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 WebTransformOperationsImpl::WebTransformOperationsImpl() |
| 12 : transform_operations_(new cc::TransformOperations()) { |
| 13 } |
| 14 |
| 15 const cc::TransformOperations& |
| 16 WebTransformOperationsImpl::AsTransformOperations() const { |
| 17 return *transform_operations_; |
| 18 } |
| 19 |
| 20 bool WebTransformOperationsImpl::canBlendWith( |
| 21 const WebTransformOperations& other) const { |
| 22 const WebTransformOperationsImpl& other_impl = |
| 23 static_cast<const WebTransformOperationsImpl&>(other); |
| 24 return transform_operations_->CanBlendWith(*other_impl.transform_operations_); |
| 25 } |
| 26 |
| 27 void WebTransformOperationsImpl::appendTranslate(double x, double y, double z) { |
| 28 transform_operations_->AppendTranslate(x, y, z); |
| 29 } |
| 30 |
| 31 void WebTransformOperationsImpl::appendRotate( |
| 32 double x, double y, double z, double degrees) { |
| 33 transform_operations_->AppendRotate(x, y, z, degrees); |
| 34 } |
| 35 |
| 36 void WebTransformOperationsImpl::appendScale(double x, double y, double z) { |
| 37 transform_operations_->AppendScale(x, y, z); |
| 38 } |
| 39 |
| 40 void WebTransformOperationsImpl::appendSkew(double x, double y) { |
| 41 transform_operations_->AppendSkew(x, y); |
| 42 } |
| 43 |
| 44 void WebTransformOperationsImpl::appendPerspective(double depth) { |
| 45 transform_operations_->AppendPerspective(depth); |
| 46 } |
| 47 |
| 48 void WebTransformOperationsImpl::appendMatrix( |
| 49 const WebKit::WebTransformationMatrix& matrix) { |
| 50 transform_operations_->AppendMatrix(matrix); |
| 51 } |
| 52 |
| 53 void WebTransformOperationsImpl::appendIdentity() { |
| 54 transform_operations_->AppendIdentity(); |
| 55 } |
| 56 |
| 57 bool WebTransformOperationsImpl::isIdentity() const { |
| 58 return transform_operations_->IsIdentity(); |
| 59 } |
| 60 |
| 61 WebTransformOperationsImpl::~WebTransformOperationsImpl() { |
| 62 } |
| 63 |
| 64 } // namespace WebKit |
OLD | NEW |