Skip to content

DlImageFilter bounds methods do not deal with perspective transforms properly #106587

@flar

Description

@flar

Recent work on the DlImageFilter methods to compute the forward and reverse bounds was based on the manner in which Skia computes the bounds in the associated SkImageFilter methods, specifically the methods that compute filtered bounds under a transform. Both mechanisms use delta transforms to try to adjust the "user space" bounds expansion (or contraction) that would happen due to the transform. Unfortunately, a flaw in the way that these methods deal with perspective transforms was noted.

The homogenous divisor of a coordinate under a perspective transform is dependent on where the coordinate is in the 2D plane. Since the X&Y coordinates are used to compute the homogenous coordinate, different numbers are computed under simple translations of coordinates and bounds.

The Sk and Dl ImageFilter bounds methods, though, use a delta transform to compute modifications to those bounds, which means they are based on invalid assumptions about how the distance vectors would have been transformed under a perspective transform.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.r: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions