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 #include "content/browser/android/in_process/synchronous_compositor_factory_impl
.h" | 5 #include "content/browser/android/in_process/synchronous_compositor_factory_impl
.h" |
6 | 6 |
7 #include "content/browser/android/in_process/synchronous_compositor_output_surfa
ce.h" | 7 #include "content/browser/android/in_process/synchronous_compositor_output_surfa
ce.h" |
8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
| 9 #include "content/renderer/gpu/frame_swap_message_queue.h" |
9 #include "gpu/command_buffer/client/gl_in_process_context.h" | 10 #include "gpu/command_buffer/client/gl_in_process_context.h" |
10 #include "ui/gl/android/surface_texture.h" | 11 #include "ui/gl/android/surface_texture.h" |
11 #include "ui/gl/gl_surface.h" | 12 #include "ui/gl/gl_surface.h" |
12 #include "ui/gl/gl_surface_stub.h" | 13 #include "ui/gl/gl_surface_stub.h" |
13 #include "webkit/common/gpu/context_provider_in_process.h" | 14 #include "webkit/common/gpu/context_provider_in_process.h" |
14 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" | 15 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" |
15 | 16 |
16 using webkit::gpu::ContextProviderWebContext; | 17 using webkit::gpu::ContextProviderWebContext; |
17 | 18 |
18 namespace content { | 19 namespace content { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } | 129 } |
129 | 130 |
130 SynchronousCompositorFactoryImpl::~SynchronousCompositorFactoryImpl() {} | 131 SynchronousCompositorFactoryImpl::~SynchronousCompositorFactoryImpl() {} |
131 | 132 |
132 scoped_refptr<base::MessageLoopProxy> | 133 scoped_refptr<base::MessageLoopProxy> |
133 SynchronousCompositorFactoryImpl::GetCompositorMessageLoop() { | 134 SynchronousCompositorFactoryImpl::GetCompositorMessageLoop() { |
134 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); | 135 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); |
135 } | 136 } |
136 | 137 |
137 scoped_ptr<cc::OutputSurface> | 138 scoped_ptr<cc::OutputSurface> |
138 SynchronousCompositorFactoryImpl::CreateOutputSurface(int routing_id) { | 139 SynchronousCompositorFactoryImpl::CreateOutputSurface( |
| 140 int routing_id, |
| 141 scoped_refptr<content::FrameSwapMessageQueue> frame_swap_message_queue) { |
139 scoped_ptr<SynchronousCompositorOutputSurface> output_surface( | 142 scoped_ptr<SynchronousCompositorOutputSurface> output_surface( |
140 new SynchronousCompositorOutputSurface(routing_id)); | 143 new SynchronousCompositorOutputSurface(routing_id, |
| 144 frame_swap_message_queue)); |
141 return output_surface.PassAs<cc::OutputSurface>(); | 145 return output_surface.PassAs<cc::OutputSurface>(); |
142 } | 146 } |
143 | 147 |
144 InputHandlerManagerClient* | 148 InputHandlerManagerClient* |
145 SynchronousCompositorFactoryImpl::GetInputHandlerManagerClient() { | 149 SynchronousCompositorFactoryImpl::GetInputHandlerManagerClient() { |
146 return synchronous_input_event_filter(); | 150 return synchronous_input_event_filter(); |
147 } | 151 } |
148 | 152 |
149 scoped_refptr<ContextProviderWebContext> SynchronousCompositorFactoryImpl:: | 153 scoped_refptr<ContextProviderWebContext> SynchronousCompositorFactoryImpl:: |
150 GetSharedOffscreenContextProviderForMainThread() { | 154 GetSharedOffscreenContextProviderForMainThread() { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 return video_context_provider_; | 238 return video_context_provider_; |
235 } | 239 } |
236 | 240 |
237 void SynchronousCompositorFactoryImpl::SetDeferredGpuService( | 241 void SynchronousCompositorFactoryImpl::SetDeferredGpuService( |
238 scoped_refptr<gpu::InProcessCommandBuffer::Service> service) { | 242 scoped_refptr<gpu::InProcessCommandBuffer::Service> service) { |
239 DCHECK(!service_); | 243 DCHECK(!service_); |
240 service_ = service; | 244 service_ = service; |
241 } | 245 } |
242 | 246 |
243 } // namespace content | 247 } // namespace content |
OLD | NEW |