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

Unified Diff: src/gpu/effects/GrRRectEffect.cpp

Issue 195423002: Fix radical assumption that 0.5 in double is exactly convertible to float. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrRRectEffect.cpp
diff --git a/src/gpu/effects/GrRRectEffect.cpp b/src/gpu/effects/GrRRectEffect.cpp
index 619cd99daf26d37160e5ce4d11b6213c5cf581eb..1bbf2f7976c2371940e544ee46b086a775b08ab9 100644
--- a/src/gpu/effects/GrRRectEffect.cpp
+++ b/src/gpu/effects/GrRRectEffect.cpp
@@ -314,23 +314,23 @@ void GLRRectEffect::setData(const GrGLUniformManager& uman, const GrDrawEffect&
break;
case RRectEffect::kTopRight_CornerFlag:
radius = rrect.radii(SkRRect::kUpperRight_Corner).fX;
- rect.fLeft -= 0.5;
+ rect.fLeft -= 0.5f;
rect.fTop += radius;
rect.fRight -= radius;
rect.fBottom += 0.5f;
break;
case RRectEffect::kBottomRight_CornerFlag:
radius = rrect.radii(SkRRect::kLowerRight_Corner).fX;
- rect.fLeft -= 0.5;
- rect.fTop -= 0.5;
+ rect.fLeft -= 0.5f;
+ rect.fTop -= 0.5f;
rect.fRight -= radius;
rect.fBottom -= radius;
break;
case RRectEffect::kBottomLeft_CornerFlag:
radius = rrect.radii(SkRRect::kLowerLeft_Corner).fX;
rect.fLeft += radius;
- rect.fTop -= 0.5;
- rect.fRight += 0.5;
+ rect.fTop -= 0.5f;
+ rect.fRight += 0.5f;
rect.fBottom -= radius;
break;
case RRectEffect::kLeft_CornerFlags:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698