| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 5 #ifndef UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ |
| 6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 6 #define UI_COMPOSITOR_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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 gpu::ImageFactory* image_factory, | 45 gpu::ImageFactory* image_factory, |
| 46 InProcessContextProvider* shared_context); | 46 InProcessContextProvider* shared_context); |
| 47 | 47 |
| 48 // cc::ContextProvider implementation. | 48 // cc::ContextProvider implementation. |
| 49 bool BindToCurrentThread() override; | 49 bool BindToCurrentThread() override; |
| 50 void DetachFromThread() override; | 50 void DetachFromThread() override; |
| 51 gpu::Capabilities ContextCapabilities() override; | 51 gpu::Capabilities ContextCapabilities() override; |
| 52 gpu::gles2::GLES2Interface* ContextGL() override; | 52 gpu::gles2::GLES2Interface* ContextGL() override; |
| 53 gpu::ContextSupport* ContextSupport() override; | 53 gpu::ContextSupport* ContextSupport() override; |
| 54 class GrContext* GrContext() override; | 54 class GrContext* GrContext() override; |
| 55 cc::ContextCacheController* CacheController() override; |
| 55 void InvalidateGrContext(uint32_t state) override; | 56 void InvalidateGrContext(uint32_t state) override; |
| 56 base::Lock* GetLock() override; | 57 base::Lock* GetLock() override; |
| 57 void DeleteCachedResources() override; | |
| 58 void SetLostContextCallback( | 58 void SetLostContextCallback( |
| 59 const LostContextCallback& lost_context_callback) override; | 59 const LostContextCallback& lost_context_callback) override; |
| 60 | 60 |
| 61 // Gives the GL internal format that should be used for calling CopyTexImage2D | 61 // Gives the GL internal format that should be used for calling CopyTexImage2D |
| 62 // on the default framebuffer. | 62 // on the default framebuffer. |
| 63 uint32_t GetCopyTextureInternalFormat(); | 63 uint32_t GetCopyTextureInternalFormat(); |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 InProcessContextProvider( | 66 InProcessContextProvider( |
| 67 const gpu::gles2::ContextCreationAttribHelper& attribs, | 67 const gpu::gles2::ContextCreationAttribHelper& attribs, |
| 68 InProcessContextProvider* shared_context, | 68 InProcessContextProvider* shared_context, |
| 69 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 69 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 70 gpu::ImageFactory* image_factory, | 70 gpu::ImageFactory* image_factory, |
| 71 gfx::AcceleratedWidget window, | 71 gfx::AcceleratedWidget window, |
| 72 const std::string& debug_name); | 72 const std::string& debug_name); |
| 73 ~InProcessContextProvider() override; | 73 ~InProcessContextProvider() override; |
| 74 | 74 |
| 75 base::ThreadChecker main_thread_checker_; | 75 base::ThreadChecker main_thread_checker_; |
| 76 base::ThreadChecker context_thread_checker_; | 76 base::ThreadChecker context_thread_checker_; |
| 77 | 77 |
| 78 std::unique_ptr<gpu::GLInProcessContext> context_; | 78 std::unique_ptr<gpu::GLInProcessContext> context_; |
| 79 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; | 79 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; |
| 80 std::unique_ptr<cc::ContextCacheController> cache_controller_; |
| 80 | 81 |
| 81 gpu::gles2::ContextCreationAttribHelper attribs_; | 82 gpu::gles2::ContextCreationAttribHelper attribs_; |
| 82 InProcessContextProvider* shared_context_; | 83 InProcessContextProvider* shared_context_; |
| 83 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 84 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
| 84 gpu::ImageFactory* image_factory_; | 85 gpu::ImageFactory* image_factory_; |
| 85 gfx::AcceleratedWidget window_; | 86 gfx::AcceleratedWidget window_; |
| 86 std::string debug_name_; | 87 std::string debug_name_; |
| 87 | 88 |
| 88 base::Lock context_lock_; | 89 base::Lock context_lock_; |
| 89 | 90 |
| 90 DISALLOW_COPY_AND_ASSIGN(InProcessContextProvider); | 91 DISALLOW_COPY_AND_ASSIGN(InProcessContextProvider); |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 } // namespace ui | 94 } // namespace ui |
| 94 | 95 |
| 95 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 96 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ |
| OLD | NEW |