Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: ui/compositor/test/test_layer_animation_delegate.cc

Issue 1531913003: CC Animations: Make ui::LayerAnimator a LayerAnimationEventObserver (instead of ui::Layer) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix LayerAnimator::SetDelegate Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/test/test_layer_animation_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/test_layer_animation_delegate.cc
diff --git a/ui/compositor/test/test_layer_animation_delegate.cc b/ui/compositor/test/test_layer_animation_delegate.cc
index e6053d6765d04c90f5fa4a36023978500ae18610..140e81eaec53fb49758456371f3db2d505c5095d 100644
--- a/ui/compositor/test/test_layer_animation_delegate.cc
+++ b/ui/compositor/test/test_layer_animation_delegate.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "ui/compositor/layer.h"
#include "ui/compositor/test/test_layer_animation_delegate.h"
namespace ui {
@@ -12,6 +13,7 @@ TestLayerAnimationDelegate::TestLayerAnimationDelegate()
brightness_(0.0f),
grayscale_(0.0f),
color_(SK_ColorBLACK) {
+ CreateCcLayer();
}
TestLayerAnimationDelegate::TestLayerAnimationDelegate(
@@ -21,6 +23,7 @@ TestLayerAnimationDelegate::TestLayerAnimationDelegate(
opacity_(other.GetOpacityForAnimation()),
visibility_(other.GetVisibilityForAnimation()),
color_(SK_ColorBLACK) {
+ CreateCcLayer();
}
TestLayerAnimationDelegate::~TestLayerAnimationDelegate() {
@@ -103,4 +106,12 @@ TestLayerAnimationDelegate::GetLayerAnimatorCollection() {
return NULL;
}
+cc::Layer* TestLayerAnimationDelegate::GetCcLayer() const {
+ return cc_layer_.get();
+}
+
+void TestLayerAnimationDelegate::CreateCcLayer() {
+ cc_layer_ = cc::Layer::Create(ui::Layer::UILayerSettings());
+}
+
} // namespace ui
« no previous file with comments | « ui/compositor/test/test_layer_animation_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698