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

Side by Side Diff: third_party/WebKit/Source/platform/animation/WebTransformOperations.cpp

Issue 1616653002: CC Animation: Move files from cc_blink to Source/platform/animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "platform/animation/WebTransformOperations.h"
6
7 #include "ui/gfx/transform.h"
8 #include <algorithm>
9
10 namespace blink {
11
12 WebTransformOperations::WebTransformOperations()
13 {
14 }
15
16 const cc::TransformOperations&
17 WebTransformOperations::AsTransformOperations() const
18 {
19 return m_transformOperations;
20 }
21
22 bool WebTransformOperations::canBlendWith(const blink::WebTransformOperations& o ther) const
23 {
24 const WebTransformOperations& otherImpl = static_cast<const WebTransformOper ations&>(other);
25 return m_transformOperations.CanBlendWith(otherImpl.m_transformOperations);
26 }
27
28 void WebTransformOperations::appendTranslate(double x, double y, double z)
29 {
30 m_transformOperations.AppendTranslate(x, y, z);
31 }
32
33 void WebTransformOperations::appendRotate(double x,
34 double y,
35 double z,
36 double degrees)
37 {
38 m_transformOperations.AppendRotate(x, y, z, degrees);
39 }
40
41 void WebTransformOperations::appendScale(double x, double y, double z)
42 {
43 m_transformOperations.AppendScale(x, y, z);
44 }
45
46 void WebTransformOperations::appendSkew(double x, double y)
47 {
48 m_transformOperations.AppendSkew(x, y);
49 }
50
51 void WebTransformOperations::appendPerspective(double depth)
52 {
53 m_transformOperations.AppendPerspective(depth);
54 }
55
56 void WebTransformOperations::appendMatrix(const SkMatrix44& matrix)
57 {
58 gfx::Transform transform(gfx::Transform::kSkipInitialization);
59 transform.matrix() = matrix;
60 m_transformOperations.AppendMatrix(transform);
61 }
62
63 void WebTransformOperations::appendIdentity()
64 {
65 m_transformOperations.AppendIdentity();
66 }
67
68 bool WebTransformOperations::isIdentity() const
69 {
70 return m_transformOperations.IsIdentity();
71 }
72
73 WebTransformOperations::~WebTransformOperations()
74 {
75 }
76
77 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698