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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp

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/WebGLRenderingContext.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
index 4f6bc8b268885deb08894df393a1f3a4005872cc..0114adfae6d7379c2706f6e9fae098c54d26b2bb 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
@@ -94,8 +94,9 @@ CanvasRenderingContext* WebGLRenderingContext::Factory::create(
if (!shouldCreateContext(contextProvider.get()))
return nullptr;
- WebGLRenderingContext* renderingContext = new WebGLRenderingContext(
- offscreenCanvas, std::move(contextProvider), attrs);
+ WebGLRenderingContext* renderingContext =
+ new WebGLRenderingContext(offscreenCanvas, std::move(contextProvider),
+ attrs, scriptState->getExecutionContext());
if (!renderingContext->drawingBuffer())
return nullptr;
renderingContext->initializeNewContext();
@@ -145,10 +146,12 @@ WebGLRenderingContext::WebGLRenderingContext(
WebGLRenderingContext::WebGLRenderingContext(
OffscreenCanvas* passedOffscreenCanvas,
std::unique_ptr<WebGraphicsContext3DProvider> contextProvider,
- const CanvasContextCreationAttributes& requestedAttributes)
+ const CanvasContextCreationAttributes& requestedAttributes,
+ ExecutionContext* executionContext)
: WebGLRenderingContextBase(passedOffscreenCanvas,
std::move(contextProvider),
requestedAttributes,
+ executionContext,
1) {}
WebGLRenderingContext::~WebGLRenderingContext() {}

Powered by Google App Engine
This is Rietveld 408576698