Handle nullptr from asTextureRef
This can fail, if the special image dimensions are larger than the maximum allowable render target dimensions. BUG=chromium:666519 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2520043003 Review-Url: https://codereview.chromium.org/2520043003
This commit is contained in:
parent
e8eed323ef
commit
818d8a99e8
@ -352,6 +352,9 @@ sk_sp<SkImage> SkImage::makeWithFilter(const SkImageFilter* filter, const SkIRec
|
||||
if (result->isTextureBacked()) {
|
||||
GrContext* context = result->getContext();
|
||||
sk_sp<GrTexture> texture = result->asTextureRef(context);
|
||||
if (!texture) {
|
||||
return nullptr;
|
||||
}
|
||||
fullSize = SkIRect::MakeWH(texture->width(), texture->height());
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user