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

Unified Diff: cc/test/test_context_provider.h

Issue 2278283003: Refactor client visibility handling (Closed)
Patch Set: feedback 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
Index: cc/test/test_context_provider.h
diff --git a/cc/test/test_context_provider.h b/cc/test/test_context_provider.h
index d7c5627f4781e5f13a47704a8c73cb90f37517a6..6ab78f8cb1582b03c1644aeb6e91a417651a2314 100644
--- a/cc/test/test_context_provider.h
+++ b/cc/test/test_context_provider.h
@@ -39,6 +39,10 @@ class TestContextProvider : public ContextProvider {
std::unique_ptr<TestWebGraphicsContext3D> context,
std::unique_ptr<TestContextSupport> support);
static scoped_refptr<TestContextProvider> Create(
+ std::unique_ptr<TestWebGraphicsContext3D> context,
+ std::unique_ptr<TestContextSupport> support,
+ std::unique_ptr<ContextCacheController> cache_controller);
+ static scoped_refptr<TestContextProvider> Create(
std::unique_ptr<TestGLES2Interface> gl);
bool BindToCurrentThread() override;
@@ -47,9 +51,9 @@ class TestContextProvider : public ContextProvider {
gpu::gles2::GLES2Interface* ContextGL() override;
gpu::ContextSupport* ContextSupport() override;
class GrContext* GrContext() override;
+ ContextCacheController* CacheController() override;
void InvalidateGrContext(uint32_t state) override;
base::Lock* GetLock() override;
- void DeleteCachedResources() override;
void SetLostContextCallback(const LostContextCallback& cb) override;
TestWebGraphicsContext3D* TestContext3d();
@@ -66,7 +70,8 @@ class TestContextProvider : public ContextProvider {
explicit TestContextProvider(
std::unique_ptr<TestContextSupport> support,
std::unique_ptr<TestGLES2Interface> gl,
- std::unique_ptr<TestWebGraphicsContext3D> context);
+ std::unique_ptr<TestWebGraphicsContext3D> context,
+ std::unique_ptr<ContextCacheController> cache_controller);
~TestContextProvider() override;
private:
@@ -75,6 +80,8 @@ class TestContextProvider : public ContextProvider {
std::unique_ptr<TestContextSupport> support_;
std::unique_ptr<TestWebGraphicsContext3D> context3d_;
std::unique_ptr<TestGLES2Interface> context_gl_;
+ sk_sp<class GrContext> gr_context_;
+ std::unique_ptr<ContextCacheController> cache_controller_;
bool bound_ = false;
base::ThreadChecker main_thread_checker_;
@@ -83,7 +90,6 @@ class TestContextProvider : public ContextProvider {
base::Lock context_lock_;
LostContextCallback lost_context_callback_;
- sk_sp<class GrContext> gr_context_;
base::WeakPtrFactory<TestContextProvider> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698