summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorWei-Ta Chen <weita@google.com>2010-12-03 14:06:18 -0800
committerWei-Ta Chen <weita@google.com>2010-12-06 14:24:51 -0800
commit953f9094a2ec14594fa8501d5f3e2d9e300b1b62 (patch)
tree418adb9e964bcaa3b17ee60976435e6e3efc359c /graphics
parent961d55fe00577921c9a803a315bed0a7f87544cb (diff)
downloadframeworks_base-953f9094a2ec14594fa8501d5f3e2d9e300b1b62.zip
frameworks_base-953f9094a2ec14594fa8501d5f3e2d9e300b1b62.tar.gz
frameworks_base-953f9094a2ec14594fa8501d5f3e2d9e300b1b62.tar.bz2
Add inPreferQualityOverSpeed into BitmapFactory.Options.
The new field allows a developer to use a more accurate by slightly slower IDCT method in JPEG decode. This in turns improves the quality of the reconstructed image. The field by default is not set and thus does not affect existing applications. Bug: 3238925 Change-Id: I93d55b7226e47a43e639325cd1a677694d6f2ee4
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/BitmapFactory.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java
index ea5ed6b..8450c3a 100644
--- a/graphics/java/android/graphics/BitmapFactory.java
+++ b/graphics/java/android/graphics/BitmapFactory.java
@@ -205,10 +205,21 @@ public class BitmapFactory {
public boolean inNativeAlloc;
/**
+ * If inPreferQualityOverSpeed is set to true, the decoder will try to
+ * decode the reconstructed image to a higher quality even at the
+ * expense of the decoding speed. Currently the field only affects JPEG
+ * decode, in the case of which a more accurate, but slightly slower,
+ * IDCT method will be used instead.
+ * @hide
+ */
+ public boolean inPreferQualityOverSpeed;
+
+ /**
* The resulting width of the bitmap, set independent of the state of
* inJustDecodeBounds. However, if there is an error trying to decode,
* outWidth will be set to -1.
*/
+
public int outWidth;
/**