Fix radical assumption that 0.5 in double is exactly convertible to float.

BUG=skia:2181

Review URL: https://codereview.chromium.org/195423002

git-svn-id: http://skia.googlecode.com/svn/trunk@13742 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2014-03-11 17:09:17 +00:00
parent b97c3ffddf
commit de9f251427

View File

@ -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: