| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 DCHECK_GT(settings.use_image_texture_targets.size(), format); | 165 DCHECK_GT(settings.use_image_texture_targets.size(), format); |
| 166 settings.use_image_texture_targets[format] = | 166 settings.use_image_texture_targets[format] = |
| 167 context_factory_->GetImageTextureTarget( | 167 context_factory_->GetImageTextureTarget( |
| 168 static_cast<gfx::BufferFormat>(format), usage); | 168 static_cast<gfx::BufferFormat>(format), usage); |
| 169 } | 169 } |
| 170 | 170 |
| 171 // Note: Only enable image decode tasks if we have more than one worker | 171 // Note: Only enable image decode tasks if we have more than one worker |
| 172 // thread. | 172 // thread. |
| 173 settings.image_decode_tasks_enabled = false; | 173 settings.image_decode_tasks_enabled = false; |
| 174 | 174 |
| 175 settings.use_compositor_animation_timelines = !command_line->HasSwitch( | 175 settings.use_compositor_animation_timelines = command_line->HasSwitch( |
| 176 switches::kUIDisableCompositorAnimationTimelines); | 176 switches::kUIEnableCompositorAnimationTimelines); |
| 177 | 177 |
| 178 #if !defined(OS_ANDROID) | 178 #if !defined(OS_ANDROID) |
| 179 // TODO(sohanjg): Revisit this memory usage in tile manager. | 179 // TODO(sohanjg): Revisit this memory usage in tile manager. |
| 180 cc::ManagedMemoryPolicy policy( | 180 cc::ManagedMemoryPolicy policy( |
| 181 512 * 1024 * 1024, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, | 181 512 * 1024 * 1024, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, |
| 182 settings.memory_policy_.num_resources_limit); | 182 settings.memory_policy_.num_resources_limit); |
| 183 settings.memory_policy_ = policy; | 183 settings.memory_policy_ = policy; |
| 184 #endif | 184 #endif |
| 185 | 185 |
| 186 base::TimeTicks before_create = base::TimeTicks::Now(); | 186 base::TimeTicks before_create = base::TimeTicks::Now(); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 observer_list_, | 522 observer_list_, |
| 523 OnCompositingLockStateChanged(this)); | 523 OnCompositingLockStateChanged(this)); |
| 524 } | 524 } |
| 525 | 525 |
| 526 void Compositor::CancelCompositorLock() { | 526 void Compositor::CancelCompositorLock() { |
| 527 if (compositor_lock_) | 527 if (compositor_lock_) |
| 528 compositor_lock_->CancelLock(); | 528 compositor_lock_->CancelLock(); |
| 529 } | 529 } |
| 530 | 530 |
| 531 } // namespace ui | 531 } // namespace ui |
| OLD | NEW |