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

Issue 806375 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocking:
issue 806366



Sign in to add a comment

Migrate CopyOutputRequests on Layers to execute in VIZ services

Project Member Reported by m...@chromium.org, Jan 26 2018

Issue description

Currently, there are a number of use cases where CopyOutputRequests are made to get "snapshots" of arbitrary Layers in the layer tree. Note that this is NOT the same thing as surface video capture. Such CopyOutputRequests are needed to support features like screenshots on CrOS (see  bug 706246 ), the screenshot extension API, the Android tab switcher UI, and the New Tab Page thumbnails, among others. Therefore, this is VIZ launch blocking!

This issue is blocking "Option 3C" discussed in  bug 806366 .

Successful resolution of this bug means that, when --enable-features=VizDisplayCompositor is used on ChromeOS, CTRL-F5 on the desktop will successfully capture a screenshot.
 

Comment 1 by m...@chromium.org, Jan 26 2018

Cc: sadrul@chromium.org sky@chromium.org anicolao@chromium.org danakj@chromium.org gklassen@chromium.org yiyix@chromium.org fsam...@chromium.org
+cc folks for awareness.

Comment 3 by m...@chromium.org, Feb 7 2018

Components: Internals>Media>ScreenCapture
Project Member

Comment 4 by bugdroid1@chromium.org, Feb 8 2018

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

commit 483530c1094f0ad6fe36663262b484be300f472e
Author: Yuri Wiitala <miu@chromium.org>
Date: Thu Feb 08 07:17:34 2018

Layer CopyOutputRequests execute in VIZ service.

Implements the final missing pieces allowing CopyOutputRequests made on
Layers to propagate and execute in the VIZ display compositor:

1. Added missing mojo fields and struct traits for viz::CopyOutputRequest
and viz::RenderPass.

2. Added extra transform code to cc::EffectTree::TakeCRsAndTransform()
to account for the scaling ratio, not just the source area.

3. Updated DelegatedFrameHost::CopyFromCompositingSurface() to use the
new scaling APIs, enabling testing and otherwise proving that all "the
plumbing" is in-place.

4. Updated RenderWidgetHostViewBrowserTests so that they now work with
--enabled-features=VizDisplayCompositor. (And, disabled dead tests I did
not feel we should bother updating; to be removed in a later change.)

5. Added privilege checks to make sure CopyOutputRequests cannot be made
from unprivileged clients. Added new RWHostImpl browser test to confirm.

Testing (all with and without --enable-features=VizDisplayCompositor):

1. All RenderWidgetHostViewBrowserTest content_browsertests pass.

2. On CrOS Ash desktop, tested CTRL-F5 (full screenshot) and
SHIFT-CTRL-F5 (partial screenshot).

3. On Linux, confirmed chrome.captureVisibleTab() screenshot API works
via the common/extensions/docs/examples/api/tabs/screenshot demo
extension.

Bug:  806375 ,  806366 ,  759310 ,  771354 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I98ad6cd90f332318dbdea9449e5d9c3a31679114
Reviewed-on: https://chromium-review.googlesource.com/890339
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535325}
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/cc/trees/property_tree.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/components/viz/common/quads/compositor_frame.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/components/viz/common/quads/compositor_frame.h
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/components/viz/common/quads/render_pass.h
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/components/viz/service/display/surface_aggregator_unittest.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/components/viz/service/frame_sinks/compositor_frame_sink_impl.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/components/viz/service/frame_sinks/compositor_frame_sink_support.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/components/viz/service/frame_sinks/compositor_frame_sink_support.h
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/components/viz/test/test_layer_tree_frame_sink.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/content/browser/bad_message.h
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/content/browser/renderer_host/delegated_frame_host.cc
[add] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/content/browser/renderer_host/render_widget_host_browsertest.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/content/browser/renderer_host/render_widget_host_view_browsertest.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/content/test/BUILD.gn
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/services/viz/public/cpp/compositing/copy_output_request_struct_traits.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/services/viz/public/cpp/compositing/copy_output_request_struct_traits.h
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/services/viz/public/cpp/compositing/render_pass_struct_traits.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/services/viz/public/cpp/compositing/render_pass_struct_traits.h
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/services/viz/public/cpp/compositing/struct_traits_unittest.cc
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/services/viz/public/interfaces/compositing/copy_output_request.mojom
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/services/viz/public/interfaces/compositing/render_pass.mojom
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/testing/buildbot/filters/viz.content_browsertests.filter
[modify] https://crrev.com/483530c1094f0ad6fe36663262b484be300f472e/tools/metrics/histograms/enums.xml

Comment 5 by m...@chromium.org, Feb 14 2018

Status: Fixed (was: Started)

Sign in to add a comment