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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 bool BindToCurrentThread() override; | 42 bool BindToCurrentThread() override; |
43 gpu::gles2::GLES2Interface* ContextGL() override; | 43 gpu::gles2::GLES2Interface* ContextGL() override; |
44 gpu::ContextSupport* ContextSupport() override; | 44 gpu::ContextSupport* ContextSupport() override; |
45 class GrContext* GrContext() override; | 45 class GrContext* GrContext() override; |
46 viz::ContextCacheController* CacheController() override; | 46 viz::ContextCacheController* CacheController() override; |
47 void InvalidateGrContext(uint32_t state) override; | 47 void InvalidateGrContext(uint32_t state) override; |
48 base::Lock* GetLock() override; | 48 base::Lock* GetLock() override; |
49 gpu::Capabilities ContextCapabilities() override; | 49 gpu::Capabilities ContextCapabilities() override; |
50 void SetLostContextCallback( | 50 void SetLostContextCallback( |
51 const LostContextCallback& lost_context_callback) override; | 51 const LostContextCallback& lost_context_callback) override; |
| 52 void SetSupportTextureNorm16(bool support) { |
| 53 capabilities_texture_norm16_ = support; |
| 54 } |
52 | 55 |
53 protected: | 56 protected: |
54 friend class base::RefCountedThreadSafe<TestInProcessContextProvider>; | 57 friend class base::RefCountedThreadSafe<TestInProcessContextProvider>; |
55 ~TestInProcessContextProvider() override; | 58 ~TestInProcessContextProvider() override; |
56 | 59 |
57 private: | 60 private: |
58 viz::TestGpuMemoryBufferManager gpu_memory_buffer_manager_; | 61 viz::TestGpuMemoryBufferManager gpu_memory_buffer_manager_; |
59 TestImageFactory image_factory_; | 62 TestImageFactory image_factory_; |
60 std::unique_ptr<gpu::GLInProcessContext> context_; | 63 std::unique_ptr<gpu::GLInProcessContext> context_; |
61 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; | 64 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; |
62 std::unique_ptr<viz::ContextCacheController> cache_controller_; | 65 std::unique_ptr<viz::ContextCacheController> cache_controller_; |
63 base::Lock context_lock_; | 66 base::Lock context_lock_; |
| 67 bool capabilities_texture_norm16_ = false; |
64 }; | 68 }; |
65 | 69 |
66 } // namespace cc | 70 } // namespace cc |
67 | 71 |
68 #endif // CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 72 #endif // CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ |
OLD | NEW |