Closed Bug 1597319 Opened 5 years ago Closed 5 years ago

Enable USE_FAST_PATH for more coordinate systems in WebRender clips

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: kvark, Assigned: kvark)

References

Details

Attachments

(1 file)

This is a follow up to bug 1535976 that is meant to improve cases like bug 1584794 (see point 1 in https://bugzilla.mozilla.org/show_bug.cgi?id=1584794#c17).

Current conditions for using the fast path are the following:

        if clip_spatial_node.coordinate_system_id == CoordinateSystemId::root() &&
           flags.contains(ClipNodeFlags::SAME_COORD_SYSTEM) &&
           node.item.kind.supports_fast_path_rendering() {
            flags |= ClipNodeFlags::USE_FAST_PATH;
        }

This we could do better:

  1. It seems to me that SAME_COORD_SYSTEM doesn't need to be checked here. The main benefit of the flag is using a faster shader. Clip rendering isn't concerned about where the target primitive is, it should only be concerned about where the clip is versus the rasterization/world space.
  2. The CoordinateSystemId::root() check is too conservative. Since sampling the mask is only concerned with 2D coordinates, we could check the actual 2D submatrix of the transform. In cases like bug 1535976, it would be identity, allowing for the fast path.

Note: this bug is only about the coordinate systems. There are other improvements possible to this condition.

Blocks: 1584794

I think the reasoning behind those checks is that the fast path skips edge AA, and ensuring both clip + primitive are in the root coordinate system is a (conservative?) way to ensure that no AA is required.

Assignee: nobody → dmalyshau
Status: NEW → ASSIGNED
Pushed by dmalyshau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d65ded00cb51 Use rounded rect FAST_PATH more agressively r=gw
Backout by shindli@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dd24ce6a2b16 Backed out changeset d65ded00cb51 for causing wrench bustages CLOSED TREE
Pushed by shindli@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ab47a4eac76c Use rounded rect FAST_PATH more agressively r=gw

Relanded this bug since it seems that it did not cause that wrench bustage.

Flags: needinfo?(dmalyshau)
Pushed by dmalyshau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/faea2d543068 Use rounded rect FAST_PATH more agressively r=gw

the was an off-by-one error in the expectations (4128 pixels versus 4129... duh), updated and relanded

Flags: needinfo?(dmalyshau)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: