| OLD | NEW |
| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 void OnSignalQuery(uint32 query, uint32 id); | 205 void OnSignalQuery(uint32 query, uint32 id); |
| 206 | 206 |
| 207 void OnSetClientHasMemoryAllocationChangedCallback(bool has_callback); | 207 void OnSetClientHasMemoryAllocationChangedCallback(bool has_callback); |
| 208 | 208 |
| 209 void OnCreateImage(int32 id, | 209 void OnCreateImage(int32 id, |
| 210 gfx::GpuMemoryBufferHandle handle, | 210 gfx::GpuMemoryBufferHandle handle, |
| 211 gfx::Size size, | 211 gfx::Size size, |
| 212 gfx::BufferFormat format, | 212 gfx::BufferFormat format, |
| 213 uint32 internalformat); | 213 uint32 internalformat); |
| 214 void OnDestroyImage(int32 id); | 214 void OnDestroyImage(int32 id); |
| 215 void OnCreateStreamTexture(uint32 texture_id, |
| 216 int32 stream_id, |
| 217 bool* succeeded); |
| 215 | 218 |
| 216 void OnCommandProcessed(); | 219 void OnCommandProcessed(); |
| 217 void OnParseError(); | 220 void OnParseError(); |
| 218 void OnCreateStreamTexture( | 221 void OnSchedulingChanged(bool scheduled); |
| 219 uint32 texture_id, int32 stream_id, bool* succeeded); | |
| 220 | 222 |
| 221 void ReportState(); | 223 void ReportState(); |
| 222 | 224 |
| 223 // Wrapper for GpuScheduler::PutChanged that sets the crash report URL. | 225 // Wrapper for GpuScheduler::PutChanged that sets the crash report URL. |
| 224 void PutChanged(); | 226 void PutChanged(); |
| 225 | 227 |
| 226 // Poll the command buffer to execute work. | 228 // Poll the command buffer to execute work. |
| 227 void PollWork(); | 229 void PollWork(); |
| 228 | 230 |
| 229 // Whether this command buffer needs to be polled again in the future. | 231 // Whether this command buffer needs to be polled again in the future. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 // elide redundant work). | 271 // elide redundant work). |
| 270 bool last_memory_allocation_valid_; | 272 bool last_memory_allocation_valid_; |
| 271 gpu::MemoryAllocation last_memory_allocation_; | 273 gpu::MemoryAllocation last_memory_allocation_; |
| 272 | 274 |
| 273 GpuWatchdog* watchdog_; | 275 GpuWatchdog* watchdog_; |
| 274 | 276 |
| 275 base::ObserverList<DestructionObserver> destruction_observers_; | 277 base::ObserverList<DestructionObserver> destruction_observers_; |
| 276 | 278 |
| 277 // A queue of sync points associated with this stub. | 279 // A queue of sync points associated with this stub. |
| 278 std::deque<uint32> sync_points_; | 280 std::deque<uint32> sync_points_; |
| 279 int sync_point_wait_count_; | 281 bool waiting_for_sync_point_; |
| 280 | 282 |
| 281 bool delayed_work_scheduled_; | 283 bool delayed_work_scheduled_; |
| 282 uint32_t previous_processed_num_; | 284 uint32_t previous_processed_num_; |
| 283 base::TimeTicks last_idle_time_; | 285 base::TimeTicks last_idle_time_; |
| 284 | 286 |
| 285 scoped_refptr<gpu::PreemptionFlag> preemption_flag_; | 287 scoped_refptr<gpu::PreemptionFlag> preemption_flag_; |
| 286 | 288 |
| 287 LatencyInfoCallback latency_info_callback_; | 289 LatencyInfoCallback latency_info_callback_; |
| 288 | 290 |
| 289 GURL active_url_; | 291 GURL active_url_; |
| 290 size_t active_url_hash_; | 292 size_t active_url_hash_; |
| 291 | 293 |
| 292 size_t total_gpu_memory_; | 294 size_t total_gpu_memory_; |
| 293 scoped_ptr<WaitForCommandState> wait_for_token_; | 295 scoped_ptr<WaitForCommandState> wait_for_token_; |
| 294 scoped_ptr<WaitForCommandState> wait_for_get_offset_; | 296 scoped_ptr<WaitForCommandState> wait_for_get_offset_; |
| 295 | 297 |
| 296 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 298 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 297 }; | 299 }; |
| 298 | 300 |
| 299 } // namespace content | 301 } // namespace content |
| 300 | 302 |
| 301 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 303 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |