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

Unified Diff: cc/layers/snap_point_list.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/snap_point_list.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/snap_point_list.cc
diff --git a/cc/layers/snap_point_list.cc b/cc/layers/snap_point_list.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c2e259aae8bb773f73d29df95b5cf37232b07684
--- /dev/null
+++ b/cc/layers/snap_point_list.cc
@@ -0,0 +1,35 @@
+// 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.
+
+#include "cc/layers/snap_point_list.h"
+
+namespace cc {
+
+bool SnapPoint::operator==(const SnapPoint& other) const {
+ return offset == other.offset && must_snap == other.must_snap &&
+ is_start == other.is_start && is_end == other.is_end;
+}
+
+bool SnapPoint::operator!=(const SnapPoint& other) const {
+ return !(*this == other);
+}
+
+SnapPointList::SnapPointList() {}
+
+SnapPointList::SnapPointList(const SnapPointList& other) {
+ horizontal = other.horizontal;
+ vertical = other.vertical;
+}
+
+SnapPointList::~SnapPointList() {}
+
+bool SnapPointList::operator==(const SnapPointList& other) const {
+ return horizontal == other.horizontal && vertical == other.vertical;
+}
+
+bool SnapPointList::operator!=(const SnapPointList& other) const {
+ return !(*this == other);
+}
+
+} // namespace cc
« no previous file with comments | « cc/layers/snap_point_list.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698