Closed Bug 1431028 Opened 2 years ago Closed 2 years ago

Don't discard the back buffer in ClientSingleTiledLayerBuffer


(Core :: Graphics: Layers, enhancement)

Not set



Tracking Status
firefox59 --- fixed


(Reporter: jerry, Assigned: jerry)


(Blocks 1 open bug)



(2 files)

When we play the full-screen video from , the video's progress bar will change the width every frame.

Gecko uses single tiled layer for the progress bar. If the buffer doesn't have an intermediate buffer, it will be discarded at the end of painting[1].
Then, gecko needs to allocate a new buffer again at the next frame.

Here is the profile data to show the heavy task at content side.

And this profile skip the buffer discarding.

Blocks: 1383292
We should only show the warning message when we have the on-white buffer.

MozReview-Commit-ID: 4gzo0reYIVL
Attachment #8943179 - Flags: review?(matt.woodrow)
Comment on attachment 8943180 [details] [diff] [review]
don't discard the back buffer in ClientSingleTiledLayerBuffer.

I don't know why we need to discard the back buffer. If we have the changes in next frame, we will need to allocate the buffer again. In comment 0, there is a case that will change the single tile layer's content. The profile data shows that it spends a lot of time for buffer allocation and repainting. If we skip the discarding for "non-intermediate" buffer, the profile looks better. This change might increase the memory usage.
Attachment #8943180 - Flags: review?(matt.woodrow)
Attachment #8943179 - Flags: review?(matt.woodrow) → review+
Attachment #8943180 - Flags: review?(matt.woodrow) → review+
Pushed by
Don't discard the back buffer in ClientSingleTiledLayerBuffer. r=mattwoodrow
Move the gfx warning to the correct position. r=mattwoodrow
Keywords: checkin-needed
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.