Closed Bug 1667918 Opened 5 years ago Closed 5 years ago

Remove clipped_world_rect from PrimitiveVisibility

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: gw, Assigned: gw)

References

Details

Attachments

(4 files)

Calculating this for every primitive on every frame is expensive. In all cases where it is currently used, we can replace it by an equivalent or better calculation, removing the need to build this.

Assignee: nobody → gwatson
Keywords: leave-open

Remove need for per-prim clipped_world_rect in calculate of
conservative visible rects for tiled primitives.

Clip task bounds already create a world space rect from the input
local / picture clip chain rect. So we can achieve the same result
by intersecting that with the current world clip rect.

Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9ea039548c24 Pt 1 - Refactor compute_conservative_visibility. r=nical https://hg.mozilla.org/integration/autoland/rev/5a073f033b4d Pt 2 - Remove world_clipped_rect from clip task bounds. r=nical

Instead of relying on the per-primitive calculated rect, add a path
that specifically determines this for pictures with surfaces. This
leaves only one place that relies on the per-primitive value, which
will be removed in the next patch.

Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6f0b89858f9a Remove clipped_world_rect use from pictures with surfaces. r=nical

This patch removes the last use of clipped_world_rect, and removes
it from the PrimitiveVisibility struct.

Instead, the already calculated tile rect is used for visibility
determination when picture caching is enabled. When picture caching
is disabled, the clipped world rect is calculated on demand but
not stored.

This patch also introduces an enum for current visibility state,
which gives better control over accessing visibility information
depending on the current pass of frame building.

Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5a7cd312e533 Pt 4 - Remove clipped_world_rect from primitive vis. r=nical

This is complete now.

Keywords: leave-open
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Blocks: 1685943
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: