GskCanvas.drawBitmap(): reuse GdkTexture objects

This commit is contained in:
Julian Winkler
2024-05-25 23:57:31 +02:00
committed by Mis012
parent 6f02565920
commit e8eabb2027
11 changed files with 44 additions and 49 deletions

View File

@@ -25,7 +25,7 @@ public class BitmapDrawable extends Drawable {
public BitmapDrawable(Resources res, Bitmap bitmap) {
this.bitmap = bitmap;
this.paintable = native_paintable_from_pixbuf(bitmap.pixbuf);
this.paintable = bitmap.getTexture();
}
public Bitmap getBitmap() {
@@ -40,6 +40,4 @@ public class BitmapDrawable extends Drawable {
}
a.recycle();
}
static native long native_paintable_from_pixbuf(long pixbuf);
}