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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 300323005: Route selection bounds updates through the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Defer selection updates until after compositor scheduling Created 6 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 metadata.min_page_scale_factor = active_tree_->min_page_scale_factor(); 1374 metadata.min_page_scale_factor = active_tree_->min_page_scale_factor();
1375 metadata.max_page_scale_factor = active_tree_->max_page_scale_factor(); 1375 metadata.max_page_scale_factor = active_tree_->max_page_scale_factor();
1376 if (top_controls_manager_) { 1376 if (top_controls_manager_) {
1377 metadata.location_bar_offset = 1377 metadata.location_bar_offset =
1378 gfx::Vector2dF(0.f, top_controls_manager_->controls_top_offset()); 1378 gfx::Vector2dF(0.f, top_controls_manager_->controls_top_offset());
1379 metadata.location_bar_content_translation = 1379 metadata.location_bar_content_translation =
1380 gfx::Vector2dF(0.f, top_controls_manager_->content_top_offset()); 1380 gfx::Vector2dF(0.f, top_controls_manager_->content_top_offset());
1381 metadata.overdraw_bottom_height = overdraw_bottom_height_; 1381 metadata.overdraw_bottom_height = overdraw_bottom_height_;
1382 } 1382 }
1383 1383
1384 active_tree_->GetViewportSelection(&metadata.selection_anchor,
1385 &metadata.selection_focus);
1386
1384 if (!InnerViewportScrollLayer()) 1387 if (!InnerViewportScrollLayer())
1385 return metadata; 1388 return metadata;
1386 1389
1387 metadata.root_scroll_offset = active_tree_->TotalScrollOffset(); 1390 metadata.root_scroll_offset = active_tree_->TotalScrollOffset();
1388 1391
1389 return metadata; 1392 return metadata;
1390 } 1393 }
1391 1394
1392 static void LayerTreeHostImplDidBeginTracingCallback(LayerImpl* layer) { 1395 static void LayerTreeHostImplDidBeginTracingCallback(LayerImpl* layer) {
1393 layer->DidBeginTracing(); 1396 layer->DidBeginTracing();
(...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after
3129 swap_promise_monitor_.erase(monitor); 3132 swap_promise_monitor_.erase(monitor);
3130 } 3133 }
3131 3134
3132 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 3135 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
3133 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 3136 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
3134 for (; it != swap_promise_monitor_.end(); it++) 3137 for (; it != swap_promise_monitor_.end(); it++)
3135 (*it)->OnSetNeedsRedrawOnImpl(); 3138 (*it)->OnSetNeedsRedrawOnImpl();
3136 } 3139 }
3137 3140
3138 } // namespace cc 3141 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698