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

Side by Side Diff: cc/test/test_context_provider.h

Issue 916723002: cc: Add threaded GPU rasterization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement ContextProviderInProcess::DetachFromThread(). Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_TEST_CONTEXT_PROVIDER_H_ 5 #ifndef CC_TEST_TEST_CONTEXT_PROVIDER_H_
6 #define CC_TEST_TEST_CONTEXT_PROVIDER_H_ 6 #define CC_TEST_TEST_CONTEXT_PROVIDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 11 matching lines...) Expand all
22 class TestContextProvider : public ContextProvider { 22 class TestContextProvider : public ContextProvider {
23 public: 23 public:
24 typedef base::Callback<scoped_ptr<TestWebGraphicsContext3D>(void)> 24 typedef base::Callback<scoped_ptr<TestWebGraphicsContext3D>(void)>
25 CreateCallback; 25 CreateCallback;
26 26
27 static scoped_refptr<TestContextProvider> Create(); 27 static scoped_refptr<TestContextProvider> Create();
28 static scoped_refptr<TestContextProvider> Create( 28 static scoped_refptr<TestContextProvider> Create(
29 scoped_ptr<TestWebGraphicsContext3D> context); 29 scoped_ptr<TestWebGraphicsContext3D> context);
30 30
31 bool BindToCurrentThread() override; 31 bool BindToCurrentThread() override;
32 void DetachFromThread() override;
32 Capabilities ContextCapabilities() override; 33 Capabilities ContextCapabilities() override;
33 gpu::gles2::GLES2Interface* ContextGL() override; 34 gpu::gles2::GLES2Interface* ContextGL() override;
34 gpu::ContextSupport* ContextSupport() override; 35 gpu::ContextSupport* ContextSupport() override;
35 class GrContext* GrContext() override; 36 class GrContext* GrContext() override;
36 void SetupLock() override; 37 void SetupLock() override;
37 base::Lock* GetLock() override; 38 base::Lock* GetLock() override;
38 bool IsContextLost() override; 39 bool IsContextLost() override;
39 void VerifyContexts() override; 40 void VerifyContexts() override;
40 void DeleteCachedResources() override; 41 void DeleteCachedResources() override;
41 bool DestroyedOnMainThread() override; 42 bool DestroyedOnMainThread() override;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 85
85 base::WeakPtrFactory<TestContextProvider> weak_ptr_factory_; 86 base::WeakPtrFactory<TestContextProvider> weak_ptr_factory_;
86 87
87 DISALLOW_COPY_AND_ASSIGN(TestContextProvider); 88 DISALLOW_COPY_AND_ASSIGN(TestContextProvider);
88 }; 89 };
89 90
90 } // namespace cc 91 } // namespace cc
91 92
92 #endif // CC_TEST_TEST_CONTEXT_PROVIDER_H_ 93 #endif // CC_TEST_TEST_CONTEXT_PROVIDER_H_
93 94
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698