Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.cpp |
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.cpp b/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.cpp |
| index 4142408539e52bc7a1e8e4fdae9daded81ad263c..ae9829d5b008298e780b1c8f8521d4782d6023a4 100644 |
| --- a/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.cpp |
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.cpp |
| @@ -27,6 +27,7 @@ |
| #include "gpu/command_buffer/client/gles2_interface.h" |
| #include "modules/webgl/WebGLFramebuffer.h" |
| +#include "wtf/Assertions.h" |
|
Zhenyao Mo
2016/04/14 20:15:15
why do you need this?
|
| namespace blink { |
| @@ -140,6 +141,7 @@ bool WebGLDrawBuffers::satisfiesWebGLRequirements(WebGLRenderingContextBase* web |
| GLint maxAllowedBuffers = std::min(maxDrawBuffers, maxColorAttachments); |
| for (GLint i = 0; i < maxAllowedBuffers; ++i) { |
| GLuint color; |
| + |
|
Ken Russell (switch to Gerrit)
2016/04/14 20:33:08
If you can undo this whitespace change and the one
|
| gl->GenTextures(1, &color); |
| colors.append(color); |
| gl->BindTexture(GL_TEXTURE_2D, color); |
| @@ -158,14 +160,12 @@ bool WebGLDrawBuffers::satisfiesWebGLRequirements(WebGLRenderingContextBase* web |
| gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, 0, 0); |
| } |
| if (supportsDepthStencil) { |
| - gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depthStencil, 0); |
| - gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_TEXTURE_2D, depthStencil, 0); |
| + gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, depthStencil, 0); |
|
Ken Russell (switch to Gerrit)
2016/04/14 20:33:08
Could you please add a comment that the DEPTH_STEN
|
| if (gl->CheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { |
| ok = false; |
| break; |
| } |
| - gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, 0, 0); |
| - gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_TEXTURE_2D, 0, 0); |
| + gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, 0, 0); |
| } |
| } |
| @@ -177,6 +177,7 @@ bool WebGLDrawBuffers::satisfiesWebGLRequirements(WebGLRenderingContextBase* web |
| if (supportsDepthStencil) |
| gl->DeleteTextures(1, &depthStencil); |
| gl->DeleteTextures(colors.size(), colors.data()); |
| + |
| return ok; |
| } |