Handle failed surface creation in AlphaThresholdImageFilter GM

Change-Id: Ibc27d26a9afc1f88d5ca7de2216e09afa10ce846
Reviewed-on: https://skia-review.googlesource.com/6354
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2016-12-20 19:05:09 -05:00 committed by Skia Commit-Bot
parent 144a5c518a
commit 253b4dd51f

View File

@ -131,6 +131,9 @@ protected:
sk_sp<SkSurface> surface(make_color_matching_surface(canvas, WIDTH, HEIGHT,
kPremul_SkAlphaType));
if (!surface) {
return;
}
surface->getCanvas()->clear(SK_ColorTRANSPARENT);
draw_rects(surface->getCanvas());