From 42485ac75b825f1eb30132fa5341985ade5b1eb5 Mon Sep 17 00:00:00 2001 From: "dongseong.hwang" Date: Wed, 27 Aug 2014 10:18:18 -0700 Subject: gpu: support immutable texture on Linux Mesa driver and GLES3. Mesa GL driver supports GL_ARB_texture_storage extensions, not GL_EXT_texture_storage. GLES3 supports glTexStroage2D by default. GLES3 doesn't support BGRA format for immutable texture without GL_APPLE_texture_format_bgra8888 extension. We prefer BGRA support to immutable texture support, so GLES3 enables immutable texture only if it supports GL_APPLE_texture_format_bgra8888. In addition, currently the compositor blindly uses BGRA on glTexStorage2D. It can cause a potential bug so this CL checks BGRA format support to use BGRA on glTexStorage2D. This CL makes Intel GPU (e.g. Intel Chromebook) and GLES3 devices with GL_APPLE_texture_format_bgra8888 extension take advantage of immutable texture. BUG=407034 Review URL: https://codereview.chromium.org/499283002 Cr-Commit-Position: refs/heads/master@{#292175} --- cc/test/test_web_graphics_context_3d.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cc/test') diff --git a/cc/test/test_web_graphics_context_3d.h b/cc/test/test_web_graphics_context_3d.h index a7d5e0b..e33c07a 100644 --- a/cc/test/test_web_graphics_context_3d.h +++ b/cc/test/test_web_graphics_context_3d.h @@ -304,6 +304,9 @@ class TestWebGraphicsContext3D { void set_support_compressed_texture_etc1(bool support) { test_capabilities_.gpu.texture_format_etc1 = support; } + void set_support_texture_format_bgra8888(bool support) { + test_capabilities_.gpu.texture_format_bgra8888 = support; + } void set_support_texture_storage(bool support) { test_capabilities_.gpu.texture_storage = support; } -- cgit v1.1