Open Bug 2064944 Opened 2 months ago Updated 23 hours ago

Refactor NativeLayerWaylandRender surface management methods to a helper class

Categories

(Core :: Graphics: WebRender, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: bradwerth, Assigned: bradwerth, NeedInfo)

References

(Blocks 2 open bugs)

Details

Attachments

(3 external files)

NativeLayer defines some surface API which has platform-specific overrides. NativeLayerWaylandRender is one such override class which is used for non-video surfaces on Wayland. The Wayland GPU process needs an implementation that does almost all of this work, and also handles video surfaces via an implementation of the AttachExternalImage method, and also packages up these calls as commands to send to the parent process over IPC. To help this along, split the surface handling methods in NativeLayerWaylandRender into a helper class that can be used as a composition object on both the parent and GPU processes.

A null lock indicates that the buffers are presented by another process,
so their usage is tracked with the DMABuf global reference counter
instead of Wayland buffer release events. Existing callers pass their
lock by pointer, so behavior is unchanged for them.

Attachment #9628632 - Attachment description: WIP: Bug 2064944 Part 1: Refactor NativeLayerWayland into a helper class for surface management. → Bug 2064944 Part 2: Refactor NativeLayerWayland into a helper class for surface management.
Attachment #9628643 - Attachment description: WIP: Bug 2064944 Part 2: Make NativeLayerWaylandRender use the surface helper class. → Bug 2064944 Part 3: Make NativeLayerWaylandRender use the surface helper class.
Pushed by bwerth@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6dc014a24fbb https://hg.mozilla.org/integration/autoland/rev/708d495fc51b Part 1: Make SurfacePoolWayland accept a nullable WaylandSurfaceLock. r=gfx-reviewers,ahale https://github.com/mozilla-firefox/firefox/commit/271644a7c76e https://hg.mozilla.org/integration/autoland/rev/ff7f736e257a Part 2: Refactor NativeLayerWayland into a helper class for surface management. r=gfx-reviewers,ahale https://github.com/mozilla-firefox/firefox/commit/bc158a9432a4 https://hg.mozilla.org/integration/autoland/rev/89d52353864a Part 3: Make NativeLayerWaylandRender use the surface helper class. r=gfx-reviewers,ahale
Pushed by ctuns@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/98bddef2a90f https://hg.mozilla.org/integration/autoland/rev/ebeddb8734cd Revert "Bug 2064944 Part 3: Make NativeLayerWaylandRender use the surface helper class. r=gfx-reviewers,ahale" for causing build bustages in NativeLayerWaylandSurfaceHandler.cpp

Backed out for causing build bustages

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: /builds/worker/checkouts/gecko/gfx/layers/NativeLayerWaylandSurfaceHandler.cpp:X:9: error: no member named 'RenderThread' in namespace 'mozilla::wr'
Flags: needinfo?(bwerth)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: