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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 960873002: Update from https://crrev.com/318214 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 49e374d94690516e8c0fbefec167c1cc03c4650f..abc63fc932eebfd8297d1bd0e020e9c3040b72a1 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -558,8 +558,7 @@ void LayerTreeHost::SetAnimationEvents(
// controllers may still receive events for impl-only animations.
const AnimationRegistrar::AnimationControllerMap& animation_controllers =
animation_registrar_->all_animation_controllers();
- AnimationRegistrar::AnimationControllerMap::const_iterator iter =
- animation_controllers.find(event_layer_id);
+ auto iter = animation_controllers.find(event_layer_id);
if (iter != animation_controllers.end()) {
switch ((*events)[event_index].type) {
case AnimationEvent::STARTED:
@@ -668,19 +667,13 @@ void LayerTreeHost::SetViewportSize(const gfx::Size& device_viewport_size) {
SetNeedsCommit();
}
-void LayerTreeHost::SetTopControlsShrinkBlinkSize(bool shrink) {
- if (top_controls_shrink_blink_size_ == shrink)
- return;
-
- top_controls_shrink_blink_size_ = shrink;
- SetNeedsCommit();
-}
-
-void LayerTreeHost::SetTopControlsHeight(float height) {
- if (top_controls_height_ == height)
+void LayerTreeHost::SetTopControlsHeight(float height, bool shrink) {
+ if (top_controls_height_ == height &&
+ top_controls_shrink_blink_size_ == shrink)
return;
top_controls_height_ = height;
+ top_controls_shrink_blink_size_ = shrink;
SetNeedsCommit();
}
@@ -1200,14 +1193,12 @@ void LayerTreeHost::AnimateLayers(base::TimeTicks monotonic_time) {
TRACE_EVENT0("cc", "LayerTreeHost::AnimateLayers");
- AnimationRegistrar::AnimationControllerMap copy =
+ AnimationRegistrar::AnimationControllerMap active_controllers_copy =
animation_registrar_->active_animation_controllers();
- for (AnimationRegistrar::AnimationControllerMap::iterator iter = copy.begin();
- iter != copy.end();
- ++iter) {
- (*iter).second->Animate(monotonic_time);
+ for (auto& it : active_controllers_copy) {
+ it.second->Animate(monotonic_time);
bool start_ready_animations = true;
- (*iter).second->UpdateState(start_ready_animations, NULL);
+ it.second->UpdateState(start_ready_animations, NULL);
}
}
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698