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

Unified Diff: mojo/services/gles2/command_buffer_driver.h

Issue 739493002: Introduce command buffer control thread (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Route echo better Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/strong_binding.h ('k') | mojo/services/gles2/command_buffer_driver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/gles2/command_buffer_driver.h
diff --git a/mojo/services/gles2/command_buffer_driver.h b/mojo/services/gles2/command_buffer_driver.h
index f2c83ea8de491a9c4053632dfd052ceb2aacb3c5..30bf0c25f38642ba034a1eb03ae4ec7c91623670 100644
--- a/mojo/services/gles2/command_buffer_driver.h
+++ b/mojo/services/gles2/command_buffer_driver.h
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "base/single_thread_task_runner.h"
#include "base/timer/timer.h"
#include "mojo/services/public/interfaces/gpu/command_buffer.mojom.h"
#include "ui/gfx/native_widget_types.h"
@@ -52,8 +53,11 @@ class CommandBufferDriver {
ScopedSharedBufferHandle transfer_buffer,
uint32_t size);
void DestroyTransferBuffer(int32_t id);
+ void Echo(const Callback<void()>& callback);
- void SetContextLostCallback(const base::Callback<void(int32_t)>& callback);
+ void SetContextLostCallback(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ const base::Callback<void(int32_t)>& callback);
private:
bool DoInitialize(ScopedSharedBufferHandle shared_state);
@@ -72,6 +76,8 @@ class CommandBufferDriver {
scoped_refptr<gfx::GLSurface> surface_;
scoped_refptr<gfx::GLShareGroup> share_group_;
scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_;
+
+ scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_;
base::Callback<void(int32_t)> context_lost_callback_;
DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver);
« no previous file with comments | « mojo/public/cpp/bindings/strong_binding.h ('k') | mojo/services/gles2/command_buffer_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698