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

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

Issue 2137173002: [SPv2] Respect transform-style in the Blink and cc property trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: large merge (with https://codereview.chromium.org/2144823006) 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/README.md ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
index 1481e60d7c64ce13a5e2294415e9a1fcd59defaf..1020a2075f5daac42b90c354617e84a38ff99269 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.h
@@ -21,16 +21,23 @@ namespace blink {
// for the root.
class PLATFORM_EXPORT TransformPaintPropertyNode : public RefCounted<TransformPaintPropertyNode> {
public:
- static PassRefPtr<TransformPaintPropertyNode> create(PassRefPtr<TransformPaintPropertyNode> parent, const TransformationMatrix& matrix, const FloatPoint3D& origin)
+ static PassRefPtr<TransformPaintPropertyNode> create(
+ PassRefPtr<TransformPaintPropertyNode> parent,
+ const TransformationMatrix& matrix,
+ const FloatPoint3D& origin,
+ bool flattensInheritedTransform = false,
+ unsigned renderingContextID = 0)
{
- return adoptRef(new TransformPaintPropertyNode(parent, matrix, origin));
+ return adoptRef(new TransformPaintPropertyNode(matrix, origin, parent, flattensInheritedTransform, renderingContextID));
}
- void update(PassRefPtr<TransformPaintPropertyNode> parent, const TransformationMatrix& matrix, const FloatPoint3D& origin)
+ void update(PassRefPtr<TransformPaintPropertyNode> parent, const TransformationMatrix& matrix, const FloatPoint3D& origin, bool flattensInheritedTransform = false, unsigned renderingContextID = 0)
{
m_parent = parent;
m_matrix = matrix;
m_origin = origin;
+ m_flattensInheritedTransform = flattensInheritedTransform;
+ m_renderingContextID = renderingContextID;
}
const TransformationMatrix& matrix() const { return m_matrix; }
@@ -40,13 +47,36 @@ public:
// is the root transform.
TransformPaintPropertyNode* parent() const { return m_parent.get(); }
+ // If true, content with this transform node (or its descendant) appears in
+ // the plane of its parent. This is implemented by flattening the total
+ // accumulated transform from its ancestors.
+ bool flattensInheritedTransform() const { return m_flattensInheritedTransform; }
+
+ // Content whose transform nodes have a common rendering context ID are 3D
+ // sorted. If this is 0, content will not be 3D sorted.
+ unsigned renderingContextID() const { return m_renderingContextID; }
+ bool hasRenderingContext() const { return m_renderingContextID; }
+
private:
- TransformPaintPropertyNode(PassRefPtr<TransformPaintPropertyNode> parent, const TransformationMatrix& matrix, const FloatPoint3D& origin)
- : m_parent(parent), m_matrix(matrix), m_origin(origin) { }
+ TransformPaintPropertyNode(
+ const TransformationMatrix& matrix,
+ const FloatPoint3D& origin,
+ PassRefPtr<TransformPaintPropertyNode> parent,
+ bool flattensInheritedTransform,
+ unsigned renderingContextID)
+ : m_matrix(matrix)
+ , m_origin(origin)
+ , m_parent(parent)
+ , m_flattensInheritedTransform(flattensInheritedTransform)
+ , m_renderingContextID(renderingContextID)
+ {
+ }
- RefPtr<TransformPaintPropertyNode> m_parent;
TransformationMatrix m_matrix;
FloatPoint3D m_origin;
+ RefPtr<TransformPaintPropertyNode> m_parent;
+ bool m_flattensInheritedTransform;
+ unsigned m_renderingContextID;
};
// Redeclared here to avoid ODR issues.
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/README.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698