author Sam Lantinga <>
Thu, 27 Jan 2011 14:45:06 -0800
changeset 5111 481dabb098ef
parent 4811 d79939f20c45
child 6251 3e8c673cad58
permissions -rw-r--r--
Improved timer implementation

The new timer model is formalized as using a separate thread to handle timer callbacks. This was the case on almost every platform before, but it's now a requirement, and simplifies the implementation and makes it perform consistently across platforms.

* Minimize timer thread blocking
* Dispatch timers as accurately as possible
* SDL_AddTimer() and SDL_RemoveTimer() are completely threadsafe
* SDL_RemoveTimer() doesn't crash with a timer that's expired or removed
     1 Eli Gottlieb's checklist for the GSOC shaped windows project.  Dated July 9, 2010.
     2 1. Enable proper linking of the X11 implementation and test it.
     3 --> Find the place in the build system for platform-specific linking flags.  STATUS: DONE
     4 --> Add a linker flag to bring in libXext.a. STATUS: DONE.
     5 2. Build the Win32 implementation of shaped-windows functionality.
     6 --> Add driver functions to the SDL_ShapeDriver in the Win32 driver's SDL_DisplayDevice at the proper point in the code.  STATUS: CHECK.
     7 --> Add a hook in the Windows resize-window code to call Win32_ResizeWindowShape().  STATUS: CHECK.
     8 --> Get the Windows code to build and run properly.  STATUS: IN PROGRESS.
     9 3. Enable building the testeyes program.
    10 --> Reprogram it to use the latest shaped-windows API.  STATUS: CHECK.
    11 --> Get it, along with the rest of the test suite in my branch, building successfully.  STATUS: DONE.
    12 --> Debug testeyes and the platform-specific shaped-window implementations in tandem.  STATUS: IN PROGRESS.
    13 4. Implement the SDL shaped-windows API for Mac OS X using Cocoa.  STATUS: IN PROGRESS
    14 --> Locate (once more) the API documentation for shaped windows under Cocoa.  STATUS: NEARLY FINISHED.
    15 --> Design and encode a version of SDL_ShapeData for Cocoa.  STATUS: IN PROGRESS.
    16 --> Write Cocoa_CreateShaper().  STATUS: MOSTLY DONE, AFAIK.
    17 --> Write Cocoa_ResizeWindowShape().  STATUS: DONE, AFAIK.
    18 --> Write Cocoa_SetWindowShape().  STATUS: IN PROGRESS.
    19 --> If necessary, implement functionality adjunct to SDL_CalculateShapeBitmap() for Cocoa usage.
    20 5. Use testeyes to debug all implementations. STATUS: SPRINT + 2.
    21 --> Debug Cocoa implementation.
    22 --> Debug Win32 implementation.
    23 --> Debug X11 implementation (again).
    25 1.3 release checklist:
    26  *
    28  * See why windows are being rearranged.  Is the shield window not up?
    29  * Make sure you can create and show a fullscreen window in one step
    30  * Figure out how to handle OpenGL context lost on Mac OS X (does it happen?)
    31  * Write automated test case for multi-draw APIs
    32  * Make sure you can build SDL without the renderer to slim it down a bunch
    33  * Implement assertion code on iPhone
    34  * Add __WINDOWS__ in addition to __WIN32__
    36  * Check 1.2 revisions:
    37 	3554 - Need to resolve semantics for locking keys on different platforms
    38 	4874 - Do we want screen rotation?  At what level?
    39 	4974 - Windows file code needs to convert UTF-8 to Unicode, but we don't need to tap dance for Windows 95/98
    40 	4484, 4485 - Verify that SDL's Windows keyboard handling works correctly
    41 	4865 - See if this is still needed (mouse coordinate clamping)
    42 	4866 - See if this is still needed (blocking window repositioning)