Closed Bug 1675159 Opened 4 years ago Closed 4 years ago

Implement Draw / partial present compositor in terms of native compositor interface

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: gw, Assigned: gw)

References

Details

Attachments

(2 files)

No description provided.

This will simplify much of the picture cache code, and is also a way to expose partial present dirty rects to the native compositor interface (e.g. for swgl)

Blocks: 1674029

This is the ordering of relevant parts of the draw / native compositor code paths in the current implementation (reference for porting draw -> native):

new:
    get_capabilities

render_impl:
    (if compositor changed)
        destroy_surface
        enable_native_compositor

    update_native_surfaces
        create_external_surface
        attach_external_image
        create_surface
        destroy_surface
        create_tile
        destroy_tile

    begin_frame

    draw_frame
        invalidate_tile

        composite_native
            add_surface[]
            start_compositing

        passes[]
            main
                composite_simple
                    get_buffer_age
                    set_buffer_damage_region
            offscreen
                bind
                unbind

    bind_debug_overlay
    unbind_debug_overlay

    end_frame

deinit:
    destroy_surface
    deinit

Implementing the Draw compositor via the native compositor interface
is simpler if the buffer age is passed into the top level render method.

Assignee: nobody → gwatson
Status: NEW → ASSIGNED

Move the calculation of the dirty rects array earlier in frame
drawing, and supply that to the start_compositing method of
the compositor trait.

For now, it's assumed that the native compositor wants a single
dirty rect, and doesn't use buffer-age functionality. These
params will be configurable as part of the compositor capabilities
struct in follow up patches.

Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/644505d8afbb Pt 1 - Pass `buffer_age` via `render` rather than callback. r=jnicol

Discussed in the sheriffs channel that I think these are unrelated, so will try to reland. Looks similar to a preexisting https://bugzilla.mozilla.org/show_bug.cgi?id=1673742, perhaps random timing changes make it more likely with this patch.

Flags: needinfo?(gwatson)
Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/33fbbff5e725 Pt 1 - Pass `buffer_age` via `render` rather than callback. r=jnicol

Dave: Can you please take a look at the failures in comment 6 and 7?

Flags: needinfo?(dtownsend)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93e746226b8f Pt 2 - Expose dirty rects to start_compositing. r=sotaro

Looks like this is no longer needed?

Flags: needinfo?(dtownsend)
See Also: → 1676474
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: