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: pixbuf uses UNPREMUL_SK_ALPHATYPE
This commit is contained in:
@@ -13,8 +13,8 @@ void attach_sk_image(GdkPixbuf *pixbuf)
|
|||||||
sk_imageinfo_t info = {
|
sk_imageinfo_t info = {
|
||||||
.width = gdk_pixbuf_get_width(pixbuf),
|
.width = gdk_pixbuf_get_width(pixbuf),
|
||||||
.height = gdk_pixbuf_get_height(pixbuf),
|
.height = gdk_pixbuf_get_height(pixbuf),
|
||||||
.colorType = RGBA_8888_SK_COLORTYPE, // is this correct?
|
.colorType = RGBA_8888_SK_COLORTYPE,
|
||||||
.alphaType = PREMUL_SK_ALPHATYPE,
|
.alphaType = UNPREMUL_SK_ALPHATYPE,
|
||||||
};
|
};
|
||||||
|
|
||||||
void *pixbuf_pixels = gdk_pixbuf_get_pixels(pixbuf);
|
void *pixbuf_pixels = gdk_pixbuf_get_pixels(pixbuf);
|
||||||
@@ -116,7 +116,6 @@ JNIEXPORT jlong JNICALL Java_android_graphics_Bitmap_native_1copy(JNIEnv *env, j
|
|||||||
GdkPixbuf *src = _PTR(src_ptr);
|
GdkPixbuf *src = _PTR(src_ptr);
|
||||||
GdkPixbuf *copy = gdk_pixbuf_copy(src);
|
GdkPixbuf *copy = gdk_pixbuf_copy(src);
|
||||||
sk_image_t *image = g_object_get_data(G_OBJECT(src), "sk_image");
|
sk_image_t *image = g_object_get_data(G_OBJECT(src), "sk_image");
|
||||||
printf("native_copy: dbg: %p\n", image);
|
|
||||||
if(image)
|
if(image)
|
||||||
g_object_set_data(G_OBJECT(copy), "sk_image", sk_image_make_raster_image(image)); // probably?
|
g_object_set_data(G_OBJECT(copy), "sk_image", sk_image_make_raster_image(image)); // probably?
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user