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

Unified Diff: cc/layers/snap_point_list.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_impl.cc ('k') | cc/layers/snap_point_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/snap_point_list.h
diff --git a/cc/layers/snap_point_list.h b/cc/layers/snap_point_list.h
new file mode 100644
index 0000000000000000000000000000000000000000..f675ef80dc1e5cf90a5ec759d479389d07ef9d89
--- /dev/null
+++ b/cc/layers/snap_point_list.h
@@ -0,0 +1,46 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_LAYERS_SNAP_POINT_LIST_H_
+#define CC_LAYERS_SNAP_POINT_LIST_H_
+
+#include <vector>
+#include "cc/cc_export.h"
+
+namespace cc {
+
+struct CC_EXPORT SnapPoint {
+ SnapPoint() : offset(0.0), must_snap(false), is_start(false), is_end(false) {}
+ SnapPoint(double o, bool m, bool start, bool end)
+ : offset(o), must_snap(m), is_start(start), is_end(end) {}
+ SnapPoint(const SnapPoint& p)
+ : offset(p.offset),
+ must_snap(p.must_snap),
+ is_start(p.is_start),
+ is_end(p.is_end) {}
+
+ double offset;
+ bool must_snap;
+ bool is_start;
+ bool is_end;
+
+ bool operator==(const SnapPoint&) const;
+ bool operator!=(const SnapPoint&) const;
+};
+
+struct CC_EXPORT SnapPointList {
+ SnapPointList();
+ SnapPointList(const SnapPointList&);
+ ~SnapPointList();
+
+ std::vector<SnapPoint> horizontal;
+ std::vector<SnapPoint> vertical;
+
+ bool operator==(const SnapPointList&) const;
+ bool operator!=(const SnapPointList&) const;
+};
+
+} // namespace cc
+
+#endif // CC_LAYERS_SNAP_POINT_LIST_H_
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/snap_point_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698