convert float to SkScalar changes

http://codereview.appspot.com/6071043/

Submitted on behalf of Guanqun.Lu@gmail.com



git-svn-id: http://skia.googlecode.com/svn/trunk@3779 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
robertphillips@google.com 2012-04-27 15:39:52 +00:00
parent f294b773f0
commit 5af5606901
2 changed files with 6 additions and 6 deletions

View File

@ -240,10 +240,10 @@ void build_kernel(float sigma, float* kernel, int kernelWidth) {
}
void scale_rect(SkRect* rect, float xScale, float yScale) {
rect->fLeft *= xScale;
rect->fTop *= yScale;
rect->fRight *= xScale;
rect->fBottom *= yScale;
rect->fLeft = SkScalarMul(rect->fLeft, SkFloatToScalar(xScale));
rect->fTop = SkScalarMul(rect->fTop, SkFloatToScalar(yScale));
rect->fRight = SkScalarMul(rect->fRight, SkFloatToScalar(xScale));
rect->fBottom = SkScalarMul(rect->fBottom, SkFloatToScalar(yScale));
}
float adjust_sigma(float sigma, int *scaleFactor, int *halfWidth,

View File

@ -774,8 +774,8 @@ bool drawWithGPUMaskFilter(GrContext* context, const SkPath& path,
clipRect.set(clip.getBounds());
// Outset srcRect and clipRect by 3 * sigma, to compute affected blur area.
srcRect.inset(-sigma3, -sigma3);
clipRect.inset(-sigma3, -sigma3);
srcRect.inset(SkFloatToScalar(-sigma3), SkFloatToScalar(-sigma3));
clipRect.inset(SkFloatToScalar(-sigma3), SkFloatToScalar(-sigma3));
srcRect.intersect(clipRect);
SkRect finalRect = srcRect;
SkIRect finalIRect;