remove SkFloatToScalar macro
BUG=
R=reed@google.com, djsollen@google.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/85463005
git-svn-id: http://skia.googlecode.com/svn/trunk@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/LayerDrawLooperTest.cpp b/tests/LayerDrawLooperTest.cpp
index 80f986f..11ac488 100644
--- a/tests/LayerDrawLooperTest.cpp
+++ b/tests/LayerDrawLooperTest.cpp
@@ -42,7 +42,7 @@
(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 @@
// 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 @@
(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 @@
// 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 @@
(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 @@
// 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));