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

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

Issue 8756001: Rebind to correct backbuffer after clearing READ buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unused result Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 3961 matching lines...) Expand 10 before | Expand all | Expand 10 after
3972 3972
3973 glDisable(GL_SCISSOR_TEST); 3973 glDisable(GL_SCISSOR_TEST);
3974 glClear(clear_bits); 3974 glClear(clear_bits);
3975 3975
3976 info->MarkAttachmentsAsCleared(renderbuffer_manager(), texture_manager()); 3976 info->MarkAttachmentsAsCleared(renderbuffer_manager(), texture_manager());
3977 3977
3978 RestoreClearState(); 3978 RestoreClearState();
3979 3979
3980 if (target == GL_READ_FRAMEBUFFER_EXT) { 3980 if (target == GL_READ_FRAMEBUFFER_EXT) {
3981 glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, info->service_id()); 3981 glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, info->service_id());
3982 FramebufferManager::FramebufferInfo*framebuffer = 3982 FramebufferManager::FramebufferInfo* framebuffer =
3983 GetFramebufferInfoForTarget(GL_READ_FRAMEBUFFER); 3983 GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER_EXT);
3984 glBindFramebufferEXT( 3984 GLuint service_id =
3985 GL_DRAW_FRAMEBUFFER_EXT, framebuffer ? framebuffer->service_id() : 0); 3985 framebuffer ? framebuffer->service_id() : GetBackbufferServiceId();
3986 glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, service_id);
3986 } 3987 }
3987 } 3988 }
3988 3989
3989 void GLES2DecoderImpl::RestoreClearState() { 3990 void GLES2DecoderImpl::RestoreClearState() {
3990 state_dirty_ = true; 3991 state_dirty_ = true;
3991 glClearColor(clear_red_, clear_green_, clear_blue_, clear_alpha_); 3992 glClearColor(clear_red_, clear_green_, clear_blue_, clear_alpha_);
3992 glClearStencil(clear_stencil_); 3993 glClearStencil(clear_stencil_);
3993 glClearDepth(clear_depth_); 3994 glClearDepth(clear_depth_);
3994 if (enable_scissor_test_) { 3995 if (enable_scissor_test_) {
3995 glEnable(GL_SCISSOR_TEST); 3996 glEnable(GL_SCISSOR_TEST);
(...skipping 3688 matching lines...) Expand 10 before | Expand all | Expand 10 after
7684 } 7685 }
7685 7686
7686 7687
7687 // Include the auto-generated part of this file. We split this because it means 7688 // Include the auto-generated part of this file. We split this because it means
7688 // we can easily edit the non-auto generated parts right here in this file 7689 // we can easily edit the non-auto generated parts right here in this file
7689 // instead of having to edit some template or the code generator. 7690 // instead of having to edit some template or the code generator.
7690 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 7691 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
7691 7692
7692 } // namespace gles2 7693 } // namespace gles2
7693 } // namespace gpu 7694 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698