| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/compositor/compositor.h" | 5 #include "ui/compositor/compositor.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 settings.use_layer_lists = | 133 settings.use_layer_lists = |
| 134 command_line->HasSwitch(cc::switches::kUIEnableLayerLists); | 134 command_line->HasSwitch(cc::switches::kUIEnableLayerLists); |
| 135 | 135 |
| 136 settings.enable_color_correct_rasterization = | 136 settings.enable_color_correct_rasterization = |
| 137 command_line->HasSwitch(switches::kEnableColorCorrectRendering); | 137 command_line->HasSwitch(switches::kEnableColorCorrectRendering); |
| 138 | 138 |
| 139 // UI compositor always uses partial raster if not using zero-copy. Zero copy | 139 // UI compositor always uses partial raster if not using zero-copy. Zero copy |
| 140 // doesn't currently support partial raster. | 140 // doesn't currently support partial raster. |
| 141 settings.use_partial_raster = !settings.use_zero_copy; | 141 settings.use_partial_raster = !settings.use_zero_copy; |
| 142 | 142 |
| 143 settings.buffer_to_texture_target_map = |
| 144 context_factory_->GetRendererSettings().buffer_to_texture_target_map; |
| 145 |
| 143 settings.gpu_memory_policy.bytes_limit_when_visible = 512 * 1024 * 1024; | 146 settings.gpu_memory_policy.bytes_limit_when_visible = 512 * 1024 * 1024; |
| 144 settings.gpu_memory_policy.priority_cutoff_when_visible = | 147 settings.gpu_memory_policy.priority_cutoff_when_visible = |
| 145 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; | 148 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; |
| 146 | 149 |
| 147 settings.disallow_non_exact_resource_reuse = | 150 settings.disallow_non_exact_resource_reuse = |
| 148 command_line->HasSwitch(cc::switches::kDisallowNonExactResourceReuse); | 151 command_line->HasSwitch(cc::switches::kDisallowNonExactResourceReuse); |
| 149 | 152 |
| 150 // TODO(staraz): LayerTreeSettings shouldn't have a RendererSettings. | 153 // TODO(staraz): LayerTreeSettings shouldn't have a RendererSettings. |
| 151 settings.renderer_settings = context_factory_->GetRendererSettings(); | 154 settings.renderer_settings = context_factory_->GetRendererSettings(); |
| 152 | 155 |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 void Compositor::TimeoutLocks() { | 571 void Compositor::TimeoutLocks() { |
| 569 // Make a copy, we're going to cause |active_locks_| to become | 572 // Make a copy, we're going to cause |active_locks_| to become |
| 570 // empty. | 573 // empty. |
| 571 std::vector<CompositorLock*> locks = active_locks_; | 574 std::vector<CompositorLock*> locks = active_locks_; |
| 572 for (auto* lock : locks) | 575 for (auto* lock : locks) |
| 573 lock->TimeoutLock(); | 576 lock->TimeoutLock(); |
| 574 DCHECK(active_locks_.empty()); | 577 DCHECK(active_locks_.empty()); |
| 575 } | 578 } |
| 576 | 579 |
| 577 } // namespace ui | 580 } // namespace ui |
| OLD | NEW |