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

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

Issue 1366473002: Move WakeUpGpu logic to GpuChannelManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 5 years, 3 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
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_channel_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 105
106 // Returns the maximum order number for unprocessed IPC messages across all 106 // Returns the maximum order number for unprocessed IPC messages across all
107 // channels. 107 // channels.
108 uint32_t GetUnprocessedOrderNum() const; 108 uint32_t GetUnprocessedOrderNum() const;
109 109
110 // Returns the maximum order number for processed IPC messages across all 110 // Returns the maximum order number for processed IPC messages across all
111 // channels. 111 // channels.
112 uint32_t GetProcessedOrderNum() const; 112 uint32_t GetProcessedOrderNum() const;
113 113
114 #if defined(OS_ANDROID)
115 void DidAccessGpu();
116 #endif
117
114 protected: 118 protected:
115 virtual scoped_ptr<GpuChannel> CreateGpuChannel( 119 virtual scoped_ptr<GpuChannel> CreateGpuChannel(
116 gfx::GLShareGroup* share_group, 120 gfx::GLShareGroup* share_group,
117 gpu::gles2::MailboxManager* mailbox_manager, 121 gpu::gles2::MailboxManager* mailbox_manager,
118 int client_id, 122 int client_id,
119 uint64_t client_tracing_id, 123 uint64_t client_tracing_id,
120 bool allow_future_sync_points, 124 bool allow_future_sync_points,
121 bool allow_real_time_streams); 125 bool allow_real_time_streams);
122 126
123 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 127 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
(...skipping 24 matching lines...) Expand all
148 void OnLoadedShader(std::string shader); 152 void OnLoadedShader(std::string shader);
149 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, int client_id); 153 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, int client_id);
150 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, int client_id); 154 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, int client_id);
151 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 155 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
152 int client_id, 156 int client_id,
153 int32 sync_point); 157 int32 sync_point);
154 158
155 void OnUpdateValueState(int client_id, 159 void OnUpdateValueState(int client_id,
156 unsigned int target, 160 unsigned int target,
157 const gpu::ValueState& state); 161 const gpu::ValueState& state);
162 #if defined(OS_ANDROID)
163 void OnWakeUpGpu();
164 void ScheduleWakeUpGpu();
165 void DoWakeUpGpu();
166 #endif
158 void OnLoseAllContexts(); 167 void OnLoseAllContexts();
159 168
160 // Used to send and receive IPC messages from the browser process. 169 // Used to send and receive IPC messages from the browser process.
161 IPC::SyncChannel* const channel_; 170 IPC::SyncChannel* const channel_;
162 MessageRouter router_; 171 MessageRouter router_;
163 172
164 GpuWatchdog* watchdog_; 173 GpuWatchdog* watchdog_;
165 174
166 base::WaitableEvent* shutdown_event_; 175 base::WaitableEvent* shutdown_event_;
167 176
168 scoped_refptr<gfx::GLShareGroup> share_group_; 177 scoped_refptr<gfx::GLShareGroup> share_group_;
169 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; 178 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_;
170 GpuMemoryManager gpu_memory_manager_; 179 GpuMemoryManager gpu_memory_manager_;
171 // SyncPointManager guaranteed to outlive running MessageLoop. 180 // SyncPointManager guaranteed to outlive running MessageLoop.
172 gpu::SyncPointManager* sync_point_manager_; 181 gpu::SyncPointManager* sync_point_manager_;
173 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; 182 scoped_ptr<gpu::gles2::ProgramCache> program_cache_;
174 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; 183 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_;
175 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> 184 scoped_refptr<gpu::gles2::FramebufferCompletenessCache>
176 framebuffer_completeness_cache_; 185 framebuffer_completeness_cache_;
177 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; 186 scoped_refptr<gfx::GLSurface> default_offscreen_surface_;
178 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; 187 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
188 #if defined(OS_ANDROID)
189 // Last time we know the GPU was powered on. Global for tracking across all
190 // transport surfaces.
191 base::TimeTicks last_gpu_access_time_;
192 base::TimeTicks begin_wake_up_time_;
193 #endif
179 194
180 // Member variables should appear before the WeakPtrFactory, to ensure 195 // Member variables should appear before the WeakPtrFactory, to ensure
181 // that any WeakPtrs to Controller are invalidated before its members 196 // that any WeakPtrs to Controller are invalidated before its members
182 // variable's destructors are executed, rendering them invalid. 197 // variable's destructors are executed, rendering them invalid.
183 base::WeakPtrFactory<GpuChannelManager> weak_factory_; 198 base::WeakPtrFactory<GpuChannelManager> weak_factory_;
184 199
185 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); 200 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager);
186 }; 201 };
187 202
188 } // namespace content 203 } // namespace content
189 204
190 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ 205 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698