| 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 "base/synchronization/lock.h" | 8 #include "base/synchronization/lock.h" |
| 9 #include "cc/output/context_provider.h" | 9 #include "cc/output/context_provider.h" |
| 10 #include "cc/test/test_gpu_memory_buffer_manager.h" | 10 #include "cc/test/test_gpu_memory_buffer_manager.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 class GrContext* GrContext() override; | 34 class GrContext* GrContext() override; |
| 35 void InvalidateGrContext(uint32_t state) override; | 35 void InvalidateGrContext(uint32_t state) override; |
| 36 void SetupLock() override; | 36 void SetupLock() override; |
| 37 base::Lock* GetLock() override; | 37 base::Lock* GetLock() override; |
| 38 Capabilities ContextCapabilities() override; | 38 Capabilities ContextCapabilities() override; |
| 39 void VerifyContexts() override; | 39 void VerifyContexts() override; |
| 40 void DeleteCachedResources() override; | 40 void DeleteCachedResources() override; |
| 41 bool DestroyedOnMainThread() override; | 41 bool DestroyedOnMainThread() override; |
| 42 void SetLostContextCallback( | 42 void SetLostContextCallback( |
| 43 const LostContextCallback& lost_context_callback) override; | 43 const LostContextCallback& lost_context_callback) override; |
| 44 void SetMemoryPolicyChangedCallback( | |
| 45 const MemoryPolicyChangedCallback& memory_policy_changed_callback) | |
| 46 override; | |
| 47 | 44 |
| 48 protected: | 45 protected: |
| 49 friend class base::RefCountedThreadSafe<TestInProcessContextProvider>; | 46 friend class base::RefCountedThreadSafe<TestInProcessContextProvider>; |
| 50 ~TestInProcessContextProvider() override; | 47 ~TestInProcessContextProvider() override; |
| 51 | 48 |
| 52 private: | 49 private: |
| 53 TestGpuMemoryBufferManager gpu_memory_buffer_manager_; | 50 TestGpuMemoryBufferManager gpu_memory_buffer_manager_; |
| 54 TestImageFactory image_factory_; | 51 TestImageFactory image_factory_; |
| 55 scoped_ptr<gpu::GLInProcessContext> context_; | 52 scoped_ptr<gpu::GLInProcessContext> context_; |
| 56 skia::RefPtr<class GrContext> gr_context_; | 53 skia::RefPtr<class GrContext> gr_context_; |
| 57 base::Lock context_lock_; | 54 base::Lock context_lock_; |
| 58 }; | 55 }; |
| 59 | 56 |
| 60 } // namespace cc | 57 } // namespace cc |
| 61 | 58 |
| 62 #endif // CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 59 #endif // CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ |
| OLD | NEW |