flowkey / UIKit-cross-platform

Cross-platform Swift implementation of UIKit, mostly for Android
MIT License
597 stars 40 forks source link

Clean up SDL.render and make the runloop run for less time #202

Closed ephemer closed 6 years ago

ephemer commented 6 years ago

Type of change: cleanup

Motivation

SDL.render for historical reasons was split into two parts. This has not been necessary for a long time. The newer code is easier to read and reason about and doesn't require passing around numbers between the various calls.

The functional change here is that we only run the runloop for half the remaining frame time (or 1ms minimum) instead of the entire remaining frame time. This gives us better rendering performance with no practical downsides.