OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_OUTPUT_IN_PROCESS_CONTEXT_PROVIDER_H_ | 5 #ifndef CC_OUTPUT_IN_PROCESS_CONTEXT_PROVIDER_H_ |
6 #define CC_OUTPUT_IN_PROCESS_CONTEXT_PROVIDER_H_ | 6 #define CC_OUTPUT_IN_PROCESS_CONTEXT_PROVIDER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
| 12 #include "base/compiler_specific.h" |
12 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
| 14 #include "cc/base/cc_export.h" |
13 #include "cc/output/context_cache_controller.h" | 15 #include "cc/output/context_cache_controller.h" |
14 #include "cc/output/context_provider.h" | 16 #include "cc/output/context_provider.h" |
15 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 17 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
16 #include "gpu/ipc/in_process_command_buffer.h" | 18 #include "gpu/ipc/in_process_command_buffer.h" |
17 #include "ui/gfx/native_widget_types.h" | 19 #include "ui/gfx/native_widget_types.h" |
18 | 20 |
19 class GrContext; | 21 class GrContext; |
20 | 22 |
21 namespace gpu { | 23 namespace gpu { |
22 class GLInProcessContext; | 24 class GLInProcessContext; |
23 class GpuMemoryBufferManager; | 25 class GpuMemoryBufferManager; |
24 class ImageFactory; | 26 class ImageFactory; |
25 struct SharedMemoryLimits; | 27 struct SharedMemoryLimits; |
26 class SyncPointManager; | 28 class SyncPointManager; |
27 namespace gles2 { | 29 namespace gles2 { |
28 class MailboxManager; | 30 class MailboxManager; |
29 } | 31 } |
30 } | 32 } |
31 | 33 |
32 namespace skia_bindings { | 34 namespace skia_bindings { |
33 class GrContextForGLES2Interface; | 35 class GrContextForGLES2Interface; |
34 } | 36 } |
35 | 37 |
36 namespace cc { | 38 namespace cc { |
37 | 39 |
38 class InProcessContextProvider : public ContextProvider { | 40 class CC_EXPORT InProcessContextProvider |
| 41 : public NON_EXPORTED_BASE(ContextProvider) { |
39 public: | 42 public: |
40 InProcessContextProvider( | 43 InProcessContextProvider( |
41 scoped_refptr<gpu::InProcessCommandBuffer::Service> service, | 44 scoped_refptr<gpu::InProcessCommandBuffer::Service> service, |
42 gpu::SurfaceHandle widget, | 45 gpu::SurfaceHandle widget, |
43 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 46 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
44 gpu::ImageFactory* image_factory, | 47 gpu::ImageFactory* image_factory, |
45 const gpu::SharedMemoryLimits& limits, | 48 const gpu::SharedMemoryLimits& limits, |
46 InProcessContextProvider* shared_context); | 49 InProcessContextProvider* shared_context); |
47 | 50 |
48 bool BindToCurrentThread() override; | 51 bool BindToCurrentThread() override; |
(...skipping 26 matching lines...) Expand all Loading... |
75 | 78 |
76 base::Lock context_lock_; | 79 base::Lock context_lock_; |
77 std::unique_ptr<gpu::GLInProcessContext> context_; | 80 std::unique_ptr<gpu::GLInProcessContext> context_; |
78 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; | 81 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; |
79 std::unique_ptr<ContextCacheController> cache_controller_; | 82 std::unique_ptr<ContextCacheController> cache_controller_; |
80 }; | 83 }; |
81 | 84 |
82 } // namespace cc | 85 } // namespace cc |
83 | 86 |
84 #endif // CC_OUTPUT_IN_PROCESS_CONTEXT_PROVIDER_H_ | 87 #endif // CC_OUTPUT_IN_PROCESS_CONTEXT_PROVIDER_H_ |
OLD | NEW |