summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/bitmap/drawable/BasicBitmapDrawable.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/bitmap/drawable/BasicBitmapDrawable.java b/src/com/android/bitmap/drawable/BasicBitmapDrawable.java
index 5de0840..d637a98 100644
--- a/src/com/android/bitmap/drawable/BasicBitmapDrawable.java
+++ b/src/com/android/bitmap/drawable/BasicBitmapDrawable.java
@@ -304,12 +304,19 @@ public class BasicBitmapDrawable extends Drawable implements DecodeCallback,
mTask.cancel();
}
final DecodeOptions opts = new DecodeOptions(bufferW, bufferH, getDecodeVerticalCenter(),
- DecodeOptions.STRATEGY_ROUND_NEAREST);
+ getDecodeStrategy());
mTask = new DecodeTask(mCurrKey, opts, factory, this, mCache);
mTask.executeOnExecutor(getExecutor());
Trace.endSection();
}
+ /**
+ * Return one of the STRATEGY constants in {@link DecodeOptions}.
+ */
+ protected int getDecodeStrategy() {
+ return DecodeOptions.STRATEGY_ROUND_NEAREST;
+ }
+
protected Executor getExecutor() {
return EXECUTOR;
}