RELAND: GpuMemoryBuffer: add image_xb30 capability and RGBX_1010102 BufferFormat
The original CL was reverted due to two gl_unittests_ozone failures:
EGLApiTest.DisabledExtensionBitTest
EGLApiTest.DisabledExtensionStringTest
these two tests also fail on my soraka ToT, so I think they're just
flaky. The fix is to check for GetSurfaceFactoryOzone() before using
it in HasGLOzone():
http://crrev.com/c/926862/1..3/ui/gl/init/ozone_util.h
[email protected], [email protected], [email protected], [email protected]
since the code they reviewed and LGTM'd hasn't changed.
Original CL description ------------------------------------------------
This CL adds a new Gpu FeatureInfo::FeatureFlags and command buffer
Capabilities to signal support for image_xb30, in parallel to the
existing image_xr30. The new flag is used on platforms supporting
glTexImage2D() with data format GL_RGB(A), namely >=gles3, >=gl3.3
or those with the appropriate GL extension.
This CL also adds a new GpuMemoryBuffer format RGBX_1010102 to
be used where image_xb30 is signalled.
With all this, Mac will use image_xr30 <-> BGRX_1010102, and the
GLES3+/GL3.3+ platforms will use image_xb30 <-> RGBX_1010102.
Bug: 803975, 776093, 803451, 808172
Change-Id: I8a5a047aabf08f08f6f6fa1d27196e29ddc67120
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/920361
Reviewed-by: David Reveman <[email protected]>
Reviewed-by: Robert Sesek <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Dale Curtis <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
Reviewed-by: Daniele Castagna <[email protected]>
Commit-Queue: Miguel Casas <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#537561}
Reviewed-on: https://chromium-review.googlesource.com/926862
Cr-Commit-Position: refs/heads/master@{#537893}
diff --git a/components/exo/buffer.cc b/components/exo/buffer.cc
index 5b350b21..af29a74 100644
--- a/components/exo/buffer.cc
+++ b/components/exo/buffer.cc
@@ -55,7 +55,8 @@
GL_RGB, // RGBX_8888
GL_RGBA, // RGBA_8888
GL_RGB, // BGRX_8888
- GL_RGB, // BGRX_1010102
+ GL_RGB10_A2_EXT, // BGRX_1010102
+ GL_RGB10_A2_EXT, // RGBX_1010102
GL_BGRA_EXT, // BGRA_8888
GL_RGBA, // RGBA_F16
GL_RGB_YCRCB_420_CHROMIUM, // YVU_420