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

Unified Diff: content/common/gpu/client/context_provider_command_buffer.h

Issue 1963263002: Fix Mac resize, delete more Mac code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/client/context_provider_command_buffer.h
diff --git a/content/common/gpu/client/context_provider_command_buffer.h b/content/common/gpu/client/context_provider_command_buffer.h
index 325954fa934152c51a85a0ed4a83a2c7dc94fdaf..47bfa02354d50b37aeae8a73ada33efcd12b7d9b 100644
--- a/content/common/gpu/client/context_provider_command_buffer.h
+++ b/content/common/gpu/client/context_provider_command_buffer.h
@@ -11,6 +11,7 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/lock.h"
#include "base/threading/thread_checker.h"
#include "cc/output/context_provider.h"
@@ -79,6 +80,12 @@ class CONTENT_EXPORT ContextProviderCommandBuffer
// be used on any thread while the lock returned by GetLock() is acquired.
void SetupLock();
+ // Set the default task runner for command buffers to use for handling IPCs.
+ // If not specified, this will be the ThreadTaskRunner for the thread on
+ // which BindToThread is called.
+ void SetDefaultTaskRunner(
+ scoped_refptr<base::SingleThreadTaskRunner> default_task_runner);
+
protected:
~ContextProviderCommandBuffer() override;
@@ -114,6 +121,7 @@ class CONTENT_EXPORT ContextProviderCommandBuffer
scoped_refptr<SharedProviders> shared_providers_;
scoped_refptr<gpu::GpuChannelHost> channel_;
+ scoped_refptr<base::SingleThreadTaskRunner> default_task_runner_;
base::Lock context_lock_; // Referenced by command_buffer_.
std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_;

Powered by Google App Engine
This is Rietveld 408576698