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