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

Unified Diff: include/core/SkImageFilter.h

Issue 1651433002: Replace the id<-->key hashmap in SkImageFilter by a SkTArray (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: remove unused parameters in header Created 4 years, 11 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/SkImageFilter.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 351a959c0be124b72bed671f264925a152284b48..44231cc7eed089218ca5a042afa41e8ea619ca10 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -9,11 +9,13 @@
#define SkImageFilter_DEFINED
#include "../private/SkTemplates.h"
+#include "../private/SkMutex.h"
#include "SkFilterQuality.h"
#include "SkFlattenable.h"
#include "SkMatrix.h"
#include "SkRect.h"
#include "SkSurfaceProps.h"
+#include "SkTArray.h"
class GrFragmentProcessor;
class GrTexture;
@@ -42,7 +44,7 @@ public:
virtual bool get(const Key& key, SkBitmap* result, SkIPoint* offset) const = 0;
virtual void set(const Key& key, const SkBitmap& result, const SkIPoint& offset) = 0;
virtual void purge() {}
- virtual void purgeByImageFilterId(uint32_t) {}
+ virtual void purgeByKeys(const Key[], int) {}
};
class Context {
@@ -450,6 +452,8 @@ private:
bool fUsesSrcInput;
CropRect fCropRect;
uint32_t fUniqueID; // Globally unique
+ mutable SkTArray<Cache::Key> fCacheKeys;
+ mutable SkMutex fMutex;
};
/**
« no previous file with comments | « no previous file | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698