Home
last modified time | relevance | path

Searched refs:SkRegion (Results 1 – 25 of 151) sorted by relevance

1234567

/external/skia/src/core/
DSkRegion.cpp33 static SkRegion::RunType* skip_intervals(const SkRegion::RunType runs[]) {
38 SkASSERT(runs[1] < SkRegion::kRunTypeSentinel);
41 SkASSERT(SkRegion::kRunTypeSentinel == runs[0]);
45 return const_cast<SkRegion::RunType*>(runs);
48 bool SkRegion::RunsAreARect(const SkRegion::RunType runs[], int count, in RunsAreARect()
72 SkRegion::SkRegion() { in SkRegion() function in SkRegion
77 SkRegion::SkRegion(const SkRegion& src) { in SkRegion() function in SkRegion
82 SkRegion::SkRegion(const SkIRect& rect) { in SkRegion() function in SkRegion
87 SkRegion::~SkRegion() { in ~SkRegion()
91 void SkRegion::freeRuns() { in freeRuns()
[all …]
DSkRegionPriv.h17 SkASSERT(((value) == SkRegion::kRunTypeSentinel) == isSentinel)
25 static int compute_intervalcount(const SkRegion::RunType runs[]) { in compute_intervalcount()
26 const SkRegion::RunType* curr = runs; in compute_intervalcount()
27 while (*curr < SkRegion::kRunTypeSentinel) { in compute_intervalcount()
29 SkASSERT(curr[1] < SkRegion::kRunTypeSentinel); in compute_intervalcount()
36 struct SkRegion::RunHead {
66 SkASSERT(count >= SkRegion::kRectRegionRuns); in Alloc()
90 SkRegion::RunType* writable_runs() { in writable_runs()
92 return (SkRegion::RunType*)(this + 1); in writable_runs()
95 const SkRegion::RunType* readonly_runs() const { in readonly_runs()
[all …]
DSkRasterClip.cpp79 SkRegion::Op op; in setConservativeRect()
81 op = SkRegion::kDifference_Op; in setConservativeRect()
83 op = SkRegion::kIntersect_Op; in setConservativeRect()
98 static MutateResult mutate_conservative_op(SkRegion::Op* op, bool inverseFilled) { in mutate_conservative_op()
101 case SkRegion::kIntersect_Op: in mutate_conservative_op()
102 case SkRegion::kDifference_Op: in mutate_conservative_op()
106 case SkRegion::kUnion_Op: in mutate_conservative_op()
107 case SkRegion::kReplace_Op: in mutate_conservative_op()
108 case SkRegion::kReverseDifference_Op: in mutate_conservative_op()
109 case SkRegion::kXOR_Op: { in mutate_conservative_op()
[all …]
DSkRegion_path.cpp35 … fCurrScanline->fXCount = (SkRegion::RunType)((int)(fCurrXPtr - fCurrScanline->firstX())); in done()
44 void copyToRgn(SkRegion::RunType runs[]) const;
77 SkRegion::RunType fLastY;
78 SkRegion::RunType fXCount;
80 SkRegion::RunType* firstX() const { return (SkRegion::RunType*)(this + 1); } in firstX()
83 return (Scanline*)((SkRegion::RunType*)(this + 1) + fXCount + 1); in nextScanline()
86 SkRegion::RunType* fStorage;
90 SkRegion::RunType* fCurrXPtr;
91 SkRegion::RunType fTop; // first Y value
143 int64_t size = sk_64_mul(fStorageCount, sizeof(SkRegion::RunType)); in init()
[all …]
DSkScan.h16 class SkRegion; variable
33 typedef void (*HairRgnProc)(const SkPoint[], int count, const SkRegion*, SkBlitter*);
62 friend class SkRegion; variable
64 static void FillIRect(const SkIRect&, const SkRegion* clip, SkBlitter*);
65 static void FillXRect(const SkXRect&, const SkRegion* clip, SkBlitter*);
66 static void FillRect(const SkRect&, const SkRegion* clip, SkBlitter*);
67 static void AntiFillRect(const SkRect&, const SkRegion* clip, SkBlitter*);
68 static void AntiFillXRect(const SkXRect&, const SkRegion*, SkBlitter*);
69 static void FillPath(const SkPath&, const SkRegion& clip, SkBlitter*);
70 static void AntiFillPath(const SkPath&, const SkRegion& clip, SkBlitter*,
[all …]
DSkRasterClip.h25 const SkRegion& bwRgn() const { SkASSERT(fIsBW); return fBW; } in bwRgn()
44 bool op(const SkIRect&, SkRegion::Op);
45 bool op(const SkRegion&, SkRegion::Op);
46 bool op(const SkRect&, const SkISize&, SkRegion::Op, bool doAA);
47 bool op(const SkPath&, const SkISize&, SkRegion::Op, bool doAA);
69 const SkRegion& forceGetBW();
78 SkRegion fBW;
110 bool setPath(const SkPath& path, const SkRegion& clip, bool doAA);
112 bool op(const SkRasterClip&, SkRegion::Op);
158 const SkRegion& getRgn() const { in getRgn()
[all …]
DSkClipStack.cpp85 visitor->clipRect(kEmptyRect, SkRegion::kIntersect_Op, false); in replay()
113 void SkClipStack::Element::initPath(int saveCount, const SkPath& path, SkRegion::Op op, in initPath()
174 bool SkClipStack::Element::canBeIntersectedInPlace(int saveCount, SkRegion::Op op) const { in canBeIntersectedInPlace()
176 (SkRegion::kDifference_Op == op || SkRegion::kIntersect_Op == op)) { in canBeIntersectedInPlace()
182 SkRegion::kIntersect_Op == op && in canBeIntersectedInPlace()
183 (SkRegion::kIntersect_Op == fOp || SkRegion::kReplace_Op == fOp); in canBeIntersectedInPlace()
397 if (SkRegion::kReplace_Op == fOp || in updateBoundAndGenID()
398 (SkRegion::kIntersect_Op == fOp && NULL == prior) || in updateBoundAndGenID()
399 (SkRegion::kIntersect_Op == fOp && prior->fIsIntersectionOfRects && in updateBoundAndGenID()
458 case SkRegion::kDifference_Op: in updateBoundAndGenID()
[all …]
/external/skia/bench/
DRegionBench.cpp13 static bool union_proc(SkRegion& a, SkRegion& b) { in union_proc()
14 SkRegion result; in union_proc()
15 return result.op(a, b, SkRegion::kUnion_Op); in union_proc()
18 static bool sect_proc(SkRegion& a, SkRegion& b) { in sect_proc()
19 SkRegion result; in sect_proc()
20 return result.op(a, b, SkRegion::kIntersect_Op); in sect_proc()
23 static bool diff_proc(SkRegion& a, SkRegion& b) { in diff_proc()
24 SkRegion result; in diff_proc()
25 return result.op(a, b, SkRegion::kDifference_Op); in diff_proc()
28 static bool diffrect_proc(SkRegion& a, SkRegion& b) { in diffrect_proc()
[all …]
DRegionContainBench.cpp13 static bool sect_proc(SkRegion& a, SkRegion& b) { in sect_proc()
14 SkRegion result; in sect_proc()
15 return result.op(a, b, SkRegion::kIntersect_Op); in sect_proc()
20 typedef bool (*Proc)(SkRegion& a, SkRegion& b);
21 SkRegion fA, fB;
42 fA.op(randrect(rand, i), SkRegion::kXOR_Op); in RegionContainBench()
/external/skia/include/core/
DSkRegion.h22 #define SkRegion_gEmptyRunHeadPtr ((SkRegion::RunHead*)-1)
30 class SK_API SkRegion {
37 SkRegion();
38 SkRegion(const SkRegion&);
39 explicit SkRegion(const SkIRect&);
40 ~SkRegion();
42 SkRegion& operator=(const SkRegion&);
48 bool operator==(const SkRegion& other) const;
53 bool operator!=(const SkRegion& other) const {
61 bool set(const SkRegion& src) { in set()
[all …]
DSkClipStack.h57 this->initCommon(0, SkRegion::kReplace_Op, false); in Element()
63 Element(const SkRect& rect, SkRegion::Op op, bool doAA) { in Element()
67 Element(const SkRRect& rrect, SkRegion::Op op, bool doAA) { in Element()
71 Element(const SkPath& path, SkRegion::Op op, bool doAA) { in Element()
97 SkRegion::Op getOp() const { return fOp; } in getOp()
110 void setOp(SkRegion::Op op) { fOp = op; } in setOp()
185 SkRegion::Op fOp;
209 this->initCommon(saveCount, SkRegion::kReplace_Op, false); in Element()
213 Element(int saveCount, const SkRRect& rrect, SkRegion::Op op, bool doAA) { in Element()
217 Element(int saveCount, const SkRect& rect, SkRegion::Op op, bool doAA) { in Element()
[all …]
/external/skia/tests/
DRegionTest.cpp13 static void Union(SkRegion* rgn, const SkIRect& rect) { in Union()
14 rgn->op(rect, SkRegion::kUnion_Op); in Union()
24 SkRegion r; in test_fromchrome()
66 SkRegion container; in test_fromchrome()
73 SkRegion rgn; in test_fromchrome()
81 SkRegion valid(SkIRect::MakeWH(10, 10)); in test_empties()
82 SkRegion empty, empty2; in test_empties()
99 SkRegion openClip; in test_empties()
117 static void randRgn(SkRandom& rand, SkRegion* rgn, int n) { in randRgn()
120 rgn->op(randRect(rand), SkRegion::kUnion_Op); in randRgn()
[all …]
DClipStackTest.cpp33 s.clipDevPath(p, SkRegion::kIntersect_Op, doAA); in test_assign_and_comparison()
39 s.clipDevRect(r, SkRegion::kIntersect_Op, doAA); in test_assign_and_comparison()
41 s.clipDevRect(r, SkRegion::kIntersect_Op, doAA); in test_assign_and_comparison()
47 s.clipDevRect(r, SkRegion::kUnion_Op, doAA); in test_assign_and_comparison()
62 s.clipDevRect(r, SkRegion::kUnion_Op, doAA); in test_assign_and_comparison()
71 s.clipDevRect(r, SkRegion::kIntersect_Op, doAA); in test_assign_and_comparison()
79 s.clipDevPath(rp, SkRegion::kUnion_Op, doAA); in test_assign_and_comparison()
89 s.clipDevRect(r, SkRegion::kUnion_Op, doAA); in test_assign_and_comparison()
112 s.clipDevPath(p, SkRegion::kIntersect_Op, doAA); in test_assign_and_comparison()
140 stack.clipDevRect(gRects[i], SkRegion::kUnion_Op, false); in test_iterators()
[all …]
DAAClipTest.cpp58 static void copyToMask(const SkRegion& rgn, SkMask* mask) { in copyToMask()
83 SkRegion tmpRgn(rgn); in copyToMask()
99 static void make_rand_rgn(SkRegion* rgn, SkRandom& rand) { in make_rand_rgn()
102 rgn->op(rand_rect(rand, 100), SkRegion::kXOR_Op); in make_rand_rgn()
106 static bool operator==(const SkRegion& rgn, const SkAAClip& aaclip) { in operator ==()
118 static bool equalsAAClip(const SkRegion& rgn) { in equalsAAClip()
124 static void setRgnToPath(SkRegion* rgn, const SkPath& path) { in setRgnToPath()
127 rgn->setPath(path, SkRegion(ir)); in setRgnToPath()
134 SkRegion rgn; in test_rgn()
140 SkRegion rgn; in test_rgn()
[all …]
/external/skia/src/gpu/effects/
DGrCoverageSetOpXP.cpp20 static GrXferProcessor* Create(SkRegion::Op regionOp, bool invertCoverage) { in Create()
35 CoverageSetOpXP(SkRegion::Op regionOp, bool fInvertCoverage);
53 SkRegion::Op fRegionOp;
93 CoverageSetOpXP::CoverageSetOpXP(SkRegion::Op regionOp, bool invertCoverage) in CoverageSetOpXP()
122 case SkRegion::kReplace_Op: in onGetBlendInfo()
126 case SkRegion::kIntersect_Op: in onGetBlendInfo()
130 case SkRegion::kUnion_Op: in onGetBlendInfo()
134 case SkRegion::kXOR_Op: in onGetBlendInfo()
138 case SkRegion::kDifference_Op: in onGetBlendInfo()
142 case SkRegion::kReverseDifference_Op: in onGetBlendInfo()
[all …]
/external/skia/samplecode/
DSampleRegion.cpp124 static void make_rgn(SkRegion* rgn, int left, int top, int right, int bottom, in make_rgn()
133 static void test_union_bug_1505668(SkRegion* ra, SkRegion* rb, SkRegion* rc) { in test_union_bug_1505668()
159 rc->op(*ra, *rb, SkRegion::kUnion_Op); in test_union_bug_1505668()
170 static void scale_rgn(SkRegion* dst, const SkRegion& src, float scale) { in scale_rgn()
171 SkRegion tmp; in scale_rgn()
172 SkRegion::Iterator iter(src); in scale_rgn()
177 tmp.op(r, SkRegion::kUnion_Op); in scale_rgn()
182 static void paint_rgn(SkCanvas* canvas, const SkRegion& rgn, in paint_rgn()
184 SkRegion scaled; in paint_rgn()
187 SkRegion::Iterator iter(rgn); in paint_rgn()
[all …]
DSampleClipDrawMatch.cpp165 canvas->clipRect(create_rect(offset), SkRegion::kReplace_Op, useAA); in drawClippedGeom()
168 canvas->clipRRect(create_rrect(offset), SkRegion::kReplace_Op, useAA); in drawClippedGeom()
171 canvas->clipRRect(create_circle(offset), SkRegion::kReplace_Op, useAA); in drawClippedGeom()
174 canvas->clipPath(create_convex_path(offset), SkRegion::kReplace_Op, useAA); in drawClippedGeom()
177 canvas->clipPath(create_concave_path(offset), SkRegion::kReplace_Op, useAA); in drawClippedGeom()
182 canvas->clipRect(r, SkRegion::kReplace_Op, true); // AA here forces shader clips in drawClippedGeom()
183 canvas->clipRect(create_rect(offset), SkRegion::kIntersect_Op, useAA); in drawClippedGeom()
188 canvas->clipRect(r, SkRegion::kReplace_Op, true); // AA here forces shader clips in drawClippedGeom()
189 canvas->clipRRect(create_rrect(offset), SkRegion::kIntersect_Op, useAA); in drawClippedGeom()
194 canvas->clipRect(r, SkRegion::kReplace_Op, true); // AA here forces shader clips in drawClippedGeom()
[all …]
/external/skia/src/gpu/
DGrReducedClip.cpp54 case SkRegion::kDifference_Op: in reduced_stack_walker()
76 case SkRegion::kIntersect_Op: in reduced_stack_walker()
99 case SkRegion::kUnion_Op: in reduced_stack_walker()
122 case SkRegion::kXOR_Op: in reduced_stack_walker()
144 case SkRegion::kReverseDifference_Op: in reduced_stack_walker()
168 case SkRegion::kReplace_Op: in reduced_stack_walker()
207 SkASSERT(SkRegion::kXOR_Op == element->getOp() || in reduced_stack_walker()
208 SkRegion::kReverseDifference_Op == element->getOp()); in reduced_stack_walker()
211 (queryBounds, SkRegion::kReverseDifference_Op, false)); in reduced_stack_walker()
220 bool isReplace = SkRegion::kReplace_Op == newElement->getOp(); in reduced_stack_walker()
[all …]
DGrStencil.cpp236 SkRegion::Op op, in GetClipPasses()
245 case SkRegion::kReplace_Op: in GetClipPasses()
249 case SkRegion::kUnion_Op: in GetClipPasses()
253 case SkRegion::kXOR_Op: in GetClipPasses()
257 case SkRegion::kDifference_Op: in GetClipPasses()
278 case SkRegion::kReplace_Op: in GetClipPasses()
289 case SkRegion::kIntersect_Op: in GetClipPasses()
296 case SkRegion::kUnion_Op: in GetClipPasses()
330 case SkRegion::kXOR_Op: in GetClipPasses()
354 case SkRegion::kDifference_Op: in GetClipPasses()
[all …]
/external/skia/include/images/
DSkPageFlipper.h35 const SkRegion& dirtyRgn() const { return *fDirty1; } in dirtyRgn()
39 void inval(const SkRegion&);
51 const SkRegion& update(SkRegion* copyBits);
54 SkRegion* fDirty0;
55 SkRegion* fDirty1;
56 SkRegion fDirty0Storage;
57 SkRegion fDirty1Storage;
/external/skia/gm/
Dcircularclips.cpp39 SkRegion::Op ops[] = { in onDraw()
40 SkRegion::kDifference_Op, in onDraw()
41 SkRegion::kIntersect_Op, in onDraw()
42 SkRegion::kUnion_Op, in onDraw()
43 SkRegion::kXOR_Op, in onDraw()
44 SkRegion::kReverseDifference_Op, in onDraw()
45 SkRegion::kReplace_Op, in onDraw()
57 canvas->clipPath(fCircle1, SkRegion::kReplace_Op, true); in onDraw()
58 canvas->clipPath(fCircle2, SkRegion::kIntersect_Op, true); in onDraw()
76 canvas->clipPath(fCircle1, SkRegion::kReplace_Op); in onDraw()
Dsimpleaaclip.cpp70 void buildRgn(SkAAClip* clip, SkRegion::Op op) { in buildRgn()
88 void drawRgnOped(SkCanvas* canvas, SkRegion::Op op, SkColor color) { in drawRgnOped()
100 void drawPathsOped(SkCanvas* canvas, SkRegion::Op op, SkColor color) { in drawPathsOped()
109 canvas->clipPath(fBasePath, SkRegion::kReplace_Op, true); in drawPathsOped()
113 canvas->clipRect(fBase, SkRegion::kReplace_Op, true); in drawPathsOped()
147 SkRegion::Op fOp; in onDraw()
149 { SK_ColorBLACK, "Difference", SkRegion::kDifference_Op }, in onDraw()
150 { SK_ColorRED, "Intersect", SkRegion::kIntersect_Op }, in onDraw()
151 { 0xFF008800, "Union", SkRegion::kUnion_Op }, in onDraw()
152 { SK_ColorGREEN, "Rev Diff", SkRegion::kReverseDifference_Op }, in onDraw()
[all …]
/external/skia/src/images/
DSkPageFlipper.cpp49 fDirty1->op(r, SkRegion::kUnion_Op); in inval()
53 void SkPageFlipper::inval(const SkRegion& rgn) { in inval()
54 SkRegion r; in inval()
56 if (r.op(rgn, SkRegion::kIntersect_Op)) { in inval()
57 fDirty1->op(r, SkRegion::kUnion_Op); in inval()
70 const SkRegion& SkPageFlipper::update(SkRegion* copyBits) { in update()
72 copyBits->op(*fDirty0, *fDirty1, SkRegion::kDifference_Op); in update()
73 SkTSwap<SkRegion*>(fDirty0, fDirty1); in update()
/external/skia/src/utils/
DSkCanvasStack.h35 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override;
36 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override;
37 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override;
38 void onClipRegion(const SkRegion&, SkRegion::Op) override;
45 SkRegion requiredClip;
DSkCanvasStack.cpp37 fCanvasData[i-1].requiredClip.op(localBounds, SkRegion::kDifference_Op); in pushCanvas()
57 fList[i]->clipRegion(fCanvasData[i].requiredClip, SkRegion::kIntersect_Op); in clipToZOrderedBounds()
80 void SkCanvasStack::onClipRect(const SkRect& r, SkRegion::Op op, ClipEdgeStyle edgeStyle) { in onClipRect()
85 void SkCanvasStack::onClipRRect(const SkRRect& rr, SkRegion::Op op, ClipEdgeStyle edgeStyle) { in onClipRRect()
90 void SkCanvasStack::onClipPath(const SkPath& p, SkRegion::Op op, ClipEdgeStyle edgeStyle) { in onClipPath()
95 void SkCanvasStack::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { in onClipRegion()
98 SkRegion tempRegion; in onClipRegion()
101 tempRegion.op(fCanvasData[i].requiredClip, SkRegion::kIntersect_Op); in onClipRegion()

1234567