| Index: third_party/WebKit/Source/platform/graphics/paint/TransformPaintProperty.h
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/TransformPaintProperty.h b/third_party/WebKit/Source/platform/graphics/paint/TransformPaintProperty.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d60a917c92f166fbeaa647da15f0d8191dbbd4c1
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/TransformPaintProperty.h
|
| @@ -0,0 +1,42 @@
|
| +// 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 TransformPaintProperty_h
|
| +#define TransformPaintProperty_h
|
| +
|
| +#include "platform/PlatformExport.h"
|
| +#include "platform/geometry/FloatPoint3D.h"
|
| +#include "platform/transforms/TransformationMatrix.h"
|
| +
|
| +#include <iosfwd>
|
| +
|
| +namespace blink {
|
| +
|
| +// A transform created by a css property such as "transform" or "perspective"
|
| +// along with an index for the parent transform property that this transform is
|
| +// relative to (or 0 for the root transform).
|
| +class PLATFORM_EXPORT TransformPaintProperty {
|
| +public:
|
| + TransformPaintProperty(const TransformationMatrix& matrix, const FloatPoint3D& origin, size_t parentIndex)
|
| + : m_matrix(matrix), m_origin(origin), m_parentIndex(parentIndex) { };
|
| +
|
| + const TransformationMatrix& matrix() const { return m_matrix; }
|
| + const FloatPoint3D& origin() const { return m_origin; }
|
| +
|
| + // Parent index in the Vector that owns transform paint properties.
|
| + size_t parentIndex() const { return m_parentIndex; }
|
| +
|
| +private:
|
| + const TransformationMatrix m_matrix;
|
| + const FloatPoint3D m_origin;
|
| + const size_t m_parentIndex;
|
| +};
|
| +
|
| +// Redeclared here to avoid ODR issues.
|
| +// See platform/testing/PaintPrinters.h.
|
| +void PrintTo(const TransformPaintProperty&, std::ostream*);
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // TransformPaintProperty_h
|
|
|