Index: tests/LayerDrawLooperTest.cpp |
diff --git a/tests/LayerDrawLooperTest.cpp b/tests/LayerDrawLooperTest.cpp |
index 8ba290fbdf2184843945f1e1519d549e50057268..4897fd28844fad377744fd95af3391e72d76ab7c 100644 |
--- a/tests/LayerDrawLooperTest.cpp |
+++ b/tests/LayerDrawLooperTest.cpp |
@@ -53,7 +53,7 @@ static void test_frontToBack(skiatest::Reporter* reporter) { |
layerInfo.fOffset.set(10.0f, 20.0f); |
layerInfo.fPaintBits |= SkLayerDrawLooper::kXfermode_Bit; |
SkPaint* layerPaint = looperBuilder.addLayer(layerInfo); |
- layerPaint->setXfermodeMode(SkXfermode::kSrc_Mode); |
+ layerPaint->setBlendMode(SkBlendMode::kSrc); |
FakeDevice device; |
SkCanvas canvas(&device); |
@@ -65,7 +65,7 @@ static void test_frontToBack(skiatest::Reporter* reporter) { |
// The back layer should come first. |
REPORTER_ASSERT(reporter, context->next(&canvas, &paint)); |
- REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrc_Mode)); |
+ REPORTER_ASSERT(reporter, paint.getBlendMode() == SkBlendMode::kSrc); |
canvas.drawRect(SkRect::MakeWH(50.0f, 50.0f), paint); |
REPORTER_ASSERT(reporter, 10.0f == device.fLastMatrix.getTranslateX()); |
REPORTER_ASSERT(reporter, 20.0f == device.fLastMatrix.getTranslateY()); |
@@ -73,7 +73,7 @@ static void test_frontToBack(skiatest::Reporter* reporter) { |
// Then the front layer. |
REPORTER_ASSERT(reporter, context->next(&canvas, &paint)); |
- REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)); |
+ REPORTER_ASSERT(reporter, paint.getBlendMode() == SkBlendMode::kSrcOver); |
canvas.drawRect(SkRect::MakeWH(50.0f, 50.0f), paint); |
REPORTER_ASSERT(reporter, 0.0f == device.fLastMatrix.getTranslateX()); |
REPORTER_ASSERT(reporter, 0.0f == device.fLastMatrix.getTranslateY()); |
@@ -93,7 +93,7 @@ static void test_backToFront(skiatest::Reporter* reporter) { |
layerInfo.fOffset.set(10.0f, 20.0f); |
layerInfo.fPaintBits |= SkLayerDrawLooper::kXfermode_Bit; |
SkPaint* layerPaint = looperBuilder.addLayerOnTop(layerInfo); |
- layerPaint->setXfermodeMode(SkXfermode::kSrc_Mode); |
+ layerPaint->setBlendMode(SkBlendMode::kSrc); |
FakeDevice device; |
SkCanvas canvas(&device); |
@@ -105,7 +105,7 @@ static void test_backToFront(skiatest::Reporter* reporter) { |
// The back layer should come first. |
REPORTER_ASSERT(reporter, context->next(&canvas, &paint)); |
- REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)); |
+ REPORTER_ASSERT(reporter, paint.getBlendMode() == SkBlendMode::kSrcOver); |
canvas.drawRect(SkRect::MakeWH(50.0f, 50.0f), paint); |
REPORTER_ASSERT(reporter, 0.0f == device.fLastMatrix.getTranslateX()); |
REPORTER_ASSERT(reporter, 0.0f == device.fLastMatrix.getTranslateY()); |
@@ -113,7 +113,7 @@ static void test_backToFront(skiatest::Reporter* reporter) { |
// Then the front layer. |
REPORTER_ASSERT(reporter, context->next(&canvas, &paint)); |
- REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrc_Mode)); |
+ REPORTER_ASSERT(reporter, paint.getBlendMode() == SkBlendMode::kSrc); |
canvas.drawRect(SkRect::MakeWH(50.0f, 50.0f), paint); |
REPORTER_ASSERT(reporter, 10.0f == device.fLastMatrix.getTranslateX()); |
REPORTER_ASSERT(reporter, 20.0f == device.fLastMatrix.getTranslateY()); |
@@ -133,7 +133,7 @@ static void test_mixed(skiatest::Reporter* reporter) { |
layerInfo.fOffset.set(10.0f, 20.0f); |
layerInfo.fPaintBits |= SkLayerDrawLooper::kXfermode_Bit; |
SkPaint* layerPaint = looperBuilder.addLayerOnTop(layerInfo); |
- layerPaint->setXfermodeMode(SkXfermode::kSrc_Mode); |
+ layerPaint->setBlendMode(SkBlendMode::kSrc); |
FakeDevice device; |
SkCanvas canvas(&device); |
@@ -145,7 +145,7 @@ static void test_mixed(skiatest::Reporter* reporter) { |
// The back layer should come first. |
REPORTER_ASSERT(reporter, context->next(&canvas, &paint)); |
- REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)); |
+ REPORTER_ASSERT(reporter, paint.getBlendMode() == SkBlendMode::kSrcOver); |
canvas.drawRect(SkRect::MakeWH(50.0f, 50.0f), paint); |
REPORTER_ASSERT(reporter, 0.0f == device.fLastMatrix.getTranslateX()); |
REPORTER_ASSERT(reporter, 0.0f == device.fLastMatrix.getTranslateY()); |
@@ -153,7 +153,7 @@ static void test_mixed(skiatest::Reporter* reporter) { |
// Then the front layer. |
REPORTER_ASSERT(reporter, context->next(&canvas, &paint)); |
- REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrc_Mode)); |
+ REPORTER_ASSERT(reporter, paint.getBlendMode() == SkBlendMode::kSrc); |
canvas.drawRect(SkRect::MakeWH(50.0f, 50.0f), paint); |
REPORTER_ASSERT(reporter, 10.0f == device.fLastMatrix.getTranslateX()); |
REPORTER_ASSERT(reporter, 20.0f == device.fLastMatrix.getTranslateY()); |