You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2020. It is now read-only.
The framebuffer divides the whole area into square blocks (or rectangular if they happen to be on the right/bottom edge), and assigns something called "dirtiness" to each of them. It's incremented if a cell in the block gets dirty (changed since the last flush). The flush method iterates over the blocks, skipping those whose dirtiness is 0 (meaning they didn't change since the last flush at all), and compiles instructions to render changes in each of them.
Well, at the no-blocks branch, I tried to remove the concept of blocks and operate over the whole area. I had to get rid of fills as well, unfortunately. (If the branch is merged, we will probably need some code that finds the rectangles to gpu.fill. Or we could leave it as is. I don't know.)
The effect of this change was a little suprising to me. The code got cleaner.
...
I mean, the master version flushes in 1.6 seconds on my emulator; the no-blocks version manages to bring it down to 0.9 s or so. Therefore, I think I'll merge this branch as soon as we compare the perfomance on an in-game computer. In the meanwhile I need to find a way to convince myself that we can do without fills for some time.
The no-blocks edition is indeed faster than no-no-blocks: 0.45s -> 0.35s on the latest OC. So I've merged the branch to master. Now I need to get rid of duplicate code... and, yet again, try to improve the perfomance.
The
Framebuffer:flush
is too slow, and we basically need to make it faster.The text was updated successfully, but these errors were encountered: