Skip to content

[Impeller] Depth/Stencil changes for improved rendering performance of complex geometry. #137714

@jonahwilliams

Description

@jonahwilliams

Now that we've resolved clip storage via stencil record/replay, we're unblocked on some new features in Impeller. This issue aggregates several other issues into a single arc of work.

  1. (issue Not Filled) Add new contents that support clipping via depth buffer. This doesn't need to be wired up anywhere besides testing.
  2. (Issue Not Filled) Ensure backends support having both depth and stencil buffer attached, including when a combined depth-stencil is used.
  3. Add new Geometry methods that describe the appropriate rendering technique (StC or not). Add functionality to color source contents to conditionally use stencil techniques. This may require some design work.
  4. Evaluate performance and switch all clipping to use depth and enable StC.
  5. Revisit polyline generation in Compute and potentially simplify by eagerly converting cubics to quadradics. There are some tessellation benchmarks that would be appropriate for this.

Cleanups:

If we're able to use StC everywhere (which we should be able to do), then we can consider removing libtess2. This would also remove the benefit for vector_graphics to perform pre-tessellation.

Notes:

  • We may determine that StC is slower than Triangulate and draw in some cases where the path is known to be static
  • We should never use StC with convex shapes.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)e: impellerImpeller rendering backend issues and features requeststeam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions