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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 1882413006: cc: Construct the RSLL without using layer hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 8 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
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 7d178db1e66ee257847d74b705521255c6686e75..f3188f6c8df9534b71d0a20488362734dbf43df1 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1760,20 +1760,9 @@ static void FindClosestMatchingLayer(const gfx::PointF& screen_space_point,
static bool ScrollsOrScrollbarAnyDrawnRenderSurfaceLayerListMember(
LayerImpl* layer) {
- if (!layer->scrollable() && !layer->ToScrollbarLayer())
- return false;
- if (layer->layer_or_descendant_is_drawn())
- return true;
-
- if (!layer->scroll_children())
- return false;
- for (std::set<LayerImpl*>::const_iterator it =
- layer->scroll_children()->begin();
- it != layer->scroll_children()->end(); ++it) {
- if ((*it)->layer_or_descendant_is_drawn())
- return true;
- }
- return false;
+ return layer->scrolls_drawn_descendant() ||
+ (layer->ToScrollbarLayer() &&
+ layer->IsDrawnRenderSurfaceLayerListMember());
}
struct FindScrollingLayerOrScrollbarLayerFunctor {
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698