Closed Bug 737434 Opened 12 years ago Closed 12 years ago

Textures get deleted and recreated on resize

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(blocking-fennec1.0 +)

RESOLVED FIXED
Firefox 14
Tracking Status
blocking-fennec1.0 --- +

People

(Reporter: kats, Assigned: cwiiis)

References

Details

Attachments

(1 file)

As per IRC conversation, TiledTextureImage deletes and re-creates textures even when the display port shrinks on one axis while staying the same size on the other axis. This is bad, as it should be able to reuse the textures.
blocking-fennec1.0: --- → ?
blocking-fennec1.0: ? → +
How will this be affected by your buffer tiling work, Benoit? As a lion affects a steak?
The new TiledThebesLayer will keep any retain tiles, regardless of how the effective visible region change. This is one of the key design criteria.
Reuse tiles instead of throwing them away when a TiledTextureImage is resized.
Attachment #608433 - Flags: review?(bgirard)
Comment on attachment 608433 [details] [diff] [review]
Reuse tiles when resizing TiledTextureImage

Looks good to me, I haven't checked the algorithm myself since it's fairly involved.

What I will be doing in the new TiledThebesLayer is this and feels much simpler:
I will take the new region and check if it intersects with each of the existing tile rect and throw away the tile. Then after I will insert any missing tile.
Attachment #608433 - Flags: review?(bgirard) → review+
(In reply to Benoit Girard (:BenWa) from comment #4)
> Comment on attachment 608433 [details] [diff] [review]
> Reuse tiles when resizing TiledTextureImage
> 
> Looks good to me, I haven't checked the algorithm myself since it's fairly
> involved.
> 
> What I will be doing in the new TiledThebesLayer is this and feels much
> simpler:
> I will take the new region and check if it intersects with each of the
> existing tile rect and throw away the tile. Then after I will insert any
> missing tile.

It would probably read simpler to compare the tile-rect with the existing tile rect and replace if they differ, rather than how I've done it in this patch, though it would be more computation. Seeing as it's being replaced anyway and I feel I've documented it reasonably well, I'm going to leave it as is.
Depends on: 738740
https://hg.mozilla.org/mozilla-central/rev/14b05b24d1e5
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 14
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: