Hidden method to get a graphic buffer from a hardware bitmap
Test: locally tested Bitmap.getGraphicBuffer() bug:30999911 Change-Id: I68d56d769045bada6a5db90ed884a570c49be4fd
This commit is contained in:
@ -1746,6 +1746,15 @@ public final class Bitmap implements Parcelable {
|
||||
nativePrepareToDraw(mNativePtr);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return {@link GraphicBuffer} which is internally used by hardware bitmap
|
||||
* @hide
|
||||
*/
|
||||
public GraphicBuffer createGraphicBufferHandle() {
|
||||
return nativeCreateGraphicBufferHandle(mNativePtr);
|
||||
}
|
||||
|
||||
//////////// native methods
|
||||
|
||||
private static native Bitmap nativeCreate(int[] colors, int offset,
|
||||
@ -1806,4 +1815,5 @@ public final class Bitmap implements Parcelable {
|
||||
private static native int nativeGetAllocationByteCount(long nativeBitmap);
|
||||
private static native Bitmap nativeCopyPreserveInternalConfig(long nativeBitmap);
|
||||
private static native Bitmap nativeCreateHardwareBitmap(GraphicBuffer buffer);
|
||||
private static native GraphicBuffer nativeCreateGraphicBufferHandle(long nativeBitmap);
|
||||
}
|
||||
|
Reference in New Issue
Block a user