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

Unified Diff: tests/MathTest.cpp

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium Created 7 years, 1 month 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
« no previous file with comments | « tests/LayerDrawLooperTest.cpp ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/MathTest.cpp
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index cfb96ad8bba9648c259b2f0f21ee548f137b7332..f5c61cbeb851673bc45fa2089ef59424a47e62fb 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -144,7 +144,7 @@ static void test_blend31() {
float f = float_blend(src, dst, a / 31.f);
int r1 = (int)f;
- int r2 = SkScalarRoundToInt(SkFloatToScalar(f));
+ int r2 = SkScalarRoundToInt(f);
if (r0 != r1 && r0 != r2) {
SkDebugf("src:%d dst:%d a:%d result:%d float:%g\n",
@@ -168,7 +168,7 @@ static void test_blend(skiatest::Reporter* reporter) {
for (int a = 0; a <= 255; a++) {
int r0 = SkAlphaBlend255(src, dst, a);
float f1 = float_blend(src, dst, a / 255.f);
- int r1 = SkScalarRoundToInt(SkFloatToScalar(f1));
+ int r1 = SkScalarRoundToInt(f1);
if (r0 != r1) {
float diff = sk_float_abs(f1 - r1);
« no previous file with comments | « tests/LayerDrawLooperTest.cpp ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698