summaryrefslogtreecommitdiffstats
path: root/cc/trees/draw_property_utils.h
diff options
context:
space:
mode:
authorjaydasika <jaydasika@chromium.org>2015-08-20 22:39:42 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-21 05:40:29 +0000
commit7ba8f92dbe796429ecfd1ce6a9482197f13a06aa (patch)
tree8281387cb5bd79540c41893329a084afc6adf4e4 /cc/trees/draw_property_utils.h
parent1b09bd614c0387158777f703cdb675384a35add3 (diff)
downloadchromium_src-7ba8f92dbe796429ecfd1ce6a9482197f13a06aa.zip
chromium_src-7ba8f92dbe796429ecfd1ce6a9482197f13a06aa.tar.gz
chromium_src-7ba8f92dbe796429ecfd1ce6a9482197f13a06aa.tar.bz2
Render Surface Content Rect from property trees
The content rect of a render surface is the union of drawable content rects of all layers that draw into it intersected with the clip rect of render surface if it is clipped. As the layer tree will be gone post slimming paint v2, calculating the content rects by walking the layer tree is not a good idea. Also, the content rect is required in CalculateRenderSurfaceLayerList, so we can't do the computation after this function seperately. So, the content rect computation is in CalculateRenderSurfaceLayerList function itself and is computed for the surface before it is used by the function. CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1291283007 Cr-Commit-Position: refs/heads/master@{#344683}
Diffstat (limited to 'cc/trees/draw_property_utils.h')
-rw-r--r--cc/trees/draw_property_utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/cc/trees/draw_property_utils.h b/cc/trees/draw_property_utils.h
index ef7f667..097b5a4 100644
--- a/cc/trees/draw_property_utils.h
+++ b/cc/trees/draw_property_utils.h
@@ -129,6 +129,10 @@ CanUseLcdTextFromPropertyTrees(const LayerImpl* layer,
bool can_use_lcd_text,
PropertyTrees* property_trees);
+gfx::Rect CC_EXPORT DrawableContentRectOfSurfaceFromPropertyTrees(
+ const RenderSurfaceImpl* render_surface,
+ const TransformTree& transform_tree);
+
gfx::Rect CC_EXPORT
DrawableContentRectFromPropertyTrees(const LayerImpl* layer,
const TransformTree& transform_tree);
@@ -136,6 +140,9 @@ DrawableContentRectFromPropertyTrees(const LayerImpl* layer,
gfx::Rect CC_EXPORT
ClipRectFromPropertyTrees(const LayerImpl* layer,
const TransformTree& transform_tree);
+
+gfx::Rect CC_EXPORT ViewportRectFromPropertyTrees(const ClipTree& tree);
+
} // namespace cc
#endif // CC_TREES_DRAW_PROPERTY_UTILS_H_