Allow creating GLImage-backed textures with glTexStorage2D.

Desktop / Chromium - jbauman [chromium.org] - 10 August 2017 02:02 EDT

Add a GL_TEXTURE_BUFFER_USAGE_CHROMIUM TexParameter that can be specified before glTexStorage2D so it will create a texture that's backed by an anonymous GLImage. The compositor will use this for raster buffers that are drawn into using the GPU rasterizer (and thus don't need to be mapped) and are used with overlays. This will save a synchronous IPC through the browser into the GPU I/O thread when creating them.

BUG= 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

Review-Url: https://codereview.chromium.org/2945673002 Cr-Commit-Position: refs/heads/master@{#493302}

5b05b90 Allow creating GLImage-backed textures with glTexStorage2D.
cc/resources/resource_provider.cc | 45 ++++++--
cc/resources/resource_provider.h | 4 +-
cc/resources/resource_provider_unittest.cc | 69 ++++++++++-
cc/test/test_web_graphics_context_3d.h | 3 +
.../CHROMIUM/CHROMIUM_texture_buffer.txt | 128 +++++++++++++++++++++
gpu/GLES2/gl2extchromium.h | 8 ++
gpu/command_buffer/build_gles2_cmd_buffer.py | 8 ++
gpu/command_buffer/common/capabilities.h | 3 +
.../common/gles2_cmd_utils_autogen.h | 1 +
.../gles2_cmd_utils_implementation_autogen.h | 16 +++
gpu/command_buffer/service/feature_info.cc | 6 +
gpu/command_buffer/service/feature_info.h | 1 +
gpu/command_buffer/service/gles2_cmd_decoder.cc | 67 ++++++++++-
.../service/gles2_cmd_validation_autogen.h | 6 +
.../gles2_cmd_validation_implementation_autogen.h | 10 ++
gpu/command_buffer/service/image_factory.cc | 1 +
gpu/command_buffer/service/image_factory.h | 1 +
gpu/command_buffer/service/texture_manager.cc | 11 +-
gpu/command_buffer/service/texture_manager.h | 3 +
.../tests/gl_texture_storage_unittest.cc | 23 ++++
gpu/command_buffer/tests/texture_image_factory.cc | 1 +
gpu/command_buffer/tests/texture_image_factory.h | 1 +
gpu/ipc/common/gpu_command_buffer_traits_multi.h | 1 +
.../gpu_memory_buffer_factory_io_surface.cc | 7 +-
.../service/gpu_memory_buffer_factory_io_surface.h | 1 +
.../gpu_memory_buffer_factory_native_pixmap.cc | 9 +-
.../gpu_memory_buffer_factory_native_pixmap.h | 1 +
ui/gl/gl_bindings.h | 4 +
ui/gl/gl_image.cc | 4 +
ui/gl/gl_image.h | 6 +-
ui/gl/gl_image_io_surface.h | 1 +
ui/gl/gl_image_io_surface.mm | 20 ++++
32 files changed, 440 insertions(+), 30 deletions(-)

Upstream: git.chromium.org


  • Share