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

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: protect ShFinalize 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 gles2::ShaderTranslatorCache* shader_translator_cache() = 0;
no sievers 2014/04/02 18:30:19 nit: return scoped_refptr<>
132 }; 134 };
133 135
134 #if defined(OS_ANDROID) 136 #if defined(OS_ANDROID)
135 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( 137 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture(
136 uint32 stream_id); 138 uint32 stream_id);
137 #endif 139 #endif
138 140
139 private: 141 private:
140 struct InitializeOnGpuThreadParams { 142 struct InitializeOnGpuThreadParams {
141 bool is_offscreen; 143 bool is_offscreen;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 221
220 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; 222 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_;
221 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; 223 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_;
222 224
223 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); 225 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer);
224 }; 226 };
225 227
226 } // namespace gpu 228 } // namespace gpu
227 229
228 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ 230 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698