Skip to content

[SDL2] function call bottleneck #39

@daltomi

Description

@daltomi

OSDEP_UpdateRect(vga,0,0,vga_an,vga_al);
if(SDL_MUSTLOCK(vga))
SDL_UnlockSurface(vga);
OSDEP_Flip(vga);

The problem is that the function OSDEP_UpdateRect only does internally is call OSDEP_Flip, so hare the function is being called 2 times. See: src/shared/osdep/osd_sdl2.c , branch: master

Maybe in modern computers the speed drop is not noticeable but mine is. Moving the windows or the mouse cursor is noticeable slower.

Proposal: A conditional guard should exist for the SDL2 implementation to only call one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions