diff options
author | ajuma <ajuma@chromium.org> | 2015-04-10 11:30:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-10 18:30:50 +0000 |
commit | 3ae2b258d39e00f11212167be326b5a6a78d3793 (patch) | |
tree | 6773f940aa31e55c94b53dae6101890e498650ba /cc/trees/property_tree.h | |
parent | a075b8261259bab1eb89ddefeae8da4754dddecd (diff) | |
download | chromium_src-3ae2b258d39e00f11212167be326b5a6a78d3793.zip chromium_src-3ae2b258d39e00f11212167be326b5a6a78d3793.tar.gz chromium_src-3ae2b258d39e00f11212167be326b5a6a78d3793.tar.bz2 |
cc: Re-use transforms from transform nodes when computing visible rects
This makes CalculateVisibleRects try to re-use the to_target and
from_target transforms stored in transform nodes whenever it needs to
compute a transform. Since these baked transforms incorporate the
target's sublayer scale, the fallback path now also includes sublayer
scale for consistency.
Testing locally on a z620, this improves property tree computation time
by 25% on rAF-driven poster circle.
BUG=474725
Review URL: https://codereview.chromium.org/1060413002
Cr-Commit-Position: refs/heads/master@{#324671}
Diffstat (limited to 'cc/trees/property_tree.h')
-rw-r--r-- | cc/trees/property_tree.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cc/trees/property_tree.h b/cc/trees/property_tree.h index f4351ba..43dcda5 100644 --- a/cc/trees/property_tree.h +++ b/cc/trees/property_tree.h @@ -153,6 +153,23 @@ class CC_EXPORT TransformTree final : public PropertyTree<TransformNode> { int dest_id, gfx::Transform* transform) const; + // Computes the change of basis transform from node |source_id| to |dest_id|, + // including any sublayer scale at |dest_id|. The function returns false iff + // the inverse of a singular transform was used (and the result should, + // therefore, not be trusted). + bool ComputeTransformWithDestinationSublayerScale( + int source_id, + int dest_id, + gfx::Transform* transform) const; + + // Computes the change of basis transform from node |source_id| to |dest_id|, + // including any sublayer scale at |source_id|. The function returns false + // iff the inverse of a singular transform was used (and the result should, + // therefore, not be trusted). + bool ComputeTransformWithSourceSublayerScale(int source_id, + int dest_id, + gfx::Transform* transform) const; + // Returns true iff the nodes indexed by |source_id| and |dest_id| are 2D axis // aligned with respect to one another. bool Are2DAxisAligned(int source_id, int dest_id) const; |