forked from len0rd/rockbox
sdl: Keep texture around, upload LCD-parts only
No need to create a new texture for every rendered frame, unless the scaling method has been adjusted. We also don't need to upload the (unchanged) player interface to GPU memory repeatedly. + Remove unused lcd_display_redraw & having_new_lcd variables Change-Id: I5bff6aa2d54347a3f2c3afba8d8d7eb9e39f77f7
This commit is contained in:
parent
7aaa722a5d
commit
400452180d
8 changed files with 279 additions and 186 deletions
|
@ -31,7 +31,7 @@
|
|||
#include "backlight.h"
|
||||
#include "system.h"
|
||||
#include "button-sdl.h"
|
||||
#include "lcd-sdl.h"
|
||||
#include "window-sdl.h"
|
||||
#include "sim_tasks.h"
|
||||
#include "buttonmap.h"
|
||||
#include "debug.h"
|
||||
|
@ -243,7 +243,7 @@ static bool event_handler(SDL_Event *event)
|
|||
sdl_app_has_input_focus = 0;
|
||||
else if(event->window.event == SDL_WINDOWEVENT_RESIZED)
|
||||
{
|
||||
sdl_window_needs_update();
|
||||
sdl_window_adjustment_needed(false);
|
||||
#if !defined (__APPLE__) && !defined(__WIN32)
|
||||
static unsigned long last_tick;
|
||||
if (TIME_AFTER(current_tick, last_tick + HZ/20) && !button_queue_full())
|
||||
|
@ -370,7 +370,7 @@ static void button_event(int key, bool pressed)
|
|||
strcmp(SDL_GetHint(SDL_HINT_RENDER_SCALE_QUALITY) ?:
|
||||
"best", "best") ? "best": "nearest");
|
||||
|
||||
sdl_window_needs_update();
|
||||
sdl_window_adjustment_needed(!display_zoom);
|
||||
#if !defined(__WIN32) && !defined (__APPLE__)
|
||||
button_queue_post(SDLK_UNKNOWN, 0); /* update window on main thread */
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue