| 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/renderer/compositor_bindings/web_transform_operations_impl.h" | 5 #include "webkit/renderer/compositor_bindings/web_transform_operations_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ui/gfx/transform.h" | 9 #include "ui/gfx/transform.h" |
| 10 | 10 |
| 11 namespace webkit { | 11 namespace webkit { |
| 12 | 12 |
| 13 WebTransformOperationsImpl::WebTransformOperationsImpl() {} | 13 WebTransformOperationsImpl::WebTransformOperationsImpl() {} |
| 14 | 14 |
| 15 const cc::TransformOperations& | 15 const cc::TransformOperations& |
| 16 WebTransformOperationsImpl::AsTransformOperations() const { | 16 WebTransformOperationsImpl::AsTransformOperations() const { |
| 17 return transform_operations_; | 17 return transform_operations_; |
| 18 } | 18 } |
| 19 | 19 |
| 20 bool WebTransformOperationsImpl::canBlendWith( | 20 bool WebTransformOperationsImpl::canBlendWith( |
| 21 const WebKit::WebTransformOperations& other) const { | 21 const blink::WebTransformOperations& other) const { |
| 22 const WebTransformOperationsImpl& other_impl = | 22 const WebTransformOperationsImpl& other_impl = |
| 23 static_cast<const WebTransformOperationsImpl&>(other); | 23 static_cast<const WebTransformOperationsImpl&>(other); |
| 24 return transform_operations_.CanBlendWith(other_impl.transform_operations_); | 24 return transform_operations_.CanBlendWith(other_impl.transform_operations_); |
| 25 } | 25 } |
| 26 | 26 |
| 27 void WebTransformOperationsImpl::appendTranslate(double x, double y, double z) { | 27 void WebTransformOperationsImpl::appendTranslate(double x, double y, double z) { |
| 28 transform_operations_.AppendTranslate(x, y, z); | 28 transform_operations_.AppendTranslate(x, y, z); |
| 29 } | 29 } |
| 30 | 30 |
| 31 void WebTransformOperationsImpl::appendRotate(double x, | 31 void WebTransformOperationsImpl::appendRotate(double x, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 57 transform_operations_.AppendIdentity(); | 57 transform_operations_.AppendIdentity(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool WebTransformOperationsImpl::isIdentity() const { | 60 bool WebTransformOperationsImpl::isIdentity() const { |
| 61 return transform_operations_.IsIdentity(); | 61 return transform_operations_.IsIdentity(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 WebTransformOperationsImpl::~WebTransformOperationsImpl() {} | 64 WebTransformOperationsImpl::~WebTransformOperationsImpl() {} |
| 65 | 65 |
| 66 } // namespace webkit | 66 } // namespace webkit |
| OLD | NEW |