diff --git a/css-paint-api/Overview.bs b/css-paint-api/Overview.bs index 944a9ca0..16c2fe4f 100644 --- a/css-paint-api/Overview.bs +++ b/css-paint-api/Overview.bs @@ -451,8 +451,12 @@ Note: The user agent can optionally defer drawing images which are paint-inva The draw a paint image function is invoked by the user agent during the object size -negotiation algorithm which is responsible for rendering an <>, with |concreteObjectSize| -set to the concrete object size of the box. +negotiation algorithm which is responsible for rendering an <>, with |snappedConcreteObjectSize| +defined as follows. Let |concreteObjectSize| be the concrete object size of the box. +The |snappedConcreteObjectSize| is usually the same as the |concreteObjectSize|. However, the +user agent may adjust the size such that it paints to pixel boundaries. If it does, the user agent +should adjust the |snappedConcreteObjectSize| by the proportional change from its original size +such that the <> function can adjust the drawing accordingly. For the purposes of the object size negotiation algorithm, the paint image has no intrinsic dimensions. @@ -463,15 +467,15 @@ Note: In a future version of the spec, the author could have the ability to spec dimensions based on computed style and size changes. The {{PaintSize}} object represents the size of the image that the author should draw. This is -the concrete object size given by the user agent. +the |snappedConcreteObjectSize| given by the user agent. Note: See [[css-images-3#object-sizing-examples]] for examples on how the concrete object size is calculated. The draw a paint image function may be speculatively invoked by the user agent at any point, -with any |concreteObjectSize|. The resulting image is not displayed. +with any |snappedConcreteObjectSize|. The resulting image is not displayed. -Note: User agents may use any heuristic to speculate a possible future value for |concretObjectSize|, +Note: User agents may use any heuristic to speculate a possible future value for |snappedConcretObjectSize|, for example speculating that the size remains unchanged. Note: Although the image is not displayed, it may still be cached, and subsequent invocations of @@ -488,12 +492,12 @@ interface PaintSize {
When the user agent wants to draw a paint image of a <> function for a |box| into its appropriate stacking level (as defined by the property the CSS property its associated -with), given |concreteObjectSize| it must run the following steps: +with), given |snappedConcreteObjectSize| it must run the following steps: 1. Let |paintFunction| be the <> function on the |box| which the user agent wants to draw. 2. If the paint valid flag for the |paintFunction| is paint-valid, and the - previous invocation had the same |concreteObjectSize|, the user agent may use the + previous invocation had the same |snappedConcreteObjectSize|, the user agent may use the drawn image from the previous invocation. If so it may abort all these steps and use the previously drawn image. @@ -572,7 +576,7 @@ with), given |concreteObjectSize| it must run the following steps: The user agent may also create a WorkletGlobalScope at this time, given the paint {{Worklet}}. - 13. Run invoke a paint callback given |name|, |inputArguments|, |concreteObjectSize|, + 13. Run invoke a paint callback given |name|, |inputArguments|, |snappedConcreteObjectSize|, |workletGlobalScope| optionally in parallel. Note: If the user agent runs invoke a paint callback on a thread in parallel, @@ -581,7 +585,7 @@ with), given |concreteObjectSize| it must run the following steps:
When the user agent wants to invoke a paint callback given |name|, |inputArguments|, -|concreteObjectSize|, and |workletGlobalScope|, it must run the following steps: +|snappedConcreteObjectSize|, and |workletGlobalScope|, it must run the following steps: 1. Let |paintDefinitionMap| be |workletGlobalScope|'s paint definitions map. @@ -646,7 +650,7 @@ When the user agent wants to invoke a paint callback given |name|, |i images. 9. Let |paintSize| be a new {{PaintSize}} initialized to the width and height defined by - |concreteObjectSize|. + |snappedConcreteObjectSize|. 10. 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