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

Unified Diff: src/core/SkBitmapCache.h

Issue 483493003: expose generalized imagecache key (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove more dead code Created 6 years, 4 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 | « gyp/core.gypi ('k') | src/core/SkBitmapCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapCache.h
diff --git a/src/core/SkBitmapCache.h b/src/core/SkBitmapCache.h
new file mode 100644
index 0000000000000000000000000000000000000000..ebade0ebd9b67fa277d6e9b2407cd2e691f20676
--- /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 SkBitmapCache_DEFINED
+#define SkBitmapCache_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, const SkMipMap** result);
+ static ID* AddAndLock(const SkBitmap& src, const SkMipMap* result);
+};
+
+#endif
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkBitmapCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698