OLD | NEW |
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 27 matching lines...) Expand all Loading... |
38 explicit TestInProcessContextProvider( | 38 explicit TestInProcessContextProvider( |
39 TestInProcessContextProvider* shared_context); | 39 TestInProcessContextProvider* shared_context); |
40 | 40 |
41 bool BindToCurrentThread() override; | 41 bool BindToCurrentThread() override; |
42 gpu::gles2::GLES2Interface* ContextGL() override; | 42 gpu::gles2::GLES2Interface* ContextGL() override; |
43 gpu::ContextSupport* ContextSupport() override; | 43 gpu::ContextSupport* ContextSupport() override; |
44 class GrContext* GrContext() override; | 44 class GrContext* GrContext() override; |
45 void InvalidateGrContext(uint32_t state) override; | 45 void InvalidateGrContext(uint32_t state) override; |
46 void SetupLock() override; | 46 void SetupLock() override; |
47 base::Lock* GetLock() override; | 47 base::Lock* GetLock() override; |
48 Capabilities ContextCapabilities() override; | 48 gpu::Capabilities ContextCapabilities() override; |
49 void DeleteCachedResources() override; | 49 void DeleteCachedResources() override; |
50 void SetLostContextCallback( | 50 void SetLostContextCallback( |
51 const LostContextCallback& lost_context_callback) override; | 51 const LostContextCallback& lost_context_callback) override; |
52 | 52 |
53 protected: | 53 protected: |
54 friend class base::RefCountedThreadSafe<TestInProcessContextProvider>; | 54 friend class base::RefCountedThreadSafe<TestInProcessContextProvider>; |
55 ~TestInProcessContextProvider() override; | 55 ~TestInProcessContextProvider() override; |
56 | 56 |
57 private: | 57 private: |
58 TestGpuMemoryBufferManager gpu_memory_buffer_manager_; | 58 TestGpuMemoryBufferManager gpu_memory_buffer_manager_; |
59 TestImageFactory image_factory_; | 59 TestImageFactory image_factory_; |
60 std::unique_ptr<gpu::GLInProcessContext> context_; | 60 std::unique_ptr<gpu::GLInProcessContext> context_; |
61 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; | 61 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; |
62 base::Lock context_lock_; | 62 base::Lock context_lock_; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace cc | 65 } // namespace cc |
66 | 66 |
67 #endif // CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 67 #endif // CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ |
OLD | NEW |