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

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

Issue 1491843006: add support for capped hairlines (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add comment Created 5 years 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/SkPathRef.cpp ('k') | src/core/SkScan_Hairline.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 The Android Open Source Project 3 * Copyright 2011 The Android Open Source Project
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 8
9 9
10 #ifndef SkScan_DEFINED 10 #ifndef SkScan_DEFINED
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 const SkRasterClip&, SkBlitter*); 49 const SkRasterClip&, SkBlitter*);
50 static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize, 50 static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize,
51 const SkRasterClip&, SkBlitter*); 51 const SkRasterClip&, SkBlitter*);
52 static void FillTriangle(const SkPoint pts[], const SkRasterClip&, SkBlitter *); 52 static void FillTriangle(const SkPoint pts[], const SkRasterClip&, SkBlitter *);
53 static void HairLine(const SkPoint[], int count, const SkRasterClip&, SkBlit ter*); 53 static void HairLine(const SkPoint[], int count, const SkRasterClip&, SkBlit ter*);
54 static void AntiHairLine(const SkPoint[], int count, const SkRasterClip&, Sk Blitter*); 54 static void AntiHairLine(const SkPoint[], int count, const SkRasterClip&, Sk Blitter*);
55 static void HairRect(const SkRect&, const SkRasterClip&, SkBlitter*); 55 static void HairRect(const SkRect&, const SkRasterClip&, SkBlitter*);
56 static void AntiHairRect(const SkRect&, const SkRasterClip&, SkBlitter*); 56 static void AntiHairRect(const SkRect&, const SkRasterClip&, SkBlitter*);
57 static void HairPath(const SkPath&, const SkRasterClip&, SkBlitter*); 57 static void HairPath(const SkPath&, const SkRasterClip&, SkBlitter*);
58 static void AntiHairPath(const SkPath&, const SkRasterClip&, SkBlitter*); 58 static void AntiHairPath(const SkPath&, const SkRasterClip&, SkBlitter*);
59 static void HairSquarePath(const SkPath&, const SkRasterClip&, SkBlitter*);
60 static void AntiHairSquarePath(const SkPath&, const SkRasterClip&, SkBlitter *);
61 static void HairRoundPath(const SkPath&, const SkRasterClip&, SkBlitter*);
62 static void AntiHairRoundPath(const SkPath&, const SkRasterClip&, SkBlitter* );
59 63
60 private: 64 private:
61 friend class SkAAClip; 65 friend class SkAAClip;
62 friend class SkRegion; 66 friend class SkRegion;
63 67
64 static void FillIRect(const SkIRect&, const SkRegion* clip, SkBlitter*); 68 static void FillIRect(const SkIRect&, const SkRegion* clip, SkBlitter*);
65 static void FillXRect(const SkXRect&, const SkRegion* clip, SkBlitter*); 69 static void FillXRect(const SkXRect&, const SkRegion* clip, SkBlitter*);
66 static void FillRect(const SkRect&, const SkRegion* clip, SkBlitter*); 70 static void FillRect(const SkRect&, const SkRegion* clip, SkBlitter*);
67 static void AntiFillRect(const SkRect&, const SkRegion* clip, SkBlitter*); 71 static void AntiFillRect(const SkRect&, const SkRegion* clip, SkBlitter*);
68 static void AntiFillXRect(const SkXRect&, const SkRegion*, SkBlitter*); 72 static void AntiFillXRect(const SkXRect&, const SkRegion*, SkBlitter*);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 for right/bottom), and store the result in the SkIRect. 116 for right/bottom), and store the result in the SkIRect.
113 */ 117 */
114 static inline void XRect_roundOut(const SkXRect& xr, SkIRect* dst) { 118 static inline void XRect_roundOut(const SkXRect& xr, SkIRect* dst) {
115 dst->fLeft = SkFixedFloorToInt(xr.fLeft); 119 dst->fLeft = SkFixedFloorToInt(xr.fLeft);
116 dst->fTop = SkFixedFloorToInt(xr.fTop); 120 dst->fTop = SkFixedFloorToInt(xr.fTop);
117 dst->fRight = SkFixedCeilToInt(xr.fRight); 121 dst->fRight = SkFixedCeilToInt(xr.fRight);
118 dst->fBottom = SkFixedCeilToInt(xr.fBottom); 122 dst->fBottom = SkFixedCeilToInt(xr.fBottom);
119 } 123 }
120 124
121 #endif 125 #endif
OLDNEW
« no previous file with comments | « src/core/SkPathRef.cpp ('k') | src/core/SkScan_Hairline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698