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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 9910004: Implement Discard and EnsureBackbufferCHROMIUM using command buffer instead of IPC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
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 // A class to emulate GLES2 over command buffers. 5 // A class to emulate GLES2 over command buffers.
6 6
7 #include "../client/gles2_implementation.h" 7 #include "../client/gles2_implementation.h"
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 3241 matching lines...) Expand 10 before | Expand all | Expand 10 after
3252 if (bound_element_array_buffer_id_ == 0) { 3252 if (bound_element_array_buffer_id_ == 0) {
3253 // Restore the element array binding. 3253 // Restore the element array binding.
3254 helper_->BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); 3254 helper_->BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
3255 } 3255 }
3256 #else 3256 #else
3257 helper_->DrawElementsInstancedANGLE( 3257 helper_->DrawElementsInstancedANGLE(
3258 mode, count, type, ToGLuint(indices), primcount); 3258 mode, count, type, ToGLuint(indices), primcount);
3259 #endif 3259 #endif
3260 } 3260 }
3261 3261
3262 void GLES2Implementation::DiscardBackbufferCHROMIUM() {
3263 GPU_CLIENT_SINGLE_THREAD_CHECK();
3264 GPU_CLIENT_LOG("[" << this << "] glDiscardBackbufferCHROMIUM()");
3265 helper_->DiscardBackbufferCHROMIUM();
3266 helper_->CommandBufferHelper::Flush();
3267 }
3268
3269 void GLES2Implementation::EnsureBackbufferCHROMIUM() {
3270 GPU_CLIENT_SINGLE_THREAD_CHECK();
3271 GPU_CLIENT_LOG("[" << this << "] glEnsureBackbufferCHROMIUM()");
3272 helper_->EnsureBackbufferCHROMIUM();
3273 }
3274
3262 } // namespace gles2 3275 } // namespace gles2
3263 } // namespace gpu 3276 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_cmd_helper_autogen.h ('k') | gpu/command_buffer/client/gles2_implementation_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698