Skip to content

[Impeller] Clarify that the Geometry.CoversArea rect represents integer bounds of whole pixels #186014

Description

@flar

During the reviews of #185760 we realized that the callers of the Geometry::CoverseArea method would only be calling the method with a rectangle that contains the integer bounds of a set of (whole) pixels. This information is not specifically mentioned in its doc comment and is not reinforced by the type of the rectangle (a 32-bit float rect). As analyzed in the PR mentioned above, the new class can only sufficiently answer the query posed by that method if it makes those assumptions (which are both reasonable and also true of all uses of the method), so they should be clarified to prevent future misuse and enforced by the API:

  • Change the Rect rect parameter of the method to IRect pixel_bounds
  • Mention in the doc comments for the base virtual method that the bounds will implicitly contain the entire area of each pixel concerned by definition (assumes that the type of the parameter is changed to IRect).

Metadata

Metadata

Assignees

No one assigned

    Labels

    e: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.team-engineOwned by Engine team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions