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:
parent
b97c3ffddf
commit
de9f251427
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user