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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 300323005: Route selection bounds updates through the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host.h ('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 51b9b4f2e33d31a0663ff35821a4b8ac0f21f482..5f45c17ed62d36ff331c93683743eb3b19d0de5b 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -21,6 +21,7 @@
#include "cc/base/math_util.h"
#include "cc/debug/devtools_instrumentation.h"
#include "cc/debug/rendering_stats_instrumentation.h"
+#include "cc/input/layer_selection_bound.h"
#include "cc/input/top_controls_manager.h"
#include "cc/layers/heads_up_display_layer.h"
#include "cc/layers/heads_up_display_layer_impl.h"
@@ -315,6 +316,8 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
sync_tree->ClearViewportLayers();
}
+ sync_tree->RegisterSelection(selection_anchor_, selection_focus_);
+
float page_scale_delta =
sync_tree->page_scale_delta() / sync_tree->sent_page_scale_delta();
sync_tree->SetPageScaleValues(page_scale_factor_,
@@ -1221,6 +1224,16 @@ void LayerTreeHost::RegisterViewportLayers(
outer_viewport_scroll_layer_ = outer_viewport_scroll_layer;
}
+void LayerTreeHost::RegisterSelection(const LayerSelectionBound& anchor,
+ const LayerSelectionBound& focus) {
+ if (selection_anchor_ == anchor && selection_focus_ == focus)
+ return;
+
+ selection_anchor_ = anchor;
+ selection_focus_ = focus;
+ SetNeedsCommit();
+}
+
int LayerTreeHost::ScheduleMicroBenchmark(
const std::string& benchmark_name,
scoped_ptr<base::Value> value,
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698