diff options
author | Mike Reed <reed@google.com> | 2018-01-02 15:40:29 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-02 21:06:41 +0000 |
commit | 46596ae50559e89a0a2462573ac9448cf309cf56 (patch) | |
tree | bc515e91123b6d0d14f7873c4ab7ce2d22b41bcc /gm/imagemakewithfilter.cpp | |
parent | 99b504018b31d63566995b3fc114c940ed4749c4 (diff) |
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 <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'gm/imagemakewithfilter.cpp')
-rw-r--r-- | gm/imagemakewithfilter.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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<SkSurface> surface = canvas->makeSurface(info); - if (!surface) { - surface = SkSurface::MakeRaster(info); - } + sk_sp<SkSurface> surface = sk_tool_utils::makeSurface(canvas, info); sk_tool_utils::draw_checkerboard(surface->getCanvas()); sk_sp<SkImage> source = surface->makeImageSnapshot(); |