diff --git a/android/native/jni/Android.mk b/android/native/jni/Android.mk index 98c19e4840..a22cb7a625 100644 --- a/android/native/jni/Android.mk +++ b/android/native/jni/Android.mk @@ -1,6 +1,6 @@ RARCH_VERSION = "0.9.8-beta3" LOCAL_PATH := $(call my-dir) -PERF_TEST := 0 +PERF_TEST := 1 HAVE_NEON := 1 HAVE_SINC := 1 HAVE_LOGGER := 1 diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index bb91143538..28e7f1685f 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -272,6 +272,9 @@ static void android_input_poll(void *data) { (void)data; + RARCH_PERFORMANCE_INIT(input_poll); + RARCH_PERFORMANCE_START(input_poll); + struct android_app* android_app = g_android.app; g_extern.lifecycle_state &= ~((1ULL << RARCH_RESET) | (1ULL << RARCH_REWIND) | (1ULL << RARCH_FAST_FORWARD_KEY) | (1ULL << RARCH_FAST_FORWARD_HOLD_KEY) | (1ULL << RARCH_MUTE) | (1ULL << RARCH_SAVE_STATE_KEY) | (1ULL << RARCH_LOAD_STATE_KEY) | (1ULL << RARCH_STATE_SLOT_PLUS) | (1ULL << RARCH_STATE_SLOT_MINUS)); @@ -292,10 +295,8 @@ static void android_input_poll(void *data) i = state_device_ids[id] = pads_connected++; int motion_action = AMotionEvent_getAction(event); - int pointer_count = AMotionEvent_getPointerCount(event); bool motion_do = ((motion_action == AMOTION_EVENT_ACTION_DOWN) || (motion_action == - AMOTION_EVENT_ACTION_POINTER_DOWN) || (motion_action == AMOTION_EVENT_ACTION_MOVE) - && pointer_count); + AMOTION_EVENT_ACTION_POINTER_DOWN) || (motion_action == AMOTION_EVENT_ACTION_MOVE)); if(type == AINPUT_EVENT_TYPE_MOTION && motion_do) { @@ -343,6 +344,8 @@ static void android_input_poll(void *data) } AInputQueue_finishEvent(android_app->inputQueue, event, handled); } + + RARCH_PERFORMANCE_STOP(input_poll); } static int16_t android_input_state(void *data, const struct retro_keybind **binds, unsigned port, unsigned device, unsigned index, unsigned id) diff --git a/gfx/context/androidegl_ctx.c b/gfx/context/androidegl_ctx.c index 33d42ecd22..6bfbe260d3 100644 --- a/gfx/context/androidegl_ctx.c +++ b/gfx/context/androidegl_ctx.c @@ -216,6 +216,9 @@ static void gfx_ctx_check_window(bool *quit, *quit = false; *resize = false; + + RARCH_PERFORMANCE_INIT(alooper_pollonce); + RARCH_PERFORMANCE_START(alooper_pollonce); id = ALooper_pollOnce(0, NULL, 0, NULL); @@ -234,6 +237,8 @@ static void gfx_ctx_check_window(bool *quit, engine_handle_cmd(android_app, cmd); } + RARCH_PERFORMANCE_STOP(alooper_pollonce); + if (g_android.reinit_video) { uninit_drivers(); @@ -283,7 +288,7 @@ static void gfx_ctx_set_resize(unsigned width, unsigned height) static void gfx_ctx_update_window_title(bool reset) { (void)reset; -#ifdef PERF_TEST +#if 0 if (reset) gfx_window_title_reset();