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

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

Issue 692583002: WIP: GPU-accelerated trapezoidal path renderer. Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rename GrTrapezoidalPathRenderer -> GrAAConcavePathRenderer; swap MSAA support for a coverage ramp. Created 5 years, 3 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/SkEdge.cpp ('k') | src/core/SkScan.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
11 #define SkScan_DEFINED 11 #define SkScan_DEFINED
12 12
13 #include "SkRect.h" 13 #include "SkRect.h"
14 #include "SkTDArray.h"
14 15
15 class SkRasterClip; 16 class SkRasterClip;
16 class SkRegion; 17 class SkRegion;
17 class SkBlitter; 18 class SkBlitter;
18 class SkPath; 19 class SkPath;
19 20
20 /** Defines a fixed-point rectangle, identical to the integer SkIRect, but its 21 /** Defines a fixed-point rectangle, identical to the integer SkIRect, but its
21 coordinates are treated as SkFixed rather than int32_t. 22 coordinates are treated as SkFixed rather than int32_t.
22 */ 23 */
23 typedef SkIRect SkXRect; 24 typedef SkIRect SkXRect;
(...skipping 25 matching lines...) Expand all
49 const SkRasterClip&, SkBlitter*); 50 const SkRasterClip&, SkBlitter*);
50 static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize, 51 static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize,
51 const SkRasterClip&, SkBlitter*); 52 const SkRasterClip&, SkBlitter*);
52 static void FillTriangle(const SkPoint pts[], const SkRasterClip&, SkBlitter *); 53 static void FillTriangle(const SkPoint pts[], const SkRasterClip&, SkBlitter *);
53 static void HairLine(const SkPoint[], int count, const SkRasterClip&, SkBlit ter*); 54 static void HairLine(const SkPoint[], int count, const SkRasterClip&, SkBlit ter*);
54 static void AntiHairLine(const SkPoint[], int count, const SkRasterClip&, Sk Blitter*); 55 static void AntiHairLine(const SkPoint[], int count, const SkRasterClip&, Sk Blitter*);
55 static void HairRect(const SkRect&, const SkRasterClip&, SkBlitter*); 56 static void HairRect(const SkRect&, const SkRasterClip&, SkBlitter*);
56 static void AntiHairRect(const SkRect&, const SkRasterClip&, SkBlitter*); 57 static void AntiHairRect(const SkRect&, const SkRasterClip&, SkBlitter*);
57 static void HairPath(const SkPath&, const SkRasterClip&, SkBlitter*); 58 static void HairPath(const SkPath&, const SkRasterClip&, SkBlitter*);
58 static void AntiHairPath(const SkPath&, const SkRasterClip&, SkBlitter*); 59 static void AntiHairPath(const SkPath&, const SkRasterClip&, SkBlitter*);
60 static void PathToTriangles(const SkPath&, const SkIRect& clipRect, bool ant iAlias, SkTDArray<SkPoint>* points);
61 static bool gWireframe;
59 62
60 private: 63 private:
61 friend class SkAAClip; 64 friend class SkAAClip;
62 friend class SkRegion; 65 friend class SkRegion;
63 66
64 static void FillIRect(const SkIRect&, const SkRegion* clip, SkBlitter*); 67 static void FillIRect(const SkIRect&, const SkRegion* clip, SkBlitter*);
65 static void FillXRect(const SkXRect&, const SkRegion* clip, SkBlitter*); 68 static void FillXRect(const SkXRect&, const SkRegion* clip, SkBlitter*);
66 static void FillRect(const SkRect&, const SkRegion* clip, SkBlitter*); 69 static void FillRect(const SkRect&, const SkRegion* clip, SkBlitter*);
67 static void AntiFillRect(const SkRect&, const SkRegion* clip, SkBlitter*); 70 static void AntiFillRect(const SkRect&, const SkRegion* clip, SkBlitter*);
68 static void AntiFillXRect(const SkXRect&, const SkRegion*, SkBlitter*); 71 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. 115 for right/bottom), and store the result in the SkIRect.
113 */ 116 */
114 static inline void XRect_roundOut(const SkXRect& xr, SkIRect* dst) { 117 static inline void XRect_roundOut(const SkXRect& xr, SkIRect* dst) {
115 dst->fLeft = SkFixedFloorToInt(xr.fLeft); 118 dst->fLeft = SkFixedFloorToInt(xr.fLeft);
116 dst->fTop = SkFixedFloorToInt(xr.fTop); 119 dst->fTop = SkFixedFloorToInt(xr.fTop);
117 dst->fRight = SkFixedCeilToInt(xr.fRight); 120 dst->fRight = SkFixedCeilToInt(xr.fRight);
118 dst->fBottom = SkFixedCeilToInt(xr.fBottom); 121 dst->fBottom = SkFixedCeilToInt(xr.fBottom);
119 } 122 }
120 123
121 #endif 124 #endif
OLDNEW
« no previous file with comments | « src/core/SkEdge.cpp ('k') | src/core/SkScan.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698