Skip to content

Commit

Permalink
Removing unneeded function.
Browse files Browse the repository at this point in the history
  • Loading branch information
twaik committed Jan 5, 2025
1 parent 1aea677 commit 4427cf4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
5 changes: 4 additions & 1 deletion app/src/main/cpp/lorie/InitOutput.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,10 @@ static Bool lorieRedraw(__unused ClientPtr pClient, __unused void *closure) {
}

static CARD32 lorieFramecounter(unused OsTimerPtr timer, unused CARD32 time, unused void *arg) {
renderer_print_fps(5000);
if (pvfb->state->renderedFrames)
log(INFO, "%d frames in 5.0 seconds = %.1f FPS",
pvfb->state->renderedFrames, ((float) pvfb->state->renderedFrames) / 5);
pvfb->state->renderedFrames = 0;
return 5000;
}

Expand Down
10 changes: 0 additions & 10 deletions app/src/main/cpp/lorie/renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,16 +608,6 @@ __noreturn static void* renderer_thread(void* closure) {
pthread_mutex_unlock(&m);
}

void renderer_print_fps(float millis) {
if (!state)
return;

if (state->renderedFrames)
log("%d frames in %.1f seconds = %.1f FPS",
state->renderedFrames, millis / 1000, (float) state->renderedFrames * 1000 / millis);
state->renderedFrames = 0;
}

static GLuint load_shader(GLenum shaderType, const char* pSource) {
GLint compiled = 0, infoLen = 0;
GLuint shader = glCreateShader(shaderType);
Expand Down
1 change: 0 additions & 1 deletion app/src/main/cpp/lorie/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ __unused void renderer_test_capabilities(int* legacy_drawing, uint8_t* flip);
__unused void renderer_set_buffer(JNIEnv* env, LorieBuffer* buffer);
__unused void renderer_set_window(JNIEnv* env, jobject surface);
__unused void renderer_set_shared_state(struct lorie_shared_server_state* state);
__unused void renderer_print_fps(float millis);

0 comments on commit 4427cf4

Please sign in to comment.