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

Unified Diff: third_party/WebKit/Source/platform/graphics/GeneratedImage.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/platform/graphics/GeneratedImage.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp b/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp
index 5a1b25147f3bbf1f335b6ee5fcb8694eec06d51a..d74b90d51c43695124f27680b3d45e29f8bbb4d2 100644
--- a/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp
@@ -48,6 +48,8 @@ void GeneratedImage::drawPattern(GraphicsContext& destContext, const FloatRect&
builder.context().beginRecording(tileRect);
drawTile(builder.context(), srcRect);
RefPtr<SkPicture> tilePicture = builder.endRecording();
+ if (!tilePicture)
+ return;
AffineTransform patternTransform;
patternTransform.translate(phase.x(), phase.y());

Powered by Google App Engine
This is Rietveld 408576698