14static jlong PathBuilder_Create(JNIEnv*
env, jobject) {
18static void PathBuilder_Release(JNIEnv*
env, jobject, jlong native_pathBuilder) {
22static void PathBuilder_MoveTo(JNIEnv*
env, jobject, jlong native_pathBuilder, jfloat
x, jfloat
y) {
23 if (
auto* pathBuilder =
reinterpret_cast<SkPathBuilder*
>(native_pathBuilder)) {
28static void PathBuilder_LineTo(JNIEnv*
env, jobject, jlong native_pathBuilder, jfloat
x, jfloat
y) {
29 if (
auto* pathBuilder =
reinterpret_cast<SkPathBuilder*
>(native_pathBuilder)) {
34static void PathBuilder_QuadTo(JNIEnv*
env, jobject, jlong native_pathBuilder, jfloat x1, jfloat y1, jfloat x2, jfloat y2) {
35 if (
auto* pathBuilder =
reinterpret_cast<SkPathBuilder*
>(native_pathBuilder)) {
36 pathBuilder->
quadTo(x1, y1, x2, y2);
40static void PathBuilder_ConicTo(JNIEnv*
env, jobject, jlong native_pathBuilder, jfloat x1, jfloat y1, jfloat x2, jfloat y2, jfloat
w) {
41 if (
auto* pathBuilder =
reinterpret_cast<SkPathBuilder*
>(native_pathBuilder)) {
42 pathBuilder->
conicTo(x1, y1, x2, y2,
w);
46static void PathBuilder_CubicTo(JNIEnv*
env, jobject, jlong native_pathBuilder, jfloat x1, jfloat y1,
48 jfloat x3, jfloat y3) {
49 if (
auto* pathBuilder =
reinterpret_cast<SkPathBuilder*
>(native_pathBuilder)) {
50 pathBuilder->
cubicTo(x1, y1, x2, y2, x3, y3);
54static void PathBuilder_Close(JNIEnv*
env, jobject, jlong native_pathBuilder) {
55 if (
auto* pathBuilder =
reinterpret_cast<SkPathBuilder*
>(native_pathBuilder)) {
60static void PathBuilder_SetFillType(JNIEnv*
env, jobject, jlong native_pathBuilder, jint fill) {
61 if (
auto* pathBuilder =
reinterpret_cast<SkPathBuilder*
>(native_pathBuilder)) {
79static jlong PathBuilder_MakePath(JNIEnv*
env, jobject, jlong native_pathBuilder) {
80 if (
auto* pathBuilder =
reinterpret_cast<SkPathBuilder*
>(native_pathBuilder)) {
82 return reinterpret_cast<jlong
>(
path);
91 static const JNINativeMethod methods[] = {
92 {
"nCreate" ,
"()J" ,
reinterpret_cast<void*
>(PathBuilder_Create)},
93 {
"nRelease" ,
"(J)V" ,
reinterpret_cast<void*
>(PathBuilder_Release)},
94 {
"nMoveTo" ,
"(JFF)V" ,
reinterpret_cast<void*
>(PathBuilder_MoveTo)},
95 {
"nLineTo" ,
"(JFF)V" ,
reinterpret_cast<void*
>(PathBuilder_LineTo)},
96 {
"nQuadTo" ,
"(JFFFF)V" ,
reinterpret_cast<void*
>(PathBuilder_QuadTo)},
97 {
"nConicTo" ,
"(JFFFFF)V" ,
reinterpret_cast<void*
>(PathBuilder_ConicTo)},
98 {
"nCubicTo" ,
"(JFFFFFF)V",
reinterpret_cast<void*
>(PathBuilder_CubicTo)},
99 {
"nClose" ,
"(J)V" ,
reinterpret_cast<void*
>(PathBuilder_Close)},
100 {
"nSetFillType" ,
"(JI)V" ,
reinterpret_cast<void*
>(PathBuilder_SetFillType)},
101 {
"nMake" ,
"(J)J" ,
reinterpret_cast<void*
>(PathBuilder_MakePath)},
104 const auto clazz =
env->FindClass(
"org/skia/jetski/PathBuilder");
106 ?
env->RegisterNatives(clazz, methods,
std::size(methods))
int register_jetski_PathBuilder(JNIEnv *env)
SkPathBuilder & conicTo(SkPoint pt1, SkPoint pt2, SkScalar w)
SkPathBuilder & lineTo(SkPoint pt)
SkPathBuilder & setFillType(SkPathFillType ft)
SkPathBuilder & cubicTo(SkPoint pt1, SkPoint pt2, SkPoint pt3)
SkPathBuilder & moveTo(SkPoint pt)
SkPathBuilder & quadTo(SkPoint pt1, SkPoint pt2)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size