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

Side by Side Diff: cc/blink/web_transform_operations_impl.cc

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: Rebase. Fix copyrights and years. Created 4 years, 10 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
« no previous file with comments | « cc/blink/web_transform_operations_impl.h ('k') | content/child/assert_matching_enums.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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 "cc/blink/web_transform_operations_impl.h"
6
7 #include <algorithm>
8
9 #include "ui/gfx/transform.h"
10
11 namespace cc_blink {
12
13 WebTransformOperationsImpl::WebTransformOperationsImpl() {
14 }
15
16 const cc::TransformOperations&
17 WebTransformOperationsImpl::AsTransformOperations() const {
18 return transform_operations_;
19 }
20
21 bool WebTransformOperationsImpl::canBlendWith(
22 const blink::WebTransformOperations& other) const {
23 const WebTransformOperationsImpl& other_impl =
24 static_cast<const WebTransformOperationsImpl&>(other);
25 return transform_operations_.CanBlendWith(other_impl.transform_operations_);
26 }
27
28 void WebTransformOperationsImpl::appendTranslate(double x, double y, double z) {
29 transform_operations_.AppendTranslate(x, y, z);
30 }
31
32 void WebTransformOperationsImpl::appendRotate(double x,
33 double y,
34 double z,
35 double degrees) {
36 transform_operations_.AppendRotate(x, y, z, degrees);
37 }
38
39 void WebTransformOperationsImpl::appendScale(double x, double y, double z) {
40 transform_operations_.AppendScale(x, y, z);
41 }
42
43 void WebTransformOperationsImpl::appendSkew(double x, double y) {
44 transform_operations_.AppendSkew(x, y);
45 }
46
47 void WebTransformOperationsImpl::appendPerspective(double depth) {
48 transform_operations_.AppendPerspective(depth);
49 }
50
51 void WebTransformOperationsImpl::appendMatrix(const SkMatrix44& matrix) {
52 gfx::Transform transform(gfx::Transform::kSkipInitialization);
53 transform.matrix() = matrix;
54 transform_operations_.AppendMatrix(transform);
55 }
56
57 void WebTransformOperationsImpl::appendIdentity() {
58 transform_operations_.AppendIdentity();
59 }
60
61 bool WebTransformOperationsImpl::isIdentity() const {
62 return transform_operations_.IsIdentity();
63 }
64
65 WebTransformOperationsImpl::~WebTransformOperationsImpl() {
66 }
67
68 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_transform_operations_impl.h ('k') | content/child/assert_matching_enums.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698