OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMPL_H
_ | 5 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMPL_H
_ |
6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMPL_H
_ | 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMPL_H
_ |
7 | 7 |
8 #include "base/synchronization/lock.h" | 8 #include "base/synchronization/lock.h" |
9 #include "cc/blink/context_provider_web_context.h" | 9 #include "cc/blink/context_provider_web_context.h" |
10 #include "content/browser/android/in_process/synchronous_input_event_filter.h" | 10 #include "content/browser/android/in_process/synchronous_input_event_filter.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class GLInProcessContext; | 21 class GLInProcessContext; |
22 } | 22 } |
23 | 23 |
24 namespace gpu_blink { | 24 namespace gpu_blink { |
25 class WebGraphicsContext3DInProcessCommandBufferImpl; | 25 class WebGraphicsContext3DInProcessCommandBufferImpl; |
26 } | 26 } |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 | 29 |
30 class InProcessChildThreadParams; | 30 class InProcessChildThreadParams; |
| 31 class SynchronousCompositorContextProvider; |
31 | 32 |
32 class SynchronousCompositorFactoryImpl : public SynchronousCompositorFactory { | 33 class SynchronousCompositorFactoryImpl : public SynchronousCompositorFactory { |
33 public: | 34 public: |
34 SynchronousCompositorFactoryImpl(); | 35 SynchronousCompositorFactoryImpl(); |
35 ~SynchronousCompositorFactoryImpl() override; | 36 ~SynchronousCompositorFactoryImpl() override; |
36 | 37 |
37 // SynchronousCompositorFactory | 38 // SynchronousCompositorFactory |
38 scoped_refptr<base::SingleThreadTaskRunner> GetCompositorTaskRunner() | 39 scoped_refptr<base::SingleThreadTaskRunner> GetCompositorTaskRunner() |
39 override; | 40 override; |
40 scoped_ptr<cc::OutputSurface> CreateOutputSurface( | 41 scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
(...skipping 26 matching lines...) Expand all Loading... |
67 const InProcessChildThreadParams& params); | 68 const InProcessChildThreadParams& params); |
68 void SetUseIpcCommandBuffer(); | 69 void SetUseIpcCommandBuffer(); |
69 void CompositorInitializedHardwareDraw(); | 70 void CompositorInitializedHardwareDraw(); |
70 void CompositorReleasedHardwareDraw(); | 71 void CompositorReleasedHardwareDraw(); |
71 | 72 |
72 | 73 |
73 private: | 74 private: |
74 scoped_refptr<cc::ContextProvider> CreateContextProviderForCompositor( | 75 scoped_refptr<cc::ContextProvider> CreateContextProviderForCompositor( |
75 int surface_id, | 76 int surface_id, |
76 CommandBufferContextType type); | 77 CommandBufferContextType type); |
| 78 scoped_refptr<cc::ContextProvider> GetSharedWorkerContextProvider(); |
77 bool CanCreateMainThreadContext(); | 79 bool CanCreateMainThreadContext(); |
78 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> | 80 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> |
79 TryCreateStreamTextureFactory(); | 81 TryCreateStreamTextureFactory(); |
80 void RestoreContextOnMainThread(); | 82 void RestoreContextOnMainThread(); |
81 scoped_refptr<gpu::InProcessCommandBuffer::Service> GpuThreadService(); | 83 scoped_refptr<gpu::InProcessCommandBuffer::Service> GpuThreadService(); |
82 | 84 |
83 SynchronousInputEventFilter synchronous_input_event_filter_; | 85 SynchronousInputEventFilter synchronous_input_event_filter_; |
84 | 86 |
85 scoped_refptr<gpu::InProcessCommandBuffer::Service> android_view_service_; | 87 scoped_refptr<gpu::InProcessCommandBuffer::Service> android_view_service_; |
86 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_thread_service_; | 88 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_thread_service_; |
87 | 89 |
88 class VideoContextProvider; | 90 class VideoContextProvider; |
89 scoped_refptr<VideoContextProvider> video_context_provider_; | 91 scoped_refptr<VideoContextProvider> video_context_provider_; |
90 | 92 |
| 93 scoped_refptr<SynchronousCompositorContextProvider> shared_worker_context_; |
| 94 scoped_refptr<cc_blink::ContextProviderWebContext> |
| 95 in_process_shared_worker_context_; |
| 96 |
91 bool use_ipc_command_buffer_; | 97 bool use_ipc_command_buffer_; |
92 | 98 |
93 // |num_hardware_compositor_lock_| is updated on UI thread only but can be | 99 // |num_hardware_compositor_lock_| is updated on UI thread only but can be |
94 // read on renderer main thread. | 100 // read on renderer main thread. |
95 base::Lock num_hardware_compositor_lock_; | 101 base::Lock num_hardware_compositor_lock_; |
96 unsigned int num_hardware_compositors_; | 102 unsigned int num_hardware_compositors_; |
97 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 103 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
98 }; | 104 }; |
99 | 105 |
100 } // namespace content | 106 } // namespace content |
101 | 107 |
102 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP
L_H_ | 108 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP
L_H_ |
OLD | NEW |