Menu

Framerate Enhancement

One thing we noticed when cranking up the work-chunk size is this can delay receiving messages from the other tasks (threads), in particular the Framerate task.

Since we are running the surface view in demand mode, this is a matter of "asking" it to render more often, and let the GL thread deal with acquiring the update lock shared between the GameCycle task and the RenderService implementation. Recall that RenderService runs on the GL thread.

So now we are adding some checks in the GameCycle task itself to perform this, and this should increase the framerate. This checking is aided by some refactoring in TaskWithChannel to provide callbacks and timing of work-chunks. We are still testing this out.

Epilog: tried to actually eliminate the Framerate task, but this resulted in very inconsistent update rate; the Framerate task actually "smooths out" those bumps, by making sure there are regularly-occurring DRAW_FRAME messages in the GameCycle queue.

Posted by g-dollar 2014-12-30 Labels: info

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.