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

Unified Diff: cc/test/test_context_provider.h

Issue 2193293004: cc: Make LayerTreeTests use a DelegatingRenderer and Display. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: display-layertreetest: withperftestsfix Created 4 years, 4 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
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/test_context_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_context_provider.h
diff --git a/cc/test/test_context_provider.h b/cc/test/test_context_provider.h
index 97c7abcd3b5bae42affb7ad1b768e9e2723f58fb..d7c5627f4781e5f13a47704a8c73cb90f37517a6 100644
--- a/cc/test/test_context_provider.h
+++ b/cc/test/test_context_provider.h
@@ -36,6 +36,9 @@ class TestContextProvider : public ContextProvider {
static scoped_refptr<TestContextProvider> Create(
std::unique_ptr<TestWebGraphicsContext3D> context);
static scoped_refptr<TestContextProvider> Create(
+ std::unique_ptr<TestWebGraphicsContext3D> context,
+ std::unique_ptr<TestContextSupport> support);
+ static scoped_refptr<TestContextProvider> Create(
std::unique_ptr<TestGLES2Interface> gl);
bool BindToCurrentThread() override;
@@ -57,10 +60,11 @@ class TestContextProvider : public ContextProvider {
// InitializeOnCurrentThread on the context returned from this method.
TestWebGraphicsContext3D* UnboundTestContext3d();
- TestContextSupport* support() { return &support_; }
+ TestContextSupport* support() { return support_.get(); }
protected:
explicit TestContextProvider(
+ std::unique_ptr<TestContextSupport> support,
std::unique_ptr<TestGLES2Interface> gl,
std::unique_ptr<TestWebGraphicsContext3D> context);
~TestContextProvider() override;
@@ -68,11 +72,10 @@ class TestContextProvider : public ContextProvider {
private:
void OnLostContext();
- TestContextSupport support_;
-
+ std::unique_ptr<TestContextSupport> support_;
std::unique_ptr<TestWebGraphicsContext3D> context3d_;
std::unique_ptr<TestGLES2Interface> context_gl_;
- bool bound_;
+ bool bound_ = false;
base::ThreadChecker main_thread_checker_;
base::ThreadChecker context_thread_checker_;
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/test_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698