Index: content/common/gpu/gpu_command_buffer_stub.h |
diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h |
index 0519e8c7fd0f30e967e4d8cdc68f5c7d04c4207e..886aca9bf0bcb3b04ccb259076df7904367e36a0 100644 |
--- a/content/common/gpu/gpu_command_buffer_stub.h |
+++ b/content/common/gpu/gpu_command_buffer_stub.h |
@@ -97,6 +97,11 @@ class GpuCommandBufferStub |
// Whether this command buffer can currently handle IPC messages. |
bool IsScheduled(); |
+ // If the command buffer is pre-empted and cannot process commands. |
+ bool IsPreempted() const { |
+ return scheduler_.get() && scheduler_->IsPreempted(); |
+ } |
+ |
// Whether there are commands in the buffer that haven't been processed. |
bool HasUnprocessedCommands(); |
@@ -130,7 +135,7 @@ class GpuCommandBufferStub |
// retire all sync points that haven't been previously retired. |
void AddSyncPoint(uint32 sync_point); |
- void SetPreemptByCounter(scoped_refptr<gpu::RefCountedCounter> counter); |
+ void SetPreemptByFlag(scoped_refptr<gpu::PreemptionFlag> flag); |
private: |
GpuMemoryManager* GetMemoryManager(); |
@@ -244,7 +249,7 @@ class GpuCommandBufferStub |
bool delayed_work_scheduled_; |
- scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_; |
+ scoped_refptr<gpu::PreemptionFlag> preemption_flag_; |
GURL active_url_; |
size_t active_url_hash_; |