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

Unified Diff: third_party/WebKit/Source/platform/exported/WebFont.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/exported/WebFont.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebFont.cpp b/third_party/WebKit/Source/platform/exported/WebFont.cpp
index 2c8c9b181dcd95732340b695d3d92e53f5e04294..dc55e85d5ccfc1b9e011b4d8275a465a872ed9b1 100644
--- a/third_party/WebKit/Source/platform/exported/WebFont.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebFont.cpp
@@ -107,8 +107,9 @@ void WebFont::drawText(WebCanvas* canvas, const WebTextRun& run,
context.drawText(m_private->getFont(), runInfo, leftBaseline);
context.restore();
}
-
- pictureBuilder.endRecording()->playback(canvas);
+ RefPtr<const SkPicture> recording = pictureBuilder.endRecording();
+ if (recording)
+ recording->playback(canvas);
}
int WebFont::calculateWidth(const WebTextRun& run) const

Powered by Google App Engine
This is Rietveld 408576698