Only update tiles that intersect with the screen, and asynchronously update
invisible tiles over multiple subsequent frames. This has the effect of
spreading out non-critical texture-upload over time and removes some juddering
on devices that don't support gralloc.
This uses MultiTileLayer instead of SingleTileLayer for devices that don't have
gralloc support. This has the advantage of reduced memory usage due to less
wastage from power-of-two textures, and can be a performance boost due to slow
sub-image updates on some devices.
This adds a new layer type that uses multiple SingleTileLayer's to implement
tiled layer support. This also assumes a back-buffer that is tiled, so that
texture updates can remain fast (relatively speaking).
The lock on the software buffer was not being respected when destroying the
surface on screen rotation, meaning we could destroy it while Gecko was still
drawing to it. This would certainly cause a crash on rotation under the right
conditions. The same situation also occurred in
GeckoSoftwareLayerClient.getBitmap().
We also waited until the next redraw when freeing the old texture associated
with the surface. This had the effect of temporarily increasing the memory
usage (generally by either 4.5 or 9 megabytes). If memory pressure is high,
this could also cause a crash, though it is far less likely than the above case.
We only ever want to respond to the latest viewport sent, separate the
viewport change into its own event and remove all but the latest in the queue
when processing events.
Ensure that all public functions in PZC are always called from
the UI thread, so that internal variables are not mutated on
different threads. I also made animatedZoomTo private so that
it can't be inadvertently called from a non-UI thread outside
the class.
Since the geometryChanged function does nothing if the parameter passed
in is false, better to rename the function to be more indicative of
what it actually does, and remove all the resulting dead code.
The missing blend function was causing the default of GL_ONE,
GL_ZERO to take effect, making it look like alpha blending wasn't
working. It would start working once the 9-patch shadow was rendered
since that code sets the correct blend function. Fix this by
ensuring we set the blend function wherever we use blending.
This removes the hard-coded limit of 1024x2048 tile sizes, and allows for
arbitrary tile-sizes. It will still only allocate texture sizes in powers of
two, however. It replaces the tile size with a buffered-area size, which can be
re-allocated as the screen dimensions change.
This removes the hard-coded limit of 1024x2048 tile sizes, and allows for
arbitrary tile-sizes. It will still only allocate texture sizes in powers of
two, however. It replaces the tile size with a buffered-area size, which can be
re-allocated as the screen dimensions change.
Check more values in browser.js when updating the viewport, and restructure
the JSON conversion in Java so that it's easier to tell what value caused a
bad viewport if it comes from Java.
Some cleanup: ensure we abort and re-bounce the viewport
if the device is rotated during a double-tap zoom. Also
rename variables to be more appropriate
Scrollbars now have rounded endcaps, are a little smaller, and there
is a 1-pixel gap between the bar and the edge of the viewport. Just
generally making them look nicer.