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

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

Issue 24925002: Move Insert/SignalSyncPoint() to GpuControl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
11 #include <queue> 11 #include <queue>
12 #include <set> 12 #include <set>
13 #include <limits> 13 #include <limits>
14 #include <stdio.h> 14 #include <stdio.h>
15 #include <string.h> 15 #include <string.h>
16 #include <GLES2/gl2ext.h> 16 #include <GLES2/gl2ext.h>
17 #include <GLES2/gl2extchromium.h> 17 #include <GLES2/gl2extchromium.h>
18 #include "gpu/command_buffer/client/buffer_tracker.h" 18 #include "gpu/command_buffer/client/buffer_tracker.h"
19 #include "gpu/command_buffer/client/gpu_memory_buffer_tracker.h" 19 #include "gpu/command_buffer/client/gpu_memory_buffer_tracker.h"
20 #include "gpu/command_buffer/client/program_info_manager.h" 20 #include "gpu/command_buffer/client/program_info_manager.h"
21 #include "gpu/command_buffer/client/query_tracker.h" 21 #include "gpu/command_buffer/client/query_tracker.h"
22 #include "gpu/command_buffer/client/transfer_buffer.h" 22 #include "gpu/command_buffer/client/transfer_buffer.h"
23 #include "gpu/command_buffer/client/vertex_array_object_manager.h" 23 #include "gpu/command_buffer/client/vertex_array_object_manager.h"
24 #include "gpu/command_buffer/common/gpu_control.h"
no sievers 2013/09/27 18:13:04 nit: already included in line 26
24 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 25 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
25 #include "gpu/command_buffer/common/gpu_control.h" 26 #include "gpu/command_buffer/common/gpu_control.h"
26 #include "gpu/command_buffer/common/trace_event.h" 27 #include "gpu/command_buffer/common/trace_event.h"
27 #include "ui/gfx/gpu_memory_buffer.h" 28 #include "ui/gfx/gpu_memory_buffer.h"
28 29
29 #if defined(__native_client__) && !defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) 30 #if defined(__native_client__) && !defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS)
30 #define GLES2_SUPPORT_CLIENT_SIDE_ARRAYS 31 #define GLES2_SUPPORT_CLIENT_SIDE_ARRAYS
31 #endif 32 #endif
32 33
33 #if defined(GPU_CLIENT_DEBUG) 34 #if defined(GPU_CLIENT_DEBUG)
(...skipping 3620 matching lines...) Expand 10 before | Expand all | Expand 10 after
3654 GPU_CLIENT_SINGLE_THREAD_CHECK(); 3655 GPU_CLIENT_SINGLE_THREAD_CHECK();
3655 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glWaitAsyncTexImage2DCHROMIUM(" 3656 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glWaitAsyncTexImage2DCHROMIUM("
3656 << GLES2Util::GetStringTextureTarget(target) << ")"); 3657 << GLES2Util::GetStringTextureTarget(target) << ")");
3657 helper_->WaitAsyncTexImage2DCHROMIUM(target); 3658 helper_->WaitAsyncTexImage2DCHROMIUM(target);
3658 CheckGLError(); 3659 CheckGLError();
3659 } 3660 }
3660 3661
3661 GLuint GLES2Implementation::InsertSyncPointCHROMIUM() { 3662 GLuint GLES2Implementation::InsertSyncPointCHROMIUM() {
3662 GPU_CLIENT_SINGLE_THREAD_CHECK(); 3663 GPU_CLIENT_SINGLE_THREAD_CHECK();
3663 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glInsertSyncPointCHROMIUM"); 3664 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glInsertSyncPointCHROMIUM");
3664 return helper_->InsertSyncPointCHROMIUM(); 3665 helper_->CommandBufferHelper::Flush();
3666 return gpu_control_->InsertSyncPoint();
3665 } 3667 }
3666 3668
3667 GLuint GLES2Implementation::CreateImageCHROMIUMHelper( 3669 GLuint GLES2Implementation::CreateImageCHROMIUMHelper(
3668 GLsizei width, GLsizei height, GLenum internalformat) { 3670 GLsizei width, GLsizei height, GLenum internalformat) {
3669 if (width <= 0) { 3671 if (width <= 0) {
3670 SetGLError(GL_INVALID_VALUE, "glCreateImageCHROMIUM", "width <= 0"); 3672 SetGLError(GL_INVALID_VALUE, "glCreateImageCHROMIUM", "width <= 0");
3671 return 0; 3673 return 0;
3672 } 3674 }
3673 3675
3674 if (height <= 0) { 3676 if (height <= 0) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
3825 CheckGLError(); 3827 CheckGLError();
3826 } 3828 }
3827 3829
3828 // Include the auto-generated part of this file. We split this because it means 3830 // Include the auto-generated part of this file. We split this because it means
3829 // we can easily edit the non-auto generated parts right here in this file 3831 // we can easily edit the non-auto generated parts right here in this file
3830 // instead of having to edit some template or the code generator. 3832 // instead of having to edit some template or the code generator.
3831 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 3833 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
3832 3834
3833 } // namespace gles2 3835 } // namespace gles2
3834 } // namespace gpu 3836 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698