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

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

Issue 2171943002: Alternate approach to updating paint property nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TransformPaintPropertyNode_h 5 #ifndef TransformPaintPropertyNode_h
6 #define TransformPaintPropertyNode_h 6 #define TransformPaintPropertyNode_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/geometry/FloatPoint3D.h" 9 #include "platform/geometry/FloatPoint3D.h"
10 #include "platform/transforms/TransformationMatrix.h" 10 #include "platform/transforms/TransformationMatrix.h"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 const TransformationMatrix& matrix() const { return m_matrix; } 29 const TransformationMatrix& matrix() const { return m_matrix; }
30 const FloatPoint3D& origin() const { return m_origin; } 30 const FloatPoint3D& origin() const { return m_origin; }
31 31
32 // Parent transform that this transform is relative to, or nullptr if this 32 // Parent transform that this transform is relative to, or nullptr if this
33 // is the root transform. 33 // is the root transform.
34 TransformPaintPropertyNode* parent() const { return m_parent.get(); } 34 TransformPaintPropertyNode* parent() const { return m_parent.get(); }
35 35
36 private: 36 private:
37
38 TransformPaintPropertyNode(const TransformationMatrix& matrix, const FloatPo int3D& origin, PassRefPtr<TransformPaintPropertyNode> parent) 37 TransformPaintPropertyNode(const TransformationMatrix& matrix, const FloatPo int3D& origin, PassRefPtr<TransformPaintPropertyNode> parent)
39 : m_matrix(matrix), m_origin(origin), m_parent(parent) { } 38 : m_matrix(matrix), m_origin(origin), m_parent(parent) { }
40 39
41 const TransformationMatrix m_matrix; 40 friend class PaintPropertyTreeBuilder;
42 const FloatPoint3D m_origin; 41 // These setters should only be used by PaintPropertyTreeBuilder.
42 void setMatrix(const TransformationMatrix& matrix) { m_matrix = matrix; }
43 void setOrigin(const FloatPoint3D& origin) { m_origin = origin; }
44 void setParent(PassRefPtr<TransformPaintPropertyNode> parent) { m_parent = p arent; }
45
46 TransformationMatrix m_matrix;
47 FloatPoint3D m_origin;
43 RefPtr<TransformPaintPropertyNode> m_parent; 48 RefPtr<TransformPaintPropertyNode> m_parent;
44 }; 49 };
45 50
46 // Redeclared here to avoid ODR issues. 51 // Redeclared here to avoid ODR issues.
47 // See platform/testing/PaintPrinters.h. 52 // See platform/testing/PaintPrinters.h.
48 void PrintTo(const TransformPaintPropertyNode&, std::ostream*); 53 void PrintTo(const TransformPaintPropertyNode&, std::ostream*);
49 54
50 } // namespace blink 55 } // namespace blink
51 56
52 #endif // TransformPaintPropertyNode_h 57 #endif // TransformPaintPropertyNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698