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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp

Issue 2428513004: [SPv2] Create effect nodes for CSS filter (Closed)
Patch Set: remove DCHECK(layer) Created 4 years, 2 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/PaintChunkerTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp
index 88464d294527d7570529445b352ed84bfae8b962..d8385c91dccb1efcc82b930a1d197d0de30b94b9 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp
@@ -17,7 +17,30 @@ namespace {
// bots.
#if defined(NDEBUG) || !OS(WIN)
-static PaintChunkProperties rootPaintChunkProperties() {
+TransformPaintPropertyNode* dummyRootTransform() {
+ DEFINE_STATIC_REF(TransformPaintPropertyNode, rootTransform,
+ (TransformPaintPropertyNode::create(
+ nullptr, TransformationMatrix(), FloatPoint3D())));
+ return rootTransform;
+}
+
+ClipPaintPropertyNode* dummyRootClip() {
+ DEFINE_STATIC_REF(ClipPaintPropertyNode, rootClip,
+ (ClipPaintPropertyNode::create(
+ nullptr, dummyRootTransform(),
+ FloatRoundedRect(LayoutRect::infiniteIntRect()))));
+ return rootClip;
+}
+
+EffectPaintPropertyNode* dummyRootEffect() {
+ DEFINE_STATIC_REF(EffectPaintPropertyNode, rootEffect,
+ (EffectPaintPropertyNode::create(
+ nullptr, dummyRootTransform(), dummyRootClip(),
+ CompositorFilterOperations(), 1.0)));
+ return rootEffect;
+}
+
+PaintChunkProperties rootPaintChunkProperties() {
return PaintChunkProperties();
}
@@ -147,8 +170,9 @@ TEST_F(PaintChunkerTest, BuildMultipleChunksWithDifferentPropertyChanges) {
PaintChunkProperties simpleTransformAndEffect;
simpleTransformAndEffect.transform = simpleTransform.transform;
- simpleTransformAndEffect.effect =
- EffectPaintPropertyNode::create(nullptr, 0.5f);
+ simpleTransformAndEffect.effect = EffectPaintPropertyNode::create(
+ dummyRootEffect(), dummyRootTransform(), dummyRootClip(),
+ CompositorFilterOperations(), 0.5f);
chunker.updateCurrentPaintChunkProperties(nullptr, simpleTransformAndEffect);
chunker.incrementDisplayItemIndex(NormalTestDisplayItem());
chunker.incrementDisplayItemIndex(NormalTestDisplayItem());
@@ -160,7 +184,9 @@ TEST_F(PaintChunkerTest, BuildMultipleChunksWithDifferentPropertyChanges) {
FloatPoint3D(9, 8, 7));
simpleTransformAndEffectWithUpdatedTransform.effect =
EffectPaintPropertyNode::create(
- nullptr, simpleTransformAndEffect.effect->opacity());
+ dummyRootEffect(), dummyRootTransform(), dummyRootClip(),
+ CompositorFilterOperations(),
+ simpleTransformAndEffect.effect->opacity());
chunker.updateCurrentPaintChunkProperties(
nullptr, simpleTransformAndEffectWithUpdatedTransform);
chunker.incrementDisplayItemIndex(NormalTestDisplayItem());

Powered by Google App Engine
This is Rietveld 408576698