Chromium Code Reviews| 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/observer_list.h" | 7 #include "base/observer_list.h" |
| 8 #include "content/browser/android/in_process/synchronous_compositor_external_beg in_frame_source.h" | 8 #include "content/browser/android/in_process/synchronous_compositor_external_beg in_frame_source.h" |
| 9 #include "content/browser/android/in_process/synchronous_compositor_impl.h" | 9 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
| 10 #include "content/browser/android/in_process/synchronous_compositor_output_surfa ce.h" | 10 #include "content/browser/android/in_process/synchronous_compositor_output_surfa ce.h" |
| 11 #include "content/browser/gpu/gpu_data_manager_impl_private.h" | |
| 11 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 12 #include "content/renderer/gpu/frame_swap_message_queue.h" | 13 #include "content/renderer/gpu/frame_swap_message_queue.h" |
| 13 #include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h" | 14 #include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h" |
| 14 #include "gpu/command_buffer/client/gl_in_process_context.h" | 15 #include "gpu/command_buffer/client/gl_in_process_context.h" |
| 15 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 16 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 16 #include "ui/gl/android/surface_texture.h" | 17 #include "ui/gl/android/surface_texture.h" |
| 17 #include "ui/gl/gl_surface.h" | 18 #include "ui/gl/gl_surface.h" |
| 18 #include "ui/gl/gl_surface_stub.h" | 19 #include "ui/gl/gl_surface_stub.h" |
| 19 #include "webkit/common/gpu/context_provider_in_process.h" | 20 #include "webkit/common/gpu/context_provider_in_process.h" |
| 20 | 21 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 ObserverList<StreamTextureFactoryContextObserver> observer_list_; | 158 ObserverList<StreamTextureFactoryContextObserver> observer_list_; |
| 158 | 159 |
| 159 DISALLOW_COPY_AND_ASSIGN(VideoContextProvider); | 160 DISALLOW_COPY_AND_ASSIGN(VideoContextProvider); |
| 160 }; | 161 }; |
| 161 | 162 |
| 162 | 163 |
| 163 SynchronousCompositorFactoryImpl::SynchronousCompositorFactoryImpl() | 164 SynchronousCompositorFactoryImpl::SynchronousCompositorFactoryImpl() |
| 164 : record_full_layer_(true), | 165 : record_full_layer_(true), |
| 165 num_hardware_compositors_(0) { | 166 num_hardware_compositors_(0) { |
| 166 SynchronousCompositorFactory::SetInstance(this); | 167 SynchronousCompositorFactory::SetInstance(this); |
| 168 | |
| 169 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); | |
| 170 DCHECK(gpu_data_manager); | |
| 171 gpu_data_manager->AppendGpuCommandLine( | |
| 172 base::CommandLine::ForCurrentProcess()); | |
|
no sievers
2015/01/23 20:21:50
We shouldn't append the command line twice.
Can w
boliu
2015/01/23 20:30:29
I did think about that.
One is the factory here i
boliu
2015/01/23 20:36:24
Actually DCHECK isn't that bad. At least will noti
| |
| 167 } | 173 } |
| 168 | 174 |
| 169 SynchronousCompositorFactoryImpl::~SynchronousCompositorFactoryImpl() {} | 175 SynchronousCompositorFactoryImpl::~SynchronousCompositorFactoryImpl() {} |
| 170 | 176 |
| 171 scoped_refptr<base::MessageLoopProxy> | 177 scoped_refptr<base::MessageLoopProxy> |
| 172 SynchronousCompositorFactoryImpl::GetCompositorMessageLoop() { | 178 SynchronousCompositorFactoryImpl::GetCompositorMessageLoop() { |
| 173 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); | 179 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); |
| 174 } | 180 } |
| 175 | 181 |
| 176 bool | 182 bool |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 300 DCHECK(!service_.get()); | 306 DCHECK(!service_.get()); |
| 301 service_ = service; | 307 service_ = service; |
| 302 } | 308 } |
| 303 | 309 |
| 304 void SynchronousCompositorFactoryImpl::SetRecordFullDocument( | 310 void SynchronousCompositorFactoryImpl::SetRecordFullDocument( |
| 305 bool record_full_document) { | 311 bool record_full_document) { |
| 306 record_full_layer_ = record_full_document; | 312 record_full_layer_ = record_full_document; |
| 307 } | 313 } |
| 308 | 314 |
| 309 } // namespace content | 315 } // namespace content |
| OLD | NEW |