static jboolean android_view_ThreadedRenderer_pauseSurface(JNIEnv* env, jobject clazz, jlong proxyPtr, jobject jsurface) { RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr); sp<ANativeWindow> window; if (jsurface) { window = android_view_Surface_getNativeWindow(env, jsurface); } return proxy->pauseSurface(window); }