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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2714043002: Store non-fast scrollable regions on ScrollNode (Closed)
Patch Set: Created 3 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
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 234ad1d3b3f19498d928522a9cc8c5e915e2ca6b..8e2ce524780ac317aceb8b6a893939b2ffb4a6ac 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2496,7 +2496,7 @@ InputHandler::ScrollStatus LayerTreeHostImpl::TryScroll(
return scroll_status;
}
- if (scroll_node->contains_non_fast_scrollable_region) {
+ if (!scroll_node->non_fast_scrollable_region.IsEmpty()) {
bool clipped = false;
gfx::Transform inverse_screen_space_transform(
gfx::Transform::kSkipInitialization);
@@ -2509,10 +2509,8 @@ InputHandler::ScrollStatus LayerTreeHostImpl::TryScroll(
gfx::PointF hit_test_point_in_layer_space = MathUtil::ProjectPoint(
inverse_screen_space_transform, screen_space_point, &clipped);
if (!clipped &&
- active_tree()
- ->LayerById(scroll_node->owning_layer_id)
- ->non_fast_scrollable_region()
- .Contains(gfx::ToRoundedPoint(hit_test_point_in_layer_space))) {
+ scroll_node->non_fast_scrollable_region.Contains(
+ gfx::ToRoundedPoint(hit_test_point_in_layer_space))) {
TRACE_EVENT0("cc",
"LayerImpl::tryScroll: Failed NonFastScrollableRegion");
scroll_status.thread = InputHandler::SCROLL_ON_MAIN_THREAD;

Powered by Google App Engine
This is Rietveld 408576698