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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 layout_and_paint_async_callback_(nullptr), | 228 layout_and_paint_async_callback_(nullptr), |
229 remote_proto_channel_receiver_(nullptr), | 229 remote_proto_channel_receiver_(nullptr), |
230 weak_factory_(this) {} | 230 weak_factory_(this) {} |
231 | 231 |
232 void RenderWidgetCompositor::Initialize(float device_scale_factor) { | 232 void RenderWidgetCompositor::Initialize(float device_scale_factor) { |
233 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 233 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
234 cc::LayerTreeSettings settings = | 234 cc::LayerTreeSettings settings = |
235 GenerateLayerTreeSettings(*cmd, compositor_deps_, device_scale_factor); | 235 GenerateLayerTreeSettings(*cmd, compositor_deps_, device_scale_factor); |
236 cc::LayerTreeHostInProcess::InitParams params; | 236 cc::LayerTreeHostInProcess::InitParams params; |
237 params.client = this; | 237 params.client = this; |
238 params.shared_bitmap_manager = compositor_deps_->GetSharedBitmapManager(); | |
239 params.gpu_memory_buffer_manager = | |
240 compositor_deps_->GetGpuMemoryBufferManager(); | |
241 params.settings = &settings; | 238 params.settings = &settings; |
242 params.task_graph_runner = compositor_deps_->GetTaskGraphRunner(); | 239 params.task_graph_runner = compositor_deps_->GetTaskGraphRunner(); |
243 params.main_task_runner = | 240 params.main_task_runner = |
244 compositor_deps_->GetCompositorMainThreadTaskRunner(); | 241 compositor_deps_->GetCompositorMainThreadTaskRunner(); |
245 params.animation_host = cc::AnimationHost::CreateMainInstance(); | 242 params.animation_host = cc::AnimationHost::CreateMainInstance(); |
246 | 243 |
247 if (cmd->HasSwitch(switches::kUseRemoteCompositing)) { | 244 if (cmd->HasSwitch(switches::kUseRemoteCompositing)) { |
248 DCHECK(!threaded_); | 245 DCHECK(!threaded_); |
249 params.image_serialization_processor = | 246 params.image_serialization_processor = |
250 compositor_deps_->GetImageSerializationProcessor(); | 247 compositor_deps_->GetImageSerializationProcessor(); |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1125 float device_scale) { | 1122 float device_scale) { |
1126 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); | 1123 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); |
1127 } | 1124 } |
1128 | 1125 |
1129 void RenderWidgetCompositor::SetDeviceColorSpace( | 1126 void RenderWidgetCompositor::SetDeviceColorSpace( |
1130 const gfx::ColorSpace& color_space) { | 1127 const gfx::ColorSpace& color_space) { |
1131 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space); | 1128 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space); |
1132 } | 1129 } |
1133 | 1130 |
1134 } // namespace content | 1131 } // namespace content |
OLD | NEW |