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

Unified Diff: cc/layers/layer_impl.cc

Issue 2767213003: First Implementation of Snapped Points
Patch Set: Rebase and format Created 3 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/layers/layer_impl.h ('k') | cc/layers/snap_point_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 1b20f0ebbbd5c18f878365a57d78952df2019a6e..094998163d7eea580c4194b5d93557b426af83b9 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -337,6 +337,7 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer->SetBounds(bounds_);
layer->SetScrollClipLayer(scroll_clip_layer_id_);
layer->SetMutableProperties(mutable_properties_);
+ layer->SetScrollSnapOffsets(snap_offsets_);
// If the main thread commits multiple times before the impl thread actually
// draws, then damage tracking will become incorrect if we simply clobber the
@@ -506,6 +507,13 @@ void LayerImpl::SetBounds(const gfx::Size& bounds) {
NoteLayerPropertyChanged();
}
+void LayerImpl::SetScrollSnapOffsets(const SnapPointList& offsets) {
+ snap_offsets_ = offsets;
+ layer_tree_impl()->DidUpdateScrollState(id());
+
+ NoteLayerPropertyChanged();
+}
+
void LayerImpl::SetViewportBoundsDelta(const gfx::Vector2dF& bounds_delta) {
DCHECK(IsActive());
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/snap_point_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698