Closed Bug 793656 Opened 7 years ago Closed 7 years ago

Progressive tile upload causes flickering when invalidating

Categories

(Core :: Graphics: Layers, defect)

ARM
Android
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: cwiiis, Assigned: cwiiis)

References

Details

Attachments

(1 file)

If you enable progressive tile upload (via layers.progressive-paint), newly invalidated areas will flicker before being updated.
This fixes the flickering by:

1- When the resolution changes, force a single transaction
2- When updating, keep a hold of tiles within the visible region.

There was code that I think attempted this there before, but was incomplete - I've simplified it somewhat (I hope).
Attachment #664032 - Flags: review?(bgirard)
(In reply to Chris Lord [:cwiiis] from comment #1)
> 1- When the resolution changes, force a single transaction

For this patch I think I'm ok with this (it's much better then discarding everything and having stuff appear tile by tile). In the long run I would like to improve this.

Option 1) Discard the buffer at the wrong res and draw progressively (Current) (+ No big upload jank, + show update progressively, - old content disappear and leaves a hole)
Option 2) Wait until the full paint comes in (Your patch) ( + Old content doesn't disappear and leave a hole, - upload jank, - not progressive)
Option 3) Snapshot the current tile buffer which will effectively keep the textures around. We can keep drawing the old buffer while we progressively draw the new size buffer. This means we get the best of both options while temporarily using more memory.
Comment on attachment 664032 [details] [diff] [review]
Fix flickering during progressive tile updates

Review of attachment 664032 [details] [diff] [review]:
-----------------------------------------------------------------

Nice, it's a big simplification of my code!
Attachment #664032 - Flags: review?(bgirard) → review+
(In reply to Benoit Girard (:BenWa) from comment #2)
> (In reply to Chris Lord [:cwiiis] from comment #1)
> > 1- When the resolution changes, force a single transaction
> 
> For this patch I think I'm ok with this (it's much better then discarding
> everything and having stuff appear tile by tile). In the long run I would
> like to improve this.
> 
> Option 1) Discard the buffer at the wrong res and draw progressively
> (Current) (+ No big upload jank, + show update progressively, - old content
> disappear and leaves a hole)
> Option 2) Wait until the full paint comes in (Your patch) ( + Old content
> doesn't disappear and leave a hole, - upload jank, - not progressive)
> Option 3) Snapshot the current tile buffer which will effectively keep the
> textures around. We can keep drawing the old buffer while we progressively
> draw the new size buffer. This means we get the best of both options while
> temporarily using more memory.

Plus one for Option 3 - with the possibility of doing cross-fades too :) I think Option 2 will do temporarily - shame about the jank, but we have this problem already so at least it isn't a regression.

Pushed patch to inbound:

https://hg.mozilla.org/integration/mozilla-inbound/rev/1ae26e279e17
https://hg.mozilla.org/mozilla-central/rev/1ae26e279e17
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Blocks: 795259
You need to log in before you can comment on or make changes to this bug.