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

Unified Diff: gpu/command_buffer/service/framebuffer_manager.cc

Issue 375413003: Do not call glDrawBuffersARB when the extension is absent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/framebuffer_manager.cc
diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc
index 4022b3defaa1e286e85e72f7ac6aa702fa1e9fb2..e1426c7d9689a3db8120a5fd4c3caba73625fc8f 100644
--- a/gpu/command_buffer/service/framebuffer_manager.cc
+++ b/gpu/command_buffer/service/framebuffer_manager.cc
@@ -374,6 +374,11 @@ bool Framebuffer::HasUnclearedColorAttachments() const {
}
void Framebuffer::ChangeDrawBuffersHelper(bool recover) const {
+ // There will always be only one buffer, GL_COLOR_ATTACHMENT0, if
+ // GL_ARB_draw_buffers is not present, even if this FBO has no attachment.
+ if (!gfx::g_driver_gl.ext.b_GL_ARB_draw_buffers)
+ return;
+
scoped_ptr<GLenum[]> buffers(new GLenum[manager_->max_draw_buffers_]);
for (uint32 i = 0; i < manager_->max_draw_buffers_; ++i)
buffers[i] = GL_NONE;
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698