Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(860)

Unified Diff: third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp

Issue 1841833002: Deal gracefully with null {GraphicsContext,SkPictureBuilder}.endRecording() results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't end recording twice in DrawingRecorder. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
diff --git a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
index a32427a80f3fbbdebace7b7dad42e1bec109884c..57cf9fc3e277cc960759b5fb59daaf13d5ca1b6b 100644
--- a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
@@ -178,6 +178,8 @@ PassRefPtr<SkImageFilter> FEImage::createImageFilterForLayoutObject(const Layout
SVGPaintContext::paintSubtree(filterPicture.context(), &layoutObject);
}
RefPtr<const SkPicture> recording = filterPicture.endRecording();
+ if (!recording)
+ return nullptr;
RefPtr<SkImageFilter> result = adoptRef(SkPictureImageFilter::Create(recording.get(), dstRect));
return result.release();

Powered by Google App Engine
This is Rietveld 408576698