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

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

Issue 2372953002: Move special DEPTH_STENCIL attachment logic from command buffers to WebGL1 (Closed)
Patch Set: add more tests 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/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 1d7971b5f50e32835300d3174d098840c7d647a8..0fef5139aa9ebeb1df843166598f543089ff1a81 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -389,20 +389,7 @@ void WebGL2RenderingContextBase::framebufferTextureLayer(GLenum target, GLenum a
synthesizeGLError(GL_INVALID_OPERATION, "framebufferTextureLayer", "no framebuffer bound");
return;
}
- if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
- contextGL()->FramebufferTextureLayer(target, GL_DEPTH_ATTACHMENT, objectOrZero(texture), level, layer);
- contextGL()->FramebufferTextureLayer(target, GL_STENCIL_ATTACHMENT, objectOrZero(texture), level, layer);
- } else {
- contextGL()->FramebufferTextureLayer(target, attachment, objectOrZero(texture), level, layer);
- }
- if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
- // On ES3, DEPTH_STENCIL_ATTACHMENT is like an alias for DEPTH_ATTACHMENT + STENCIL_ATTACHMENT.
- // We divide it here so in WebGLFramebuffer, we don't have to handle DEPTH_STENCIL_ATTACHMENT in WebGL 2.
- framebufferBinding->setAttachmentForBoundFramebuffer(target, GL_DEPTH_ATTACHMENT, textarget, texture, level, layer);
- framebufferBinding->setAttachmentForBoundFramebuffer(target, GL_STENCIL_ATTACHMENT, textarget, texture, level, layer);
- } else {
- framebufferBinding->setAttachmentForBoundFramebuffer(target, attachment, textarget, texture, level, layer);
- }
+ framebufferBinding->setAttachmentForBoundFramebuffer(target, attachment, textarget, texture, level, layer);
applyStencilTest();
}

Powered by Google App Engine
This is Rietveld 408576698