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

Side by Side Diff: content/common/gpu/gpu_channel_manager.h

Issue 1451353002: Implement GpuArcVideoService for arc video accelerator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and addressed luis's comments Created 5 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 (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 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 namespace IPC { 49 namespace IPC {
50 struct ChannelHandle; 50 struct ChannelHandle;
51 class SyncChannel; 51 class SyncChannel;
52 } 52 }
53 53
54 struct GPUCreateCommandBufferConfig; 54 struct GPUCreateCommandBufferConfig;
55 struct GpuMsg_EstablishChannel_Params; 55 struct GpuMsg_EstablishChannel_Params;
56 56
57 namespace content { 57 namespace content {
58 class GpuArcVideoService;
58 class GpuChannel; 59 class GpuChannel;
59 class GpuMemoryBufferFactory; 60 class GpuMemoryBufferFactory;
60 class GpuWatchdog; 61 class GpuWatchdog;
61 62
62 // A GpuChannelManager is a thread responsible for issuing rendering commands 63 // A GpuChannelManager is a thread responsible for issuing rendering commands
63 // managing the lifetimes of GPU channels and forwarding IPC requests from the 64 // managing the lifetimes of GPU channels and forwarding IPC requests from the
64 // browser process to them based on the corresponding renderer ID. 65 // browser process to them based on the corresponding renderer ID.
65 class CONTENT_EXPORT GpuChannelManager : public IPC::Listener, 66 class CONTENT_EXPORT GpuChannelManager : public IPC::Listener,
66 public IPC::Sender { 67 public IPC::Sender {
67 public: 68 public:
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 const gfx::GLSurfaceHandle& window, 153 const gfx::GLSurfaceHandle& window,
153 int32 client_id, 154 int32 client_id,
154 const GPUCreateCommandBufferConfig& init_params, 155 const GPUCreateCommandBufferConfig& init_params,
155 int32 route_id); 156 int32 route_id);
156 void OnLoadedShader(const std::string& shader); 157 void OnLoadedShader(const std::string& shader);
157 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, int client_id); 158 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, int client_id);
158 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, int client_id); 159 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, int client_id);
159 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 160 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
160 int client_id, 161 int client_id,
161 const gpu::SyncToken& sync_token); 162 const gpu::SyncToken& sync_token);
163 void OnCreateArcVideoAcceleratorChannel();
164 void ArcVideoAcceleratorChannelCreated(const IPC::ChannelHandle& handle);
165 void OnShutdownArcVideoService();
162 166
163 void OnUpdateValueState(int client_id, 167 void OnUpdateValueState(int client_id,
164 unsigned int target, 168 unsigned int target,
165 const gpu::ValueState& state); 169 const gpu::ValueState& state);
166 #if defined(OS_ANDROID) 170 #if defined(OS_ANDROID)
167 void OnWakeUpGpu(); 171 void OnWakeUpGpu();
168 void ScheduleWakeUpGpu(); 172 void ScheduleWakeUpGpu();
169 void DoWakeUpGpu(); 173 void DoWakeUpGpu();
170 #endif 174 #endif
171 void OnLoseAllContexts(); 175 void OnLoseAllContexts();
(...skipping 11 matching lines...) Expand all
183 scoped_refptr<gpu::PreemptionFlag> preemption_flag_; 187 scoped_refptr<gpu::PreemptionFlag> preemption_flag_;
184 GpuMemoryManager gpu_memory_manager_; 188 GpuMemoryManager gpu_memory_manager_;
185 // SyncPointManager guaranteed to outlive running MessageLoop. 189 // SyncPointManager guaranteed to outlive running MessageLoop.
186 gpu::SyncPointManager* sync_point_manager_; 190 gpu::SyncPointManager* sync_point_manager_;
187 scoped_ptr<gpu::SyncPointClientWaiter> sync_point_client_waiter_; 191 scoped_ptr<gpu::SyncPointClientWaiter> sync_point_client_waiter_;
188 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; 192 scoped_ptr<gpu::gles2::ProgramCache> program_cache_;
189 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; 193 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_;
190 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> 194 scoped_refptr<gpu::gles2::FramebufferCompletenessCache>
191 framebuffer_completeness_cache_; 195 framebuffer_completeness_cache_;
192 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; 196 scoped_refptr<gfx::GLSurface> default_offscreen_surface_;
197 scoped_ptr<GpuArcVideoService> arc_video_service_;
Pawel Osciak 2015/12/23 06:24:01 I'm wondering if we should make this and other thi
kcwu 2015/12/23 09:09:43 Done.
193 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; 198 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
194 #if defined(OS_ANDROID) 199 #if defined(OS_ANDROID)
195 // Last time we know the GPU was powered on. Global for tracking across all 200 // Last time we know the GPU was powered on. Global for tracking across all
196 // transport surfaces. 201 // transport surfaces.
197 base::TimeTicks last_gpu_access_time_; 202 base::TimeTicks last_gpu_access_time_;
198 base::TimeTicks begin_wake_up_time_; 203 base::TimeTicks begin_wake_up_time_;
199 #endif 204 #endif
200 205
201 // Member variables should appear before the WeakPtrFactory, to ensure 206 // Member variables should appear before the WeakPtrFactory, to ensure
202 // that any WeakPtrs to Controller are invalidated before its members 207 // that any WeakPtrs to Controller are invalidated before its members
203 // variable's destructors are executed, rendering them invalid. 208 // variable's destructors are executed, rendering them invalid.
204 base::WeakPtrFactory<GpuChannelManager> weak_factory_; 209 base::WeakPtrFactory<GpuChannelManager> weak_factory_;
205 210
206 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); 211 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager);
207 }; 212 };
208 213
209 } // namespace content 214 } // namespace content
210 215
211 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ 216 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698