Closed Bug 1583732 Opened 4 months ago Closed 3 months ago

[Wayland] Don't use dmabuf wayland buffer for partial screen updates

Categories

(Core :: Widget: Gtk, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 4 obsolete files)

Dmabuf wayland buffer in basic compositor should be used for fullscreen (whole buffer) updates only (if even).

Assignee: nobody → stransky

Don't use GetWaylandBufferToDraw() method to get/create wayland buffer
but split it to smaller methods:

GetPartialWaylandBuffer() - get wayland bufer for partial screen update
GetFullScreenWaylandBuffer() - get wayland buffer for fullscreen update, buffer
can be switched/changed.

SetNewWaylandBuffer() - changes active wayland buffer or create a new one.

Depends on D47890

When CACHE_MISSING image cache is selected we draw directly to wayland buffer if it's available
and cache drawing when wayland buffer is missing only. That produces flickering when small buffer parts are
sent to compositor early and the buffer is blocked for further rendering.

This patch enables direct rendering of bigger screen parts only (like page scrolling) to eliminate small
buffer updates.

Depends on D47891

  • Use two sets of wayland buffers (shm and dmabuf) and use dmabuf for fullscreen updates only
    when dmabuf is enabled.

  • Fix buffered rendering, disable direct rendering for CACHE_ALL

  • Rename GetFullScreenWaylandBuffer() to GetWaylandBufferWithSwitch() and
    GetPartialWaylandBuffer() to GetWaylandBufferRecent() to better reflect
    actual roles.

Depends on D47892

Add IsDMABufBuffer identification to WindowBackBuffer

Use two sets of wayland buffers (shm and dmabuf) and use dmabuf for fullscreen updates only
when dmabuf is enabled.

Don't use GetWaylandBufferToDraw() method to get/create wayland buffer
but split it to smaller methods:

GetPartialWaylandBuffer() - get wayland bufer for partial screen update
GetFullScreenWaylandBuffer() - get wayland buffer for fullscreen update, buffer
can be switched/changed.

SetNewWaylandBuffer() - changes active wayland buffer or create a new one.

When CACHE_MISSING image cache is selected we draw directly to wayland buffer if it's available
and cache drawing when wayland buffer is missing only. That produces flickering when small buffer parts are
sent to compositor early and the buffer is blocked for further rendering.

This patch enables direct rendering of bigger screen parts only (like page scrolling) to eliminate small
buffer updates.

Rename GetFullScreenWaylandBuffer() to GetWaylandBufferWithSwitch() and
GetPartialWaylandBuffer() to GetWaylandBufferRecent() to better reflect
actual roles.

Attachment #9098214 - Attachment is obsolete: true
Attachment #9098213 - Attachment is obsolete: true
Attachment #9098212 - Attachment is obsolete: true
Attachment #9098211 - Attachment is obsolete: true
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/83c16dc95d13
[Wayland] Use DMABUF for fullscreen updates only, r=jhorak
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.