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

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

Issue 896303004: gpu: Workaround Adreno 420 bug with deleting current FBO. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after
3087 void GLES2DecoderImpl::DeleteFramebuffersHelper( 3087 void GLES2DecoderImpl::DeleteFramebuffersHelper(
3088 GLsizei n, const GLuint* client_ids) { 3088 GLsizei n, const GLuint* client_ids) {
3089 bool supports_separate_framebuffer_binds = 3089 bool supports_separate_framebuffer_binds =
3090 features().chromium_framebuffer_multisample; 3090 features().chromium_framebuffer_multisample;
3091 3091
3092 for (GLsizei ii = 0; ii < n; ++ii) { 3092 for (GLsizei ii = 0; ii < n; ++ii) {
3093 Framebuffer* framebuffer = 3093 Framebuffer* framebuffer =
3094 GetFramebuffer(client_ids[ii]); 3094 GetFramebuffer(client_ids[ii]);
3095 if (framebuffer && !framebuffer->IsDeleted()) { 3095 if (framebuffer && !framebuffer->IsDeleted()) {
3096 if (framebuffer == framebuffer_state_.bound_draw_framebuffer.get()) { 3096 if (framebuffer == framebuffer_state_.bound_draw_framebuffer.get()) {
3097 GLenum target = supports_separate_framebuffer_binds ?
3098 GL_DRAW_FRAMEBUFFER_EXT : GL_FRAMEBUFFER;
3099
3100 // Unbind attachments on FBO before deletion.
3101 if (workarounds().unbind_attachments_on_bound_render_fbo_delete)
3102 framebuffer->UnbindAttachments(target);
3103
3104 glBindFramebufferEXT(target, GetBackbufferServiceId());
3097 framebuffer_state_.bound_draw_framebuffer = NULL; 3105 framebuffer_state_.bound_draw_framebuffer = NULL;
3098 framebuffer_state_.clear_state_dirty = true; 3106 framebuffer_state_.clear_state_dirty = true;
3099 GLenum target = supports_separate_framebuffer_binds ?
3100 GL_DRAW_FRAMEBUFFER_EXT : GL_FRAMEBUFFER;
3101 glBindFramebufferEXT(target, GetBackbufferServiceId());
3102 } 3107 }
3103 if (framebuffer == framebuffer_state_.bound_read_framebuffer.get()) { 3108 if (framebuffer == framebuffer_state_.bound_read_framebuffer.get()) {
3104 framebuffer_state_.bound_read_framebuffer = NULL; 3109 framebuffer_state_.bound_read_framebuffer = NULL;
3105 GLenum target = supports_separate_framebuffer_binds ? 3110 GLenum target = supports_separate_framebuffer_binds ?
3106 GL_READ_FRAMEBUFFER_EXT : GL_FRAMEBUFFER; 3111 GL_READ_FRAMEBUFFER_EXT : GL_FRAMEBUFFER;
3107 glBindFramebufferEXT(target, GetBackbufferServiceId()); 3112 glBindFramebufferEXT(target, GetBackbufferServiceId());
3108 } 3113 }
3109 OnFboChanged(); 3114 OnFboChanged();
3110 RemoveFramebuffer(client_ids[ii]); 3115 RemoveFramebuffer(client_ids[ii]);
3111 } 3116 }
(...skipping 8676 matching lines...) Expand 10 before | Expand all | Expand 10 after
11788 } 11793 }
11789 } 11794 }
11790 11795
11791 // Include the auto-generated part of this file. We split this because it means 11796 // Include the auto-generated part of this file. We split this because it means
11792 // we can easily edit the non-auto generated parts right here in this file 11797 // we can easily edit the non-auto generated parts right here in this file
11793 // instead of having to edit some template or the code generator. 11798 // instead of having to edit some template or the code generator.
11794 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 11799 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
11795 11800
11796 } // namespace gles2 11801 } // namespace gles2
11797 } // namespace gpu 11802 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698