Skip to content

[css-paint-api] Unnecessary paint-valid flag? #447

Closed
@asajeffrey

Description

@asajeffrey

The css-paint-api spec includes a paint-valid flag https://drafts.css-houdini.org/css-paint-api/#paint-valid-flag.

This flag is maintained as global mutable state, and is set invalid by they style engine, and valid by the paint worklets. This produces the usual problems of shared mutable state in a concurrent implementation.

The flag's main purpose is to avoid re-drawing paint images when the properties have not changed, but this is already handled by step 10 of https://drafts.css-houdini.org/css-paint-api/#invoke-a-paint-callback:

At this stage the user agent may re-use an image from a previous invocation if paintSize, styleMap, inputArguments are equivalent to that previous invocation. If so let the image output be that cached image and abort all these steps.

Since user agents are allowed to reuse previous results, it looks like the paint-valid flag is no longer needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions