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

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

Issue 2509193002: Correct the OffscreenCanvas.getContext API (Closed)
Patch Set: support webgl2 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
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index 739a23f6d51e9088cce1f3c2e4f8fee42a299ad5..97edeede8b64a30e1e198f4aa6070bb8a33a9d5a 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -247,6 +247,31 @@ WebGL2RenderingContextBase::WebGL2RenderingContextBase(
WTF_ARRAY_LENGTH(kSupportedInternalFormatsStorage));
}
+WebGL2RenderingContextBase::WebGL2RenderingContextBase(
+ OffscreenCanvas* passedOffscreenCanvas,
+ std::unique_ptr<WebGraphicsContext3DProvider> contextProvider,
+ const CanvasContextCreationAttributes& requestedAttributes)
+ : WebGLRenderingContextBase(passedOffscreenCanvas,
+ std::move(contextProvider),
+ requestedAttributes,
+ 2),
+ m_readFramebufferBinding(this, nullptr),
+ m_transformFeedbackBinding(this, nullptr),
+ m_boundCopyReadBuffer(this, nullptr),
+ m_boundCopyWriteBuffer(this, nullptr),
+ m_boundPixelPackBuffer(this, nullptr),
+ m_boundPixelUnpackBuffer(this, nullptr),
+ m_boundTransformFeedbackBuffer(this, nullptr),
+ m_boundUniformBuffer(this, nullptr),
+ m_currentBooleanOcclusionQuery(this, nullptr),
+ m_currentTransformFeedbackPrimitivesWrittenQuery(this, nullptr),
+ m_currentElapsedQuery(this, nullptr) {
+ m_supportedInternalFormatsStorage.insert(
+ kSupportedInternalFormatsStorage,
+ kSupportedInternalFormatsStorage +
+ WTF_ARRAY_LENGTH(kSupportedInternalFormatsStorage));
+}
+
WebGL2RenderingContextBase::~WebGL2RenderingContextBase() {
m_readFramebufferBinding = nullptr;
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698