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

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

Issue 797533002: Add a glBegin/End pair to make glBindFramebuffer work (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 6 years 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
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 4251 matching lines...) Expand 10 before | Expand all | Expand 10 after
4262 state_.RestoreVertexAttribs(); 4262 state_.RestoreVertexAttribs();
4263 } 4263 }
4264 4264
4265 void GLES2DecoderImpl::SetIgnoreCachedStateForTest(bool ignore) { 4265 void GLES2DecoderImpl::SetIgnoreCachedStateForTest(bool ignore) {
4266 state_.SetIgnoreCachedStateForTest(ignore); 4266 state_.SetIgnoreCachedStateForTest(ignore);
4267 } 4267 }
4268 4268
4269 void GLES2DecoderImpl::OnFboChanged() const { 4269 void GLES2DecoderImpl::OnFboChanged() const {
4270 if (workarounds().restore_scissor_on_fbo_change) 4270 if (workarounds().restore_scissor_on_fbo_change)
4271 state_.fbo_binding_for_scissor_workaround_dirty_ = true; 4271 state_.fbo_binding_for_scissor_workaround_dirty_ = true;
4272
4273 if (workarounds().gl_begin_gl_end_on_fbo_change_to_backbuffer) {
4274 GLint bound_fbo_unsigned = -1;
4275 glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &bound_fbo_unsigned);
4276 GLuint bound_fbo = static_cast<GLuint>(bound_fbo_unsigned);
4277 if (surface_ && surface_->GetBackingFrameBufferObject() == bound_fbo)
4278 surface_->WasBound();
4279 }
4272 } 4280 }
4273 4281
4274 // Called after the FBO is checked for completeness. 4282 // Called after the FBO is checked for completeness.
4275 void GLES2DecoderImpl::OnUseFramebuffer() const { 4283 void GLES2DecoderImpl::OnUseFramebuffer() const {
4276 if (state_.fbo_binding_for_scissor_workaround_dirty_) { 4284 if (state_.fbo_binding_for_scissor_workaround_dirty_) {
4277 state_.fbo_binding_for_scissor_workaround_dirty_ = false; 4285 state_.fbo_binding_for_scissor_workaround_dirty_ = false;
4278 // The driver forgets the correct scissor when modifying the FBO binding. 4286 // The driver forgets the correct scissor when modifying the FBO binding.
4279 glScissor(state_.scissor_x, 4287 glScissor(state_.scissor_x,
4280 state_.scissor_y, 4288 state_.scissor_y,
4281 state_.scissor_width, 4289 state_.scissor_width,
(...skipping 7250 matching lines...) Expand 10 before | Expand all | Expand 10 after
11532 } 11540 }
11533 } 11541 }
11534 11542
11535 // Include the auto-generated part of this file. We split this because it means 11543 // Include the auto-generated part of this file. We split this because it means
11536 // we can easily edit the non-auto generated parts right here in this file 11544 // we can easily edit the non-auto generated parts right here in this file
11537 // instead of having to edit some template or the code generator. 11545 // instead of having to edit some template or the code generator.
11538 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 11546 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
11539 11547
11540 } // namespace gles2 11548 } // namespace gles2
11541 } // namespace gpu 11549 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698