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

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

Issue 1063853005: Unify Android Webview and Chrome's fling (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: comments Created 5 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
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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 // TODO(vmpstr): Early out if there are no requests on any of the layers. For 105 // TODO(vmpstr): Early out if there are no requests on any of the layers. For
106 // that, we need to inform LayerTreeImpl whenever there are requests when we 106 // that, we need to inform LayerTreeImpl whenever there are requests when we
107 // get them. 107 // get them.
108 LayerTreeHostCommon::CallFunctionForSubtree( 108 LayerTreeHostCommon::CallFunctionForSubtree(
109 root_layer_.get(), [request_ids](LayerImpl* layer) { 109 root_layer_.get(), [request_ids](LayerImpl* layer) {
110 layer->GatherFrameTimingRequestIds(request_ids); 110 layer->GatherFrameTimingRequestIds(request_ids);
111 }); 111 });
112 } 112 }
113 113
114 bool LayerTreeImpl::IsExternalFlingActive() const { 114 bool LayerTreeImpl::IsExternalScrollActive() const {
115 return root_layer_scroll_offset_delegate_ && 115 return root_layer_scroll_offset_delegate_ &&
116 root_layer_scroll_offset_delegate_->IsExternalFlingActive(); 116 root_layer_scroll_offset_delegate_->IsExternalScrollActive();
117 } 117 }
118 118
119 void LayerTreeImpl::DidUpdateScrollOffset(int layer_id) { 119 void LayerTreeImpl::DidUpdateScrollOffset(int layer_id) {
120 int inner_layer_id = InnerViewportScrollLayer() 120 int inner_layer_id = InnerViewportScrollLayer()
121 ? InnerViewportScrollLayer()->id() 121 ? InnerViewportScrollLayer()->id()
122 : Layer::INVALID_ID; 122 : Layer::INVALID_ID;
123 int outer_layer_id = OuterViewportScrollLayer() 123 int outer_layer_id = OuterViewportScrollLayer()
124 ? OuterViewportScrollLayer()->id() 124 ? OuterViewportScrollLayer()->id()
125 : Layer::INVALID_ID; 125 : Layer::INVALID_ID;
126 if (layer_id != outer_layer_id && layer_id != inner_layer_id) 126 if (layer_id != outer_layer_id && layer_id != inner_layer_id)
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 scoped_ptr<PendingPageScaleAnimation> pending_animation) { 1565 scoped_ptr<PendingPageScaleAnimation> pending_animation) {
1566 pending_page_scale_animation_ = pending_animation.Pass(); 1566 pending_page_scale_animation_ = pending_animation.Pass();
1567 } 1567 }
1568 1568
1569 scoped_ptr<PendingPageScaleAnimation> 1569 scoped_ptr<PendingPageScaleAnimation>
1570 LayerTreeImpl::TakePendingPageScaleAnimation() { 1570 LayerTreeImpl::TakePendingPageScaleAnimation() {
1571 return pending_page_scale_animation_.Pass(); 1571 return pending_page_scale_animation_.Pass();
1572 } 1572 }
1573 1573
1574 } // namespace cc 1574 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698