Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: include/core/SkImageFilter.h

Issue 225903010: Allow clients to specify an external SkImageFilter cache. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Move external to a global on SkImageFilter. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImageFilter.h
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index 7a65f53788d34a9d6caf967e55596fbd25fb4430..b3d748095571e3978cb63003197ff7be3af45d77 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -56,6 +56,7 @@ public:
virtual bool get(const SkImageFilter* key, SkBitmap* result, SkIPoint* offset) = 0;
virtual void set(const SkImageFilter* key,
const SkBitmap& result, const SkIPoint& offset) = 0;
+ virtual void remove(const SkImageFilter* key) = 0;
};
class Context {
@@ -183,6 +184,17 @@ public:
SkBitmap* result, SkIPoint* offset) const;
#endif
+ /**
+ * Set an external cache to be used for all image filter processing. This
+ * will replace the default intra-frame cache.
+ */
+ static void SetExternalCache(Cache* cache);
+
+ /**
+ * Returns the currently-set external cache, or NULL if none is set.
+ */
+ static Cache* GetExternalCache();
+
SK_DEFINE_FLATTENABLE_TYPE(SkImageFilter)
protected:
@@ -274,7 +286,6 @@ protected:
const SkMatrix& matrix,
const SkIRect& bounds) const;
-
private:
typedef SkFlattenable INHERITED;
int fInputCount;
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698