| Index: third_party/WebKit/Source/platform/animation/WebTransformOperations.cpp
|
| diff --git a/third_party/WebKit/Source/platform/animation/WebTransformOperations.cpp b/third_party/WebKit/Source/platform/animation/WebTransformOperations.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ef8e1b828aa11cf04569a605e6b3d51d1dfc874d
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/animation/WebTransformOperations.cpp
|
| @@ -0,0 +1,77 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "platform/animation/WebTransformOperations.h"
|
| +
|
| +#include "ui/gfx/transform.h"
|
| +#include <algorithm>
|
| +
|
| +namespace blink {
|
| +
|
| +WebTransformOperations::WebTransformOperations()
|
| +{
|
| +}
|
| +
|
| +const cc::TransformOperations&
|
| +WebTransformOperations::AsTransformOperations() const
|
| +{
|
| + return m_transformOperations;
|
| +}
|
| +
|
| +bool WebTransformOperations::canBlendWith(const blink::WebTransformOperations& other) const
|
| +{
|
| + const WebTransformOperations& otherImpl = static_cast<const WebTransformOperations&>(other);
|
| + return m_transformOperations.CanBlendWith(otherImpl.m_transformOperations);
|
| +}
|
| +
|
| +void WebTransformOperations::appendTranslate(double x, double y, double z)
|
| +{
|
| + m_transformOperations.AppendTranslate(x, y, z);
|
| +}
|
| +
|
| +void WebTransformOperations::appendRotate(double x,
|
| + double y,
|
| + double z,
|
| + double degrees)
|
| +{
|
| + m_transformOperations.AppendRotate(x, y, z, degrees);
|
| +}
|
| +
|
| +void WebTransformOperations::appendScale(double x, double y, double z)
|
| +{
|
| + m_transformOperations.AppendScale(x, y, z);
|
| +}
|
| +
|
| +void WebTransformOperations::appendSkew(double x, double y)
|
| +{
|
| + m_transformOperations.AppendSkew(x, y);
|
| +}
|
| +
|
| +void WebTransformOperations::appendPerspective(double depth)
|
| +{
|
| + m_transformOperations.AppendPerspective(depth);
|
| +}
|
| +
|
| +void WebTransformOperations::appendMatrix(const SkMatrix44& matrix)
|
| +{
|
| + gfx::Transform transform(gfx::Transform::kSkipInitialization);
|
| + transform.matrix() = matrix;
|
| + m_transformOperations.AppendMatrix(transform);
|
| +}
|
| +
|
| +void WebTransformOperations::appendIdentity()
|
| +{
|
| + m_transformOperations.AppendIdentity();
|
| +}
|
| +
|
| +bool WebTransformOperations::isIdentity() const
|
| +{
|
| + return m_transformOperations.IsIdentity();
|
| +}
|
| +
|
| +WebTransformOperations::~WebTransformOperations()
|
| +{
|
| +}
|
| +
|
| +} // namespace blink
|
|
|