reimplement Bitmap and Path using GdkTexture and GskPath

This allows us to use GskCanvas for Bitmap rendering

This increases the required GTK version to >= 4.14.
This commit is contained in:
Julian Winkler
2024-12-19 20:20:40 +01:00
parent c076c1e545
commit cd2c69cf73
26 changed files with 498 additions and 3559 deletions

View File

@@ -20,8 +20,6 @@ public class ImageButton extends ImageView {
@Override
protected native long native_constructor(Context context, AttributeSet attrs);
@Override
protected native void native_setPixbuf(long widget, long pixbuf);
@Override
protected native void native_setDrawable(long widget, long paintable);
@Override
protected native void nativeSetOnClickListener(long widget);

View File

@@ -51,7 +51,7 @@ public class ImageView extends View {
return;
}
bitmap = BitmapFactory.decodeResource(Context.this_application.getResources(), resid);
native_setPixbuf(widget, bitmap.pixbuf);
native_setDrawable(widget, bitmap.getTexture());
}
public void setAdjustViewBounds(boolean adjustViewBounds) {}
@@ -84,7 +84,7 @@ public class ImageView extends View {
public void setImageBitmap(Bitmap bitmap) {
if (bitmap != null)
native_setPixbuf(widget, bitmap.pixbuf);
native_setDrawable(widget, bitmap.getTexture());
}
/**
@@ -184,7 +184,6 @@ public class ImageView extends View {
@Override
protected native long native_constructor(Context context, AttributeSet attrs);
protected native void native_setPixbuf(long widget, long pixbuf);
protected native void native_setDrawable(long widget, long paintable);
protected native void native_setScaleType(long widget, int scale_type);
}