diff options
Diffstat (limited to 'chrome/renderer/command_buffer_proxy.h')
-rw-r--r-- | chrome/renderer/command_buffer_proxy.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/renderer/command_buffer_proxy.h b/chrome/renderer/command_buffer_proxy.h index a2fb9c4..990f6f3 100644 --- a/chrome/renderer/command_buffer_proxy.h +++ b/chrome/renderer/command_buffer_proxy.h @@ -51,6 +51,12 @@ class CommandBufferProxy : public gpu::CommandBuffer, virtual void SetToken(int32 token); virtual void SetParseError(gpu::error::Error error); + // Set a task that will be invoked the next time the window becomes invalid + // and needs to be repainted. Takes ownership of task. + void SetNotifyRepaintTask(Task* task) { + notify_repaint_task_.reset(task); + } + #if defined(OS_MACOSX) virtual void SetWindowSize(int32 width, int32 height); #endif @@ -71,6 +77,7 @@ class CommandBufferProxy : public gpu::CommandBuffer, private: // Message handlers: void OnUpdateState(gpu::CommandBuffer::State state); + void OnNotifyRepaint(); // As with the service, the client takes ownership of the ring buffer. int32 size_; @@ -90,6 +97,8 @@ class CommandBufferProxy : public gpu::CommandBuffer, typedef std::queue<linked_ptr<Task> > AsyncFlushTaskQueue; AsyncFlushTaskQueue pending_async_flush_tasks_; + scoped_ptr<Task> notify_repaint_task_; + DISALLOW_COPY_AND_ASSIGN(CommandBufferProxy); }; |