From 46596ae50559e89a0a2462573ac9448cf309cf56 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Tue, 2 Jan 2018 15:40:29 -0500 Subject: use tool_utils to encapsulate checking for recording canvas and makeSurface Bug: skia: Change-Id: Ia93ee09dd213b8d6ad5c18e887add5ff3448c824 Reviewed-on: https://skia-review.googlesource.com/90243 Reviewed-by: Mike Reed Commit-Queue: Mike Reed --- gm/imagemakewithfilter.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gm/imagemakewithfilter.cpp') diff --git a/gm/imagemakewithfilter.cpp b/gm/imagemakewithfilter.cpp index 9c6e870a85..9805a0ba09 100644 --- a/gm/imagemakewithfilter.cpp +++ b/gm/imagemakewithfilter.cpp @@ -70,10 +70,7 @@ protected: canvas->translate(MARGIN, MARGIN); - sk_sp surface = canvas->makeSurface(info); - if (!surface) { - surface = SkSurface::MakeRaster(info); - } + sk_sp surface = sk_tool_utils::makeSurface(canvas, info); sk_tool_utils::draw_checkerboard(surface->getCanvas()); sk_sp source = surface->makeImageSnapshot(); -- cgit v1.2.3