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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 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 <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 28 matching lines...) Expand all
39 #if defined(OS_ANDROID) 39 #if defined(OS_ANDROID)
40 namespace gfx { 40 namespace gfx {
41 class SurfaceTexture; 41 class SurfaceTexture;
42 } 42 }
43 namespace gpu { 43 namespace gpu {
44 class StreamTextureManagerInProcess; 44 class StreamTextureManagerInProcess;
45 } 45 }
46 #endif 46 #endif
47 47
48 namespace gpu { 48 namespace gpu {
49 class ValueStateMap;
49 50
50 namespace gles2 { 51 namespace gles2 {
51 class GLES2Decoder; 52 class GLES2Decoder;
52 class MailboxManager; 53 class MailboxManager;
53 class ShaderTranslatorCache; 54 class ShaderTranslatorCache;
54 } 55 }
55 56
56 class CommandBufferServiceBase; 57 class CommandBufferServiceBase;
57 class GpuMemoryBufferManager; 58 class GpuMemoryBufferManager;
58 class GpuScheduler; 59 class GpuScheduler;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 virtual void ScheduleTask(const base::Closure& task) = 0; 132 virtual void ScheduleTask(const base::Closure& task) = 0;
132 133
133 // Schedules |callback| to run at an appropriate time for performing idle 134 // Schedules |callback| to run at an appropriate time for performing idle
134 // work. 135 // work.
135 virtual void ScheduleIdleWork(const base::Closure& task) = 0; 136 virtual void ScheduleIdleWork(const base::Closure& task) = 0;
136 137
137 virtual bool UseVirtualizedGLContexts() = 0; 138 virtual bool UseVirtualizedGLContexts() = 0;
138 virtual scoped_refptr<gles2::ShaderTranslatorCache> 139 virtual scoped_refptr<gles2::ShaderTranslatorCache>
139 shader_translator_cache() = 0; 140 shader_translator_cache() = 0;
140 scoped_refptr<gles2::MailboxManager> mailbox_manager(); 141 scoped_refptr<gles2::MailboxManager> mailbox_manager();
142 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state();
141 143
142 private: 144 private:
143 scoped_refptr<gles2::MailboxManager> mailbox_manager_; 145 scoped_refptr<gles2::MailboxManager> mailbox_manager_;
146 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_;
144 }; 147 };
145 148
146 #if defined(OS_ANDROID) 149 #if defined(OS_ANDROID)
147 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( 150 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture(
148 uint32 stream_id); 151 uint32 stream_id);
149 #endif 152 #endif
150 153
151 private: 154 private:
152 struct InitializeOnGpuThreadParams { 155 struct InitializeOnGpuThreadParams {
153 bool is_offscreen; 156 bool is_offscreen;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 uint32 internalformat); 203 uint32 internalformat);
201 void DestroyImageOnGpuThread(int32 id); 204 void DestroyImageOnGpuThread(int32 id);
202 205
203 // Callbacks: 206 // Callbacks:
204 void OnContextLost(); 207 void OnContextLost();
205 void OnResizeView(gfx::Size size, float scale_factor); 208 void OnResizeView(gfx::Size size, float scale_factor);
206 bool GetBufferChanged(int32 transfer_buffer_id); 209 bool GetBufferChanged(int32 transfer_buffer_id);
207 void PumpCommands(); 210 void PumpCommands();
208 void PerformIdleWork(); 211 void PerformIdleWork();
209 212
210 static scoped_refptr<Service> GetDefaultService();
211
212 // Members accessed on the gpu thread (possibly with the exception of 213 // Members accessed on the gpu thread (possibly with the exception of
213 // creation): 214 // creation):
214 bool context_lost_; 215 bool context_lost_;
215 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_; 216 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_;
216 scoped_ptr<GpuScheduler> gpu_scheduler_; 217 scoped_ptr<GpuScheduler> gpu_scheduler_;
217 scoped_ptr<gles2::GLES2Decoder> decoder_; 218 scoped_ptr<gles2::GLES2Decoder> decoder_;
218 scoped_refptr<gfx::GLContext> context_; 219 scoped_refptr<gfx::GLContext> context_;
219 scoped_refptr<gfx::GLSurface> surface_; 220 scoped_refptr<gfx::GLSurface> surface_;
220 base::Closure context_lost_callback_; 221 base::Closure context_lost_callback_;
221 bool idle_work_pending_; // Used to throttle PerformIdleWork. 222 bool idle_work_pending_; // Used to throttle PerformIdleWork.
(...skipping 25 matching lines...) Expand all
247 248
248 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_; 249 base::WeakPtr<InProcessCommandBuffer> gpu_thread_weak_ptr_;
249 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_; 250 base::WeakPtrFactory<InProcessCommandBuffer> gpu_thread_weak_ptr_factory_;
250 251
251 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer); 252 DISALLOW_COPY_AND_ASSIGN(InProcessCommandBuffer);
252 }; 253 };
253 254
254 } // namespace gpu 255 } // namespace gpu
255 256
256 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_ 257 #endif // GPU_COMMAND_BUFFER_SERVICE_IN_PROCESS_COMMAND_BUFFER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gpu_switches.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