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

Unified Diff: third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp

Issue 2294963002: Submit Compositor Frame from OffscreenCanvas on main (Closed)
Patch Set: Using Ref test fixes layout test problem Created 4 years, 3 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/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
index 839a8687eb16ad21f15f55e5e2aa61a5422d58a0..861ec6b44f1bde9630fa0c8f845e020f1ec92a33 100644
--- a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
@@ -44,6 +44,16 @@ DEFINE_TRACE(OffscreenCanvasRenderingContext2D)
BaseRenderingContext2D::trace(visitor);
}
+void OffscreenCanvasRenderingContext2D::commit(ExecutionContext* executionContext)
+{
+ if (executionContext->isWorkerGlobalScope()) {
+ // TODO(563858): implement commit() on worker thread; currently, do
+ // nothing for worker thread.
+ return;
+ }
+ getOffscreenCanvas()->getOrCreateFrameDispatcher()->uploadImage(width(), height());
+}
+
// BaseRenderingContext2D implementation
bool OffscreenCanvasRenderingContext2D::originClean() const
{

Powered by Google App Engine
This is Rietveld 408576698