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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
9 #include "base/sys_info.h" | 9 #include "base/sys_info.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 scoped_refptr<base::SingleThreadTaskRunner> | 161 scoped_refptr<base::SingleThreadTaskRunner> |
162 SynchronousCompositorFactoryImpl::GetCompositorTaskRunner() { | 162 SynchronousCompositorFactoryImpl::GetCompositorTaskRunner() { |
163 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); | 163 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); |
164 } | 164 } |
165 | 165 |
166 scoped_ptr<cc::OutputSurface> | 166 scoped_ptr<cc::OutputSurface> |
167 SynchronousCompositorFactoryImpl::CreateOutputSurface( | 167 SynchronousCompositorFactoryImpl::CreateOutputSurface( |
168 int routing_id, | 168 int routing_id, |
169 scoped_refptr<content::FrameSwapMessageQueue> frame_swap_message_queue) { | 169 scoped_refptr<content::FrameSwapMessageQueue> frame_swap_message_queue) { |
170 // TODO(piman): we still need to create a View command buffer until | |
171 // crbug.com/526196 is fixed. The surface_id doesn't matter, it just needs to | |
172 // be !0. | |
173 const int32 kDummySurfaceId = 1; | |
174 scoped_refptr<cc::ContextProvider> onscreen_context = | 170 scoped_refptr<cc::ContextProvider> onscreen_context = |
175 CreateContextProviderForCompositor(kDummySurfaceId, | 171 CreateContextProviderForCompositor(0, RENDER_COMPOSITOR_CONTEXT); |
176 RENDER_COMPOSITOR_CONTEXT); | |
177 scoped_refptr<cc::ContextProvider> worker_context = | 172 scoped_refptr<cc::ContextProvider> worker_context = |
178 GetSharedWorkerContextProvider(); | 173 GetSharedWorkerContextProvider(); |
179 return make_scoped_ptr(new SynchronousCompositorOutputSurface( | 174 return make_scoped_ptr(new SynchronousCompositorOutputSurface( |
180 onscreen_context, worker_context, routing_id, frame_swap_message_queue)); | 175 onscreen_context, worker_context, routing_id, frame_swap_message_queue)); |
181 } | 176 } |
182 | 177 |
183 InputHandlerManagerClient* | 178 InputHandlerManagerClient* |
184 SynchronousCompositorFactoryImpl::GetInputHandlerManagerClient() { | 179 SynchronousCompositorFactoryImpl::GetInputHandlerManagerClient() { |
185 return synchronous_input_event_filter(); | 180 return synchronous_input_event_filter(); |
186 } | 181 } |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 android_view_service_->sync_point_manager()); | 405 android_view_service_->sync_point_manager()); |
411 } | 406 } |
412 return gpu_thread_service_; | 407 return gpu_thread_service_; |
413 } | 408 } |
414 | 409 |
415 void SynchronousCompositorFactoryImpl::SetUseIpcCommandBuffer() { | 410 void SynchronousCompositorFactoryImpl::SetUseIpcCommandBuffer() { |
416 use_ipc_command_buffer_ = true; | 411 use_ipc_command_buffer_ = true; |
417 } | 412 } |
418 | 413 |
419 } // namespace content | 414 } // namespace content |
OLD | NEW |