OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "webkit/compositor_bindings/web_transform_operations_impl.h" |
| 6 |
| 7 #include "cc/transform_operations.h" |
| 8 |
| 9 namespace WebKit { |
| 10 |
| 11 #if WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL |
| 12 WebTransformOperationsImpl::WebTransformOperationsImpl() |
| 13 : transform_operations_(new cc::TransformOperations()) { |
| 14 } |
| 15 |
| 16 const cc::TransformOperations& |
| 17 WebTransformOperationsImpl::AsTransformOperations() const { |
| 18 return *transform_operations_; |
| 19 } |
| 20 |
| 21 bool WebTransformOperationsImpl::canBlendWith( |
| 22 const 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( |
| 33 double x, double y, double z, double degrees) { |
| 34 transform_operations_->AppendRotate(x, y, z, degrees); |
| 35 } |
| 36 |
| 37 void WebTransformOperationsImpl::appendScale(double x, double y, double z) { |
| 38 transform_operations_->AppendScale(x, y, z); |
| 39 } |
| 40 |
| 41 void WebTransformOperationsImpl::appendSkew(double x, double y) { |
| 42 transform_operations_->AppendSkew(x, y); |
| 43 } |
| 44 |
| 45 void WebTransformOperationsImpl::appendPerspective(double depth) { |
| 46 transform_operations_->AppendPerspective(depth); |
| 47 } |
| 48 |
| 49 void WebTransformOperationsImpl::appendMatrix( |
| 50 const WebKit::WebTransformationMatrix& matrix) { |
| 51 transform_operations_->AppendMatrix(matrix); |
| 52 } |
| 53 |
| 54 void WebTransformOperationsImpl::appendIdentity() { |
| 55 transform_operations_->AppendIdentity(); |
| 56 } |
| 57 |
| 58 bool WebTransformOperationsImpl::isIdentity() const { |
| 59 return transform_operations_->IsIdentity(); |
| 60 } |
| 61 |
| 62 WebTransformOperationsImpl::~WebTransformOperationsImpl() { |
| 63 } |
| 64 #endif // WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL |
| 65 |
| 66 } // namespace WebKit |
OLD | NEW |