aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/imagefilters.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/imagefilters.cpp')
-rw-r--r--gm/imagefilters.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/gm/imagefilters.cpp b/gm/imagefilters.cpp
index 146388f331..bc33a57e8f 100644
--- a/gm/imagefilters.cpp
+++ b/gm/imagefilters.cpp
@@ -11,6 +11,7 @@
#include "SkImage.h"
#include "SkImageFilter.h"
#include "SkSurface.h"
+#include "sk_tool_utils.h"
/**
* Test drawing a primitive w/ an imagefilter (in this case, just matrix w/ identity) to see
@@ -69,10 +70,7 @@ DEF_SIMPLE_GM(imagefilters_xfermodes, canvas, 480, 480) {
static sk_sp<SkImage> make_image(SkCanvas* canvas) {
const SkImageInfo info = SkImageInfo::MakeS32(100, 100, kPremul_SkAlphaType);
- auto surface(canvas->makeSurface(info));
- if (!surface) {
- surface = SkSurface::MakeRaster(info);
- }
+ auto surface(sk_tool_utils::makeSurface(canvas, info));
surface->getCanvas()->drawRect(SkRect::MakeXYWH(25, 25, 50, 50), SkPaint());
return surface->makeImageSnapshot();
}