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

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

Issue 2389363002: Move special DEPTH_STENCIL attachment logic from command buffers to WebGL1 (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.cpp ('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/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 3e6fea9a423f24eecc7e84436deef7f7b76368c8..7d64f6bc8f80548d0bb6392800e0d6a5c0591839 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -2528,25 +2528,8 @@ void WebGLRenderingContextBase::framebufferRenderbuffer(
"no framebuffer bound");
return;
}
- GLuint bufferObject = objectOrZero(buffer);
- if (isWebGL2OrHigher() && 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.
- contextGL()->FramebufferRenderbuffer(target, GL_DEPTH_ATTACHMENT,
- renderbuffertarget, bufferObject);
- contextGL()->FramebufferRenderbuffer(target, GL_STENCIL_ATTACHMENT,
- renderbuffertarget, bufferObject);
- framebufferBinding->setAttachmentForBoundFramebuffer(
- target, GL_DEPTH_ATTACHMENT, buffer);
- framebufferBinding->setAttachmentForBoundFramebuffer(
- target, GL_STENCIL_ATTACHMENT, buffer);
- } else {
- contextGL()->FramebufferRenderbuffer(target, attachment, renderbuffertarget,
- bufferObject);
- framebufferBinding->setAttachmentForBoundFramebuffer(target, attachment,
- buffer);
- }
+ framebufferBinding->setAttachmentForBoundFramebuffer(target, attachment,
+ buffer);
applyStencilTest();
}
@@ -2573,25 +2556,8 @@ void WebGLRenderingContextBase::framebufferTexture2D(GLenum target,
"no framebuffer bound");
return;
}
- GLuint textureObject = objectOrZero(texture);
- if (isWebGL2OrHigher() && 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.
- contextGL()->FramebufferTexture2D(target, GL_DEPTH_ATTACHMENT, textarget,
- textureObject, level);
- contextGL()->FramebufferTexture2D(target, GL_STENCIL_ATTACHMENT, textarget,
- textureObject, level);
- framebufferBinding->setAttachmentForBoundFramebuffer(
- target, GL_DEPTH_ATTACHMENT, textarget, texture, level, 0);
- framebufferBinding->setAttachmentForBoundFramebuffer(
- target, GL_STENCIL_ATTACHMENT, textarget, texture, level, 0);
- } else {
- contextGL()->FramebufferTexture2D(target, attachment, textarget,
- textureObject, level);
- framebufferBinding->setAttachmentForBoundFramebuffer(
- target, attachment, textarget, texture, level, 0);
- }
+ framebufferBinding->setAttachmentForBoundFramebuffer(
+ target, attachment, textarget, texture, level, 0);
applyStencilTest();
}
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698