You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
Bitmap: implement pixel buffer access
For GPU textures, the GdkTextureDownloader will take care of format conversions, so the application never sees the actual format. If the application calls AndroidBitmap_unlockPixels(), the texture is converted into a GdkMemoryTexture and can be accessed zero copy.
This commit is contained in:
@@ -71,6 +71,14 @@ JNIEXPORT jlong JNICALL Java_android_graphics_Bitmap_native_1ref_1texture
|
||||
JNIEXPORT void JNICALL Java_android_graphics_Bitmap_native_1get_1pixels
|
||||
(JNIEnv *, jclass, jlong, jintArray, jint, jint, jint, jint, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: android_graphics_Bitmap
|
||||
* Method: native_copy_to_buffer
|
||||
* Signature: (JLjava/nio/Buffer;II)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_graphics_Bitmap_native_1copy_1to_1buffer
|
||||
(JNIEnv *, jclass, jlong, jobject, jint, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user