summaryrefslogtreecommitdiffstats
path: root/cc/layers
diff options
context:
space:
mode:
authorvollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-13 17:11:40 +0000
committervollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-13 17:11:40 +0000
commita1286744cfb8668656c71a26a61da95a58be6e56 (patch)
tree9b2bea643b5ef2dcffa2a81fee6f003112ebbade /cc/layers
parent20bdd4a7149476bffe423950fb2ba66106e4db2d (diff)
downloadchromium_src-a1286744cfb8668656c71a26a61da95a58be6e56.zip
chromium_src-a1286744cfb8668656c71a26a61da95a58be6e56.tar.gz
chromium_src-a1286744cfb8668656c71a26a61da95a58be6e56.tar.bz2
Add animated bounds to AsValue data for a LayerImpl
BUG=None Review URL: https://codereview.chromium.org/64123007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234834 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers')
-rw-r--r--cc/layers/layer_impl.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 894daf1..72f70ed 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -22,6 +22,7 @@
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/layer_tree_settings.h"
#include "cc/trees/proxy.h"
+#include "ui/gfx/box_f.h"
#include "ui/gfx/point_conversions.h"
#include "ui/gfx/quad_f.h"
#include "ui/gfx/rect_conversions.h"
@@ -1329,6 +1330,14 @@ void LayerImpl::AsValueInto(base::DictionaryValue* state) const {
state->SetBoolean("can_use_lcd_text", can_use_lcd_text());
state->SetBoolean("contents_opaque", contents_opaque());
+
+ if (layer_animation_controller_->IsAnimatingProperty(Animation::Transform) ||
+ layer_animation_controller_->IsAnimatingProperty(Animation::Filter)) {
+ gfx::BoxF box(bounds().width(), bounds().height(), 0.f);
+ gfx::BoxF inflated;
+ if (layer_animation_controller_->AnimatedBoundsForBox(box, &inflated))
+ state->Set("animated_bounds", MathUtil::AsValue(inflated).release());
+ }
}
size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; }