Textures get deleted and recreated on resize

RESOLVED FIXED in Firefox 14

Status

()

RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: kats, Assigned: cwiiis)

Tracking

unspecified
Firefox 14
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking-fennec1.0 +)

Details

Attachments

(1 attachment)

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.
(Assignee)

Updated

7 years ago
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.
(Assignee)

Comment 3

7 years ago
Created attachment 608433 [details] [diff] [review]
Reuse tiles when resizing TiledTextureImage

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+
(Assignee)

Comment 5

7 years ago
(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.

Comment 7

7 years ago
https://hg.mozilla.org/mozilla-central/rev/14b05b24d1e5
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 14
You need to log in before you can comment on or make changes to this bug.