aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-05-03 10:52:00 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-03 15:46:55 +0000
commita9e241d357641493ba1908cd36cf43d16490421b (patch)
tree74166d93910ab878afec692d3b332790f65bb5d3
parent9d5f66d9c21eda7d3e2ed47654180c0c4b6e38b1 (diff)
drawfilter is legacy-guarded, no need for deprecated
Bug: skia: Change-Id: Ic8dbe9aa043bd793e49975f5b6f08a0ac38e4faa Reviewed-on: https://skia-review.googlesource.com/15185 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
-rw-r--r--BUILD.gn5
-rw-r--r--include/core/SkCanvas.h7
-rw-r--r--include/core/SkPostConfig.h8
-rw-r--r--samplecode/SamplePictFile.cpp20
4 files changed, 1 insertions, 39 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 76cfbd295f..539767aa99 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -139,10 +139,7 @@ config("skia_private") {
"third_party/gif",
]
- defines = [
- "SK_GAMMA_APPLY_TO_A8",
- "SK_INTERNAL",
- ]
+ defines = [ "SK_GAMMA_APPLY_TO_A8" ]
if (is_android) {
defines += [
"SK_GAMMA_EXPONENT=1.4",
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index a259e531f3..37896dea45 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1157,18 +1157,12 @@ public:
}
//////////////////////////////////////////////////////////////////////////
-#ifdef SK_INTERNAL
-#ifndef SK_SUPPORT_LEGACY_DRAWFILTER
- #define SK_SUPPORT_LEGACY_DRAWFILTER
-#endif
-#endif
#ifdef SK_SUPPORT_LEGACY_DRAWFILTER
/** Get the current filter object. The filter's reference count is not
affected. The filter is saved/restored, just like the matrix and clip.
@return the canvas' filter (or NULL).
*/
- SK_ATTR_EXTERNALLY_DEPRECATED("getDrawFilter use is deprecated")
SkDrawFilter* getDrawFilter() const;
/** Set the new filter (or NULL). Pass NULL to clear any existing filter.
@@ -1179,7 +1173,6 @@ public:
@param filter the new filter (or NULL)
@return the new filter
*/
- SK_ATTR_EXTERNALLY_DEPRECATED("setDrawFilter use is deprecated")
virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter);
#endif
//////////////////////////////////////////////////////////////////////////
diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h
index c34397cde6..0bf33d478a 100644
--- a/include/core/SkPostConfig.h
+++ b/include/core/SkPostConfig.h
@@ -248,14 +248,6 @@
# define SK_ATTR_DEPRECATED(msg) SK_ATTRIBUTE(deprecated)
#endif
-#if !defined(SK_ATTR_EXTERNALLY_DEPRECATED)
-# if !defined(SK_INTERNAL)
-# define SK_ATTR_EXTERNALLY_DEPRECATED(msg) SK_ATTR_DEPRECATED(msg)
-# else
-# define SK_ATTR_EXTERNALLY_DEPRECATED(msg)
-# endif
-#endif
-
/**
* If your judgment is better than the compiler's (i.e. you've profiled it),
* you can use SK_ALWAYS_INLINE to force inlining. E.g.
diff --git a/samplecode/SamplePictFile.cpp b/samplecode/SamplePictFile.cpp
index 32cc723d9d..efaac7158a 100644
--- a/samplecode/SamplePictFile.cpp
+++ b/samplecode/SamplePictFile.cpp
@@ -30,18 +30,6 @@
#include "SkGlyphCache.h"
-#include "SkDrawFilter.h"
-class SkCounterDrawFilter : public SkDrawFilter {
-public:
- SkCounterDrawFilter(int count) : fCount(count) {}
-
- bool filter(SkPaint*, Type t) override {
- return --fCount >= 0;
- }
-
- int fCount;
-};
-
class PictFileView : public SampleView {
public:
PictFileView(const char name[] = nullptr)
@@ -129,14 +117,6 @@ protected:
if (!*picture) {
*picture = LoadPicture(fFilename.c_str(), fBBox).release();
}
- if (*picture) {
- SkCounterDrawFilter filter(fCount);
- if (fCount > 0) {
- canvas->setDrawFilter(&filter);
- }
- canvas->drawPicture(*picture);
- canvas->setDrawFilter(nullptr);
- }
#ifdef SK_GLYPHCACHE_TRACK_HASH_STATS
SkGlyphCache::Dump();