Bug 103924 - [BlackBerry] Refactor the backingstore to swap full geometries
Summary: [BlackBerry] Refactor the backingstore to swap full geometries
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jakob Petsovits
URL:
Keywords:
Depends on:
Blocks: 103930
  Show dependency treegraph
 
Reported: 2012-12-03 13:51 PST by Jakob Petsovits
Modified: 2012-12-03 15:09 PST (History)
1 user (show)

See Also:


Attachments
Patch (77.61 KB, patch)
2012-12-03 14:04 PST, Jakob Petsovits
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Petsovits 2012-12-03 13:51:41 PST
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.
Comment 1 Jakob Petsovits 2012-12-03 14:04:12 PST
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 2 Yong Li 2012-12-03 14:23:28 PST
Comment on attachment 177324 [details]
Patch

r+ based on the fact it was reviewed by Adam and Arvid :)
Comment 3 WebKit Review Bot 2012-12-03 15:08:56 PST
Comment on attachment 177324 [details]
Patch

Clearing flags on attachment: 177324

Committed r136442: <http://trac.webkit.org/changeset/136442>
Comment 4 WebKit Review Bot 2012-12-03 15:09:00 PST
All reviewed patches have been landed.  Closing bug.