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

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

Issue 12079065: cc: Flush after context switch (Qualcomm WAR) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snowclamp_simple
Patch Set: remove extraneous whitespace change Created 7 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
« no previous file with comments | « gpu/command_buffer/service/feature_info.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 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 if (texture_dirty) 2730 if (texture_dirty)
2731 RestoreCurrentTexture2DBindings(); 2731 RestoreCurrentTexture2DBindings();
2732 // A texture attached to frame-buffer might have changed size. 2732 // A texture attached to frame-buffer might have changed size.
2733 if (frame_buffer_dirty) { 2733 if (frame_buffer_dirty) {
2734 clear_state_dirty_ = true; 2734 clear_state_dirty_ = true;
2735 // TODO(gman): If textures tracked which framebuffers they were attached to 2735 // TODO(gman): If textures tracked which framebuffers they were attached to
2736 // we could just mark those framebuffers as not complete. 2736 // we could just mark those framebuffers as not complete.
2737 framebuffer_manager()->IncFramebufferStateChangeCount(); 2737 framebuffer_manager()->IncFramebufferStateChangeCount();
2738 } 2738 }
2739 2739
2740 if (workarounds().flush_on_context_switch)
2741 glFlush();
2742
2740 return true; 2743 return true;
2741 } 2744 }
2742 2745
2743 void GLES2DecoderImpl::ReleaseCurrent() { 2746 void GLES2DecoderImpl::ReleaseCurrent() {
2744 if (context_.get()) 2747 if (context_.get())
2745 context_->ReleaseCurrent(surface_.get()); 2748 context_->ReleaseCurrent(surface_.get());
2746 } 2749 }
2747 2750
2748 void GLES2DecoderImpl::RestoreCurrentRenderbufferBindings() { 2751 void GLES2DecoderImpl::RestoreCurrentRenderbufferBindings() {
2749 RenderbufferManager::RenderbufferInfo* renderbuffer = 2752 RenderbufferManager::RenderbufferInfo* renderbuffer =
(...skipping 7324 matching lines...) Expand 10 before | Expand all | Expand 10 after
10074 return error::kNoError; 10077 return error::kNoError;
10075 } 10078 }
10076 10079
10077 // Include the auto-generated part of this file. We split this because it means 10080 // Include the auto-generated part of this file. We split this because it means
10078 // we can easily edit the non-auto generated parts right here in this file 10081 // we can easily edit the non-auto generated parts right here in this file
10079 // instead of having to edit some template or the code generator. 10082 // instead of having to edit some template or the code generator.
10080 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 10083 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
10081 10084
10082 } // namespace gles2 10085 } // namespace gles2
10083 } // namespace gpu 10086 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698