aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-03 15:34:35 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-03 15:34:35 +0000
commit491493119c11206c5823b76eb6420a705be243a1 (patch)
tree4fe04b434de7061a325a42fcb190691443bc559f /tools
parent6c035f6c873d02d3cf46ecf67b6d9c2af3c374d8 (diff)
Add canFilterMaskGPU & filterMaskGPU to SkMaskFilter
Diffstat (limited to 'tools')
-rw-r--r--tools/PictureRenderer.cpp5
-rw-r--r--tools/PictureRenderer.h4
2 files changed, 4 insertions, 5 deletions
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index 12a10707a7..2730a23f52 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -64,10 +64,9 @@ public:
virtual bool filter(SkPaint* paint, Type t) {
paint->setFlags(paint->getFlags() & ~fFlags[t] & SkPaint::kAllFlags);
- if (PictureRenderer::kBlur_DrawFilterFlag & fFlags[t]) {
+ if (PictureRenderer::kMaskFilter_DrawFilterFlag & fFlags[t]) {
SkMaskFilter* maskFilter = paint->getMaskFilter();
- SkMaskFilter::BlurInfo blurInfo;
- if (maskFilter && maskFilter->asABlur(&blurInfo)) {
+ if (NULL != maskFilter) {
paint->setMaskFilter(NULL);
}
}
diff --git a/tools/PictureRenderer.h b/tools/PictureRenderer.h
index cb06679a78..738b812279 100644
--- a/tools/PictureRenderer.h
+++ b/tools/PictureRenderer.h
@@ -59,13 +59,13 @@ public:
// this uses SkPaint::Flags as a base and adds additional flags
enum DrawFilterFlags {
kNone_DrawFilterFlag = 0,
- kBlur_DrawFilterFlag = 0x8000, // toggles between blur and no blur
+ kMaskFilter_DrawFilterFlag = 0x8000, // toggles on/off mask filters (e.g., blurs)
kHinting_DrawFilterFlag = 0x10000, // toggles between no hinting and normal hinting
kSlightHinting_DrawFilterFlag = 0x20000, // toggles between slight and normal hinting
kAAClip_DrawFilterFlag = 0x40000, // toggles between soft and hard clip
};
- SK_COMPILE_ASSERT(!(kBlur_DrawFilterFlag & SkPaint::kAllFlags), blur_flag_must_be_greater);
+ SK_COMPILE_ASSERT(!(kMaskFilter_DrawFilterFlag & SkPaint::kAllFlags), maskfilter_flag_must_be_greater);
SK_COMPILE_ASSERT(!(kHinting_DrawFilterFlag & SkPaint::kAllFlags),
hinting_flag_must_be_greater);
SK_COMPILE_ASSERT(!(kSlightHinting_DrawFilterFlag & SkPaint::kAllFlags),