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

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

Issue 2738573002: Streamline the presentation of ImageBitmapRenderingContext (Closed)
Patch Set: Fix crash in gpu test 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 5c4ae21aec52ea2d4574b1281738c6f4dd96f75b..be4c72606529c1879ede2e0b79c5e6d666f65037 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
@@ -165,6 +165,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