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

Side by Side Diff: webkit/compositor_bindings/web_transform_animation_curve_impl.cc

Issue 12035029: Finish migrating cc/ from WebKit::WebTransformationMatrix to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix nits Created 7 years, 11 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/compositor_bindings/web_transform_animation_curve_impl.h" 5 #include "webkit/compositor_bindings/web_transform_animation_curve_impl.h"
6 6
7 #include "cc/keyframed_animation_curve.h" 7 #include "cc/keyframed_animation_curve.h"
8 #include "cc/timing_function.h" 8 #include "cc/timing_function.h"
9 #include "cc/transform_operations.h" 9 #include "cc/transform_operations.h"
10 #include "webkit/compositor_bindings/web_animation_curve_common.h" 10 #include "webkit/compositor_bindings/web_animation_curve_common.h"
11 #include "webkit/compositor_bindings/web_transform_operations_impl.h" 11 #include "webkit/compositor_bindings/web_transform_operations_impl.h"
12 #include "webkit/compositor_bindings/web_transformation_matrix_util.h"
12 13
13 namespace WebKit { 14 namespace WebKit {
14 15
15 WebTransformAnimationCurveImpl::WebTransformAnimationCurveImpl() 16 WebTransformAnimationCurveImpl::WebTransformAnimationCurveImpl()
16 : m_curve(cc::KeyframedTransformAnimationCurve::create()) 17 : m_curve(cc::KeyframedTransformAnimationCurve::create())
17 { 18 {
18 } 19 }
19 20
20 WebTransformAnimationCurveImpl::~WebTransformAnimationCurveImpl() 21 WebTransformAnimationCurveImpl::~WebTransformAnimationCurveImpl()
21 { 22 {
(...skipping 18 matching lines...) Expand all
40 41
41 void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, d ouble x1, double y1, double x2, double y2) 42 void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, d ouble x1, double y1, double x2, double y2)
42 { 43 {
43 const cc::TransformOperations& transformOperations = 44 const cc::TransformOperations& transformOperations =
44 static_cast<const webkit::WebTransformOperationsImpl&>(keyframe.value()) .AsTransformOperations(); 45 static_cast<const webkit::WebTransformOperationsImpl&>(keyframe.value()) .AsTransformOperations();
45 m_curve->addKeyframe(cc::TransformKeyframe::create(keyframe.time(), transfor mOperations, cc::CubicBezierTimingFunction::create(x1, y1, x2, y2).PassAs<cc::Ti mingFunction>())); 46 m_curve->addKeyframe(cc::TransformKeyframe::create(keyframe.time(), transfor mOperations, cc::CubicBezierTimingFunction::create(x1, y1, x2, y2).PassAs<cc::Ti mingFunction>()));
46 } 47 }
47 48
48 WebTransformationMatrix WebTransformAnimationCurveImpl::getValue(double time) co nst 49 WebTransformationMatrix WebTransformAnimationCurveImpl::getValue(double time) co nst
49 { 50 {
50 return m_curve->getValue(time); 51 return webkit::WebTransformationMatrixUtil::ToWebTransformationMatrix(m_curv e->getValue(time));
51 } 52 }
52 53
53 scoped_ptr<cc::AnimationCurve> WebTransformAnimationCurveImpl::cloneToAnimationC urve() const 54 scoped_ptr<cc::AnimationCurve> WebTransformAnimationCurveImpl::cloneToAnimationC urve() const
54 { 55 {
55 return m_curve->clone(); 56 return m_curve->clone();
56 } 57 }
57 58
58 } // namespace WebKit 59 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/web_layer_impl.cc ('k') | webkit/compositor_bindings/web_transform_operations_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698