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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2554773002: CC Animation: Rename Active Players to Ticking Players. (Closed)
Patch Set: Rename the argument. Created 4 years 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
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 1548
1549 if (OuterViewportScrollLayer()) { 1549 if (OuterViewportScrollLayer()) {
1550 metadata.root_overflow_x_hidden = 1550 metadata.root_overflow_x_hidden =
1551 !OuterViewportScrollLayer()->user_scrollable_horizontal(); 1551 !OuterViewportScrollLayer()->user_scrollable_horizontal();
1552 metadata.root_overflow_y_hidden = 1552 metadata.root_overflow_y_hidden =
1553 !OuterViewportScrollLayer()->user_scrollable_vertical(); 1553 !OuterViewportScrollLayer()->user_scrollable_vertical();
1554 } 1554 }
1555 1555
1556 if (GetDrawMode() == DRAW_MODE_RESOURCELESS_SOFTWARE) { 1556 if (GetDrawMode() == DRAW_MODE_RESOURCELESS_SOFTWARE) {
1557 metadata.is_resourceless_software_draw_with_scroll_or_animation = 1557 metadata.is_resourceless_software_draw_with_scroll_or_animation =
1558 IsActivelyScrolling() || mutator_host_->NeedsAnimateLayers(); 1558 IsActivelyScrolling() || mutator_host_->NeedsTickAnimations();
1559 } 1559 }
1560 1560
1561 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) { 1561 for (LayerImpl* surface_layer : active_tree_->SurfaceLayers()) {
1562 metadata.referenced_surfaces.push_back( 1562 metadata.referenced_surfaces.push_back(
1563 static_cast<SurfaceLayerImpl*>(surface_layer)->surface_id()); 1563 static_cast<SurfaceLayerImpl*>(surface_layer)->surface_id());
1564 } 1564 }
1565 if (!InnerViewportScrollLayer()) 1565 if (!InnerViewportScrollLayer())
1566 return metadata; 1566 return metadata;
1567 1567
1568 metadata.root_overflow_x_hidden |= 1568 metadata.root_overflow_x_hidden |=
(...skipping 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after
3434 } 3434 }
3435 3435
3436 bool LayerTreeHostImpl::AnimateScrollbars(base::TimeTicks monotonic_time) { 3436 bool LayerTreeHostImpl::AnimateScrollbars(base::TimeTicks monotonic_time) {
3437 bool animated = false; 3437 bool animated = false;
3438 for (auto& pair : scrollbar_animation_controllers_) 3438 for (auto& pair : scrollbar_animation_controllers_)
3439 animated |= pair.second->Animate(monotonic_time); 3439 animated |= pair.second->Animate(monotonic_time);
3440 return animated; 3440 return animated;
3441 } 3441 }
3442 3442
3443 bool LayerTreeHostImpl::AnimateLayers(base::TimeTicks monotonic_time) { 3443 bool LayerTreeHostImpl::AnimateLayers(base::TimeTicks monotonic_time) {
3444 const bool animated = mutator_host_->AnimateLayers(monotonic_time); 3444 const bool animated = mutator_host_->TickAnimations(monotonic_time);
3445 3445
3446 // TODO(crbug.com/551134): Only do this if the animations are on the active 3446 // TODO(crbug.com/551134): Only do this if the animations are on the active
3447 // tree, or if they are on the pending tree waiting for some future time to 3447 // tree, or if they are on the pending tree waiting for some future time to
3448 // start. 3448 // start.
3449 // TODO(crbug.com/551138): We currently have a single signal from the 3449 // TODO(crbug.com/551138): We currently have a single signal from the
3450 // animation_host, so on the last frame of an animation we will 3450 // animation_host, so on the last frame of an animation we will
3451 // still request an extra SetNeedsAnimate here. 3451 // still request an extra SetNeedsAnimate here.
3452 if (animated) 3452 if (animated)
3453 SetNeedsOneBeginImplFrame(); 3453 SetNeedsOneBeginImplFrame();
3454 // TODO(crbug.com/551138): We could return true only if the animations are on 3454 // TODO(crbug.com/551138): We could return true only if the animations are on
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
4085 worker_context_visibility_ = 4085 worker_context_visibility_ =
4086 worker_context->CacheController()->ClientBecameVisible(); 4086 worker_context->CacheController()->ClientBecameVisible();
4087 } else { 4087 } else {
4088 worker_context->CacheController()->ClientBecameNotVisible( 4088 worker_context->CacheController()->ClientBecameNotVisible(
4089 std::move(worker_context_visibility_)); 4089 std::move(worker_context_visibility_));
4090 } 4090 }
4091 } 4091 }
4092 } 4092 }
4093 4093
4094 } // namespace cc 4094 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698