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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_LAYERS_SNAP_POINT_LIST_H_
6 #define CC_LAYERS_SNAP_POINT_LIST_H_
7
8 #include <vector>
9 #include "cc/cc_export.h"
10
11 namespace cc {
12
13 struct CC_EXPORT SnapPoint {
14 SnapPoint() : offset(0.0), must_snap(false), is_start(false), is_end(false) {}
15 SnapPoint(double o, bool m, bool start, bool end)
16 : offset(o), must_snap(m), is_start(start), is_end(end) {}
17 SnapPoint(const SnapPoint& p)
18 : offset(p.offset),
19 must_snap(p.must_snap),
20 is_start(p.is_start),
21 is_end(p.is_end) {}
22
23 double offset;
24 bool must_snap;
25 bool is_start;
26 bool is_end;
27
28 bool operator==(const SnapPoint&) const;
29 bool operator!=(const SnapPoint&) const;
30 };
31
32 struct CC_EXPORT SnapPointList {
33 SnapPointList();
34 SnapPointList(const SnapPointList&);
35 ~SnapPointList();
36
37 std::vector<SnapPoint> horizontal;
38 std::vector<SnapPoint> vertical;
39
40 bool operator==(const SnapPointList&) const;
41 bool operator!=(const SnapPointList&) const;
42 };
43
44 } // namespace cc
45
46 #endif // CC_LAYERS_SNAP_POINT_LIST_H_
OLDNEW
« 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