Skip to content
  • Anatoly Trosinenko's avatar
    2ab858c6
    sdl: restore optimized redraw · 2ab858c6
    Anatoly Trosinenko authored
    
    
    The documentation on SDL_RenderPresent function states that
    "the backbuffer should be considered invalidated after each present",
    so copy the entire texture on each redraw.
    
    On the other hand, SDL_UpdateTexture function is described as
    "fairly slow function", so restrict it to just the changed pixels.
    
    Also added SDL_RenderClear call, as suggested in the documentation
    page on SDL_RenderPresent.
    
    Signed-off-by: default avatarAnatoly Trosinenko <anatoly.trosinenko@gmail.com>
    Message-id: 20180205133228.25082-1-anatoly.trosinenko@gmail.com
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    2ab858c6
    sdl: restore optimized redraw
    Anatoly Trosinenko authored
    
    
    The documentation on SDL_RenderPresent function states that
    "the backbuffer should be considered invalidated after each present",
    so copy the entire texture on each redraw.
    
    On the other hand, SDL_UpdateTexture function is described as
    "fairly slow function", so restrict it to just the changed pixels.
    
    Also added SDL_RenderClear call, as suggested in the documentation
    page on SDL_RenderPresent.
    
    Signed-off-by: default avatarAnatoly Trosinenko <anatoly.trosinenko@gmail.com>
    Message-id: 20180205133228.25082-1-anatoly.trosinenko@gmail.com
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Loading