forked from hex007/freej2me
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PlatformImage: Use even faster transforms.
Instead of using get/setDataElements to handle pixel data, use the image's dataBuffers for even faster manipulations, since now we are handling handling them directly into the data arrays themselves without the get/setDataElement middlemen, resulting in lower overhead. TRANS_MIRROR now also uses less cycles to compute by only iterating on half of the image's width (as we can assign two pixels here from the edges to the center). And calculations that don't change on each inner loop (for transforms that need an inner loop) are cached on the outer loop and reused in there for less calculation steps overall. In more intense scenes (and with my 8250U locked to 800MHz), Sonic 2 Crash is now running around 2x faster in Java 8 going from 6fps to its usual 12fps, making it perfectly playable even on such a low performance state.
- Loading branch information
1 parent
f294a95
commit 8607ad5
Showing
1 changed file
with
35 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters