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

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

Issue 1461923004: Avoid devolving to a path when conservative clipping with RRects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Simplify Created 5 years, 1 month 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/SkCanvas.cpp ('k') | src/core/SkRasterClip.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 * Copyright 2010 Google Inc. 2 * Copyright 2010 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkRasterClip_DEFINED 8 #ifndef SkRasterClip_DEFINED
9 #define SkRasterClip_DEFINED 9 #define SkRasterClip_DEFINED
10 10
11 #include "SkRegion.h" 11 #include "SkRegion.h"
12 #include "SkAAClip.h" 12 #include "SkAAClip.h"
13 13
14 class SkRRect;
15
14 class SkRasterClip { 16 class SkRasterClip {
15 public: 17 public:
16 SkRasterClip(bool forceConservativeRects = false); 18 SkRasterClip(bool forceConservativeRects = false);
17 SkRasterClip(const SkIRect&, bool forceConservativeRects = false); 19 SkRasterClip(const SkIRect&, bool forceConservativeRects = false);
18 SkRasterClip(const SkRasterClip&); 20 SkRasterClip(const SkRasterClip&);
19 ~SkRasterClip(); 21 ~SkRasterClip();
20 22
21 bool isForceConservativeRects() const { return fForceConservativeRects; } 23 bool isForceConservativeRects() const { return fForceConservativeRects; }
22 24
23 bool isBW() const { return fIsBW; } 25 bool isBW() const { return fIsBW; }
(...skipping 13 matching lines...) Expand all
37 39
38 bool isComplex() const; 40 bool isComplex() const;
39 const SkIRect& getBounds() const; 41 const SkIRect& getBounds() const;
40 42
41 bool setEmpty(); 43 bool setEmpty();
42 bool setRect(const SkIRect&); 44 bool setRect(const SkIRect&);
43 45
44 bool op(const SkIRect&, SkRegion::Op); 46 bool op(const SkIRect&, SkRegion::Op);
45 bool op(const SkRegion&, SkRegion::Op); 47 bool op(const SkRegion&, SkRegion::Op);
46 bool op(const SkRect&, const SkISize&, SkRegion::Op, bool doAA); 48 bool op(const SkRect&, const SkISize&, SkRegion::Op, bool doAA);
49 bool op(const SkRRect&, const SkISize&, SkRegion::Op, bool doAA);
47 bool op(const SkPath&, const SkISize&, SkRegion::Op, bool doAA); 50 bool op(const SkPath&, const SkISize&, SkRegion::Op, bool doAA);
48 51
49 void translate(int dx, int dy, SkRasterClip* dst) const; 52 void translate(int dx, int dy, SkRasterClip* dst) const;
50 void translate(int dx, int dy) { 53 void translate(int dx, int dy) {
51 this->translate(dx, dy, this); 54 this->translate(dx, dy, this);
52 } 55 }
53 56
54 bool quickContains(const SkIRect& rect) const; 57 bool quickContains(const SkIRect& rect) const;
55 bool quickContains(int left, int top, int right, int bottom) const { 58 bool quickContains(int left, int top, int right, int bottom) const {
56 return quickContains(SkIRect::MakeLTRB(left, top, right, bottom)); 59 return quickContains(SkIRect::MakeLTRB(left, top, right, bottom));
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 169
167 private: 170 private:
168 SkRegion fBWRgn; 171 SkRegion fBWRgn;
169 SkAAClipBlitter fAABlitter; 172 SkAAClipBlitter fAABlitter;
170 // what we return 173 // what we return
171 const SkRegion* fClipRgn; 174 const SkRegion* fClipRgn;
172 SkBlitter* fBlitter; 175 SkBlitter* fBlitter;
173 }; 176 };
174 177
175 #endif 178 #endif
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkRasterClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698