src/api-impl: use skia instead of cairo

Using the C API provided by SkiaSharp's skia fork instead of using cairo
significantly improves performance. The API is also closer to the android
Canvas API, which makes the implementation more straightforward.
This commit is contained in:
Mis012
2023-08-28 20:03:32 +02:00
parent 096919ec37
commit 1e47824a79
47 changed files with 3184 additions and 159 deletions

View File

@@ -23,21 +23,29 @@ JNIEXPORT void JNICALL Java_android_graphics_Canvas_native_1save
JNIEXPORT void JNICALL Java_android_graphics_Canvas_native_1restore
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: android_graphics_Canvas
* Method: native_drawRect
* Signature: (JFFFFJ)V
*/
JNIEXPORT void JNICALL Java_android_graphics_Canvas_native_1drawRect
(JNIEnv *, jclass, jlong, jfloat, jfloat, jfloat, jfloat, jlong);
/*
* Class: android_graphics_Canvas
* Method: native_drawLine
* Signature: (JJFFFFI)V
* Signature: (JJFFFFJ)V
*/
JNIEXPORT void JNICALL Java_android_graphics_Canvas_native_1drawLine
(JNIEnv *, jclass, jlong, jlong, jfloat, jfloat, jfloat, jfloat, jint);
(JNIEnv *, jclass, jlong, jlong, jfloat, jfloat, jfloat, jfloat, jlong);
/*
* Class: android_graphics_Canvas
* Method: native_drawBitmap
* Signature: (JJJFFFFFFLandroid/graphics/Paint;)V
* Signature: (JJJFFFFFFJ)V
*/
JNIEXPORT void JNICALL Java_android_graphics_Canvas_native_1drawBitmap
(JNIEnv *, jclass, jlong, jlong, jlong, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jobject);
(JNIEnv *, jclass, jlong, jlong, jlong, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jlong);
/*
* Class: android_graphics_Canvas