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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 SynchronousCompositorFactoryImpl::~SynchronousCompositorFactoryImpl() {} | 159 SynchronousCompositorFactoryImpl::~SynchronousCompositorFactoryImpl() {} |
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 int surface_id, | |
170 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; |
171 scoped_refptr<cc::ContextProvider> onscreen_context = | 174 scoped_refptr<cc::ContextProvider> onscreen_context = |
172 CreateContextProviderForCompositor(surface_id, RENDER_COMPOSITOR_CONTEXT); | 175 CreateContextProviderForCompositor(kDummySurfaceId, |
| 176 RENDER_COMPOSITOR_CONTEXT); |
173 scoped_refptr<cc::ContextProvider> worker_context = | 177 scoped_refptr<cc::ContextProvider> worker_context = |
174 GetSharedWorkerContextProvider(); | 178 GetSharedWorkerContextProvider(); |
175 return make_scoped_ptr(new SynchronousCompositorOutputSurface( | 179 return make_scoped_ptr(new SynchronousCompositorOutputSurface( |
176 onscreen_context, worker_context, routing_id, frame_swap_message_queue)); | 180 onscreen_context, worker_context, routing_id, frame_swap_message_queue)); |
177 } | 181 } |
178 | 182 |
179 InputHandlerManagerClient* | 183 InputHandlerManagerClient* |
180 SynchronousCompositorFactoryImpl::GetInputHandlerManagerClient() { | 184 SynchronousCompositorFactoryImpl::GetInputHandlerManagerClient() { |
181 return synchronous_input_event_filter(); | 185 return synchronous_input_event_filter(); |
182 } | 186 } |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 android_view_service_->sync_point_manager()); | 410 android_view_service_->sync_point_manager()); |
407 } | 411 } |
408 return gpu_thread_service_; | 412 return gpu_thread_service_; |
409 } | 413 } |
410 | 414 |
411 void SynchronousCompositorFactoryImpl::SetUseIpcCommandBuffer() { | 415 void SynchronousCompositorFactoryImpl::SetUseIpcCommandBuffer() { |
412 use_ipc_command_buffer_ = true; | 416 use_ipc_command_buffer_ = true; |
413 } | 417 } |
414 | 418 |
415 } // namespace content | 419 } // namespace content |
OLD | NEW |