|
After profiling, it turns out the Beam animation was mostly janky
because of the initial buffer allocations that take place in the
graphics driver. Modified both the animation and firefly
renderers to swap the buffers three times before drawing anything,
thereby making sure the buffers are allocated.
Do not scale the screenshot while rendering fireflies,
as that can cause jank as well.
Also modified the FireflyRenderer to keep most of its state alive
between subsequent Beams, causing it to come up faster.
Cleaned up some old code and added documentation.
Change-Id: Ica231861dd7ede178ad2ec1ab09aa00d1c876624
|