| 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 27 matching lines...) Expand all Loading... |
| 38 gpu::ImageFactory* image_factory, | 38 gpu::ImageFactory* image_factory, |
| 39 gfx::AcceleratedWidget window, | 39 gfx::AcceleratedWidget window, |
| 40 const std::string& debug_name); | 40 const std::string& debug_name); |
| 41 | 41 |
| 42 // Uses default attributes for creating an offscreen context. | 42 // Uses default attributes for creating an offscreen context. |
| 43 static scoped_refptr<InProcessContextProvider> CreateOffscreen( | 43 static scoped_refptr<InProcessContextProvider> CreateOffscreen( |
| 44 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 44 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 45 gpu::ImageFactory* image_factory, | 45 gpu::ImageFactory* image_factory, |
| 46 InProcessContextProvider* shared_context); | 46 InProcessContextProvider* shared_context); |
| 47 | 47 |
| 48 // cc::ContextProvider: | 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 void InvalidateGrContext(uint32_t state) override; | 55 void InvalidateGrContext(uint32_t state) override; |
| 56 base::Lock* GetLock() override; | 56 base::Lock* GetLock() override; |
| 57 void DeleteCachedResources() 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 uint32_t GetCopyTextureInternalFormat(); |
| 62 |
| 61 private: | 63 private: |
| 62 InProcessContextProvider( | 64 InProcessContextProvider( |
| 63 const gpu::gles2::ContextCreationAttribHelper& attribs, | 65 const gpu::gles2::ContextCreationAttribHelper& attribs, |
| 64 InProcessContextProvider* shared_context, | 66 InProcessContextProvider* shared_context, |
| 65 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 67 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 66 gpu::ImageFactory* image_factory, | 68 gpu::ImageFactory* image_factory, |
| 67 gfx::AcceleratedWidget window, | 69 gfx::AcceleratedWidget window, |
| 68 const std::string& debug_name); | 70 const std::string& debug_name); |
| 69 ~InProcessContextProvider() override; | 71 ~InProcessContextProvider() override; |
| 70 | 72 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 82 std::string debug_name_; | 84 std::string debug_name_; |
| 83 | 85 |
| 84 base::Lock context_lock_; | 86 base::Lock context_lock_; |
| 85 | 87 |
| 86 DISALLOW_COPY_AND_ASSIGN(InProcessContextProvider); | 88 DISALLOW_COPY_AND_ASSIGN(InProcessContextProvider); |
| 87 }; | 89 }; |
| 88 | 90 |
| 89 } // namespace ui | 91 } // namespace ui |
| 90 | 92 |
| 91 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 93 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ |
| OLD | NEW |