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

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

Issue 869433003: (not for commit) Simplified multi-threaded Ganesh with lock on Flush only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 // A class to emulate GLES2 over command buffers. 5 // A class to emulate GLES2 over command buffers.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <GLES2/gl2ext.h> 9 #include <GLES2/gl2ext.h>
10 #include <GLES2/gl2extchromium.h> 10 #include <GLES2/gl2extchromium.h>
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 826
827 void GLES2Implementation::ShallowFlushCHROMIUM() { 827 void GLES2Implementation::ShallowFlushCHROMIUM() {
828 GPU_CLIENT_SINGLE_THREAD_CHECK(); 828 GPU_CLIENT_SINGLE_THREAD_CHECK();
829 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glShallowFlushCHROMIUM()"); 829 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glShallowFlushCHROMIUM()");
830 // Flush our command buffer 830 // Flush our command buffer
831 // (tell the service to execute up to the flush cmd.) 831 // (tell the service to execute up to the flush cmd.)
832 helper_->CommandBufferHelper::Flush(); 832 helper_->CommandBufferHelper::Flush();
833 // TODO(piman): Add the FreeEverything() logic here. 833 // TODO(piman): Add the FreeEverything() logic here.
834 } 834 }
835 835
836 void GLES2Implementation::SetSafeFlushPoint() {
837 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glSetSafeFlushPoint()");
838 // Save the current command offset for SafeFlush().
839 helper_->CommandBufferHelper::SetSafeFlushPoint();
840 }
841
842 void GLES2Implementation::SafeFlush() {
843 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glSafeFlushCHROMIUM()");
844 // Flush our command buffer up to the last safe flush point.
845 // (tell the service to execute up to the flush cmd.)
846 helper_->CommandBufferHelper::SafeFlush();
847 }
848
836 void GLES2Implementation::Finish() { 849 void GLES2Implementation::Finish() {
837 GPU_CLIENT_SINGLE_THREAD_CHECK(); 850 GPU_CLIENT_SINGLE_THREAD_CHECK();
838 FinishHelper(); 851 FinishHelper();
839 } 852 }
840 853
841 void GLES2Implementation::ShallowFinishCHROMIUM() { 854 void GLES2Implementation::ShallowFinishCHROMIUM() {
842 GPU_CLIENT_SINGLE_THREAD_CHECK(); 855 GPU_CLIENT_SINGLE_THREAD_CHECK();
843 TRACE_EVENT0("gpu", "GLES2::ShallowFinishCHROMIUM"); 856 TRACE_EVENT0("gpu", "GLES2::ShallowFinishCHROMIUM");
844 // Flush our command buffer (tell the service to execute up to the flush cmd 857 // Flush our command buffer (tell the service to execute up to the flush cmd
845 // and don't return until it completes). 858 // and don't return until it completes).
(...skipping 3527 matching lines...) Expand 10 before | Expand all | Expand 10 after
4373 return false; 4386 return false;
4374 } 4387 }
4375 4388
4376 // Include the auto-generated part of this file. We split this because it means 4389 // Include the auto-generated part of this file. We split this because it means
4377 // we can easily edit the non-auto generated parts right here in this file 4390 // we can easily edit the non-auto generated parts right here in this file
4378 // instead of having to edit some template or the code generator. 4391 // instead of having to edit some template or the code generator.
4379 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 4392 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
4380 4393
4381 } // namespace gles2 4394 } // namespace gles2
4382 } // namespace gpu 4395 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/client/gles2_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698