aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcState.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-08-26 09:08:04 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-26 09:08:04 -0700
commit680fb9e8f10d24b5fe35c90338de37c57392f1aa (patch)
treef973f7d37ccd4deb5a23eb57c8b0a0b7e514ad3f /src/core/SkBitmapProcState.h
parent97b49478cfbcdb9cac6de2ab0d44f975311ef631 (diff)
retool image cache to be generic cache, allowing the client to subclass "Rec", so they can provide a custom Key and arbitrary Value.
Follow-on CLs - rename ScaledimageCache to something like GeneralCache - explore if we can use call-backs or some mechanism to completely hide "lock/unlock", by forcing all clients to support "copying" their value out of the cache as the result of a Find. R=mtklein@google.com, senorblanco@google.com, bsalomon@google.com, qiankun.miao@intel.com, senorblanco@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/507483002
Diffstat (limited to 'src/core/SkBitmapProcState.h')
-rw-r--r--src/core/SkBitmapProcState.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkBitmapProcState.h b/src/core/SkBitmapProcState.h
index 73d7e904b3..a249ed6ce1 100644
--- a/src/core/SkBitmapProcState.h
+++ b/src/core/SkBitmapProcState.h
@@ -13,6 +13,7 @@
#include "SkBitmap.h"
#include "SkBitmapFilter.h"
#include "SkMatrix.h"
+#include "SkMipMap.h"
#include "SkPaint.h"
#include "SkScaledImageCache.h"
@@ -36,7 +37,7 @@ class SkPaint;
struct SkBitmapProcState {
- SkBitmapProcState(): fScaledCacheID(NULL), fBitmapFilter(NULL) {}
+ SkBitmapProcState() : fBitmapFilter(NULL) {}
~SkBitmapProcState();
typedef void (*ShaderProc32)(const SkBitmapProcState&, int x, int y,
@@ -142,7 +143,8 @@ private:
SkBitmap fOrigBitmap; // CONSTRUCTOR
SkBitmap fScaledBitmap; // chooseProcs
- SkScaledImageCache::ID* fScaledCacheID;
+ SkAutoTUnref<const SkMipMap> fCurrMip;
+// SkScaledImageCache::ID fScaledCacheID;
MatrixProc chooseMatrixProc(bool trivial_matrix);
bool chooseProcs(const SkMatrix& inv, const SkPaint&);