Closed Bug 1951093 Opened 1 year ago Closed 1 year ago

Use synced rendering to layers

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

Use synced rendering to layers. Right now we use desynced surfaces which eats extra resources and may cause visual artifacts.

Flags: needinfo?(stransky)

The problem here is that we commit to parent surface (which is requested to promote child changes) in NativeLayerRootWayland::CommitToScreen() only.

So if we ask any layer for frame callback and then do commit in to layer/surface, we don't commit to NativeLayerRootWayland to promote the change and we're missing the frame callback then, as parrent is still pending the commit.

We may manage the frame callbacks globally somehow by NativeLayerRootWayland for all child layers.

No longer depends on: hdr-video-linux
Flags: needinfo?(stransky)
Assignee: nobody → stransky
Status: NEW → ASSIGNED
  • Rename IsEmulatedFrameCallbackPendingLocked() to HasEmulatedFrameCallbackLocked
  • Move HasEmulatedFrameCallbackLocked to RequestFrameCallbackLocked as it's used only there
  • Remove mBufferAttached check from HasEmulatedFrameCallbackLocked() - it's already at RequestFrameCallbackLocked()
  • Call frame callback handlers after RequestFrameCallbackLocked(). I allows to perform commit to parent surface from frame callback
    handler of child surface. That's needed for subsurface synced rendering when any wl_subsurface::commit is performed only when parent wl_surface
    is commited too.

  • Move mPersistentFrameCallbackHandlers / mOneTimeFrameCallbackHandlers check to RequestFrameCallbackLocked().

It ensures all layers are updated once when parent WaylandSurface is committed so we should see less visual artifacts
during resize / scrolling and so on.

Attachment #9469407 - Attachment description: Bug 1951093 [Wayland] Rename WaylandSurface::aLastFrameCallbackTime to aLastFrameCallbackTime::mLastFrameCallbackTime r?emilio → Bug 1951093 [Wayland] Rename WaylandSurface::aLastFrameCallbackTime to mLastFrameCallbackTime r?emilio
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/11f639848261 [Wayland] Remove frame callback force commit feature from WaylandSurface as it's not used r=emilio https://hg.mozilla.org/integration/autoland/rev/52d9deed7c7c [Wayland] Rework RequestFrameCallbackLocked r=emilio https://hg.mozilla.org/integration/autoland/rev/f52d62a1ed50 [Wayland] Rename WaylandSurface::aLastFrameCallbackTime to mLastFrameCallbackTime r=emilio https://hg.mozilla.org/integration/autoland/rev/4a17c43ba0b6 [Wayland] Call frame callback handlers after RequestFrameCallbackLocked() call r=emilio https://hg.mozilla.org/integration/autoland/rev/46fc6ddc0690 [Wauland] Use synced rendering to NativeLayerWayland surfaces r=emilio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: