| Index: gm/colorfilterimagefilter.cpp
|
| diff --git a/gm/colorfilterimagefilter.cpp b/gm/colorfilterimagefilter.cpp
|
| index 6323d33f6d38b1800a9a591a9619376cef87eb80..3227dfba178956b3b2a56d9a7c3ee4e1848386a2 100644
|
| --- a/gm/colorfilterimagefilter.cpp
|
| +++ b/gm/colorfilterimagefilter.cpp
|
| @@ -23,7 +23,7 @@ static SkImageFilter* make_blur(float amount, SkImageFilter* input = NULL) {
|
| }
|
|
|
| static SkImageFilter* make_brightness(float amount, SkImageFilter* input = NULL) {
|
| - SkScalar amount255 = SkScalarMul(SkFloatToScalar(amount), SkIntToScalar(255));
|
| + SkScalar amount255 = SkScalarMul(amount, SkIntToScalar(255));
|
| SkScalar matrix[20] = { 1, 0, 0, 0, amount255,
|
| 0, 1, 0, 0, amount255,
|
| 0, 0, 1, 0, amount255,
|
| @@ -35,10 +35,10 @@ static SkImageFilter* make_brightness(float amount, SkImageFilter* input = NULL)
|
| static SkImageFilter* make_grayscale(SkImageFilter* input = NULL) {
|
| SkScalar matrix[20];
|
| memset(matrix, 0, 20 * sizeof(SkScalar));
|
| - matrix[0] = matrix[5] = matrix[10] = SkFloatToScalar(0.2126f);
|
| - matrix[1] = matrix[6] = matrix[11] = SkFloatToScalar(0.7152f);
|
| - matrix[2] = matrix[7] = matrix[12] = SkFloatToScalar(0.0722f);
|
| - matrix[18] = SkFloatToScalar(1.0f);
|
| + matrix[0] = matrix[5] = matrix[10] = 0.2126f;
|
| + matrix[1] = matrix[6] = matrix[11] = 0.7152f;
|
| + matrix[2] = matrix[7] = matrix[12] = 0.0722f;
|
| + matrix[18] = 1.0f;
|
| SkAutoTUnref<SkColorFilter> filter(new SkColorMatrixFilter(matrix));
|
| return SkColorFilterImageFilter::Create(filter, input);
|
| }
|
| @@ -62,7 +62,7 @@ protected:
|
| void drawClippedRect(SkCanvas* canvas, const SkRect& r, const SkPaint& paint, float outset = 0.0f) {
|
| canvas->save();
|
| SkRect clip(r);
|
| - clip.outset(SkFloatToScalar(outset), SkFloatToScalar(outset));
|
| + clip.outset(outset, outset);
|
| canvas->clipRect(clip);
|
| canvas->drawRect(r, paint);
|
| canvas->restore();
|
|
|