aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects/SkPaintFlagsDrawFilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/SkPaintFlagsDrawFilter.cpp')
-rw-r--r--src/effects/SkPaintFlagsDrawFilter.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/effects/SkPaintFlagsDrawFilter.cpp b/src/effects/SkPaintFlagsDrawFilter.cpp
index ed2df88..62eb53a 100644
--- a/src/effects/SkPaintFlagsDrawFilter.cpp
+++ b/src/effects/SkPaintFlagsDrawFilter.cpp
@@ -2,21 +2,12 @@
#include "SkPaint.h"
SkPaintFlagsDrawFilter::SkPaintFlagsDrawFilter(uint32_t clearFlags,
- uint32_t setFlags)
-{
+ uint32_t setFlags) {
fClearFlags = SkToU16(clearFlags & SkPaint::kAllFlags);
fSetFlags = SkToU16(setFlags & SkPaint::kAllFlags);
}
-bool SkPaintFlagsDrawFilter::filter(SkCanvas*, SkPaint* paint, Type)
-{
- fPrevFlags = paint->getFlags();
- paint->setFlags((fPrevFlags & ~fClearFlags) | fSetFlags);
- return true;
+void SkPaintFlagsDrawFilter::filter(SkPaint* paint, Type) {
+ paint->setFlags((paint->getFlags() & ~fClearFlags) | fSetFlags);
}
-void SkPaintFlagsDrawFilter::restore(SkCanvas*, SkPaint* paint, Type)
-{
- paint->setFlags(fPrevFlags);
-}
-