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

Unified Diff: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.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/core/offscreencanvas/OffscreenCanvas.cpp
diff --git a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
index b5f8febd6e7bfcd7f93520e4634a53b70aa5fd7f..7a41d2339b0f2af3a52184f7655089b4ea5a0d67 100644
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
@@ -9,7 +9,9 @@
#include "core/html/canvas/CanvasRenderingContext.h"
#include "core/html/canvas/CanvasRenderingContextFactory.h"
#include "platform/graphics/ImageBuffer.h"
+#include "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h"
#include "wtf/MathExtras.h"
+#include "wtf/PtrUtil.h"
#include <memory>
namespace blink {
@@ -134,6 +136,13 @@ bool OffscreenCanvas::isPaintable() const
return m_context->isPaintable();
}
+OffscreenCanvasFrameDispatcher* OffscreenCanvas::getOrCreateFrameDispatcher()
+{
+ if (!m_frameDispatcher)
+ m_frameDispatcher = wrapUnique(new OffscreenCanvasFrameDispatcherImpl(m_clientId, m_localId, m_nonce));
danakj 2016/09/02 19:12:42 why isn't this created when OffscreenCanvas is con
xlai (Olivia) 2016/09/02 20:10:06 The FrameDispatcher is needed only when user inten
danakj 2016/09/02 21:51:00 Oops I mean to change this comment but it got lost
danakj 2016/09/02 21:53:50 Though also from https://cs.chromium.org/chromium/
xlai (Olivia) 2016/09/02 23:41:28 The code link you've given happens when OffscreenC
danakj 2016/09/03 00:40:42 I see. I guess I mostly find it a bit confusing th
+ return m_frameDispatcher.get();
+}
+
DEFINE_TRACE(OffscreenCanvas)
{
visitor->trace(m_context);

Powered by Google App Engine
This is Rietveld 408576698