SDL_Flip slow on Android

Hi!

I just noticed that if you use SDL_FLIP_HORIZONTAL ion RenderCopyEx on Android the whole
drawing process takes a lot of time.
Like this:
SDL_RenderCopyEx(Game::renderer,tex,&src,&dest,NULL,NULL,SDL_FLIP_HORIZONTAL);

If I then after that use this:
SDL_RenderCopyEx(Game::renderer,tex,&src,&dest,NULL,NULL,SDL_FLIP_NONE);
it is still slow. Just like if there is a memory leak or something.

I had to go back to a SDL2.0.9-version from 2018-10-31 to get it to be fast again.

I have tried the latest Mercurial version but that is also slow.
I have no issues with this on ios, macos , switch etc.

Is this a well known bug?

1 Like

What happens if you add this:

SDL_SetHint(SDL_HINT_RENDER_BATCHING, "1");

Batching was added around that date and not enabled by default.

1 Like

If I use the latest official release and set that hint the speed is back on.
Really thank you.

However, in the latest Mercurial version, the SDL_HINT_RENDER_BATCHING is removed from the SDL_hints.h file.

Glad that worked. Iā€™m looking at the latest HG and the hint is there:

https://hg.libsdl.org/SDL/file/24883e864f7e/include/SDL_hints.h

You are correct. I must have missed that somehow

1 Like