Index: tests/PaintTest.cpp |
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp |
index f50746777149f68f2aef5517a2de9976e8e450eb..c4a4fb7721635585ebefc59867755f8b5828e682 100644 |
--- a/tests/PaintTest.cpp |
+++ b/tests/PaintTest.cpp |
@@ -292,7 +292,7 @@ DEF_TEST(Paint_MoreFlattening, r) { |
paint.setColor(0x00AABBCC); |
paint.setTextScaleX(1.0f); // Default value, ignored. |
paint.setTextSize(19); |
- paint.setXfermode(SkXfermode::Make(SkXfermode::kModulate_Mode)); |
+ paint.setBlendMode(SkBlendMode::kModulate); |
paint.setLooper(nullptr); // Default value, ignored. |
SkBinaryWriteBuffer writer; |
@@ -311,12 +311,11 @@ DEF_TEST(Paint_MoreFlattening, r) { |
ASSERT(other.getTextScaleX() == paint.getTextScaleX()); |
ASSERT(other.getTextSize() == paint.getTextSize()); |
ASSERT(other.getLooper() == paint.getLooper()); |
+ ASSERT(other.getBlendMode() == paint.getBlendMode()); |
- // We have to be a little looser and compare just the modes. Pointers might not be the same. |
- SkXfermode::Mode otherMode, paintMode; |
- ASSERT(other.getXfermode()->asMode(&otherMode)); |
- ASSERT(paint.getXfermode()->asMode(&paintMode)); |
- ASSERT(otherMode == paintMode); |
+#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR |
+ other.setXfermode(nullptr); |
+#endif |
} |
DEF_TEST(Paint_getHash, r) { |
@@ -355,11 +354,11 @@ DEF_TEST(Paint_nothingToDraw, r) { |
REPORTER_ASSERT(r, paint.nothingToDraw()); |
paint.setAlpha(0xFF); |
- paint.setXfermodeMode(SkXfermode::kDst_Mode); |
+ paint.setBlendMode(SkBlendMode::kDst); |
REPORTER_ASSERT(r, paint.nothingToDraw()); |
paint.setAlpha(0); |
- paint.setXfermodeMode(SkXfermode::kSrcOver_Mode); |
+ paint.setBlendMode(SkBlendMode::kSrcOver); |
SkColorMatrix cm; |
cm.setIdentity(); // does not change alpha |