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:
parent
144a5c518a
commit
253b4dd51f
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user