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
GskCanavas: draw default content when custom View calls super.onDraw()
This commit is contained in:
@@ -89,3 +89,9 @@ JNIEXPORT jlong JNICALL Java_android_graphics_drawable_Drawable_native_1construc
|
||||
JNIEXPORT void JNICALL Java_android_graphics_drawable_Drawable_native_1invalidate(JNIEnv *env, jobject this, jlong paintable_ptr) {
|
||||
gdk_paintable_invalidate_contents(GDK_PAINTABLE(_PTR(paintable_ptr)));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_android_graphics_drawable_Drawable_native_1draw(JNIEnv *env, jobject this, jlong paintable_ptr, jlong snapshot_ptr, jint width, jint height) {
|
||||
GdkSnapshot *snapshot = (GdkSnapshot *)_PTR(snapshot_ptr);
|
||||
GdkPaintable *paintable = GDK_PAINTABLE(_PTR(paintable_ptr));
|
||||
gdk_paintable_snapshot(paintable, snapshot, width, height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user