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

Unified Diff: cc/layers/layer_impl.h

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.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.h
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index 5fa037d0842fe7da399732ca935c48c7af5d97b7..006b9f9a3052858f3095ae1c076c01b6b24f2faa 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -29,6 +29,7 @@
#include "cc/layers/layer_position_constraint.h"
#include "cc/layers/performance_properties.h"
#include "cc/layers/render_surface_impl.h"
+#include "cc/layers/snap_point_list.h"
#include "cc/quads/shared_quad_state.h"
#include "cc/resources/resource_provider.h"
#include "cc/tiles/tile_priority.h"
@@ -298,6 +299,14 @@ class CC_EXPORT LayerImpl {
gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const;
gfx::Vector2dF ClampScrollToMaxScrollOffset();
+ void SetScrollSnapOffsets(const SnapPointList& offsets);
+ std::vector<SnapPoint> snap_offsets_horizontal() {
+ return snap_offsets_.horizontal;
+ }
+ std::vector<SnapPoint> snap_offsets_vertical() {
+ return snap_offsets_.vertical;
+ }
+
// Returns the delta of the scroll that was outside of the bounds of the
// initial scroll
gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll);
@@ -515,6 +524,8 @@ class CC_EXPORT LayerImpl {
int clip_tree_index_;
int scroll_tree_index_;
+ SnapPointList snap_offsets_;
+
protected:
friend class TreeSynchronizer;
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698