Closed Bug 1255448 Opened 6 years ago Closed 6 years ago

ClientMultiTiledLayerBuffer does not free tiles as it is scrolled out of display port


(Core :: Graphics: Layers, defect)

Not set



Tracking Status
firefox48 --- fixed


(Reporter: jnicol, Assigned: jnicol)



(1 file)

We only call ClientMultiTiledLayerBuffer::PaintThebes() if we have a non-empty region to paint. This means that ClientMultiTiledLayerBuffer::Update--where we calculate which tiles are valid, then allocate or free tiles as required--does not get called unless we paint something.

As a layer gets scrolled out of the displayport ideally we would free its tiles which are not in use. However, typically no new painting will be required as it is scrolled, so we end up keeping the tiles around forever (or until it scrolls back in to the display port.)

Requiring PaintThebes to be called even when the region is empty perhaps seems a bit odd, but is I believe the simplest solution to this.
Remove early return for empty invalid regions from
ClientTiledPaintedLayer::RenderHighPrecision so that
ClientMultiTiledLayerBuffer::PaintThebes is called even when the region
to paint is empty. This ensures that the tile buffer will free unused
tiles in cases where no new painting is required but the valid region
has shrunk.

Add replacement early returns into ClientMultiTiledLayerBuffer to avoid
as much needless work as possible while still recalculating which tiles
are valid.

Review commit:
See other reviews:
Attachment #8729209 - Flags: review?(matt.woodrow)
Comment on attachment 8729209 [details]
MozReview Request: Bug 1255448 - Call ClientMultiTiledLayerBuffer::PaintThebes even when region to paint is empty. r?mattwoodrow
Attachment #8729209 - Flags: review?(matt.woodrow) → review+
only affects OS X and android. try run:

for some reason that got stuck with some of the android jobs still pending, so this too:

requesting checkin please.
Oops, didn't set the flag
Keywords: checkin-needed
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.