| Index: third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.h
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.h b/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e656dc8bf1180f32a0d8724275b4823ac6341e67
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.h
|
| @@ -0,0 +1,46 @@
|
| +// Copyright 2015 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.
|
| +
|
| +#ifndef TransformPaintPropertyNode_h
|
| +#define TransformPaintPropertyNode_h
|
| +
|
| +#include "platform/PlatformExport.h"
|
| +#include "platform/geometry/FloatPoint3D.h"
|
| +#include "platform/transforms/TransformationMatrix.h"
|
| +#include "wtf/PassRefPtr.h"
|
| +#include "wtf/RefCounted.h"
|
| +#include "wtf/RefPtr.h"
|
| +
|
| +#include <iosfwd>
|
| +
|
| +namespace blink {
|
| +
|
| +// A transform created by a css property such as "transform" or "perspective"
|
| +// along with a reference to the parent TransformPaintPropertyNode, or nullptr
|
| +// for the root.
|
| +class PLATFORM_EXPORT TransformPaintPropertyNode : public RefCounted<TransformPaintPropertyNode> {
|
| +public:
|
| + TransformPaintPropertyNode(const TransformationMatrix& matrix, const FloatPoint3D& origin, PassRefPtr<TransformPaintPropertyNode> parent = nullptr)
|
| + : m_matrix(matrix), m_origin(origin), m_parent(parent) { }
|
| +
|
| + const TransformationMatrix& matrix() const { return m_matrix; }
|
| + const FloatPoint3D& origin() const { return m_origin; }
|
| +
|
| + // Parent transform that this transform is relative to, or nullptr if this
|
| + // is the root transform.
|
| + const TransformPaintPropertyNode* parent() const { return m_parent.get(); }
|
| +
|
| +private:
|
| + const TransformationMatrix m_matrix;
|
| + const FloatPoint3D m_origin;
|
| + RefPtr<TransformPaintPropertyNode> m_parent;
|
| +};
|
| +
|
| +// Redeclared here to avoid ODR issues.
|
| +// See platform/testing/PaintPrinters.h.
|
| +void PrintTo(const TransformPaintPropertyNode&, std::ostream*);
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // TransformPaintPropertyNode_h
|
|
|