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

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: dummyRootEffect 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
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 03980087c1c8c198b83549a2574fbd84142fa8b2..bb36f4e0460fde3d38e710902a2af91a235aa82a 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.h
@@ -21,9 +21,14 @@ namespace blink {
// for the root.
class PLATFORM_EXPORT TransformPaintPropertyNode : public RefCounted<TransformPaintPropertyNode> {
public:
- static PassRefPtr<TransformPaintPropertyNode> create(const TransformationMatrix& matrix, const FloatPoint3D& origin, PassRefPtr<TransformPaintPropertyNode> parent = nullptr)
+ static PassRefPtr<TransformPaintPropertyNode> create(
+ const TransformationMatrix& matrix,
+ const FloatPoint3D& origin,
+ PassRefPtr<TransformPaintPropertyNode> parent = nullptr,
+ bool flattensInheritedTransform = false,
+ unsigned renderingContextID = 0)
{
- return adoptRef(new TransformPaintPropertyNode(matrix, origin, parent));
+ return adoptRef(new TransformPaintPropertyNode(matrix, origin, parent, flattensInheritedTransform, renderingContextID));
}
const TransformationMatrix& matrix() const { return m_matrix; }
@@ -33,14 +38,36 @@ public:
// is the root transform.
TransformPaintPropertyNode* parent() const { return m_parent.get(); }
-private:
+ // 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; }
- TransformPaintPropertyNode(const TransformationMatrix& matrix, const FloatPoint3D& origin, PassRefPtr<TransformPaintPropertyNode> parent)
- : m_matrix(matrix), m_origin(origin), m_parent(parent) { }
+private:
+ 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)
+ {
+ }
const TransformationMatrix m_matrix;
const FloatPoint3D m_origin;
- RefPtr<TransformPaintPropertyNode> m_parent;
+ const RefPtr<TransformPaintPropertyNode> m_parent;
+ const bool m_flattensInheritedTransform;
+ const unsigned m_renderingContextID;
};
// Redeclared here to avoid ODR issues.

Powered by Google App Engine
This is Rietveld 408576698