summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorBjorn Bringert <bringert@android.com>2010-04-14 14:43:26 +0100
committerBjorn Bringert <bringert@android.com>2010-08-18 15:39:52 +0100
commita006b47298539d89dc7a06b54c070cb3e986352a (patch)
tree73596cd05521ac6506f5811bc36f1c8ebeeb4315 /graphics
parent7eb84256e57ce85bece610e6a01e20fa12e0f3fe (diff)
downloadframeworks_base-a006b47298539d89dc7a06b54c070cb3e986352a.zip
frameworks_base-a006b47298539d89dc7a06b54c070cb3e986352a.tar.gz
frameworks_base-a006b47298539d89dc7a06b54c070cb3e986352a.tar.bz2
New API and implementation of DB and memory-backed FDs
This depends on a kernel patch that implements read(2) in the ashmem driver. Bug http://b/issue?id=2595601 Change-Id: Ie3b10aa471aada21812b35e63954c1b2f0a7b042
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/BitmapFactory.java19
1 files changed, 0 insertions, 19 deletions
diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java
index 5b8d62c..d2845cf 100644
--- a/graphics/java/android/graphics/BitmapFactory.java
+++ b/graphics/java/android/graphics/BitmapFactory.java
@@ -18,7 +18,6 @@ package android.graphics;
import android.content.res.AssetManager;
import android.content.res.Resources;
-import android.os.MemoryFile;
import android.util.DisplayMetrics;
import android.util.TypedValue;
@@ -532,18 +531,6 @@ public class BitmapFactory {
* @return the decoded bitmap, or null
*/
public static Bitmap decodeFileDescriptor(FileDescriptor fd, Rect outPadding, Options opts) {
- try {
- if (MemoryFile.isMemoryFile(fd)) {
- int mappedlength = MemoryFile.getSize(fd);
- MemoryFile file = new MemoryFile(fd, mappedlength, "r");
- InputStream is = file.getInputStream();
- Bitmap bm = decodeStream(is, outPadding, opts);
- return finishDecode(bm, outPadding, opts);
- }
- } catch (IOException ex) {
- // invalid filedescriptor, no need to call nativeDecodeFileDescriptor()
- return null;
- }
Bitmap bm = nativeDecodeFileDescriptor(fd, outPadding, opts);
return finishDecode(bm, outPadding, opts);
}
@@ -630,12 +617,6 @@ public class BitmapFactory {
*/
public static LargeBitmap createLargeBitmap(
FileDescriptor fd, boolean isShareable) throws IOException {
- if (MemoryFile.isMemoryFile(fd)) {
- int mappedlength = MemoryFile.getSize(fd);
- MemoryFile file = new MemoryFile(fd, mappedlength, "r");
- InputStream is = file.getInputStream();
- return createLargeBitmap(is, isShareable);
- }
return nativeCreateLargeBitmap(fd, isShareable);
}