| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 params.engine_picture_cache = | 254 params.engine_picture_cache = |
| 255 compositor_deps_->GetImageSerializationProcessor() | 255 compositor_deps_->GetImageSerializationProcessor() |
| 256 ->CreateEnginePictureCache(); | 256 ->CreateEnginePictureCache(); |
| 257 params.settings = &settings; | 257 params.settings = &settings; |
| 258 layer_tree_host_ = base::MakeUnique<cc::LayerTreeHostRemote>(¶ms); | 258 layer_tree_host_ = base::MakeUnique<cc::LayerTreeHostRemote>(¶ms); |
| 259 return; | 259 return; |
| 260 } | 260 } |
| 261 | 261 |
| 262 cc::LayerTreeHostInProcess::InitParams params; | 262 cc::LayerTreeHostInProcess::InitParams params; |
| 263 params.client = this; | 263 params.client = this; |
| 264 params.shared_bitmap_manager = compositor_deps_->GetSharedBitmapManager(); | |
| 265 params.gpu_memory_buffer_manager = | |
| 266 compositor_deps_->GetGpuMemoryBufferManager(); | |
| 267 params.settings = &settings; | 264 params.settings = &settings; |
| 268 params.task_graph_runner = compositor_deps_->GetTaskGraphRunner(); | 265 params.task_graph_runner = compositor_deps_->GetTaskGraphRunner(); |
| 269 params.main_task_runner = | 266 params.main_task_runner = |
| 270 compositor_deps_->GetCompositorMainThreadTaskRunner(); | 267 compositor_deps_->GetCompositorMainThreadTaskRunner(); |
| 271 params.animation_host = cc::AnimationHost::CreateMainInstance(); | 268 params.animation_host = cc::AnimationHost::CreateMainInstance(); |
| 272 | 269 |
| 273 if (cmd->HasSwitch(switches::kUseRemoteCompositing)) { | 270 if (cmd->HasSwitch(switches::kUseRemoteCompositing)) { |
| 274 DCHECK(!threaded_); | 271 DCHECK(!threaded_); |
| 275 params.image_serialization_processor = | 272 params.image_serialization_processor = |
| 276 compositor_deps_->GetImageSerializationProcessor(); | 273 compositor_deps_->GetImageSerializationProcessor(); |
| (...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1152 float device_scale) { | 1149 float device_scale) { |
| 1153 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); | 1150 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); |
| 1154 } | 1151 } |
| 1155 | 1152 |
| 1156 void RenderWidgetCompositor::SetDeviceColorSpace( | 1153 void RenderWidgetCompositor::SetDeviceColorSpace( |
| 1157 const gfx::ColorSpace& color_space) { | 1154 const gfx::ColorSpace& color_space) { |
| 1158 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space); | 1155 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space); |
| 1159 } | 1156 } |
| 1160 | 1157 |
| 1161 } // namespace content | 1158 } // namespace content |
| OLD | NEW |