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

Unified Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp

Issue 2565903002: [SPv2] Add createOpacityOnlyEffect test helper (Closed)
Patch Set: rebase && git cl format 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/compositing/PaintArtifactCompositorTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
index 9d23fbba5d8fa1e13afdc8afc385bb967d4019fd..65f83f61022d50aedf41436d772b9b9bf38b6371 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
@@ -19,6 +19,7 @@
#include "platform/graphics/paint/EffectPaintPropertyNode.h"
#include "platform/graphics/paint/PaintArtifact.h"
#include "platform/graphics/paint/ScrollPaintPropertyNode.h"
+#include "platform/testing/PaintPropertyTestHelpers.h"
#include "platform/testing/PictureMatchers.h"
#include "platform/testing/TestPaintArtifact.h"
#include "platform/testing/WebLayerTreeViewImplForTesting.h"
@@ -29,6 +30,7 @@
namespace blink {
namespace {
+using ::blink::testing::createOpacityOnlyEffect;
using ::testing::Pointee;
PaintChunkProperties defaultPaintChunkProperties() {
@@ -569,15 +571,12 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees,
}
TEST_F(PaintArtifactCompositorTestWithPropertyTrees, EffectTreeConversion) {
- RefPtr<EffectPaintPropertyNode> effect1 = EffectPaintPropertyNode::create(
- EffectPaintPropertyNode::root(), TransformPaintPropertyNode::root(),
- ClipPaintPropertyNode::root(), CompositorFilterOperations(), 0.5);
- RefPtr<EffectPaintPropertyNode> effect2 = EffectPaintPropertyNode::create(
- effect1, TransformPaintPropertyNode::root(),
- ClipPaintPropertyNode::root(), CompositorFilterOperations(), 0.3);
- RefPtr<EffectPaintPropertyNode> effect3 = EffectPaintPropertyNode::create(
- EffectPaintPropertyNode::root(), TransformPaintPropertyNode::root(),
- ClipPaintPropertyNode::root(), CompositorFilterOperations(), 0.2);
+ RefPtr<EffectPaintPropertyNode> effect1 =
+ createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5);
+ RefPtr<EffectPaintPropertyNode> effect2 =
+ createOpacityOnlyEffect(effect1, 0.3);
+ RefPtr<EffectPaintPropertyNode> effect3 =
+ createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.2);
TestPaintArtifact artifact;
artifact
@@ -661,9 +660,8 @@ TEST_F(PaintArtifactCompositorTestWithPropertyTrees, OneScrollNode) {
}
TEST_F(PaintArtifactCompositorTestWithPropertyTrees, NestedScrollNodes) {
- RefPtr<EffectPaintPropertyNode> effect = EffectPaintPropertyNode::create(
- EffectPaintPropertyNode::root(), TransformPaintPropertyNode::root(),
- ClipPaintPropertyNode::root(), CompositorFilterOperations(), 0.5);
+ RefPtr<EffectPaintPropertyNode> effect =
+ createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5);
RefPtr<TransformPaintPropertyNode> scrollTranslationA =
TransformPaintPropertyNode::create(
« no previous file with comments | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698