Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/TransformPaintProperty.h

Issue 1390123002: (WIP) Paint property hierarchy approach 1 of 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 #ifndef TransformPaintProperty_h
6 #define TransformPaintProperty_h
7
8 #include "platform/PlatformExport.h"
9 #include "platform/geometry/FloatPoint3D.h"
10 #include "platform/transforms/TransformationMatrix.h"
11
12 #include <iosfwd>
13
14 namespace blink {
15
16 // A transform created by a css property such as "transform" or "perspective"
17 // along with an index for the parent transform property that this transform is
18 // relative to (or 0 for the root transform).
19 class PLATFORM_EXPORT TransformPaintProperty {
20 public:
21 TransformPaintProperty(const TransformationMatrix& matrix, const FloatPoint3 D& origin, size_t parentIndex)
22 : m_matrix(matrix), m_origin(origin), m_parentIndex(parentIndex) { };
23
24 const TransformationMatrix& matrix() const { return m_matrix; }
25 const FloatPoint3D& origin() const { return m_origin; }
26
27 // Parent index in the Vector that owns transform paint properties.
28 size_t parentIndex() const { return m_parentIndex; }
29
30 private:
31 const TransformationMatrix m_matrix;
32 const FloatPoint3D m_origin;
33 const size_t m_parentIndex;
34 };
35
36 // Redeclared here to avoid ODR issues.
37 // See platform/testing/PaintPrinters.h.
38 void PrintTo(const TransformPaintProperty&, std::ostream*);
39
40 } // namespace blink
41
42 #endif // TransformPaintProperty_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698