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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h

Issue 2490443002: Make OffscreenCanvas an EventTarget (Closed)
Patch Set: tests added Created 4 years, 1 month 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/webgl/WebGLRenderingContextBase.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
index b459f9e053d2ce628929f475584f5017ba8f964f..2e1e7d0ce6befceae0f59214d2709bbff2a82d99 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -591,6 +591,10 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
void commit(ScriptState*, ExceptionState&);
+ ExecutionContext* getExecutionContext() final {
+ return m_executionContext.get();
+ }
+
protected:
friend class EXTDisjointTimerQuery;
friend class EXTDisjointTimerQueryWebGL2;
@@ -622,6 +626,7 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
WebGLRenderingContextBase(OffscreenCanvas*,
std::unique_ptr<WebGraphicsContext3DProvider>,
const CanvasContextCreationAttributes&,
+ ExecutionContext*,
unsigned);
PassRefPtr<DrawingBuffer> createDrawingBuffer(
std::unique_ptr<WebGraphicsContext3DProvider>,
@@ -1579,6 +1584,7 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
OffscreenCanvas*,
std::unique_ptr<WebGraphicsContext3DProvider>,
const CanvasContextCreationAttributes&,
+ ExecutionContext*,
unsigned);
static std::unique_ptr<WebGraphicsContext3DProvider>
createContextProviderInternal(HTMLCanvasElement*,
@@ -1590,6 +1596,8 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
const unsigned m_version;
+ Member<ExecutionContext> m_executionContext;
Justin Novosad 2016/11/14 16:41:00 Storing this in the rendering context is unnecessa
xidachen 2016/11/14 18:48:12 Done. It does make things much simpler.
+
bool isPaintable() const final { return drawingBuffer(); }
};

Powered by Google App Engine
This is Rietveld 408576698