Index: src/core/SkBitmapCache.h |
diff --git a/src/core/SkBitmapCache.h b/src/core/SkBitmapCache.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..01d7f1bda71458693f547d5afdd0b8f20ebf8b2f |
--- /dev/null |
+++ b/src/core/SkBitmapCache.h |
@@ -0,0 +1,45 @@ |
+/* |
+ * Copyright 2014 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#ifndef SkScaledBitmapKey_DEFINED |
hal.canary
2014/08/21 15:35:01
Wrong define name
reed1
2014/08/21 15:58:10
Done.
|
+#define SkScaledBitmapKey_DEFINED |
+ |
+#include "SkScaledImageCache.h" |
+ |
+class SkBitmapCache { |
+public: |
+ typedef SkScaledImageCache::ID ID; |
+ |
+ static void Unlock(ID* id) { |
+ SkScaledImageCache::Unlock(id); |
+ } |
+ |
+ /* Input: bitmap+inverse_scale */ |
+ static ID* FindAndLock(const SkBitmap& src, SkScalar invScaleX, SkScalar invScaleY, |
+ SkBitmap* result); |
+ static ID* AddAndLock(const SkBitmap& src, SkScalar invScaleX, SkScalar invScaleY, |
+ const SkBitmap& result); |
+ |
+ /* Input: bitmap_genID+width+height */ |
+ static ID* FindAndLock(uint32_t genID, int width, int height, SkBitmap* result); |
+ |
+ static ID* AddAndLock(uint32_t genID, int width, int height, const SkBitmap& result); |
+}; |
+ |
+class SkMipMapCache { |
+public: |
+ typedef SkScaledImageCache::ID ID; |
+ |
+ static void Unlock(ID* id) { |
+ SkScaledImageCache::Unlock(id); |
+ } |
+ |
+ static ID* FindAndLock(const SkBitmap& src, SkMipMap const** result); |
mtklein
2014/08/21 15:29:18
try const SkMipMap** (though I see this is preexis
reed1
2014/08/21 15:58:10
Done.
|
+ static ID* AddAndLock(const SkBitmap& src, const SkMipMap* result); |
+}; |
+ |
+#endif |