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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.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/layout/svg/LayoutSVGResourcePattern.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
index 386da9e10da92e1fb7f6ff82bb5c1e140c1e40cb..801ecd679595873fabf4a2457e7f15c4fa251f9a 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
@@ -109,8 +109,12 @@ PassOwnPtr<PatternData> LayoutSVGResourcePattern::buildPatternData(const LayoutO
tileTransform.scale(clientBoundingBox.width(), clientBoundingBox.height());
}
+ RefPtr<SkPicture> recording = asPicture(tileBounds, tileTransform);
+ if (!recording)
+ return nullptr;
+
OwnPtr<PatternData> patternData = adoptPtr(new PatternData);
- patternData->pattern = Pattern::createPicturePattern(asPicture(tileBounds, tileTransform));
+ patternData->pattern = Pattern::createPicturePattern(recording);
// Compute pattern space transformation.
patternData->transform.translate(tileBounds.x(), tileBounds.y());

Powered by Google App Engine
This is Rietveld 408576698