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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.h

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/GraphicsContext.h
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.h b/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
index 1cf648d8dad969a124dbf56a26af869171d70246..8e431b5269413f0bd4268374a8c9244384bd4017 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
@@ -211,6 +211,9 @@ public:
// are stored in a display list that can be replayed at a later time. Pass in the bounding
// rectangle for the content in the list.
void beginRecording(const FloatRect&);
+ // Returns a picture with any recorded draw commands since the prerequisite call to
+ // beginRecording(), or nullptr if the canvas is disabled. The canvas should only be disabled in
+ // certain testing situations.
PassRefPtr<SkPicture> endRecording();
void setShadow(const FloatSize& offset, float blur, const Color&,

Powered by Google App Engine
This is Rietveld 408576698