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

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

Issue 2286873003: Provide TaskRunner to ContextCacheController (Closed)
Patch Set: Created 4 years, 3 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_IN_PROCESS_CONTEXT_PROVIDER_H_ 5 #ifndef CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
6 #define CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ 6 #define CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 12 matching lines...) Expand all
23 namespace skia_bindings { 23 namespace skia_bindings {
24 class GrContextForGLES2Interface; 24 class GrContextForGLES2Interface;
25 } 25 }
26 26
27 namespace cc { 27 namespace cc {
28 28
29 std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext(); 29 std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext();
30 std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext( 30 std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext(
31 TestGpuMemoryBufferManager* gpu_memory_buffer_manager, 31 TestGpuMemoryBufferManager* gpu_memory_buffer_manager,
32 TestImageFactory* image_factory, 32 TestImageFactory* image_factory,
33 gpu::GLInProcessContext* shared_context); 33 gpu::GLInProcessContext* shared_context,
34 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
34 35
35 class TestInProcessContextProvider : public ContextProvider { 36 class TestInProcessContextProvider : public ContextProvider {
36 public: 37 public:
37 explicit TestInProcessContextProvider( 38 explicit TestInProcessContextProvider(
38 TestInProcessContextProvider* shared_context); 39 TestInProcessContextProvider* shared_context);
39 40
40 bool BindToCurrentThread() override; 41 bool BindToCurrentThread() override;
41 gpu::gles2::GLES2Interface* ContextGL() override; 42 gpu::gles2::GLES2Interface* ContextGL() override;
42 gpu::ContextSupport* ContextSupport() override; 43 gpu::ContextSupport* ContextSupport() override;
43 class GrContext* GrContext() override; 44 class GrContext* GrContext() override;
(...skipping 13 matching lines...) Expand all
57 TestImageFactory image_factory_; 58 TestImageFactory image_factory_;
58 std::unique_ptr<gpu::GLInProcessContext> context_; 59 std::unique_ptr<gpu::GLInProcessContext> context_;
59 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; 60 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_;
60 std::unique_ptr<ContextCacheController> cache_controller_; 61 std::unique_ptr<ContextCacheController> cache_controller_;
61 base::Lock context_lock_; 62 base::Lock context_lock_;
62 }; 63 };
63 64
64 } // namespace cc 65 } // namespace cc
65 66
66 #endif // CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ 67 #endif // CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698