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

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

Issue 1925693002: remove 'deprecated' region from SkDraw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add override Created 4 years, 7 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
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; 14 class SkRRect;
15 15
16 class SkRasterClip { 16 class SkRasterClip {
17 public: 17 public:
18 SkRasterClip(bool forceConservativeRects = false); 18 SkRasterClip(bool forceConservativeRects = false);
19 SkRasterClip(const SkIRect&, bool forceConservativeRects = false); 19 SkRasterClip(const SkIRect&, bool forceConservativeRects = false);
20 SkRasterClip(const SkRegion&);
20 SkRasterClip(const SkRasterClip&); 21 SkRasterClip(const SkRasterClip&);
21 ~SkRasterClip(); 22 ~SkRasterClip();
22 23
24 // Only compares the current state. Does not compare isForceConservativeRect s(), so that field
25 // could be different but this could still return true.
26 bool operator==(const SkRasterClip&) const;
27 bool operator!=(const SkRasterClip& other) const {
28 return !(*this == other);
29 }
30
23 bool isForceConservativeRects() const { return fForceConservativeRects; } 31 bool isForceConservativeRects() const { return fForceConservativeRects; }
24 32
25 bool isBW() const { return fIsBW; } 33 bool isBW() const { return fIsBW; }
26 bool isAA() const { return !fIsBW; } 34 bool isAA() const { return !fIsBW; }
27 const SkRegion& bwRgn() const { SkASSERT(fIsBW); return fBW; } 35 const SkRegion& bwRgn() const { SkASSERT(fIsBW); return fBW; }
28 const SkAAClip& aaRgn() const { SkASSERT(!fIsBW); return fAA; } 36 const SkAAClip& aaRgn() const { SkASSERT(!fIsBW); return fAA; }
29 37
30 bool isEmpty() const { 38 bool isEmpty() const {
31 SkASSERT(this->computeIsEmpty() == fIsEmpty); 39 SkASSERT(this->computeIsEmpty() == fIsEmpty);
32 return fIsEmpty; 40 return fIsEmpty;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 177
170 private: 178 private:
171 SkRegion fBWRgn; 179 SkRegion fBWRgn;
172 SkAAClipBlitter fAABlitter; 180 SkAAClipBlitter fAABlitter;
173 // what we return 181 // what we return
174 const SkRegion* fClipRgn; 182 const SkRegion* fClipRgn;
175 SkBlitter* fBlitter; 183 SkBlitter* fBlitter;
176 }; 184 };
177 185
178 #endif 186 #endif
OLDNEW
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkRasterClip.cpp » ('j') | src/utils/SkCanvasStateUtils.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698