Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ion/src/com/koushikdutta/ion/Ion.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ public static Builders.IV.F<? extends Builders.IV.F<?>> with(ImageView imageView
Context context;
IonImageViewRequestBuilder bitmapBuilder = new IonImageViewRequestBuilder(this);

public FileCache getStoreCache() {
return storeCache;
}

private Ion(Context context, String name) {
this.context = context = context.getApplicationContext();
this.name = name;
Expand Down
6 changes: 3 additions & 3 deletions ion/src/com/koushikdutta/ion/IonBitmapRequestBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ abstract class IonBitmapRequestBuilder implements BitmapFutureBuilder, Builders.
};

IonRequestBuilder builder;
Ion ion;
static Ion ion;
ArrayList<Transform> transforms;
ScaleMode scaleMode;
int resizeWidth;
Expand Down Expand Up @@ -114,7 +114,7 @@ public static String computeDecodeKey(IonRequestBuilder builder, int resizeWidth
decodeKey += ":noAnimate";
if (deepZoom)
decodeKey += ":deepZoom";
return FileCache.toKeyString(decodeKey);
return ion.getCache().toKeyString(decodeKey);
}

public void addDefaultTransform() {
Expand All @@ -141,7 +141,7 @@ public static String computeBitmapKey(String decodeKey, List<Transform> transfor
for (Transform transform : transforms) {
bitmapKey += transform.key();
}
bitmapKey = FileCache.toKeyString(bitmapKey);
bitmapKey = ion.getCache().toKeyString(bitmapKey);
}

return bitmapKey;
Expand Down
4 changes: 2 additions & 2 deletions ion/src/com/koushikdutta/ion/IonDrawable.java
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ private void drawDeepZoom(Canvas canvas) {

// find, render/fetch
// System.out.println("rendering: " + texRect + " for: " + bounds);
String tileKey = FileCache.toKeyString(info.key, ",", level, ",", x, ",", y);
String tileKey = ion.getCache().toKeyString(info.key, ",", level, ",", x, ",", y);
BitmapInfo tile = ion.bitmapCache.get(tileKey);
if (tile != null && tile.bitmap != null) {
// render it
Expand Down Expand Up @@ -704,7 +704,7 @@ private void drawDeepZoom(Canvas canvas) {
int parentY = y >> 1;

while (parentLevel >= 0) {
tileKey = FileCache.toKeyString(info.key, ",", parentLevel, ",", parentX, ",", parentY);
tileKey = ion.getCache().toKeyString(info.key, ",", parentLevel, ",", parentX, ",", parentY);
tile = ion.bitmapCache.get(tileKey);
if (tile != null && tile.bitmap != null)
break;
Expand Down