New issue
Advanced search Search tips

Issue 837476 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: 2
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Feature



Sign in to add a comment

SwapBuffers callback support

Project Member Reported by ericrk@chromium.org, Apr 27 2018

Issue description

Currently, various OutputSurface derived classes make use of LatencyInfoCache which generates |swap_id_| values which mirror the values generated by ImageTransportSurface in the GPU process (see https://cs.chromium.org/chromium/src/components/viz/service/display/output_surface.h?rcl=5ed4537c67e7a0e38981dbde6a3971debcedbba5&l=170).

Recent code changes will introduce additional mirrored |swap_id_|s. In order to avoid this fragile dependency, we should update SwapBuffers and related command buffer commands to take a callback which can be used to store data (such as latency info) which must be associated with a give SwapBuffers ack. Internally, the CommandBuffer could generate |swap_id_| and round-trip this value, ensuring that everything stays in sync.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 7 2018

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

commit b6b2c63d49e1d60f0ceb25beb3a3008b3881089e
Author: Eric Karl <ericrk@chromium.org>
Date: Mon May 07 22:45:04 2018

Generate Swap IDs client side and round-trip them through GPU proc

Currently we use the concept of a Swap ID in LatencyInfoCache. We want
to depend on this pattern in additional places as well.

Unfortunately, the ID used in LatencyInfoCache is loosely coupled to
the ID generated in the GPU proc - they seem to line up now, but
nothing guarantees they keep doing so.

To make this system more robust, this patch introduces client
generation of Swap IDs, which are then sent to the GPU proc and
round-tripped back to the client.

Bug:  837476 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr
Change-Id: I04f762c7f84a437b13fe1ff75abb13fc0237dc08
Reviewed-on: https://chromium-review.googlesource.com/1035536
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556588}
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/chrome/browser/android/vr/mailbox_to_surface_bridge.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/chrome/browser/android/vr/mailbox_to_surface_bridge.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/components/viz/service/display/output_surface.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/components/viz/service/display/output_surface.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/components/viz/service/display_embedder/gl_output_surface.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/components/viz/service/display_embedder/gl_output_surface.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/components/viz/service/display_embedder/skia_output_surface_impl.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/components/viz/service/display_embedder/skia_output_surface_impl.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/components/viz/service/display_embedder/viz_process_context_provider.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/components/viz/service/display_embedder/viz_process_context_provider.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/components/viz/test/test_context_support.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/components/viz/test/test_context_support.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/content/browser/compositor/gpu_browser_compositor_output_surface.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/content/browser/compositor/gpu_browser_compositor_output_surface.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/content/renderer/pepper/pepper_video_encoder_host.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/content/renderer/pepper/ppb_graphics_3d_impl.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/content/renderer/pepper/ppb_graphics_3d_impl.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/GLES2/gl2extchromium.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/context_support.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/gles2_c_lib_autogen.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/gles2_implementation.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/gles2_implementation.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/gles2_implementation_autogen.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/gles2_interface_autogen.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/gles2_interface_stub_autogen.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/gpu_control_client.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/raster_implementation.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/raster_implementation.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/client/raster_implementation_gles_unittest.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/common/gles2_cmd_format_autogen.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/gles2_cmd_buffer_functions.txt
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/command_buffer_direct.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/command_buffer_direct.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/decoder_client.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototypes.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/memory_program_cache_unittest.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/program_manager_unittest.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/raster_decoder_unittest_base.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/service/raster_decoder_unittest_base.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/tests/gl_native_gmb_backbuffer_unittest.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/gles2_conform_support/egl/context.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/client/command_buffer_proxy_impl.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/client/command_buffer_proxy_impl.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/gl_in_process_context.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/gl_in_process_context.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/in_process_command_buffer.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/in_process_command_buffer.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/service/direct_composition_surface_win_unittest.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/service/gles2_command_buffer_stub.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/service/gles2_command_buffer_stub.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/service/gpu_vsync_provider_unittest_win.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/service/image_transport_surface_delegate.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/service/image_transport_surface_overlay_mac.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/service/image_transport_surface_overlay_mac.mm
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/service/pass_through_image_transport_surface.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/service/pass_through_image_transport_surface.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/service/raster_command_buffer_stub.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/gpu/ipc/service/raster_command_buffer_stub.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/ppapi/proxy/ppb_graphics_3d_proxy.cc
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/ppapi/proxy/ppb_graphics_3d_proxy.h
[modify] https://crrev.com/b6b2c63d49e1d60f0ceb25beb3a3008b3881089e/ui/compositor/test/in_process_context_factory.cc

Comment 2 by ericrk@chromium.org, May 10 2018

Status: Fixed (was: Assigned)

Sign in to add a comment