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 "content/browser/android/in_process/synchronous_input_event_filter.h" | 9 #include "content/browser/android/in_process/synchronous_input_event_filter.h" |
10 #include "content/renderer/android/synchronous_compositor_factory.h" | 10 #include "content/renderer/android/synchronous_compositor_factory.h" |
11 #include "content/renderer/media/android/stream_texture_factory_synchronous_impl
.h" | 11 #include "content/renderer/media/android/stream_texture_factory_synchronous_impl
.h" |
12 #include "gpu/command_buffer/service/in_process_command_buffer.h" | 12 #include "gpu/command_buffer/service/in_process_command_buffer.h" |
13 #include "webkit/common/gpu/context_provider_web_context.h" | 13 #include "webkit/common/gpu/context_provider_web_context.h" |
14 | 14 |
15 namespace gfx { | |
16 class GLSurface; | |
17 } | |
18 | |
19 namespace gpu { | 15 namespace gpu { |
20 class GLInProcessContext; | 16 class GLInProcessContext; |
21 } | 17 } |
22 | 18 |
23 namespace webkit { | 19 namespace webkit { |
24 namespace gpu { | 20 namespace gpu { |
25 class WebGraphicsContext3DInProcessCommandBufferImpl; | 21 class WebGraphicsContext3DInProcessCommandBufferImpl; |
26 } | 22 } |
27 } | 23 } |
28 | 24 |
(...skipping 21 matching lines...) Expand all Loading... |
50 SynchronousInputEventFilter* synchronous_input_event_filter() { | 46 SynchronousInputEventFilter* synchronous_input_event_filter() { |
51 return &synchronous_input_event_filter_; | 47 return &synchronous_input_event_filter_; |
52 } | 48 } |
53 | 49 |
54 void SetDeferredGpuService( | 50 void SetDeferredGpuService( |
55 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); | 51 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); |
56 void CompositorInitializedHardwareDraw(); | 52 void CompositorInitializedHardwareDraw(); |
57 void CompositorReleasedHardwareDraw(); | 53 void CompositorReleasedHardwareDraw(); |
58 | 54 |
59 scoped_refptr<cc::ContextProvider> | 55 scoped_refptr<cc::ContextProvider> |
60 CreateOnscreenContextProviderForCompositorThread( | 56 CreateOnscreenContextProviderForCompositorThread(); |
61 scoped_refptr<gfx::GLSurface> surface); | |
62 gpu::GLInProcessContext* GetShareContext(); | 57 gpu::GLInProcessContext* GetShareContext(); |
63 | 58 |
64 private: | 59 private: |
65 bool CanCreateMainThreadContext(); | 60 bool CanCreateMainThreadContext(); |
66 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> | 61 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> |
67 TryCreateStreamTextureFactory(); | 62 TryCreateStreamTextureFactory(); |
68 | 63 |
69 SynchronousInputEventFilter synchronous_input_event_filter_; | 64 SynchronousInputEventFilter synchronous_input_event_filter_; |
70 | 65 |
71 scoped_refptr<webkit::gpu::ContextProviderWebContext> | 66 scoped_refptr<webkit::gpu::ContextProviderWebContext> |
72 offscreen_context_for_main_thread_; | 67 offscreen_context_for_main_thread_; |
73 | 68 |
74 scoped_refptr<gpu::InProcessCommandBuffer::Service> service_; | 69 scoped_refptr<gpu::InProcessCommandBuffer::Service> service_; |
75 scoped_ptr<gpu::GLInProcessContext> share_context_; | 70 scoped_ptr<gpu::GLInProcessContext> share_context_; |
76 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> | 71 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> |
77 video_context_provider_; | 72 video_context_provider_; |
78 | 73 |
79 // |num_hardware_compositor_lock_| is updated on UI thread only but can be | 74 // |num_hardware_compositor_lock_| is updated on UI thread only but can be |
80 // read on renderer main thread. | 75 // read on renderer main thread. |
81 base::Lock num_hardware_compositor_lock_; | 76 base::Lock num_hardware_compositor_lock_; |
82 unsigned int num_hardware_compositors_; | 77 unsigned int num_hardware_compositors_; |
83 }; | 78 }; |
84 | 79 |
85 } // namespace content | 80 } // namespace content |
86 | 81 |
87 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP
L_H_ | 82 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP
L_H_ |
OLD | NEW |