aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkCanvas.h
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-02-05 20:46:05 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-02-05 20:46:05 +0000
commitba09de4c4be66cc07790f23b0f3a925f47340e3e (patch)
tree5ad0a0bc1bfe3f0c0ca6f1df45d29847a8bb4ec2 /include/core/SkCanvas.h
parent945a139553a9c9da03766213661d7f5fd6ed3042 (diff)
respect edgetype in quickreject
git-svn-id: http://skia.googlecode.com/svn/trunk@489 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r--include/core/SkCanvas.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 40b5c56171..3a10ca4031 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -772,14 +772,31 @@ private:
mutable SkRectCompareType fLocalBoundsCompareType;
mutable bool fLocalBoundsCompareTypeDirty;
+ mutable SkRectCompareType fLocalBoundsCompareTypeBW;
+ mutable bool fLocalBoundsCompareTypeDirtyBW;
+
+ /* Get the local clip bounds with an anti-aliased edge.
+ */
const SkRectCompareType& getLocalClipBoundsCompareType() const {
- if (fLocalBoundsCompareTypeDirty) {
- this->computeLocalClipBoundsCompareType();
- fLocalBoundsCompareTypeDirty = false;
+ return getLocalClipBoundsCompareType(kAA_EdgeType);
+ }
+
+ const SkRectCompareType& getLocalClipBoundsCompareType(EdgeType et) const {
+ if (et == kAA_EdgeType) {
+ if (fLocalBoundsCompareTypeDirty) {
+ this->computeLocalClipBoundsCompareType(et);
+ fLocalBoundsCompareTypeDirty = false;
+ }
+ return fLocalBoundsCompareType;
+ } else {
+ if (fLocalBoundsCompareTypeDirtyBW) {
+ this->computeLocalClipBoundsCompareType(et);
+ fLocalBoundsCompareTypeDirtyBW = false;
+ }
+ return fLocalBoundsCompareTypeBW;
}
- return fLocalBoundsCompareType;
}
- void computeLocalClipBoundsCompareType() const;
+ void computeLocalClipBoundsCompareType(EdgeType et) const;
};
/** Stack helper class to automatically call restoreToCount() on the canvas