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

Side by Side Diff: trunk/src/gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 382003004: Revert 282393 "Do not call glDrawBuffersARB when the extension i..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/src/gpu/command_buffer/service/framebuffer_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 3104 matching lines...) Expand 10 before | Expand all | Expand 10 after
3115 state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 3115 state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
3116 glClearStencil(0); 3116 glClearStencil(0);
3117 state_.SetDeviceStencilMaskSeparate(GL_FRONT, kDefaultStencilMask); 3117 state_.SetDeviceStencilMaskSeparate(GL_FRONT, kDefaultStencilMask);
3118 state_.SetDeviceStencilMaskSeparate(GL_BACK, kDefaultStencilMask); 3118 state_.SetDeviceStencilMaskSeparate(GL_BACK, kDefaultStencilMask);
3119 glClearDepth(1.0f); 3119 glClearDepth(1.0f);
3120 state_.SetDeviceDepthMask(GL_TRUE); 3120 state_.SetDeviceDepthMask(GL_TRUE);
3121 state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false); 3121 state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false);
3122 bool reset_draw_buffer = false; 3122 bool reset_draw_buffer = false;
3123 if ((backbuffer_needs_clear_bits_ | GL_COLOR_BUFFER_BIT) != 0 && 3123 if ((backbuffer_needs_clear_bits_ | GL_COLOR_BUFFER_BIT) != 0 &&
3124 group_->draw_buffer() == GL_NONE) { 3124 group_->draw_buffer() == GL_NONE) {
3125 DCHECK(gfx::g_driver_gl.ext.b_GL_ARB_draw_buffers);
3126 reset_draw_buffer = true; 3125 reset_draw_buffer = true;
3127 GLenum buf = GL_BACK; 3126 GLenum buf = GL_BACK;
3128 if (GetBackbufferServiceId() != 0) // emulated backbuffer 3127 if (GetBackbufferServiceId() != 0) // emulated backbuffer
3129 buf = GL_COLOR_ATTACHMENT0; 3128 buf = GL_COLOR_ATTACHMENT0;
3130 glDrawBuffersARB(1, &buf); 3129 glDrawBuffersARB(1, &buf);
3131 } 3130 }
3132 glClear(backbuffer_needs_clear_bits_); 3131 glClear(backbuffer_needs_clear_bits_);
3133 if (reset_draw_buffer) { 3132 if (reset_draw_buffer) {
3134 GLenum buf = GL_NONE; 3133 GLenum buf = GL_NONE;
3135 glDrawBuffersARB(1, &buf); 3134 glDrawBuffersARB(1, &buf);
(...skipping 7781 matching lines...) Expand 10 before | Expand all | Expand 10 after
10917 } 10916 }
10918 } 10917 }
10919 10918
10920 // Include the auto-generated part of this file. We split this because it means 10919 // Include the auto-generated part of this file. We split this because it means
10921 // we can easily edit the non-auto generated parts right here in this file 10920 // we can easily edit the non-auto generated parts right here in this file
10922 // instead of having to edit some template or the code generator. 10921 // instead of having to edit some template or the code generator.
10923 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 10922 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
10924 10923
10925 } // namespace gles2 10924 } // namespace gles2
10926 } // namespace gpu 10925 } // namespace gpu
OLDNEW
« no previous file with comments | « trunk/src/gpu/command_buffer/service/framebuffer_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698