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 "content/browser/android/in_process/synchronous_input_event_filter.h" | 10 #include "content/browser/android/in_process/synchronous_input_event_filter.h" |
10 #include "content/renderer/android/synchronous_compositor_factory.h" | 11 #include "content/renderer/android/synchronous_compositor_factory.h" |
11 #include "content/renderer/media/android/stream_texture_factory_synchronous_impl
.h" | 12 #include "content/renderer/media/android/stream_texture_factory_synchronous_impl
.h" |
12 #include "gpu/command_buffer/service/in_process_command_buffer.h" | 13 #include "gpu/command_buffer/service/in_process_command_buffer.h" |
13 #include "webkit/common/gpu/context_provider_web_context.h" | |
14 | 14 |
15 namespace gpu { | 15 namespace gpu { |
16 class GLInProcessContext; | 16 class GLInProcessContext; |
17 } | 17 } |
18 | 18 |
19 namespace gpu_blink { | 19 namespace gpu_blink { |
20 class WebGraphicsContext3DInProcessCommandBufferImpl; | 20 class WebGraphicsContext3DInProcessCommandBufferImpl; |
21 } | 21 } |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 class SynchronousCompositorFactoryImpl : public SynchronousCompositorFactory { | 25 class SynchronousCompositorFactoryImpl : public SynchronousCompositorFactory { |
26 public: | 26 public: |
27 SynchronousCompositorFactoryImpl(); | 27 SynchronousCompositorFactoryImpl(); |
28 virtual ~SynchronousCompositorFactoryImpl(); | 28 virtual ~SynchronousCompositorFactoryImpl(); |
29 | 29 |
30 // SynchronousCompositorFactory | 30 // SynchronousCompositorFactory |
31 virtual scoped_refptr<base::MessageLoopProxy> GetCompositorMessageLoop() | 31 virtual scoped_refptr<base::MessageLoopProxy> GetCompositorMessageLoop() |
32 override; | 32 override; |
33 virtual bool RecordFullLayer() override; | 33 virtual bool RecordFullLayer() override; |
34 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( | 34 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
35 int routing_id, | 35 int routing_id, |
36 scoped_refptr<content::FrameSwapMessageQueue> frame_swap_message_queue) | 36 scoped_refptr<content::FrameSwapMessageQueue> frame_swap_message_queue) |
37 override; | 37 override; |
38 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() override; | 38 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() override; |
39 virtual scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( | 39 virtual scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( |
40 int routing_id) override; | 40 int routing_id) override; |
41 virtual scoped_refptr<webkit::gpu::ContextProviderWebContext> | 41 virtual scoped_refptr<cc_blink::ContextProviderWebContext> |
42 CreateOffscreenContextProvider( | 42 CreateOffscreenContextProvider( |
43 const blink::WebGraphicsContext3D::Attributes& attributes, | 43 const blink::WebGraphicsContext3D::Attributes& attributes, |
44 const std::string& debug_name) override; | 44 const std::string& debug_name) override; |
45 virtual scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory( | 45 virtual scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory( |
46 int view_id) override; | 46 int view_id) override; |
47 virtual gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl* | 47 virtual gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl* |
48 CreateOffscreenGraphicsContext3D( | 48 CreateOffscreenGraphicsContext3D( |
49 const blink::WebGraphicsContext3D::Attributes& attributes) override; | 49 const blink::WebGraphicsContext3D::Attributes& attributes) override; |
50 | 50 |
51 SynchronousInputEventFilter* synchronous_input_event_filter() { | 51 SynchronousInputEventFilter* synchronous_input_event_filter() { |
52 return &synchronous_input_event_filter_; | 52 return &synchronous_input_event_filter_; |
53 } | 53 } |
54 | 54 |
(...skipping 24 matching lines...) Expand all Loading... |
79 // |num_hardware_compositor_lock_| is updated on UI thread only but can be | 79 // |num_hardware_compositor_lock_| is updated on UI thread only but can be |
80 // read on renderer main thread. | 80 // read on renderer main thread. |
81 base::Lock num_hardware_compositor_lock_; | 81 base::Lock num_hardware_compositor_lock_; |
82 unsigned int num_hardware_compositors_; | 82 unsigned int num_hardware_compositors_; |
83 scoped_refptr<base::MessageLoopProxy> main_thread_proxy_; | 83 scoped_refptr<base::MessageLoopProxy> main_thread_proxy_; |
84 }; | 84 }; |
85 | 85 |
86 } // namespace content | 86 } // namespace content |
87 | 87 |
88 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP
L_H_ | 88 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP
L_H_ |
OLD | NEW |