Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: ui/compositor/compositor.cc

Issue 1536833004: CC Animations: Enable external animation host for ui::Compositor (Aura) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@player2animator
Patch Set: Rebase. Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 DCHECK_GT(settings.use_image_texture_targets.size(), format); 162 DCHECK_GT(settings.use_image_texture_targets.size(), format);
163 settings.use_image_texture_targets[format] = 163 settings.use_image_texture_targets[format] =
164 context_factory_->GetImageTextureTarget( 164 context_factory_->GetImageTextureTarget(
165 static_cast<gfx::BufferFormat>(format), usage); 165 static_cast<gfx::BufferFormat>(format), usage);
166 } 166 }
167 167
168 // Note: Only enable image decode tasks if we have more than one worker 168 // Note: Only enable image decode tasks if we have more than one worker
169 // thread. 169 // thread.
170 settings.image_decode_tasks_enabled = false; 170 settings.image_decode_tasks_enabled = false;
171 171
172 settings.use_compositor_animation_timelines = 172 settings.use_compositor_animation_timelines = !command_line->HasSwitch(
173 command_line->HasSwitch(switches::kUIEnableCompositorAnimationTimelines); 173 switches::kUIDisableCompositorAnimationTimelines);
174 174
175 #if !defined(OS_ANDROID) 175 #if !defined(OS_ANDROID)
176 // TODO(sohanjg): Revisit this memory usage in tile manager. 176 // TODO(sohanjg): Revisit this memory usage in tile manager.
177 cc::ManagedMemoryPolicy policy( 177 cc::ManagedMemoryPolicy policy(
178 512 * 1024 * 1024, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, 178 512 * 1024 * 1024, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE,
179 settings.memory_policy_.num_resources_limit); 179 settings.memory_policy_.num_resources_limit);
180 settings.memory_policy_ = policy; 180 settings.memory_policy_ = policy;
181 #endif 181 #endif
182 182
183 base::TimeTicks before_create = base::TimeTicks::Now(); 183 base::TimeTicks before_create = base::TimeTicks::Now();
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 observer_list_, 519 observer_list_,
520 OnCompositingLockStateChanged(this)); 520 OnCompositingLockStateChanged(this));
521 } 521 }
522 522
523 void Compositor::CancelCompositorLock() { 523 void Compositor::CancelCompositorLock() {
524 if (compositor_lock_) 524 if (compositor_lock_)
525 compositor_lock_->CancelLock(); 525 compositor_lock_->CancelLock();
526 } 526 }
527 527
528 } // namespace ui 528 } // namespace ui
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/chrome_restart_request.cc ('k') | ui/compositor/compositor_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698