fix(ci): restore sanity checks
This commit is contained in:
@@ -298,8 +298,8 @@ JNIEXPORT jobject JNICALL Java_com_edde746_plezy_libass_AssRender_nativeAssRende
|
||||
const jboolean hasOutput = imageListHasOutput(image) ? JNI_TRUE : JNI_FALSE;
|
||||
if (tAss - t0 > 40) {
|
||||
__android_log_print(
|
||||
ANDROID_LOG_WARN, LOG_TAG, "slow render t=%lldms: ass=%lldms (changed=%d, hasOutput=%d)",
|
||||
(long long)time, tAss - t0, changed, hasOutput == JNI_TRUE);
|
||||
ANDROID_LOG_WARN, LOG_TAG, "slow render t=%lldms: ass=%lldms (changed=%d, hasOutput=%d)", (long long)time,
|
||||
tAss - t0, changed, hasOutput == JNI_TRUE);
|
||||
}
|
||||
return (*env)->NewObject(env, atlasFrameClass, ctor, 0, 0, 0, changed, 0, hasOutput);
|
||||
}
|
||||
@@ -569,8 +569,7 @@ static EGLint gFtPresentName = EGL_DISPLAY_PRESENT_TIME_ANDROID;
|
||||
// Probes the extension on the currently-current draw surface and enables capture.
|
||||
// Re-resolves the display/surface each call so surface recreation is handled.
|
||||
// Returns one of the FT_* codes above.
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_com_edde746_plezy_libass_AssFrameTimestamps_nativeInit(JNIEnv* env, jclass clazz) {
|
||||
JNIEXPORT jint JNICALL Java_com_edde746_plezy_libass_AssFrameTimestamps_nativeInit(JNIEnv* env, jclass clazz) {
|
||||
gFtSurface = EGL_NO_SURFACE;
|
||||
EGLDisplay dpy = eglGetCurrentDisplay();
|
||||
EGLSurface surf = eglGetCurrentSurface(EGL_DRAW);
|
||||
@@ -632,8 +631,7 @@ Java_com_edde746_plezy_libass_AssFrameTimestamps_nativeGetNextFrameId(JNIEnv* en
|
||||
// Present (or composition) time for frameId (System.nanoTime() domain), or the
|
||||
// PENDING(-2)/INVALID(-1) sentinels. Reported a few frames after the swap.
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_com_edde746_plezy_libass_AssFrameTimestamps_nativeGetDisplayPresentTime(
|
||||
JNIEnv* env, jclass clazz, jlong frameId) {
|
||||
Java_com_edde746_plezy_libass_AssFrameTimestamps_nativeGetDisplayPresentTime(JNIEnv* env, jclass clazz, jlong frameId) {
|
||||
if (pEglGetFrameTimestamps == NULL || gFtSurface == EGL_NO_SURFACE) return EGL_TIMESTAMP_INVALID_ANDROID;
|
||||
const EGLint names[1] = {gFtPresentName};
|
||||
EGLnsecsANDROID values[1] = {0};
|
||||
|
||||
@@ -67,8 +67,7 @@ static int64_t readFenceTimeNs(int fd, int* outStatus) {
|
||||
if (ioctl(fd, SYNC_IOC_FILE_INFO, &probe) < 0) return -1;
|
||||
*outStatus = probe.status;
|
||||
if (probe.status != 1 || probe.num_fences == 0) return -1;
|
||||
struct stp_fence_info* arr =
|
||||
(struct stp_fence_info*)calloc(probe.num_fences, sizeof(struct stp_fence_info));
|
||||
struct stp_fence_info* arr = (struct stp_fence_info*)calloc(probe.num_fences, sizeof(struct stp_fence_info));
|
||||
if (!arr) return -1;
|
||||
struct stp_file_info req;
|
||||
memset(&req, 0, sizeof(req));
|
||||
@@ -118,10 +117,7 @@ static int resolveSc(void) {
|
||||
p_getControls = (pf_getControls)dlsym(h, "ASurfaceTransactionStats_getASurfaceControls");
|
||||
p_prevRelease = (pf_prevRelease)dlsym(h, "ASurfaceTransactionStats_getPreviousReleaseFenceFd");
|
||||
p_releaseControls = (pf_releaseControls)dlsym(h, "ASurfaceTransactionStats_releaseASurfaceControls");
|
||||
gScOk = (p_fromJava && p_setOnComplete && p_latchTime && p_getControls && p_prevRelease &&
|
||||
p_releaseControls)
|
||||
? 1
|
||||
: 0;
|
||||
gScOk = (p_fromJava && p_setOnComplete && p_latchTime && p_getControls && p_prevRelease && p_releaseControls) ? 1 : 0;
|
||||
return gScOk;
|
||||
}
|
||||
|
||||
@@ -143,12 +139,12 @@ static int64_t nowMonoNs(void) {
|
||||
return (int64_t)ts.tv_sec * 1000000000LL + ts.tv_nsec;
|
||||
}
|
||||
|
||||
static void reportResult(JNIEnv* env, int64_t tag, int64_t latchNs, int64_t releaseNs, int count,
|
||||
int fenceState, int source, int64_t cbNs) {
|
||||
static void reportResult(
|
||||
JNIEnv* env, int64_t tag, int64_t latchNs, int64_t releaseNs, int count, int fenceState, int source, int64_t cbNs) {
|
||||
if (!env || !gProbeClass || !gOnResult) return;
|
||||
(*env)->CallStaticVoidMethod(env, gProbeClass, gOnResult, (jlong)tag, (jlong)latchNs,
|
||||
(jlong)releaseNs, (jint)count, (jint)fenceState, (jint)source,
|
||||
(jlong)cbNs);
|
||||
(*env)->CallStaticVoidMethod(
|
||||
env, gProbeClass, gOnResult, (jlong)tag, (jlong)latchNs, (jlong)releaseNs, (jint)count, (jint)fenceState,
|
||||
(jint)source, (jlong)cbNs);
|
||||
if ((*env)->ExceptionCheck(env)) (*env)->ExceptionClear(env);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user