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: regenerate GdkTexture when Canvas was used on the Bitmap
This commit is contained in:
@@ -158,3 +158,9 @@ JNIEXPORT void JNICALL Java_android_graphics_Bitmap_nativeCopyPixelsToBuffer(JNI
|
||||
memcpy(pixels, gdk_pixbuf_get_pixels(pixbuf), pixbuf_size);
|
||||
release_nio_buffer(env, array_ref, array);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_android_graphics_Bitmap_native_1unref_1texture(JNIEnv *env, jclass class, jlong texture_ptr)
|
||||
{
|
||||
GdkTexture *texture = GDK_TEXTURE(_PTR(texture_ptr));
|
||||
g_object_unref(texture);
|
||||
}
|
||||
|
||||
@@ -67,6 +67,14 @@ JNIEXPORT jlong JNICALL Java_android_graphics_Bitmap_native_1create
|
||||
JNIEXPORT jlong JNICALL Java_android_graphics_Bitmap_native_1paintable_1from_1pixbuf
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_graphics_Bitmap
|
||||
* Method: native_unref_texture
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_graphics_Bitmap_native_1unref_1texture
|
||||
(JNIEnv *, jclass, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_graphics_Bitmap
|
||||
* Method: nativeCopy
|
||||
|
||||
Reference in New Issue
Block a user