Chromium Code Reviews| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 uint32_t target = context_factory_->GetImageTextureTarget(format, usage); | 183 uint32_t target = context_factory_->GetImageTextureTarget(format, usage); |
| 184 settings.renderer_settings | 184 settings.renderer_settings |
| 185 .buffer_to_texture_target_map[std::make_pair(usage, format)] = target; | 185 .buffer_to_texture_target_map[std::make_pair(usage, format)] = target; |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 | 188 |
| 189 settings.gpu_memory_policy.bytes_limit_when_visible = 512 * 1024 * 1024; | 189 settings.gpu_memory_policy.bytes_limit_when_visible = 512 * 1024 * 1024; |
| 190 settings.gpu_memory_policy.priority_cutoff_when_visible = | 190 settings.gpu_memory_policy.priority_cutoff_when_visible = |
| 191 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; | 191 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; |
| 192 | 192 |
| 193 settings.renderer_settings.disallow_non_exact_resource_reuse = | |
|
danakj
2017/05/04 21:48:37
This won't affect layout tests fwiw, but it's fine
ericrk
2017/05/05 23:18:38
Yup, missed the other half of this. Added it in.
| |
| 194 command_line->HasSwitch(cc::switches::kDisallowNonExactResourceReuse); | |
| 195 | |
| 193 base::TimeTicks before_create = base::TimeTicks::Now(); | 196 base::TimeTicks before_create = base::TimeTicks::Now(); |
| 194 | 197 |
| 195 animation_host_ = cc::AnimationHost::CreateMainInstance(); | 198 animation_host_ = cc::AnimationHost::CreateMainInstance(); |
| 196 | 199 |
| 197 cc::LayerTreeHost::InitParams params; | 200 cc::LayerTreeHost::InitParams params; |
| 198 params.client = this; | 201 params.client = this; |
| 199 params.task_graph_runner = context_factory_->GetTaskGraphRunner(); | 202 params.task_graph_runner = context_factory_->GetTaskGraphRunner(); |
| 200 params.settings = &settings; | 203 params.settings = &settings; |
| 201 params.main_task_runner = task_runner_; | 204 params.main_task_runner = task_runner_; |
| 202 params.mutator_host = animation_host_.get(); | 205 params.mutator_host = animation_host_.get(); |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 596 void Compositor::TimeoutLocks() { | 599 void Compositor::TimeoutLocks() { |
| 597 // Make a copy, we're going to cause |active_locks_| to become | 600 // Make a copy, we're going to cause |active_locks_| to become |
| 598 // empty. | 601 // empty. |
| 599 std::vector<CompositorLock*> locks = active_locks_; | 602 std::vector<CompositorLock*> locks = active_locks_; |
| 600 for (auto* lock : locks) | 603 for (auto* lock : locks) |
| 601 lock->TimeoutLock(); | 604 lock->TimeoutLock(); |
| 602 DCHECK(active_locks_.empty()); | 605 DCHECK(active_locks_.empty()); |
| 603 } | 606 } |
| 604 | 607 |
| 605 } // namespace ui | 608 } // namespace ui |
| OLD | NEW |