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

Side by Side Diff: gpu/command_buffer/service/in_process_command_buffer.h

Issue 217813004: Make ShaderTranslatorCache thread safe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 6 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 namespace gpu { 40 namespace gpu {
41 class StreamTextureManagerInProcess; 41 class StreamTextureManagerInProcess;
42 } 42 }
43 #endif 43 #endif
44 44
45 namespace gpu { 45 namespace gpu {
46 46
47 namespace gles2 { 47 namespace gles2 {
48 class GLES2Decoder; 48 class GLES2Decoder;
49 class ShaderTranslatorCache;
49 } 50 }
50 51
51 class CommandBufferServiceBase; 52 class CommandBufferServiceBase;
52 class GpuMemoryBufferFactory; 53 class GpuMemoryBufferFactory;
53 class GpuScheduler; 54 class GpuScheduler;
54 class TransferBufferManagerInterface; 55 class TransferBufferManagerInterface;
55 56
56 // This class provides a thread-safe interface to the global GPU service (for 57 // This class provides a thread-safe interface to the global GPU service (for
57 // example GPU thread) when being run in single process mode. 58 // example GPU thread) when being run in single process mode.
58 // However, the behavior for accessing one context (i.e. one instance of this 59 // However, the behavior for accessing one context (i.e. one instance of this
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 virtual void Release() const = 0; 123 virtual void Release() const = 0;
123 124
124 // Queues a task to run as soon as possible. 125 // Queues a task to run as soon as possible.
125 virtual void ScheduleTask(const base::Closure& task) = 0; 126 virtual void ScheduleTask(const base::Closure& task) = 0;
126 127
127 // Schedules |callback| to run at an appropriate time for performing idle 128 // Schedules |callback| to run at an appropriate time for performing idle
128 // work. 129 // work.
129 virtual void ScheduleIdleWork(const base::Closure& task) = 0; 130 virtual void ScheduleIdleWork(const base::Closure& task) = 0;
130 131
131 virtual bool UseVirtualizedGLContexts() = 0; 132 virtual bool UseVirtualizedGLContexts() = 0;
133 virtual scoped_refptr<gles2::ShaderTranslatorCache>
134 shader_translator_cache() = 0;
132 }; 135 };
133 136
134 #if defined(OS_ANDROID) 137 #if defined(OS_ANDROID)
135 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( 138 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture(
136 uint32 stream_id); 139 uint32 stream_id);
137 #endif 140 #endif
138 141
139 private: 142 private:
140 struct InitializeOnGpuThreadParams { 143 struct InitializeOnGpuThreadParams {
141 bool is_offscreen; 144 bool is_offscreen;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 222
220 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; 223 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_;
221 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; 224 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_;
222 225
223 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); 226 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer);
224 }; 227 };
225 228
226 } // namespace gpu 229 } // namespace gpu
227 230
228 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ 231 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc ('k') | gpu/command_buffer/service/in_process_command_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698