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

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

Issue 608223002: [Android]Increase Scrollbar fade delay on Resize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 2 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/layers/scrollbar_layer_unittest.cc ('k') | cc/trees/layer_tree_impl.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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 2518 matching lines...) Expand 10 before | Expand all | Expand 10 after
2529 // the top controls visible. 2529 // the top controls visible.
2530 gfx::Vector2dF applied_delta; 2530 gfx::Vector2dF applied_delta;
2531 gfx::Vector2dF excess_delta; 2531 gfx::Vector2dF excess_delta;
2532 if (consume_by_top_controls) { 2532 if (consume_by_top_controls) {
2533 excess_delta = top_controls_manager_->ScrollBy(pending_delta); 2533 excess_delta = top_controls_manager_->ScrollBy(pending_delta);
2534 applied_delta = pending_delta - excess_delta; 2534 applied_delta = pending_delta - excess_delta;
2535 pending_delta = excess_delta; 2535 pending_delta = excess_delta;
2536 // Force updating of vertical adjust values if needed. 2536 // Force updating of vertical adjust values if needed.
2537 if (applied_delta.y() != 0) { 2537 if (applied_delta.y() != 0) {
2538 did_scroll_top_controls = true; 2538 did_scroll_top_controls = true;
2539 layer_impl->ScrollbarParametersDidChange(); 2539 layer_impl->ScrollbarParametersDidChange(false);
2540 } 2540 }
2541 } 2541 }
2542 // Track root layer deltas for reporting overscroll. 2542 // Track root layer deltas for reporting overscroll.
2543 unused_root_delta = pending_delta; 2543 unused_root_delta = pending_delta;
2544 } 2544 }
2545 2545
2546 gfx::Vector2dF applied_delta; 2546 gfx::Vector2dF applied_delta;
2547 // Gesture events need to be transformed from viewport coordinates to local 2547 // Gesture events need to be transformed from viewport coordinates to local
2548 // layer coordinates so that the scrolling contents exactly follow the 2548 // layer coordinates so that the scrolling contents exactly follow the
2549 // user's finger. In contrast, wheel events represent a fixed amount of 2549 // user's finger. In contrast, wheel events represent a fixed amount of
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
3377 } 3377 }
3378 3378
3379 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3379 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3380 std::vector<PictureLayerImpl*>::iterator it = 3380 std::vector<PictureLayerImpl*>::iterator it =
3381 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3381 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3382 DCHECK(it != picture_layers_.end()); 3382 DCHECK(it != picture_layers_.end());
3383 picture_layers_.erase(it); 3383 picture_layers_.erase(it);
3384 } 3384 }
3385 3385
3386 } // namespace cc 3386 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/scrollbar_layer_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698