OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_operations_impl.h" | 5 #include "webkit/compositor_bindings/web_transform_operations_impl.h" |
6 #include "webkit/compositor_bindings/web_transformation_matrix_util.h" | 6 #include "webkit/compositor_bindings/web_transformation_matrix_util.h" |
7 | 7 |
8 namespace webkit { | 8 namespace webkit { |
9 | 9 |
10 WebTransformOperationsImpl::WebTransformOperationsImpl() {} | 10 WebTransformOperationsImpl::WebTransformOperationsImpl() {} |
(...skipping 26 matching lines...) Expand all Loading... |
37 } | 37 } |
38 | 38 |
39 void WebTransformOperationsImpl::appendSkew(double x, double y) { | 39 void WebTransformOperationsImpl::appendSkew(double x, double y) { |
40 transform_operations_.AppendSkew(x, y); | 40 transform_operations_.AppendSkew(x, y); |
41 } | 41 } |
42 | 42 |
43 void WebTransformOperationsImpl::appendPerspective(double depth) { | 43 void WebTransformOperationsImpl::appendPerspective(double depth) { |
44 transform_operations_.AppendPerspective(depth); | 44 transform_operations_.AppendPerspective(depth); |
45 } | 45 } |
46 | 46 |
| 47 void WebTransformOperationsImpl::appendMatrix(const SkMatrix44& matrix) { |
| 48 gfx::Transform transform(gfx::Transform::kSkipInitialization); |
| 49 transform.matrix() = matrix; |
| 50 transform_operations_.AppendMatrix(transform); |
| 51 } |
| 52 |
47 void WebTransformOperationsImpl::appendMatrix( | 53 void WebTransformOperationsImpl::appendMatrix( |
48 const WebKit::WebTransformationMatrix& matrix) { | 54 const WebKit::WebTransformationMatrix& matrix) { |
49 transform_operations_.AppendMatrix( | 55 transform_operations_.AppendMatrix( |
50 WebTransformationMatrixUtil::ToTransform(matrix)); | 56 WebTransformationMatrixUtil::ToTransform(matrix)); |
51 } | 57 } |
52 | 58 |
53 void WebTransformOperationsImpl::appendIdentity() { | 59 void WebTransformOperationsImpl::appendIdentity() { |
54 transform_operations_.AppendIdentity(); | 60 transform_operations_.AppendIdentity(); |
55 } | 61 } |
56 | 62 |
57 bool WebTransformOperationsImpl::isIdentity() const { | 63 bool WebTransformOperationsImpl::isIdentity() const { |
58 return transform_operations_.IsIdentity(); | 64 return transform_operations_.IsIdentity(); |
59 } | 65 } |
60 | 66 |
61 WebTransformOperationsImpl::~WebTransformOperationsImpl() {} | 67 WebTransformOperationsImpl::~WebTransformOperationsImpl() {} |
62 | 68 |
63 } // namespace webkit | 69 } // namespace webkit |
OLD | NEW |