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

Unified Diff: cc/test/animation_test_common.cc

Issue 11644004: Only create instances of WebTransformOperations using cc::TransformOperations::Create (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase, and fix WebTransformAnimationCurveImpl Created 8 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
Index: cc/test/animation_test_common.cc
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
index 258a266d25eae055f355a080a3ab768fd8bfd76b..a6964d710291138c4fe7c87ece5e0e80ee2264d2 100644
--- a/cc/test/animation_test_common.cc
+++ b/cc/test/animation_test_common.cc
@@ -8,6 +8,7 @@
#include "cc/layer.h"
#include "cc/layer_animation_controller.h"
#include "cc/layer_impl.h"
+#include "cc/transform_operations.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebTransformOperations.h"
using cc::ActiveAnimation;
@@ -50,14 +51,16 @@ int addAnimatedTransform(Target& target, double duration, int deltaX, int deltaY
scoped_ptr<KeyframedTransformAnimationCurve> curve(KeyframedTransformAnimationCurve::create());
if (duration > 0) {
- WebKit::WebTransformOperations startOperations;
- startOperations.appendTranslate(deltaX, deltaY, 0);
- curve->addKeyframe(TransformKeyframe::create(0, startOperations, scoped_ptr<cc::TimingFunction>()));
+ scoped_ptr<WebKit::WebTransformOperations> startOperations(
+ TransformOperations::Create());
+ startOperations->appendTranslate(deltaX, deltaY, 0);
+ curve->addKeyframe(TransformKeyframe::create(0, *startOperations, scoped_ptr<cc::TimingFunction>()));
}
- WebKit::WebTransformOperations operations;
- operations.appendTranslate(deltaX, deltaY, 0);
- curve->addKeyframe(TransformKeyframe::create(duration, operations, scoped_ptr<cc::TimingFunction>()));
+ scoped_ptr<WebKit::WebTransformOperations> operations(
+ TransformOperations::Create());
+ operations->appendTranslate(deltaX, deltaY, 0);
+ curve->addKeyframe(TransformKeyframe::create(duration, *operations, scoped_ptr<cc::TimingFunction>()));
int id = nextAnimationId++;

Powered by Google App Engine
This is Rietveld 408576698