COPYING
author Ryan C. Gordon <icculus@icculus.org>
Wed, 06 Mar 2019 03:08:45 -0500
changeset 103 685c0014eda1
parent 46 2d9662c88cc3
permissions -rw-r--r--
Optimize dirty rectangle rendering.

Only push the video surface to a texture immediately when the app does
SDL_Flip() or SDL_UpdateRect(0,0,0,0). If it looks like dirty rectangle
rendering, only push when we're in a PumpEvents that's close to 60Hz, under
the assumption that the app isn't in the middle of rendering if they're
pumping the event queue, and that updates to the texture faster than the
refresh rate aren't seen anyhow.

This lets things that render a little in response to every mouse event, like
TuxPaint, run at reasonable speeds and still look correct.

This probably needs to not hardcode for 60Hz, but get the actual refresh rate
from SDL2.
icculus@0
     1
icculus@0
     2
Simple DirectMedia Layer
icculus@46
     3
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
icculus@0
     4
  
icculus@0
     5
This software is provided 'as-is', without any express or implied
icculus@0
     6
warranty.  In no event will the authors be held liable for any damages
icculus@0
     7
arising from the use of this software.
icculus@0
     8
icculus@0
     9
Permission is granted to anyone to use this software for any purpose,
icculus@0
    10
including commercial applications, and to alter it and redistribute it
icculus@0
    11
freely, subject to the following restrictions:
icculus@0
    12
  
icculus@0
    13
1. The origin of this software must not be misrepresented; you must not
icculus@0
    14
   claim that you wrote the original software. If you use this software
icculus@0
    15
   in a product, an acknowledgment in the product documentation would be
icculus@0
    16
   appreciated but is not required. 
icculus@0
    17
2. Altered source versions must be plainly marked as such, and must not be
icculus@0
    18
   misrepresented as being the original software.
icculus@0
    19
3. This notice may not be removed or altered from any source distribution.
icculus@0
    20