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

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

Issue 2843293004: change overlay scrollbar hover show to hover fade in (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_settings.h » ('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_impl.h" 5 #include "cc/trees/layer_tree_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 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 gfx::Size LayerTreeImpl::DrawViewportSize() const { 1463 gfx::Size LayerTreeImpl::DrawViewportSize() const {
1464 return layer_tree_host_impl_->DrawViewportSize(); 1464 return layer_tree_host_impl_->DrawViewportSize();
1465 } 1465 }
1466 1466
1467 const gfx::Rect LayerTreeImpl::ViewportRectForTilePriority() const { 1467 const gfx::Rect LayerTreeImpl::ViewportRectForTilePriority() const {
1468 return layer_tree_host_impl_->ViewportRectForTilePriority(); 1468 return layer_tree_host_impl_->ViewportRectForTilePriority();
1469 } 1469 }
1470 1470
1471 std::unique_ptr<ScrollbarAnimationController> 1471 std::unique_ptr<ScrollbarAnimationController>
1472 LayerTreeImpl::CreateScrollbarAnimationController(int scroll_layer_id) { 1472 LayerTreeImpl::CreateScrollbarAnimationController(int scroll_layer_id) {
1473 DCHECK(!settings().scrollbar_fade_out_delay.is_zero()); 1473 DCHECK(!settings().scrollbar_fade_delay.is_zero());
1474 DCHECK(!settings().scrollbar_fade_out_duration.is_zero()); 1474 DCHECK(!settings().scrollbar_fade_duration.is_zero());
1475 base::TimeDelta fade_out_delay = settings().scrollbar_fade_out_delay; 1475 base::TimeDelta fade_delay = settings().scrollbar_fade_delay;
1476 base::TimeDelta fade_out_resize_delay = 1476 base::TimeDelta fade_out_resize_delay =
1477 settings().scrollbar_fade_out_resize_delay; 1477 settings().scrollbar_fade_out_resize_delay;
1478 base::TimeDelta fade_out_duration = settings().scrollbar_fade_out_duration; 1478 base::TimeDelta fade_duration = settings().scrollbar_fade_duration;
1479 switch (settings().scrollbar_animator) { 1479 switch (settings().scrollbar_animator) {
1480 case LayerTreeSettings::ANDROID_OVERLAY: { 1480 case LayerTreeSettings::ANDROID_OVERLAY: {
1481 return ScrollbarAnimationController:: 1481 return ScrollbarAnimationController::
1482 CreateScrollbarAnimationControllerAndroid( 1482 CreateScrollbarAnimationControllerAndroid(
1483 scroll_layer_id, layer_tree_host_impl_, fade_out_delay, 1483 scroll_layer_id, layer_tree_host_impl_, fade_delay,
1484 fade_out_resize_delay, fade_out_duration); 1484 fade_out_resize_delay, fade_duration);
1485 } 1485 }
1486 case LayerTreeSettings::AURA_OVERLAY: { 1486 case LayerTreeSettings::AURA_OVERLAY: {
1487 DCHECK(!settings().scrollbar_show_delay.is_zero());
1488 base::TimeDelta show_delay = settings().scrollbar_show_delay;
1489 base::TimeDelta thinning_duration = 1487 base::TimeDelta thinning_duration =
1490 settings().scrollbar_thinning_duration; 1488 settings().scrollbar_thinning_duration;
1491 return ScrollbarAnimationController:: 1489 return ScrollbarAnimationController::
1492 CreateScrollbarAnimationControllerAuraOverlay( 1490 CreateScrollbarAnimationControllerAuraOverlay(
1493 scroll_layer_id, layer_tree_host_impl_, show_delay, 1491 scroll_layer_id, layer_tree_host_impl_, fade_delay,
1494 fade_out_delay, fade_out_resize_delay, fade_out_duration, 1492 fade_out_resize_delay, fade_duration, thinning_duration);
1495 thinning_duration);
1496 } 1493 }
1497 case LayerTreeSettings::NO_ANIMATOR: 1494 case LayerTreeSettings::NO_ANIMATOR:
1498 NOTREACHED(); 1495 NOTREACHED();
1499 break; 1496 break;
1500 } 1497 }
1501 return nullptr; 1498 return nullptr;
1502 } 1499 }
1503 1500
1504 void LayerTreeImpl::DidAnimateScrollOffset() { 1501 void LayerTreeImpl::DidAnimateScrollOffset() {
1505 layer_tree_host_impl_->DidAnimateScrollOffset(); 1502 layer_tree_host_impl_->DidAnimateScrollOffset();
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
2180 2177
2181 void LayerTreeImpl::ResetAllChangeTracking() { 2178 void LayerTreeImpl::ResetAllChangeTracking() {
2182 layers_that_should_push_properties_.clear(); 2179 layers_that_should_push_properties_.clear();
2183 // Iterate over all layers, including masks. 2180 // Iterate over all layers, including masks.
2184 for (auto& layer : *layers_) 2181 for (auto& layer : *layers_)
2185 layer->ResetChangeTracking(); 2182 layer->ResetChangeTracking();
2186 property_trees_.ResetAllChangeTracking(); 2183 property_trees_.ResetAllChangeTracking();
2187 } 2184 }
2188 2185
2189 } // namespace cc 2186 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698