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

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h

Issue 2144823006: Reuse existing paint property node is possible (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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
index 16f07086d7c79ffe1a76b6eefae797928862a7c9..72a21f3d2edd07961902519af35ccf86b73f53c6 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
@@ -15,6 +15,7 @@ namespace blink {
class FrameView;
class LayoutObject;
+class ObjectPaintProperties;
// The context for PaintPropertyTreeBuilder.
// It's responsible for bookkeeping tree state in other order, for example, the most recent
@@ -67,6 +68,16 @@ public:
void buildTreeNodes(const LayoutObject&, PaintPropertyTreeBuilderContext&);
private:
+ template <typename PropertyNode, void (ObjectPaintProperties::*Setter)(PassRefPtr<PropertyNode>)>
+ static void clearPaintProperty(const LayoutObject&);
+
+ template <
+ typename PropertyNode,
+ PropertyNode* (ObjectPaintProperties::*Getter)() const,
+ void (ObjectPaintProperties::*Setter)(PassRefPtr<PropertyNode>),
+ typename... Args>
+ static void updateOrCreatePaintProperty(const LayoutObject&, const PaintPropertyTreeBuilderContext&, PropertyNode*& contextProperty, const Args&...);
+
static void updatePaintOffsetTranslation(const LayoutObject&, PaintPropertyTreeBuilderContext&);
static void updateTransform(const LayoutObject&, PaintPropertyTreeBuilderContext&);
static void updateEffect(const LayoutObject&, PaintPropertyTreeBuilderContext&);

Powered by Google App Engine
This is Rietveld 408576698