[css-houdini-drafts] [css-paint-api] Unnecessary paint-valid flag?

asajeffrey has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== [css-paint-api] Unnecessary paint-valid flag? ==
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.

Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/447 using your GitHub account

Received on Friday, 11 August 2017 22:12:12 UTC