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

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

Issue 2573883002: Refactor PaintChunkProperties to use PropertyTreeState (Closed)
Patch Set: none Created 4 years 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/PaintChunkProperties.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintChunkProperties.h b/third_party/WebKit/Source/platform/graphics/paint/PaintChunkProperties.h
index 2f095e49575a5243d506470509a6bdc295a2ad9d..77a80e604eb9ed024653db733ea71593d027caf9 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintChunkProperties.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintChunkProperties.h
@@ -5,10 +5,7 @@
#ifndef PaintChunkProperties_h
#define PaintChunkProperties_h
-#include "platform/graphics/paint/ClipPaintPropertyNode.h"
-#include "platform/graphics/paint/EffectPaintPropertyNode.h"
-#include "platform/graphics/paint/ScrollPaintPropertyNode.h"
-#include "platform/graphics/paint/TransformPaintPropertyNode.h"
+#include "platform/graphics/paint/PropertyTreeState.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
#include <iosfwd>
@@ -27,13 +24,14 @@ namespace blink {
struct PaintChunkProperties {
DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
- PaintChunkProperties() : backfaceHidden(false) {}
+ PaintChunkProperties(const PropertyTreeState& state)
+ : propertyTreeState(state), backfaceHidden(false) {}
- // TODO(pdr): Refactor these to use PropertyTreeState.
- RefPtr<const TransformPaintPropertyNode> transform;
- RefPtr<const ClipPaintPropertyNode> clip;
- RefPtr<const EffectPaintPropertyNode> effect;
- RefPtr<const ScrollPaintPropertyNode> scroll;
+ PaintChunkProperties()
+ : propertyTreeState(nullptr, nullptr, nullptr, nullptr),
+ backfaceHidden(false) {}
+
+ PropertyTreeState propertyTreeState;
bool backfaceHidden;
};
@@ -41,9 +39,7 @@ struct PaintChunkProperties {
// crawling the entire property tree to compute.
inline bool operator==(const PaintChunkProperties& a,
const PaintChunkProperties& b) {
- return a.transform.get() == b.transform.get() &&
- a.clip.get() == b.clip.get() && a.effect.get() == b.effect.get() &&
- a.scroll.get() == b.scroll.get() &&
+ return a.propertyTreeState == b.propertyTreeState &&
a.backfaceHidden == b.backfaceHidden;
}

Powered by Google App Engine
This is Rietveld 408576698