OLD | NEW |
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 23 matching lines...) Expand all Loading... |
34 static void FillRect(const SkRect&, const SkRasterClip&, SkBlitter*); | 34 static void FillRect(const SkRect&, const SkRasterClip&, SkBlitter*); |
35 static void AntiFillRect(const SkRect&, const SkRasterClip&, SkBlitter*); | 35 static void AntiFillRect(const SkRect&, const SkRasterClip&, SkBlitter*); |
36 static void AntiFillXRect(const SkXRect&, const SkRasterClip&, SkBlitter*); | 36 static void AntiFillXRect(const SkXRect&, const SkRasterClip&, SkBlitter*); |
37 static void FillPath(const SkPath&, const SkRasterClip&, SkBlitter*); | 37 static void FillPath(const SkPath&, const SkRasterClip&, SkBlitter*); |
38 static void AntiFillPath(const SkPath&, const SkRasterClip&, SkBlitter*); | 38 static void AntiFillPath(const SkPath&, const SkRasterClip&, SkBlitter*); |
39 static void FrameRect(const SkRect&, const SkPoint& strokeSize, | 39 static void FrameRect(const SkRect&, const SkPoint& strokeSize, |
40 const SkRasterClip&, SkBlitter*); | 40 const SkRasterClip&, SkBlitter*); |
41 static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize, | 41 static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize, |
42 const SkRasterClip&, SkBlitter*); | 42 const SkRasterClip&, SkBlitter*); |
43 static void FillTriangle(const SkPoint pts[], const SkRasterClip&, SkBlitter
*); | 43 static void FillTriangle(const SkPoint pts[], const SkRasterClip&, SkBlitter
*); |
44 static void HairLine(const SkPoint&, const SkPoint&, const SkRasterClip&, | 44 static void HairLine(SkPoint, SkPoint, const SkRasterClip&, SkBlitter*); |
45 SkBlitter*); | 45 static void AntiHairLine(SkPoint, SkPoint, const SkRasterClip&, SkBlitter*); |
46 static void AntiHairLine(const SkPoint&, const SkPoint&, const SkRasterClip&
, | |
47 SkBlitter*); | |
48 static void HairRect(const SkRect&, const SkRasterClip&, SkBlitter*); | 46 static void HairRect(const SkRect&, const SkRasterClip&, SkBlitter*); |
49 static void AntiHairRect(const SkRect&, const SkRasterClip&, SkBlitter*); | 47 static void AntiHairRect(const SkRect&, const SkRasterClip&, SkBlitter*); |
50 static void HairPath(const SkPath&, const SkRasterClip&, SkBlitter*); | 48 static void HairPath(const SkPath&, const SkRasterClip&, SkBlitter*); |
51 static void AntiHairPath(const SkPath&, const SkRasterClip&, SkBlitter*); | 49 static void AntiHairPath(const SkPath&, const SkRasterClip&, SkBlitter*); |
52 | 50 |
53 private: | 51 private: |
54 friend class SkAAClip; | 52 friend class SkAAClip; |
55 friend class SkRegion; | 53 friend class SkRegion; |
56 | 54 |
57 static void FillIRect(const SkIRect&, const SkRegion* clip, SkBlitter*); | 55 static void FillIRect(const SkIRect&, const SkRegion* clip, SkBlitter*); |
58 static void FillXRect(const SkXRect&, const SkRegion* clip, SkBlitter*); | 56 static void FillXRect(const SkXRect&, const SkRegion* clip, SkBlitter*); |
59 static void FillRect(const SkRect&, const SkRegion* clip, SkBlitter*); | 57 static void FillRect(const SkRect&, const SkRegion* clip, SkBlitter*); |
60 static void AntiFillRect(const SkRect&, const SkRegion* clip, SkBlitter*); | 58 static void AntiFillRect(const SkRect&, const SkRegion* clip, SkBlitter*); |
61 static void AntiFillXRect(const SkXRect&, const SkRegion*, SkBlitter*); | 59 static void AntiFillXRect(const SkXRect&, const SkRegion*, SkBlitter*); |
62 static void FillPath(const SkPath&, const SkRegion& clip, SkBlitter*); | 60 static void FillPath(const SkPath&, const SkRegion& clip, SkBlitter*); |
63 static void AntiFillPath(const SkPath&, const SkRegion& clip, SkBlitter*, | 61 static void AntiFillPath(const SkPath&, const SkRegion& clip, SkBlitter*, |
64 bool forceRLE = false); | 62 bool forceRLE = false); |
65 static void FillTriangle(const SkPoint pts[], const SkRegion*, SkBlitter*); | 63 static void FillTriangle(const SkPoint pts[], const SkRegion*, SkBlitter*); |
66 | 64 |
67 static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize, | 65 static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize, |
68 const SkRegion*, SkBlitter*); | 66 const SkRegion*, SkBlitter*); |
69 static void HairLineRgn(const SkPoint&, const SkPoint&, const SkRegion*, | 67 static void HairLineRgn(SkPoint, SkPoint, const SkRegion*, SkBlitter*); |
70 SkBlitter*); | 68 static void AntiHairLineRgn(SkPoint, SkPoint, const SkRegion*, SkBlitter*); |
71 static void AntiHairLineRgn(const SkPoint&, const SkPoint&, const SkRegion*, | |
72 SkBlitter*); | |
73 }; | 69 }; |
74 | 70 |
75 /** Assign an SkXRect from a SkIRect, by promoting the src rect's coordinates | 71 /** Assign an SkXRect from a SkIRect, by promoting the src rect's coordinates |
76 from int to SkFixed. Does not check for overflow if the src coordinates | 72 from int to SkFixed. Does not check for overflow if the src coordinates |
77 exceed 32K | 73 exceed 32K |
78 */ | 74 */ |
79 static inline void XRect_set(SkXRect* xr, const SkIRect& src) { | 75 static inline void XRect_set(SkXRect* xr, const SkIRect& src) { |
80 xr->fLeft = SkIntToFixed(src.fLeft); | 76 xr->fLeft = SkIntToFixed(src.fLeft); |
81 xr->fTop = SkIntToFixed(src.fTop); | 77 xr->fTop = SkIntToFixed(src.fTop); |
82 xr->fRight = SkIntToFixed(src.fRight); | 78 xr->fRight = SkIntToFixed(src.fRight); |
(...skipping 24 matching lines...) Expand all Loading... |
107 for right/bottom), and store the result in the SkIRect. | 103 for right/bottom), and store the result in the SkIRect. |
108 */ | 104 */ |
109 static inline void XRect_roundOut(const SkXRect& xr, SkIRect* dst) { | 105 static inline void XRect_roundOut(const SkXRect& xr, SkIRect* dst) { |
110 dst->fLeft = SkFixedFloorToInt(xr.fLeft); | 106 dst->fLeft = SkFixedFloorToInt(xr.fLeft); |
111 dst->fTop = SkFixedFloorToInt(xr.fTop); | 107 dst->fTop = SkFixedFloorToInt(xr.fTop); |
112 dst->fRight = SkFixedCeilToInt(xr.fRight); | 108 dst->fRight = SkFixedCeilToInt(xr.fRight); |
113 dst->fBottom = SkFixedCeilToInt(xr.fBottom); | 109 dst->fBottom = SkFixedCeilToInt(xr.fBottom); |
114 } | 110 } |
115 | 111 |
116 #endif | 112 #endif |
OLD | NEW |