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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 986433004: Revert of Always create top controls manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « cc/input/top_controls_manager_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index d893b33c3374787a4dd4c8ff18e61bf0dce27e8c..92e9c2593fc2a2c8a23eb897d85f37a08b143c33 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -448,8 +448,11 @@
host_impl->SetUseGpuRasterization(UseGpuRasterization());
shared_bitmap_manager_ = NULL;
gpu_memory_buffer_manager_ = NULL;
- top_controls_manager_weak_ptr_ =
- host_impl->top_controls_manager()->AsWeakPtr();
+ if (settings_.calculate_top_controls_position &&
+ host_impl->top_controls_manager()) {
+ top_controls_manager_weak_ptr_ =
+ host_impl->top_controls_manager()->AsWeakPtr();
+ }
input_handler_weak_ptr_ = host_impl->AsWeakPtr();
return host_impl.Pass();
}
@@ -1155,6 +1158,9 @@
void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints,
TopControlsState current,
bool animate) {
+ if (!settings_.calculate_top_controls_position)
+ return;
+
// Top controls are only used in threaded mode.
proxy_->ImplThreadTaskRunner()->PostTask(
FROM_HERE,
« no previous file with comments | « cc/input/top_controls_manager_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698