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

Unified Diff: cc/layers/layer.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/input/input_handler.h ('k') | cc/layers/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.h
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index c88721b0fa6e1e82ad3728900e1d3f93b7cc566b..af061fa5f80149fc5e1fb6f7b496c7f356b3f7eb 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -24,6 +24,7 @@
#include "cc/input/input_handler.h"
#include "cc/layers/layer_collections.h"
#include "cc/layers/layer_position_constraint.h"
+#include "cc/layers/snap_point_list.h"
#include "cc/paint/paint_record.h"
#include "cc/trees/element_id.h"
#include "cc/trees/mutator_host_client.h"
@@ -114,6 +115,8 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
void SetBounds(const gfx::Size& bounds);
gfx::Size bounds() const { return inputs_.bounds; }
+ void SetScrollSnapOffsets(const SnapPointList& offsets);
+ SnapPointList snap_offsets() { return inputs_.snap_offsets; }
void SetMasksToBounds(bool masks_to_bounds);
bool masks_to_bounds() const { return inputs_.masks_to_bounds; }
@@ -593,6 +596,8 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
LayerClient* client;
base::Callback<void(const gfx::ScrollOffset&)> did_scroll_callback;
std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests;
+
+ SnapPointList snap_offsets;
};
Layer* parent_;
« no previous file with comments | « cc/input/input_handler.h ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698