| 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 "gpu/command_buffer/client/gl_in_process_context.h" | 9 #include "gpu/command_buffer/client/gl_in_process_context.h" |
| 10 #include "ui/gl/android/surface_texture.h" | 10 #include "ui/gl/android/surface_texture.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 gpu::GLInProcessContext* gl_in_process_context_; | 116 gpu::GLInProcessContext* gl_in_process_context_; |
| 117 | 117 |
| 118 DISALLOW_COPY_AND_ASSIGN(VideoContextProvider); | 118 DISALLOW_COPY_AND_ASSIGN(VideoContextProvider); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace | 121 } // namespace |
| 122 | 122 |
| 123 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; | 123 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; |
| 124 | 124 |
| 125 SynchronousCompositorFactoryImpl::SynchronousCompositorFactoryImpl() | 125 SynchronousCompositorFactoryImpl::SynchronousCompositorFactoryImpl() |
| 126 : num_hardware_compositors_(0) { | 126 : record_full_layer_(true), |
| 127 num_hardware_compositors_(0) { |
| 127 SynchronousCompositorFactory::SetInstance(this); | 128 SynchronousCompositorFactory::SetInstance(this); |
| 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 |
| 138 bool |
| 139 SynchronousCompositorFactoryImpl::RecordFullLayer() { |
| 140 return record_full_layer_; |
| 141 } |
| 142 |
| 137 scoped_ptr<cc::OutputSurface> | 143 scoped_ptr<cc::OutputSurface> |
| 138 SynchronousCompositorFactoryImpl::CreateOutputSurface(int routing_id) { | 144 SynchronousCompositorFactoryImpl::CreateOutputSurface(int routing_id) { |
| 139 scoped_ptr<SynchronousCompositorOutputSurface> output_surface( | 145 scoped_ptr<SynchronousCompositorOutputSurface> output_surface( |
| 140 new SynchronousCompositorOutputSurface(routing_id)); | 146 new SynchronousCompositorOutputSurface(routing_id)); |
| 141 return output_surface.PassAs<cc::OutputSurface>(); | 147 return output_surface.PassAs<cc::OutputSurface>(); |
| 142 } | 148 } |
| 143 | 149 |
| 144 InputHandlerManagerClient* | 150 InputHandlerManagerClient* |
| 145 SynchronousCompositorFactoryImpl::GetInputHandlerManagerClient() { | 151 SynchronousCompositorFactoryImpl::GetInputHandlerManagerClient() { |
| 146 return synchronous_input_event_filter(); | 152 return synchronous_input_event_filter(); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 } | 239 } |
| 234 return video_context_provider_; | 240 return video_context_provider_; |
| 235 } | 241 } |
| 236 | 242 |
| 237 void SynchronousCompositorFactoryImpl::SetDeferredGpuService( | 243 void SynchronousCompositorFactoryImpl::SetDeferredGpuService( |
| 238 scoped_refptr<gpu::InProcessCommandBuffer::Service> service) { | 244 scoped_refptr<gpu::InProcessCommandBuffer::Service> service) { |
| 239 DCHECK(!service_); | 245 DCHECK(!service_); |
| 240 service_ = service; | 246 service_ = service; |
| 241 } | 247 } |
| 242 | 248 |
| 249 void SynchronousCompositorFactoryImpl::DisableRecordFullLayer() { |
| 250 record_full_layer_ = false; |
| 251 } |
| 252 |
| 243 } // namespace content | 253 } // namespace content |
| OLD | NEW |