Index: gm/complexclip_blur_tiled.cpp |
diff --git a/gm/complexclip_blur_tiled.cpp b/gm/complexclip_blur_tiled.cpp |
index 9413e64e07d4cce42774486a69edc695b50897fc..979c7e7423fa81cfb6bcc62beea99d81b9adfe29 100644 |
--- a/gm/complexclip_blur_tiled.cpp |
+++ b/gm/complexclip_blur_tiled.cpp |
@@ -31,22 +31,21 @@ protected: |
void onDraw(SkCanvas* canvas) override { |
SkPaint blurPaint; |
- SkAutoTUnref<SkImageFilter> blur(SkBlurImageFilter::Create(5.0f, 5.0f)); |
- blurPaint.setImageFilter(blur); |
- const SkScalar tile_size = SkIntToScalar(128); |
+ blurPaint.setImageFilter(SkBlurImageFilter::Make(5.0f, 5.0f, nullptr)); |
+ const SkScalar tileSize = SkIntToScalar(128); |
SkRect bounds; |
if (!canvas->getClipBounds(&bounds)) { |
bounds.setEmpty(); |
} |
- int ts = SkScalarCeilToInt(tile_size); |
+ int ts = SkScalarCeilToInt(tileSize); |
SkImageInfo info = SkImageInfo::MakeN32Premul(ts, ts); |
auto tileSurface(canvas->makeSurface(info)); |
if (!tileSurface) { |
tileSurface = SkSurface::MakeRaster(info); |
} |
SkCanvas* tileCanvas = tileSurface->getCanvas(); |
- for (SkScalar y = bounds.top(); y < bounds.bottom(); y += tile_size) { |
- for (SkScalar x = bounds.left(); x < bounds.right(); x += tile_size) { |
+ for (SkScalar y = bounds.top(); y < bounds.bottom(); y += tileSize) { |
+ for (SkScalar x = bounds.left(); x < bounds.right(); x += tileSize) { |
tileCanvas->save(); |
tileCanvas->clear(0); |
tileCanvas->translate(-x, -y); |
@@ -69,7 +68,6 @@ private: |
////////////////////////////////////////////////////////////////////////////// |
-static GM* MyFactory1(void*) { return new ComplexClipBlurTiledGM(); } |
-static GMRegistry reg1(MyFactory1); |
+DEF_GM(return new ComplexClipBlurTiledGM;) |
} |