summaryrefslogtreecommitdiffstats
path: root/cc/layers/render_surface.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-04 00:54:45 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-04 00:54:45 +0000
commit30fe19ff40762f1cc3771fb705bd85a736f20515 (patch)
tree3995542f4366d5ba92a94779e33fe490ae37092b /cc/layers/render_surface.cc
parent7cdf718fc246843a381a48041c697355e314a563 (diff)
downloadchromium_src-30fe19ff40762f1cc3771fb705bd85a736f20515.zip
chromium_src-30fe19ff40762f1cc3771fb705bd85a736f20515.tar.gz
chromium_src-30fe19ff40762f1cc3771fb705bd85a736f20515.tar.bz2
cc: Allow readbacks from hidden layers.
If a layer or any of its ancestors has hide_layer_and_subtree() set to true, the layer will not be part of the compositor's output. But if we want to service a CopyOutputRequest on a layer in the hidden subtree, we need to draw it. This CL tracks visibility recursively in CalcDropProperties, so that when an output request exists in the subtree, we can avoid skipping the subtree, but make note that the layers in it are not visible (at least, until we recurse into the copy output requested layer). If a layer with an output request can not be drawn (it is clipped away/empty), then we abort the copy request and send an empty result. This is done for any remaining copy requests in the layer tree after we have taken requests that will be used and moved them onto RenderPasses. Tests: LayerTreeHostCommonTest.SubtreeHiddenWithCopyRequest LayerTreeHostCommonTest.ClippedOutCopyRequest LayerTreeHostTestAsyncReadbackInHiddenSubtree.RunSingleThread_DirectRenderer LayerTreeHostTestAsyncReadbackInHiddenSubtree.RunMultiThread_DirectRenderer_MainThreadPaint LayerTreeHostTestAsyncReadbackInHiddenSubtree.RunMultiThread_DirectRenderer_ImplSidePaint LayerTreeHostTestAsyncReadbackClippedOut.RunSingleThread_DirectRenderer LayerTreeHostTestAsyncReadbackClippedOut.RunMultiThread_DirectRenderer_MainThreadPaint LayerTreeHostTestAsyncReadbackClippedOut.RunMultiThread_DirectRenderer_ImplSidePaint LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest.RunSingleThread_DirectRenderer LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest.RunMultiThread_DirectRenderer_MainThreadPaint LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest.RunMultiThread_DirectRenderer_ImplSidePaint R=enne BUG=242572 Review URL: https://chromiumcodereview.appspot.com/17619004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210090 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/render_surface.cc')
-rw-r--r--cc/layers/render_surface.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/cc/layers/render_surface.cc b/cc/layers/render_surface.cc
index 4eb5d34..60d9cb2 100644
--- a/cc/layers/render_surface.cc
+++ b/cc/layers/render_surface.cc
@@ -17,6 +17,7 @@ RenderSurface::RenderSurface(Layer* owning_layer)
target_surface_transforms_are_animating_(false),
screen_space_transforms_are_animating_(false),
is_clipped_(false),
+ contributes_to_drawn_surface_(false),
nearest_ancestor_that_moves_pixels_(NULL) {}
RenderSurface::~RenderSurface() {}