New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 687690 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Mar 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Chromecast: support passing content bounds to swap buffers function

Project Member Reported by halliwell@chromium.org, Feb 1 2017

Issue description

For power saving on Chromecast Ultra, want to restrict scanout to subset of graphics plane with content.  Rough steps:
* Use swap buffers with damage API for now (although it's semantically different, so should consider a new EGL extension instead)
* Create SwapWithBounds API for passing bounds through to GPU process at swap time
* Compute content bounds in compositor/overlay code (i.e. bounds of non-overlay content) and pass through when swapping
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 6 2017

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

commit 53242f17bf9b441c048511dfd2352e38326ef193
Author: halliwell <halliwell@chromium.org>
Date: Mon Feb 06 16:26:57 2017

Rename SwapBuffersWithDamage to SwapBuffersWithBounds

SwapBuffersWithDamage was added for power savings on Chromecast
(see bug), but there is a semantic mismatch: we actually want to
pass non-overlay content bounds through to graphics driver, not
damage rect.

This renames the API to SwapBuffersWithBounds and hides the misuse
of 'swap with damage' API inside GLSurfaceCast.  Will fix that
separately when we have a different EGL extension name for the API.

BUG= 687690 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

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

[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/cc/test/test_context_support.cc
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/cc/test/test_context_support.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/GLES2/gl2chromium_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/build_gles2_cmd_buffer.py
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/client/context_support.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/client/gles2_c_lib_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/client/gles2_implementation.cc
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/client/gles2_implementation.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/client/gles2_implementation_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/client/gles2_interface_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/client/gles2_interface_stub_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/cmd_buffer_functions.txt
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/common/capabilities.cc
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/common/capabilities.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/common/gles2_cmd_format_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototypes.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/command_buffer/service/gles2_cmd_decoder_unittest_4_autogen.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/ipc/common/gpu_command_buffer_traits_multi.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/ipc/service/pass_through_image_transport_surface.cc
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/gpu/ipc/service/pass_through_image_transport_surface.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/ui/gl/gl_surface.cc
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/ui/gl/gl_surface.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/ui/gl/gl_surface_egl.cc
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/ui/gl/gl_surface_egl.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/ui/gl/gl_switches.cc
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/ui/gl/gl_switches.h
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/ui/ozone/platform/cast/gl_surface_cast.cc
[modify] https://crrev.com/53242f17bf9b441c048511dfd2352e38326ef193/ui/ozone/platform/cast/gl_surface_cast.h

Project Member

Comment 2 by bugdroid1@chromium.org, Feb 22 2017

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

commit 55723a7098ece4916d203986b5f7d336a0c0a9f5
Author: halliwell <halliwell@chromium.org>
Date: Wed Feb 22 22:24:03 2017

cc: Make OutputSurfaceFrame::sub_buffer_rect optional

sub_buffer_rect is used to signal partial or empty swap, but previously
required a default value of full surface size to indicate regular
swap.  In preparation for adding swap with content bounds, clarify
the default case to not provide a value for sub_buffer_rect.

BUG= 687690 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

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

[modify] https://crrev.com/55723a7098ece4916d203986b5f7d336a0c0a9f5/cc/output/gl_renderer.cc
[modify] https://crrev.com/55723a7098ece4916d203986b5f7d336a0c0a9f5/cc/output/output_surface_frame.h
[modify] https://crrev.com/55723a7098ece4916d203986b5f7d336a0c0a9f5/cc/test/fake_output_surface.cc
[modify] https://crrev.com/55723a7098ece4916d203986b5f7d336a0c0a9f5/cc/test/fake_output_surface.h
[modify] https://crrev.com/55723a7098ece4916d203986b5f7d336a0c0a9f5/content/browser/compositor/gpu_browser_compositor_output_surface.cc
[modify] https://crrev.com/55723a7098ece4916d203986b5f7d336a0c0a9f5/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
[modify] https://crrev.com/55723a7098ece4916d203986b5f7d336a0c0a9f5/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
[modify] https://crrev.com/55723a7098ece4916d203986b5f7d336a0c0a9f5/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/55723a7098ece4916d203986b5f7d336a0c0a9f5/services/ui/surfaces/display_output_surface.cc
[modify] https://crrev.com/55723a7098ece4916d203986b5f7d336a0c0a9f5/services/ui/surfaces/display_output_surface_ozone.cc
[modify] https://crrev.com/55723a7098ece4916d203986b5f7d336a0c0a9f5/ui/compositor/test/in_process_context_factory.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Feb 28 2017

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

commit dc04cafce9b167e74e2cd98761cd0f075e187671
Author: halliwell <halliwell@chromium.org>
Date: Tue Feb 28 00:53:05 2017

Use SwapBuffersWithBounds on Chromecast

1) Compute bounds of non-transparent content in Cast overlay
strategy.
2) Pass these bounds through via swap call (SwapBuffersWithBounds)

BUG= 687690 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

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

[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/BUILD.gn
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/direct_renderer.cc
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/direct_renderer.h
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/gl_renderer.cc
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/gl_renderer.h
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/gl_renderer_unittest.cc
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/output_surface_frame.h
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/overlay_processor.cc
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/overlay_processor.h
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/overlay_strategy_fullscreen.cc
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/overlay_strategy_fullscreen.h
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/overlay_strategy_single_on_top.cc
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/overlay_strategy_single_on_top.h
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/overlay_strategy_underlay.cc
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/overlay_strategy_underlay.h
[add] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/overlay_strategy_underlay_cast.cc
[add] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/overlay_strategy_underlay_cast.h
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/cc/output/overlay_unittest.cc
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/chromecast/browser/cast_browser_main_parts.cc
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/components/display_compositor/compositor_overlay_candidate_validator_ozone.cc
[modify] https://crrev.com/dc04cafce9b167e74e2cd98761cd0f075e187671/content/browser/compositor/gpu_browser_compositor_output_surface.cc

Status: Verified (was: Untriaged)
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 25 2017

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

commit ad19ce4f06f1a12bf01780f85cef87e4e16fd8b3
Author: halliwell <halliwell@chromium.org>
Date: Sat Mar 25 01:50:18 2017

[Chromecast] Fix assert failure + add test in SwapWithBounds path

GLRenderer::SwapBuffers cannot access current_frame() - it fails
DCHECK(current_frame_valid_).  Add a test to actually exercise the
SwapWithBounds codepath in GLRenderer.

BUG= 687690 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

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

[modify] https://crrev.com/ad19ce4f06f1a12bf01780f85cef87e4e16fd8b3/cc/output/gl_renderer.cc
[modify] https://crrev.com/ad19ce4f06f1a12bf01780f85cef87e4e16fd8b3/cc/output/gl_renderer.h
[modify] https://crrev.com/ad19ce4f06f1a12bf01780f85cef87e4e16fd8b3/cc/output/gl_renderer_unittest.cc
[modify] https://crrev.com/ad19ce4f06f1a12bf01780f85cef87e4e16fd8b3/cc/test/test_web_graphics_context_3d.h

Sign in to add a comment