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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp

Issue 2738573002: Streamline the presentation of ImageBitmapRenderingContext (Closed)
Patch Set: Created 3 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/html/canvas/CanvasRenderingContext.cpp
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
index 77bedfa4a87b0e00b44897391efa685335493fb5..3db6ed20b1019af7d4aefafd90233d8fe7a50adb 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
@@ -175,6 +175,15 @@ void CanvasRenderingContext::dispose() {
void CanvasRenderingContext::didDraw(const SkIRect& dirtyRect) {
canvas()->didDraw(SkRect::Make(dirtyRect));
+ scheduleFinalizeFrameIfNeeded();
+}
+
+void CanvasRenderingContext::didDraw() {
+ canvas()->didDraw();
+ scheduleFinalizeFrameIfNeeded();
+}
+
+void CanvasRenderingContext::scheduleFinalizeFrameIfNeeded() {
if (!m_finalizeFrameScheduled) {
m_finalizeFrameScheduled = true;
Platform::current()->currentThread()->addTaskObserver(this);

Powered by Google App Engine
This is Rietveld 408576698