summaryrefslogtreecommitdiffstats
path: root/cc/test/test_web_graphics_context_3d.h
diff options
context:
space:
mode:
authordongseong.hwang <dongseong.hwang@intel.com>2014-08-27 10:18:18 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-27 17:25:44 +0000
commit42485ac75b825f1eb30132fa5341985ade5b1eb5 (patch)
treeccf0b95f23776995367e7d10d99e546249e2e262 /cc/test/test_web_graphics_context_3d.h
parent82fd6e6f80b2e35a1ace01dd25d4a8dcc40b4d75 (diff)
downloadchromium_src-42485ac75b825f1eb30132fa5341985ade5b1eb5.zip
chromium_src-42485ac75b825f1eb30132fa5341985ade5b1eb5.tar.gz
chromium_src-42485ac75b825f1eb30132fa5341985ade5b1eb5.tar.bz2
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}
Diffstat (limited to 'cc/test/test_web_graphics_context_3d.h')
-rw-r--r--cc/test/test_web_graphics_context_3d.h3
1 files changed, 3 insertions, 0 deletions
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;
}