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

Unified Diff: cc/test/test_in_process_context_provider.h

Issue 1985973002: Defer compositor context creation to the thread. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: contextfactory: . 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: cc/test/test_in_process_context_provider.h
diff --git a/cc/test/test_in_process_context_provider.h b/cc/test/test_in_process_context_provider.h
index 351e41e6242f22a073b5c41e5367d9c25a0ed6ca..3e13b46e3cf45472c3f70581a19ff631dc948afe 100644
--- a/cc/test/test_in_process_context_provider.h
+++ b/cc/test/test_in_process_context_provider.h
@@ -9,6 +9,7 @@
#include <memory>
+#include "base/macros.h"
#include "base/synchronization/lock.h"
#include "cc/output/context_provider.h"
#include "cc/test/test_gpu_memory_buffer_manager.h"
@@ -37,7 +38,18 @@ class TestInProcessContextProvider : public ContextProvider {
explicit TestInProcessContextProvider(
TestInProcessContextProvider* shared_context);
- bool BindToCurrentThread() override;
+ class Factory : public ContextProvider::Factory {
+ public:
+ explicit Factory(TestInProcessContextProvider* shared_context)
+ : shared_context_(shared_context) {}
+ scoped_refptr<ContextProvider> CreateContext() override;
+
+ private:
+ TestInProcessContextProvider* const shared_context_;
+
+ DISALLOW_COPY_AND_ASSIGN(Factory);
+ };
+
gpu::gles2::GLES2Interface* ContextGL() override;
gpu::ContextSupport* ContextSupport() override;
class GrContext* GrContext() override;

Powered by Google App Engine
This is Rietveld 408576698