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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 // Uses default attributes for creating an offscreen context. | 43 // Uses default attributes for creating an offscreen context. |
44 static scoped_refptr<InProcessContextProvider> CreateOffscreen( | 44 static scoped_refptr<InProcessContextProvider> CreateOffscreen( |
45 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 45 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
46 gpu::ImageFactory* image_factory, | 46 gpu::ImageFactory* image_factory, |
47 InProcessContextProvider* shared_context); | 47 InProcessContextProvider* shared_context); |
48 | 48 |
49 // cc::ContextProvider: | 49 // cc::ContextProvider: |
50 bool BindToCurrentThread() override; | 50 bool BindToCurrentThread() override; |
51 void DetachFromThread() override; | 51 void DetachFromThread() override; |
52 Capabilities ContextCapabilities() override; | 52 gpu::Capabilities ContextCapabilities() override; |
53 gpu::gles2::GLES2Interface* ContextGL() override; | 53 gpu::gles2::GLES2Interface* ContextGL() override; |
54 gpu::ContextSupport* ContextSupport() override; | 54 gpu::ContextSupport* ContextSupport() override; |
55 class GrContext* GrContext() override; | 55 class GrContext* GrContext() override; |
56 void InvalidateGrContext(uint32_t state) override; | 56 void InvalidateGrContext(uint32_t state) override; |
57 void SetupLock() override; | 57 void SetupLock() override; |
58 base::Lock* GetLock() override; | 58 base::Lock* GetLock() override; |
59 void DeleteCachedResources() override; | 59 void DeleteCachedResources() override; |
60 void SetLostContextCallback( | 60 void SetLostContextCallback( |
61 const LostContextCallback& lost_context_callback) override; | 61 const LostContextCallback& lost_context_callback) override; |
62 | 62 |
(...skipping 12 matching lines...) Expand all Loading... |
75 | 75 |
76 std::unique_ptr<gpu::GLInProcessContext> context_; | 76 std::unique_ptr<gpu::GLInProcessContext> context_; |
77 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; | 77 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; |
78 | 78 |
79 gpu::gles2::ContextCreationAttribHelper attribs_; | 79 gpu::gles2::ContextCreationAttribHelper attribs_; |
80 InProcessContextProvider* shared_context_; | 80 InProcessContextProvider* shared_context_; |
81 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 81 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
82 gpu::ImageFactory* image_factory_; | 82 gpu::ImageFactory* image_factory_; |
83 gfx::AcceleratedWidget window_; | 83 gfx::AcceleratedWidget window_; |
84 std::string debug_name_; | 84 std::string debug_name_; |
85 cc::ContextProvider::Capabilities capabilities_; | |
86 | 85 |
87 base::Lock context_lock_; | 86 base::Lock context_lock_; |
88 | 87 |
89 DISALLOW_COPY_AND_ASSIGN(InProcessContextProvider); | 88 DISALLOW_COPY_AND_ASSIGN(InProcessContextProvider); |
90 }; | 89 }; |
91 | 90 |
92 } // namespace ui | 91 } // namespace ui |
93 | 92 |
94 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ | 93 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ |
OLD | NEW |