lp://staging/firefoxjpeg2000
- Get this branch:
- bzr branch lp://staging/firefoxjpeg2000
Branch information
Recent revisions
- 371. By Ben Karel
-
Fixes stutter when panning (non-animating) images.
Suppose the user is panning a very large image. Instead of rendering the
entire image to a huge buffer, smaller, more manageable buffer sizes are used.
In order to balance memory usage versus processing time, the buffers are sized
larger than the viewport. This allows us to pan around a limited amount without
needing to re-render the entire buffer for every pixel movement, which is much
too computationally expensive to be feasible.When the user pans close to the "edge" of one of these pre-rendered buffers,
the buffer must be re-rendered. Before this patch, re-rendering was done
synchronously on the UI thread in response to triggering mouse movements.
The problem is that doing so creates a regular and noticeable stutter during
continuous panning. When panning over a movie, the problem becomes much worse.A simple asynchronous update of the buffer contents was not quite right either.
Prior to this patch, there was no distinction between "the position of the
texture being drawn on the screen" and "the position of the texture currently
being processed." This makes sense only with synchronous updating of texture
contents. We would first update the position of the currently used texture,
then freeze the processing thread, call updateBuffer(), and resume processing.
Unfortunately, the next mouse movement was likely to come in before the
new texture is done rendering. When it did, the old texture would be drawn
at the new coordinates (for a frame or two), resulting in an ugly flash.Thus, this patch adds HVJ_Image:
:processing_ texture_ dims to complement
HVJ_Image::SegmentedTextu re::dims and allow seamless asynchronous image updates.
Branch metadata
- Branch format:
- Branch format 6
- Repository format:
- Bazaar pack repository format 1 (needs bzr 0.92)