aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@google.com>2015-09-09 07:22:09 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-09 07:22:09 -0700
commitd9b8d7ac1fb4628f3411253c0fc6cd37e4ff0487 (patch)
tree0fb1483f5d9a875bd6349aa1ea8cf3e09cefa132 /include
parent2ac6793efc9b33f6104f9c39810bee5714bdc208 (diff)
Revert of Make SkGraphics::Term a no-op, stop calling it. (patchset #2 id:20001 of https://codereview.chromium.org/1329853005/ )
Reason for revert: SK_ATTR_DEPRECATED is meaningful to Android. Don't use it. Original issue's description: > Make SkGraphics::Term a no-op, stop calling it. > > I'd remove it entirely but Android is calling it explicitly. > > BUG=skia:4259 > > Committed: https://skia.googlesource.com/skia/+/925979f733fe8e70d84627147dee04d030423349 TBR=reed@google.com,scroggo@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4259 Review URL: https://codereview.chromium.org/1314483006
Diffstat (limited to 'include')
-rw-r--r--include/core/SkGraphics.h9
-rw-r--r--include/core/SkPaint.h5
-rw-r--r--include/views/SkEvent.h2
3 files changed, 12 insertions, 4 deletions
diff --git a/include/core/SkGraphics.h b/include/core/SkGraphics.h
index e9c5af511e..8e8bd77ef4 100644
--- a/include/core/SkGraphics.h
+++ b/include/core/SkGraphics.h
@@ -23,8 +23,10 @@ public:
*/
static void Init();
- SK_ATTR_DEPRECATED("SkGraphics::Term() is a no-op. We're in the middle of cleaning it up.")
- static void Term() {}
+ /**
+ * Call this to release any memory held privately, such as the font cache.
+ */
+ static void Term();
/**
* Return the version numbers for the library. If the parameter is not
@@ -167,6 +169,9 @@ public:
SkAutoGraphics() {
SkGraphics::Init();
}
+ ~SkAutoGraphics() {
+ SkGraphics::Term();
+ }
};
#endif
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 2090ed2337..0c071ad361 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -289,7 +289,7 @@ public:
SkFilterQuality getFilterQuality() const {
return (SkFilterQuality)fBitfields.fFilterQuality;
}
-
+
/**
* Set the filter quality. This affects the quality (and performance) of
* drawing scaled images.
@@ -1046,6 +1046,8 @@ private:
*/
SkColor computeLuminanceColor() const;
+ static void Term();
+
enum {
/* This is the size we use when we ask for a glyph's path. We then
* post-transform it as we draw to match the request.
@@ -1088,6 +1090,7 @@ private:
friend class SkAutoGlyphCacheNoGamma;
friend class SkCanvas;
friend class SkDraw;
+ friend class SkGraphics; // So Term() can be called.
friend class SkPDFDevice;
friend class GrBitmapTextContext;
friend class GrAtlasTextContext;
diff --git a/include/views/SkEvent.h b/include/views/SkEvent.h
index 0af76fe686..f4df4482bf 100644
--- a/include/views/SkEvent.h
+++ b/include/views/SkEvent.h
@@ -223,7 +223,7 @@ public:
*/
static void Init();
/** Global cleanup function for the SkEvent system. Should be called exactly once after
- all event methods have been called.
+ all event methods have been called, and should be called before calling SkGraphics::Term().
*/
static void Term();