OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/renderer/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 cc::LayerTreeHostInProcess::InitParams params; | 235 cc::LayerTreeHostInProcess::InitParams params; |
236 params.client = this; | 236 params.client = this; |
237 params.shared_bitmap_manager = compositor_deps_->GetSharedBitmapManager(); | 237 params.shared_bitmap_manager = compositor_deps_->GetSharedBitmapManager(); |
238 params.gpu_memory_buffer_manager = | 238 params.gpu_memory_buffer_manager = |
239 compositor_deps_->GetGpuMemoryBufferManager(); | 239 compositor_deps_->GetGpuMemoryBufferManager(); |
240 params.settings = &settings; | 240 params.settings = &settings; |
241 params.task_graph_runner = compositor_deps_->GetTaskGraphRunner(); | 241 params.task_graph_runner = compositor_deps_->GetTaskGraphRunner(); |
242 params.main_task_runner = | 242 params.main_task_runner = |
243 compositor_deps_->GetCompositorMainThreadTaskRunner(); | 243 compositor_deps_->GetCompositorMainThreadTaskRunner(); |
244 params.animation_host = cc::AnimationHost::CreateMainInstance(); | 244 params.animation_host = cc::AnimationHost::CreateMainInstance(); |
245 DCHECK(settings.use_compositor_frame_sink_begin_frame_source); | |
246 | 245 |
247 if (cmd->HasSwitch(switches::kUseRemoteCompositing)) { | 246 if (cmd->HasSwitch(switches::kUseRemoteCompositing)) { |
248 DCHECK(!threaded_); | 247 DCHECK(!threaded_); |
249 params.image_serialization_processor = | 248 params.image_serialization_processor = |
250 compositor_deps_->GetImageSerializationProcessor(); | 249 compositor_deps_->GetImageSerializationProcessor(); |
251 layer_tree_host_ = | 250 layer_tree_host_ = |
252 cc::LayerTreeHostInProcess::CreateRemoteServer(this, ¶ms); | 251 cc::LayerTreeHostInProcess::CreateRemoteServer(this, ¶ms); |
253 } else if (!threaded_) { | 252 } else if (!threaded_) { |
254 // Single-threaded layout tests. | 253 // Single-threaded layout tests. |
255 layer_tree_host_ = | 254 layer_tree_host_ = |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1125 float device_scale) { | 1124 float device_scale) { |
1126 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); | 1125 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); |
1127 } | 1126 } |
1128 | 1127 |
1129 void RenderWidgetCompositor::SetDeviceColorSpace( | 1128 void RenderWidgetCompositor::SetDeviceColorSpace( |
1130 const gfx::ColorSpace& color_space) { | 1129 const gfx::ColorSpace& color_space) { |
1131 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space); | 1130 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space); |
1132 } | 1131 } |
1133 | 1132 |
1134 } // namespace content | 1133 } // namespace content |
OLD | NEW |