Revert "archive: Use memfd instead"
* It sucks, seems simplify the conditions, but more syscalls are
made(read/seek/write), more context switch, futhermore AImageDecoder itself does support
read raw buffer, and we are not intend to support multi-process decoding
This reverts commit f4826ea727.
This commit is contained in:
1 parent
f4826ea727
commit
a0fe6f0d7d
6 files changed
+63
-25
No files matched your search
@@ -71,6 +71,14 @@ public final class Image {
|
||||
return newFromAddr(nativeDecodeFdInt(fd));
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode image from {@code InputStream}
|
||||
*/
|
||||
@Nullable
|
||||
public static Image decodeAddr(Long addr, boolean partially) {
|
||||
return newFromAddr(nativeDecodeAddr(addr));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a plain image from Bitmap
|
||||
*/
|
||||
@@ -91,6 +99,8 @@ public final class Image {
|
||||
|
||||
private static native long nativeDecodeFdInt(int fd);
|
||||
|
||||
private static native long nativeDecodeAddr(long addr);
|
||||
|
||||
private static native long nativeCreate(Bitmap bitmap);
|
||||
|
||||
private static native void nativeRender(long nativePtr,
|
||||
|
||||
Reference in new issue
Block a user