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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 2453553003: Disable overlay scrollbars in Blink when hidden by the compositor. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index e0539a66a9795e96a95a458d82c763cae76d963e..b5eb7d23bd64e081ffd1fc16fe3dca4917178531 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -356,6 +356,7 @@ class CC_EXPORT LayerTreeHostImpl
void SetNeedsAnimateForScrollbarAnimation() override;
void SetNeedsRedrawForScrollbarAnimation() override;
ScrollbarSet ScrollbarsFor(int scroll_layer_id) const override;
+ void SetScrollbarsHidden(int layer_id, bool hidden) override;
// VideoBeginFrameSource implementation.
void AddVideoFrameController(VideoFrameController* controller) override;
@@ -806,6 +807,11 @@ class CC_EXPORT LayerTreeHostImpl
std::unordered_map<int, std::unique_ptr<ScrollbarAnimationController>>
scrollbar_animation_controllers_;
+ // A map of scroll layers whose scrollbars have been hidden or shown since
+ // the last commit. This gets cleared every commit so only changes are sent
+ // back to the main thread.
+ std::unordered_map<int, bool> scrollbars_hidden_map_;
+
RenderingStatsInstrumentation* rendering_stats_instrumentation_;
MicroBenchmarkControllerImpl micro_benchmark_controller_;
std::unique_ptr<SynchronousTaskGraphRunner>

Powered by Google App Engine
This is Rietveld 408576698