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

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

Issue 2212163002: Add some plumbing for the color management of canvases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 4 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/webgl/WebGL2RenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index 9a84f98e2777968e04385952256419bf1a4b64b9..ef97d60d6e50ffb42854b1aa765ffac8415c39d8 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -170,7 +170,7 @@ const GLenum kCompressedTextureFormatsETC2EAC[] = {
GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
};
-WebGL2RenderingContextBase::WebGL2RenderingContextBase(HTMLCanvasElement* passedCanvas, std::unique_ptr<WebGraphicsContext3DProvider> contextProvider, const WebGLContextAttributes& requestedAttributes)
+WebGL2RenderingContextBase::WebGL2RenderingContextBase(HTMLCanvasElement* passedCanvas, std::unique_ptr<WebGraphicsContext3DProvider> contextProvider, const CanvasContextCreationAttributes& requestedAttributes)
: WebGLRenderingContextBase(passedCanvas, std::move(contextProvider), requestedAttributes, 2)
{
m_supportedInternalFormatsStorage.insert(kSupportedInternalFormatsStorage, kSupportedInternalFormatsStorage + WTF_ARRAY_LENGTH(kSupportedInternalFormatsStorage));
@@ -3188,10 +3188,10 @@ ScriptValue WebGL2RenderingContextBase::getFramebufferAttachmentParameter(Script
// Default framebuffer (an internal fbo)
if (!framebufferBinding) {
- // We can use m_requestedAttribs because in WebGL 2, they are required to be honored.
- bool hasDepth = m_requestedAttributes.depth();
- bool hasStencil = m_requestedAttributes.stencil();
- bool hasAlpha = m_requestedAttributes.alpha();
+ // We can use creationAttributes() because in WebGL 2, they are required to be honored.
+ bool hasDepth = creationAttributes().depth();
+ bool hasStencil = creationAttributes().stencil();
+ bool hasAlpha = creationAttributes().alpha();
bool missingImage = (attachment == GL_DEPTH && !hasDepth)
|| (attachment == GL_STENCIL && !hasStencil);
if (missingImage) {

Powered by Google App Engine
This is Rietveld 408576698