New issue
Advanced search Search tips

Issue 768108 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug

Blocking:
issue 806133



Sign in to add a comment

Create GMB backed compositor textures service side

Project Member Reported by sunn...@chromium.org, Sep 23 2017

Issue description

Textures which are only used for GL and scanout can be created service side, eliminating costly sync IPC for creating the GMB in the renderer and async IPC for associating the GMB handle with a GLImage.

jbauman's CL (20bcdb14c7a6f0801522d23693f530d4f224d727) was reverted because of memory tracking issues. I have a CL ready for review that incorporates piman's feedback.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/97e66d17000891e7ec8c594691cf092d0fdf27f1

commit 97e66d17000891e7ec8c594691cf092d0fdf27f1
Author: Sunny Sachanandani <sunnyps@chromium.org>
Date: Sat Oct 14 04:36:07 2017

gpu: Add CHROMIUM_texture_storage_image extension.

TexStorage2DImageCHROMIUM allows allocating GpuMemoryBuffer storage for
scanout textures in the GPU process. This eliminates a round-trip IPC in
the renderer for creating the GMB and another IPC for associating the
GMB with a GLImage in the GPU process.

Also expand the list of formats supported for scanout by IO surfaces so
that we can cover all formats we encounter today.

BUG= 768108 
R=piman

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
Change-Id: Ieb2dc0a9ffb29a067fa474973c4784fd574d8d90
Reviewed-on: https://chromium-review.googlesource.com/625064
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508927}
[add] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_texture_storage_image.txt
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/GLES2/gl2chromium_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/GLES2/gl2extchromium.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/build_gles2_cmd_buffer.py
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/client/gles2_c_lib_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/client/gles2_implementation_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/client/gles2_interface_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/client/gles2_interface_stub_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/cmd_buffer_functions.txt
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/common/capabilities.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/common/gles2_cmd_format_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/common/gles2_cmd_utils_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/service/feature_info.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototypes.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/service/image_factory.cc
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/service/image_factory.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/tests/gl_texture_storage_unittest.cc
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/tests/texture_image_factory.cc
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/command_buffer/tests/texture_image_factory.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/ipc/common/gpu_command_buffer_traits_multi.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/ipc/common/gpu_memory_buffer_support.cc
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/ipc/service/gpu_memory_buffer_factory_io_surface.cc
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/ipc/service/gpu_memory_buffer_factory_native_pixmap.cc
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/gpu/ipc/service/gpu_memory_buffer_factory_native_pixmap.h
[modify] https://crrev.com/97e66d17000891e7ec8c594691cf092d0fdf27f1/ui/gl/gl_bindings.h

Project Member

Comment 2 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/88353d21b37f03d0ddf67dd5cb51e6b8592c107a

commit 88353d21b37f03d0ddf67dd5cb51e6b8592c107a
Author: Sunny Sachanandani <sunnyps@chromium.org>
Date: Thu Oct 26 01:52:24 2017

gpu: GL_CHROMIUM_color_space_metadata extension.

Rename SetColorSpaceForScanout to SetColorSpaceMetadata. This was used
for DirectCompositon overlays but not documented, so document it.
Implement it for IO surfaces. This will be used to set the color space
for textures backed by service side anonymous GpuMemoryBuffers.

R=piman,reveman,ccameron
BUG= 768108 

Cq-Include-Trybots: 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
Change-Id: I7248bb582513f604aa67a0c20190bf5f9e458062
Reviewed-on: https://chromium-review.googlesource.com/714647
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Chris Watkins <watk@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511690}
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/components/viz/service/display/gl_renderer.cc
[add] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_color_space_metadata.txt
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_texture_storage_image.txt
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/GLES2/gl2chromium_autogen.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/GLES2/gl2extchromium.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/build_gles2_cmd_buffer.py
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/client/gles2_c_lib_autogen.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/client/gles2_implementation.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/client/gles2_implementation_autogen.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/client/gles2_interface_autogen.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/client/gles2_interface_stub_autogen.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/cmd_buffer_functions.txt
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/service/gl_stream_texture_image.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/service/texture_definition.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/service/texture_manager_unittest.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/command_buffer/tests/texture_image_factory.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/ipc/client/gpu_memory_buffer_impl_io_surface.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/ipc/service/direct_composition_surface_win.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/ipc/service/direct_composition_surface_win_unittest.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/gpu/ipc/service/stream_texture_android.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/media/gpu/android/avda_codec_image.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/media/gpu/android/codec_image.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/media/gpu/dxva_picture_buffer_win.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gfx/BUILD.gn
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gfx/mac/io_surface.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gfx/mac/io_surface.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image_dxgi.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image_dxgi.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image_egl.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image_egl.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image_glx.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image_io_surface.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image_io_surface.mm
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image_memory.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image_native_pixmap.cc
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image_native_pixmap.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image_stub.h
[modify] https://crrev.com/88353d21b37f03d0ddf67dd5cb51e6b8592c107a/ui/gl/gl_image_surface_texture.h

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d2e9756d46f6a324a1e98d3553eb045556a5f4af

commit d2e9756d46f6a324a1e98d3553eb045556a5f4af
Author: Sunny Sachanandani <sunnyps@chromium.org>
Date: Mon Oct 30 20:45:44 2017

cc: Use CHROMIUM_texture_storage_image for GMB backed texture resources.

Use TexStorage2DImageCHROMIUM to allocate service side anonymous
GpuMemoryBuffers instead of allocating GMBs client side. Add a new
texture hint that can be used to allocate textures this way, and use it
for overlay resources in GLRenderer.

R=piman,ccameron
BUG= 768108 

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
Change-Id: I1564dcb4d444b0b9c77e0486f38fd7ddea3da351
Reviewed-on: https://chromium-review.googlesource.com/714654
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512615}
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/raster/raster_buffer_provider_unittest.cc
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/resources/display_resource_provider.cc
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/resources/layer_tree_resource_provider.cc
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/resources/resource_provider.cc
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/resources/resource_provider.h
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/resources/resource_provider_unittest.cc
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/test/layer_test_common.cc
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/test/layer_tree_pixel_resource_test.cc
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/test/layer_tree_pixel_resource_test.h
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/test/test_gles2_interface.cc
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/test/test_gles2_interface.h
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/test/test_web_graphics_context_3d.h
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/trees/layer_tree_host_pixeltest_blending.cc
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/cc/trees/layer_tree_host_pixeltest_masks.cc
[modify] https://crrev.com/d2e9756d46f6a324a1e98d3553eb045556a5f4af/components/viz/service/display/gl_renderer.cc

Status: Fixed (was: Started)

Comment 5 by kbr@chromium.org, Jan 26 2018

Blocking: 806133

Sign in to add a comment