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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 379473002: Rename composited selection anchor/focus to start/end (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test Created 6 years, 5 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_impl.h ('k') | content/common/cc_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 2dec1dcfbad32c1511762402de601100f6817ed7..f58fa728fc4684ed298e7428f741f9de5bd1eb86 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -211,7 +211,7 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
target_tree->ClearViewportLayers();
}
- target_tree->RegisterSelection(selection_anchor_, selection_focus_);
+ target_tree->RegisterSelection(selection_start_, selection_end_);
// This should match the property synchronization in
// LayerTreeHost::finishCommitOnImplThread().
@@ -1311,10 +1311,10 @@ LayerImpl* LayerTreeImpl::FindLayerThatIsHitByPointInTouchHandlerRegion(
return data_for_recursion.closest_match;
}
-void LayerTreeImpl::RegisterSelection(const LayerSelectionBound& anchor,
- const LayerSelectionBound& focus) {
- selection_anchor_ = anchor;
- selection_focus_ = focus;
+void LayerTreeImpl::RegisterSelection(const LayerSelectionBound& start,
+ const LayerSelectionBound& end) {
+ selection_start_ = start;
+ selection_end_ = end;
}
static ViewportSelectionBound ComputeViewportSelection(
@@ -1345,22 +1345,22 @@ static ViewportSelectionBound ComputeViewportSelection(
return result;
}
-void LayerTreeImpl::GetViewportSelection(ViewportSelectionBound* anchor,
- ViewportSelectionBound* focus) {
- DCHECK(anchor);
- DCHECK(focus);
+void LayerTreeImpl::GetViewportSelection(ViewportSelectionBound* start,
+ ViewportSelectionBound* end) {
+ DCHECK(start);
+ DCHECK(end);
- *anchor = ComputeViewportSelection(
- selection_anchor_,
- selection_anchor_.layer_id ? LayerById(selection_anchor_.layer_id) : NULL,
+ *start = ComputeViewportSelection(
+ selection_start_,
+ selection_start_.layer_id ? LayerById(selection_start_.layer_id) : NULL,
device_scale_factor());
- if (anchor->type == SELECTION_BOUND_CENTER ||
- anchor->type == SELECTION_BOUND_EMPTY) {
- *focus = *anchor;
+ if (start->type == SELECTION_BOUND_CENTER ||
+ start->type == SELECTION_BOUND_EMPTY) {
+ *end = *start;
} else {
- *focus = ComputeViewportSelection(
- selection_focus_,
- selection_focus_.layer_id ? LayerById(selection_focus_.layer_id) : NULL,
+ *end = ComputeViewportSelection(
+ selection_end_,
+ selection_end_.layer_id ? LayerById(selection_end_.layer_id) : NULL,
device_scale_factor());
}
}
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | content/common/cc_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698