| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_impl.h" | 5 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "cc/input/input_handler.h" | 10 #include "cc/input/input_handler.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 SynchronousCompositorFactory::SetInstance(this); | 44 SynchronousCompositorFactory::SetInstance(this); |
| 45 } | 45 } |
| 46 | 46 |
| 47 // SynchronousCompositorFactory | 47 // SynchronousCompositorFactory |
| 48 virtual scoped_refptr<base::MessageLoopProxy> | 48 virtual scoped_refptr<base::MessageLoopProxy> |
| 49 GetCompositorMessageLoop() OVERRIDE { | 49 GetCompositorMessageLoop() OVERRIDE { |
| 50 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); | 50 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); |
| 51 } | 51 } |
| 52 | 52 |
| 53 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( | 53 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
| 54 int routing_id) OVERRIDE { | 54 int routing_id, size_t max_transfer_buffer_usage_bytes) OVERRIDE { |
| 55 scoped_ptr<SynchronousCompositorOutputSurface> output_surface( | 55 scoped_ptr<SynchronousCompositorOutputSurface> output_surface( |
| 56 new SynchronousCompositorOutputSurface(routing_id)); | 56 new SynchronousCompositorOutputSurface( |
| 57 routing_id, |
| 58 max_transfer_buffer_usage_bytes)); |
| 57 return output_surface.PassAs<cc::OutputSurface>(); | 59 return output_surface.PassAs<cc::OutputSurface>(); |
| 58 } | 60 } |
| 59 | 61 |
| 60 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() OVERRIDE { | 62 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() OVERRIDE { |
| 61 return synchronous_input_event_filter(); | 63 return synchronous_input_event_filter(); |
| 62 } | 64 } |
| 63 | 65 |
| 64 SynchronousInputEventFilter* synchronous_input_event_filter() { | 66 SynchronousInputEventFilter* synchronous_input_event_filter() { |
| 65 return &synchronous_input_event_filter_; | 67 return &synchronous_input_event_filter_; |
| 66 } | 68 } |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 g_factory.Get(); // Ensure it's initialized. | 289 g_factory.Get(); // Ensure it's initialized. |
| 288 SynchronousCompositorImpl::CreateForWebContents(contents); | 290 SynchronousCompositorImpl::CreateForWebContents(contents); |
| 289 } | 291 } |
| 290 if (SynchronousCompositorImpl* instance = | 292 if (SynchronousCompositorImpl* instance = |
| 291 SynchronousCompositorImpl::FromWebContents(contents)) { | 293 SynchronousCompositorImpl::FromWebContents(contents)) { |
| 292 instance->SetClient(client); | 294 instance->SetClient(client); |
| 293 } | 295 } |
| 294 } | 296 } |
| 295 | 297 |
| 296 } // namespace content | 298 } // namespace content |
| OLD | NEW |