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

Unified Diff: cc/layers/layer.cc

Issue 2770293003: Feed ScrollableArea::showOverlayScrollbars into ScrollbarAnimationController. (Closed)
Patch Set: rebase Created 3 years, 9 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/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index ceba86515bac7bf782c1749b8c66df6effbd9df8..f53553c02eb8d328aea9dc0a434167e5b927e65d 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -92,6 +92,7 @@ Layer::Layer()
subtree_property_changed_(false),
may_contain_video_(false),
is_scroll_clip_layer_(false),
+ needs_show_scrollbars_(false),
safe_opaque_background_color_(0),
draw_blend_mode_(SkBlendMode::kSrcOver),
num_unclipped_descendants_(0) {}
@@ -1185,6 +1186,9 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
->property_trees()
->scroll_tree.SetScrollOffsetClobberActiveValue(layer->id());
+ if (needs_show_scrollbars_)
+ layer->set_needs_show_scrollbars(true);
+
// If the main thread commits multiple times before the impl thread actually
// draws, then damage tracking will become incorrect if we simply clobber the
// update_rect here. The LayerImpl's update_rect needs to accumulate (i.e.
@@ -1196,6 +1200,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer->SetNeedsPushProperties();
// Reset any state that should be cleared for the next update.
+ needs_show_scrollbars_ = false;
subtree_property_changed_ = false;
inputs_.update_rect = gfx::Rect();
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698