Index: tests/LayerDrawLooperTest.cpp |
diff --git a/tests/LayerDrawLooperTest.cpp b/tests/LayerDrawLooperTest.cpp |
index 80f986f867e342901873886043eb781170c1c95e..11ac48869f556ddd87d7afe68af1a38299995198 100644 |
--- a/tests/LayerDrawLooperTest.cpp |
+++ b/tests/LayerDrawLooperTest.cpp |
@@ -42,7 +42,7 @@ static void test_frontToBack(skiatest::Reporter* reporter) { |
(void)looper->addLayer(layerInfo); |
// Add the back layer, with some layer info set. |
- layerInfo.fOffset.set(SkFloatToScalar(10.0f), SkFloatToScalar(20.0f)); |
+ layerInfo.fOffset.set(10.0f, 20.0f); |
layerInfo.fPaintBits |= SkLayerDrawLooper::kXfermode_Bit; |
SkPaint* layerPaint = looper->addLayer(layerInfo); |
layerPaint->setXfermodeMode(SkXfermode::kSrc_Mode); |
@@ -55,17 +55,17 @@ static void test_frontToBack(skiatest::Reporter* reporter) { |
// The back layer should come first. |
REPORTER_ASSERT(reporter, looper->next(&canvas, &paint)); |
REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrc_Mode)); |
- canvas.drawRect(SkRect::MakeWH(SkFloatToScalar(50.0f), SkFloatToScalar(50.0f)), paint); |
- REPORTER_ASSERT(reporter, SkFloatToScalar(10.0f) == device.fLastMatrix.getTranslateX()); |
- REPORTER_ASSERT(reporter, SkFloatToScalar(20.0f) == device.fLastMatrix.getTranslateY()); |
+ 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()); |
paint.reset(); |
// Then the front layer. |
REPORTER_ASSERT(reporter, looper->next(&canvas, &paint)); |
REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)); |
- canvas.drawRect(SkRect::MakeWH(SkFloatToScalar(50.0f), SkFloatToScalar(50.0f)), paint); |
- REPORTER_ASSERT(reporter, SkFloatToScalar(0.0f) == device.fLastMatrix.getTranslateX()); |
- REPORTER_ASSERT(reporter, SkFloatToScalar(0.0f) == device.fLastMatrix.getTranslateY()); |
+ 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()); |
// Only two layers were added, so that should be the end. |
REPORTER_ASSERT(reporter, !looper->next(&canvas, &paint)); |
@@ -79,7 +79,7 @@ static void test_backToFront(skiatest::Reporter* reporter) { |
(void)looper->addLayerOnTop(layerInfo); |
// Add the front layer, with some layer info set. |
- layerInfo.fOffset.set(SkFloatToScalar(10.0f), SkFloatToScalar(20.0f)); |
+ layerInfo.fOffset.set(10.0f, 20.0f); |
layerInfo.fPaintBits |= SkLayerDrawLooper::kXfermode_Bit; |
SkPaint* layerPaint = looper->addLayerOnTop(layerInfo); |
layerPaint->setXfermodeMode(SkXfermode::kSrc_Mode); |
@@ -92,17 +92,17 @@ static void test_backToFront(skiatest::Reporter* reporter) { |
// The back layer should come first. |
REPORTER_ASSERT(reporter, looper->next(&canvas, &paint)); |
REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)); |
- canvas.drawRect(SkRect::MakeWH(SkFloatToScalar(50.0f), SkFloatToScalar(50.0f)), paint); |
- REPORTER_ASSERT(reporter, SkFloatToScalar(0.0f) == device.fLastMatrix.getTranslateX()); |
- REPORTER_ASSERT(reporter, SkFloatToScalar(0.0f) == device.fLastMatrix.getTranslateY()); |
+ 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()); |
paint.reset(); |
// Then the front layer. |
REPORTER_ASSERT(reporter, looper->next(&canvas, &paint)); |
REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrc_Mode)); |
- canvas.drawRect(SkRect::MakeWH(SkFloatToScalar(50.0f), SkFloatToScalar(50.0f)), paint); |
- REPORTER_ASSERT(reporter, SkFloatToScalar(10.0f) == device.fLastMatrix.getTranslateX()); |
- REPORTER_ASSERT(reporter, SkFloatToScalar(20.0f) == device.fLastMatrix.getTranslateY()); |
+ 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()); |
// Only two layers were added, so that should be the end. |
REPORTER_ASSERT(reporter, !looper->next(&canvas, &paint)); |
@@ -116,7 +116,7 @@ static void test_mixed(skiatest::Reporter* reporter) { |
(void)looper->addLayer(layerInfo); |
// Add the front layer, with some layer info set. |
- layerInfo.fOffset.set(SkFloatToScalar(10.0f), SkFloatToScalar(20.0f)); |
+ layerInfo.fOffset.set(10.0f, 20.0f); |
layerInfo.fPaintBits |= SkLayerDrawLooper::kXfermode_Bit; |
SkPaint* layerPaint = looper->addLayerOnTop(layerInfo); |
layerPaint->setXfermodeMode(SkXfermode::kSrc_Mode); |
@@ -129,17 +129,17 @@ static void test_mixed(skiatest::Reporter* reporter) { |
// The back layer should come first. |
REPORTER_ASSERT(reporter, looper->next(&canvas, &paint)); |
REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)); |
- canvas.drawRect(SkRect::MakeWH(SkFloatToScalar(50.0f), SkFloatToScalar(50.0f)), paint); |
- REPORTER_ASSERT(reporter, SkFloatToScalar(0.0f) == device.fLastMatrix.getTranslateX()); |
- REPORTER_ASSERT(reporter, SkFloatToScalar(0.0f) == device.fLastMatrix.getTranslateY()); |
+ 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()); |
paint.reset(); |
// Then the front layer. |
REPORTER_ASSERT(reporter, looper->next(&canvas, &paint)); |
REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrc_Mode)); |
- canvas.drawRect(SkRect::MakeWH(SkFloatToScalar(50.0f), SkFloatToScalar(50.0f)), paint); |
- REPORTER_ASSERT(reporter, SkFloatToScalar(10.0f) == device.fLastMatrix.getTranslateX()); |
- REPORTER_ASSERT(reporter, SkFloatToScalar(20.0f) == device.fLastMatrix.getTranslateY()); |
+ 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()); |
// Only two layers were added, so that should be the end. |
REPORTER_ASSERT(reporter, !looper->next(&canvas, &paint)); |