diff options
author | avallee@chromium.org <avallee@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-24 01:33:11 +0000 |
---|---|---|
committer | avallee@chromium.org <avallee@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-24 01:33:11 +0000 |
commit | 3d86dd7a4ebd896a46f4c07cd7a2fbb6df726217 (patch) | |
tree | 54751d98283fefa47e68978a6a0218e1966b53b5 /cc/debug | |
parent | 938023f551e85235e39ec7a9ebbb4cd94764d9f0 (diff) | |
download | chromium_src-3d86dd7a4ebd896a46f4c07cd7a2fbb6df726217.zip chromium_src-3d86dd7a4ebd896a46f4c07cd7a2fbb6df726217.tar.gz chromium_src-3d86dd7a4ebd896a46f4c07cd7a2fbb6df726217.tar.bz2 |
Compute accurate screen space bounds for animated layers.
This walks up the layer tree transforming a layer's bounds as a box
through the different layer transforms and uses the
LayerAnimationController::AnimationBoundsForBox to transform the box at
layers which are animated.
Expansion of the box is included for filters which change the bounds,
however, the LayerAnimationController implementation is currently stubbed.
+ Added computation of animation bounds of layers in the screen space.
- Removed invalid assertion in LayerAnimationControllerTest.AnimatedBounds.
~ Renamed methods to use the uniform naming AnimationBounds.
~ Extracted LTHC::ApplySublayerTransformAboutAnchor from
LTHC::CalculateDrawPropertiesInternal.
~ Fixed LayerImpl::AsValueInto to correctly calculate bounds.
! Did not substitute implementation of ApplySublayerTransformAboutAnchor
inside CalculateDrawPropertiesInternal due to performance regression.
BUG=280375
Review URL: https://codereview.chromium.org/109193002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/debug')
-rw-r--r-- | cc/debug/debug_rect_history.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cc/debug/debug_rect_history.cc b/cc/debug/debug_rect_history.cc index 679beaf..c361603 100644 --- a/cc/debug/debug_rect_history.cc +++ b/cc/debug/debug_rect_history.cc @@ -6,6 +6,7 @@ #include "cc/base/math_util.h" #include "cc/layers/layer_impl.h" +#include "cc/layers/layer_utils.h" #include "cc/layers/render_surface_impl.h" #include "cc/trees/damage_tracker.h" #include "cc/trees/layer_tree_host.h" @@ -247,8 +248,11 @@ void DebugRectHistory::SaveLayerAnimationBoundsRects( it != end; ++it) { if (!it.represents_itself()) continue; + + // TODO(avallee): Figure out if we should show something for a layer who's + // animating bounds but that we can't compute them. gfx::BoxF inflated_bounds; - if (!(*it)->GetAnimationBounds(&inflated_bounds)) + if (!LayerUtils::GetAnimationBounds(**it, &inflated_bounds)) continue; debug_rects_.push_back(DebugRect(ANIMATION_BOUNDS_RECT_TYPE, |