The backingstore had a working split between front and back state, but it was multilayered and hard to grasp. The commit below cleanly divides the responsibilities of BackingStoreGeometry and TileBuffer, with the latter now being able to function on its own without the help of its geometry. The BackingStoreTile class was an unnecessary middleman and can be removed wholesale. A BackingStoreGeometry can now function with null tiles being assigned to its indices, which enables us to reclaim tile buffers outside of the visible contents area as back buffers. This reduces the need to swap and block when the backingstore size exceeds the contents size, and also lets us use more tiles for initial rendering after a call to resetTiles() which is now implemented as swapping in a geometry with only null buffers. setBackingStoreRect() was the only function that had to get an actual change of behavior. Because we're now constructing new BackingStoreGeometry objects every time the front geometry is being exchanged for a new one, it is only safe to call other functions reliant on the new geometry after it has been finalized and put in place. Therefore, updateTilesForScrollOrNotRenderedRegion() takes on the render queue maintenance tasks that setBackingStoreRect() had performed previously. It was already doing something very similar so only few changes to the function were necessary.
Created attachment 177324 [details] Patch I reused the commit message as bug description, you don't have to read it again. This patch is also tracked as part of RIM PR 253496.
Comment on attachment 177324 [details] Patch r+ based on the fact it was reviewed by Adam and Arvid :)
Comment on attachment 177324 [details] Patch Clearing flags on attachment: 177324 Committed r136442: <http://trac.webkit.org/changeset/136442>
All reviewed patches have been landed. Closing bug.