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

Side by Side Diff: src/core/SkLineClipper.h

Issue 886503010: Revert of Faster edge re-sort, drop trailing edges (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « src/core/SkEdgeBuilder.cpp ('k') | src/core/SkLineClipper.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #ifndef SkLineClipper_DEFINED 8 #ifndef SkLineClipper_DEFINED
9 #define SkLineClipper_DEFINED 9 #define SkLineClipper_DEFINED
10 10
(...skipping 12 matching lines...) Expand all
23 right, turn those into vertical line segments that are aligned to the 23 right, turn those into vertical line segments that are aligned to the
24 edge of the clip. 24 edge of the clip.
25 25
26 Return the number of line segments that result, and store the end-points 26 Return the number of line segments that result, and store the end-points
27 of those segments sequentially in lines as follows: 27 of those segments sequentially in lines as follows:
28 1st segment: lines[0]..lines[1] 28 1st segment: lines[0]..lines[1]
29 2nd segment: lines[1]..lines[2] 29 2nd segment: lines[1]..lines[2]
30 3rd segment: lines[2]..lines[3] 30 3rd segment: lines[2]..lines[3]
31 */ 31 */
32 static int ClipLine(const SkPoint pts[2], const SkRect& clip, 32 static int ClipLine(const SkPoint pts[2], const SkRect& clip,
33 SkPoint lines[kMaxPoints], bool canClipToTheRight); 33 SkPoint lines[kMaxPoints]);
34 34
35 /* Intersect the line segment against the rect. If there is a non-empty 35 /* Intersect the line segment against the rect. If there is a non-empty
36 resulting segment, return true and set dst[] to that segment. If not, 36 resulting segment, return true and set dst[] to that segment. If not,
37 return false and ignore dst[]. 37 return false and ignore dst[].
38 38
39 ClipLine is specialized for scan-conversion, as it adds vertical 39 ClipLine is specialized for scan-conversion, as it adds vertical
40 segments on the sides to show where the line extended beyond the 40 segments on the sides to show where the line extended beyond the
41 left or right sides. IntersectLine does not. 41 left or right sides. IntersectLine does not.
42 */ 42 */
43 static bool IntersectLine(const SkPoint src[2], const SkRect& clip, 43 static bool IntersectLine(const SkPoint src[2], const SkRect& clip,
44 SkPoint dst[2]); 44 SkPoint dst[2]);
45 }; 45 };
46 46
47 #endif 47 #endif
OLDNEW
« no previous file with comments | « src/core/SkEdgeBuilder.cpp ('k') | src/core/SkLineClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698