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

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

Issue 1348363003: content/gpu: Simplify stub scheduling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gpu_channel_stream
Patch Set: fix android compile error sigh 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_command_buffer_stub.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_COMMAND_BUFFER_STUB_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 void OnSignalQuery(uint32 query, uint32 id); 209 void OnSignalQuery(uint32 query, uint32 id);
210 210
211 void OnSetClientHasMemoryAllocationChangedCallback(bool has_callback); 211 void OnSetClientHasMemoryAllocationChangedCallback(bool has_callback);
212 212
213 void OnCreateImage(int32 id, 213 void OnCreateImage(int32 id,
214 gfx::GpuMemoryBufferHandle handle, 214 gfx::GpuMemoryBufferHandle handle,
215 gfx::Size size, 215 gfx::Size size,
216 gfx::BufferFormat format, 216 gfx::BufferFormat format,
217 uint32 internalformat); 217 uint32 internalformat);
218 void OnDestroyImage(int32 id); 218 void OnDestroyImage(int32 id);
219 void OnCreateStreamTexture(uint32 texture_id,
220 int32 stream_id,
221 bool* succeeded);
219 222
220 void OnCommandProcessed(); 223 void OnCommandProcessed();
221 void OnParseError(); 224 void OnParseError();
222 void OnCreateStreamTexture( 225 void OnSchedulingChanged(bool scheduled);
223 uint32 texture_id, int32 stream_id, bool* succeeded);
224 226
225 void ReportState(); 227 void ReportState();
226 228
227 // Wrapper for GpuScheduler::PutChanged that sets the crash report URL. 229 // Wrapper for GpuScheduler::PutChanged that sets the crash report URL.
228 void PutChanged(); 230 void PutChanged();
229 231
230 // Poll the command buffer to execute work. 232 // Poll the command buffer to execute work.
231 void PollWork(); 233 void PollWork();
232 void PerformWork(); 234 void PerformWork();
233 235
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // elide redundant work). 278 // elide redundant work).
277 bool last_memory_allocation_valid_; 279 bool last_memory_allocation_valid_;
278 gpu::MemoryAllocation last_memory_allocation_; 280 gpu::MemoryAllocation last_memory_allocation_;
279 281
280 GpuWatchdog* watchdog_; 282 GpuWatchdog* watchdog_;
281 283
282 base::ObserverList<DestructionObserver> destruction_observers_; 284 base::ObserverList<DestructionObserver> destruction_observers_;
283 285
284 // A queue of sync points associated with this stub. 286 // A queue of sync points associated with this stub.
285 std::deque<uint32> sync_points_; 287 std::deque<uint32> sync_points_;
286 int sync_point_wait_count_; 288 bool waiting_for_sync_point_;
287 289
288 base::TimeTicks process_delayed_work_time_; 290 base::TimeTicks process_delayed_work_time_;
289 uint32_t previous_processed_num_; 291 uint32_t previous_processed_num_;
290 base::TimeTicks last_idle_time_; 292 base::TimeTicks last_idle_time_;
291 293
292 scoped_refptr<gpu::PreemptionFlag> preemption_flag_; 294 scoped_refptr<gpu::PreemptionFlag> preemption_flag_;
293 295
294 LatencyInfoCallback latency_info_callback_; 296 LatencyInfoCallback latency_info_callback_;
295 297
296 GURL active_url_; 298 GURL active_url_;
297 size_t active_url_hash_; 299 size_t active_url_hash_;
298 300
299 size_t total_gpu_memory_; 301 size_t total_gpu_memory_;
300 scoped_ptr<WaitForCommandState> wait_for_token_; 302 scoped_ptr<WaitForCommandState> wait_for_token_;
301 scoped_ptr<WaitForCommandState> wait_for_get_offset_; 303 scoped_ptr<WaitForCommandState> wait_for_get_offset_;
302 304
303 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); 305 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
304 }; 306 };
305 307
306 } // namespace content 308 } // namespace content
307 309
308 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 310 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698