View: prevent redundant measuring for performance reasons

No need to remeasure or relayout when nothing has changed
This commit is contained in:
Julian Winkler
2023-10-28 22:38:43 +02:00
parent 4f9e672819
commit 3bdffe7ce9
4 changed files with 28 additions and 14 deletions

View File

@@ -117,6 +117,7 @@ void set_up_handle_cache(JNIEnv *env)
handle_cache.view.getScrollY = _METHOD(handle_cache.view.class, "getScrollY", "()I");
handle_cache.view.performClick = _METHOD(handle_cache.view.class, "performClick", "()Z");
handle_cache.view.onTouchEvent = _METHOD(handle_cache.view.class, "onTouchEvent", "(Landroid/view/MotionEvent;)Z");
handle_cache.view.layoutInternal = _METHOD(handle_cache.view.class, "layoutInternal", "(II)V");
handle_cache.asset_manager.class = _REF((*env)->FindClass(env, "android/content/res/AssetManager"));
handle_cache.asset_manager.extractFromAPK = _STATIC_METHOD(handle_cache.asset_manager.class, "extractFromAPK", "(Ljava/lang/String;Ljava/lang/String;)V");