@@ -451,8 +451,12 @@ Note: The user agent can optionally defer drawing images which are <a>paint-inva
451
451
</div>
452
452
453
453
The <a>draw a paint image</a> function is invoked by the user agent during the <a>object size
454
- negotiation</a> algorithm which is responsible for rendering an <<image>> , with |concreteObjectSize|
455
- set to the <a>concrete object size</a> of the <a>box</a> .
454
+ negotiation</a> algorithm which is responsible for rendering an <<image>> , with |snappedConcreteObjectSize|
455
+ defined as follows. Let |concreteObjectSize| be the <a>concrete object size</a> of the <a>box</a> .
456
+ The |snappedConcreteObjectSize| is usually the same as the |concreteObjectSize|. However, the
457
+ user agent may adjust the size such that it paints to pixel boundaries. If it does, the user agent
458
+ should adjust the |snappedConcreteObjectSize| by the proportional change from its original size
459
+ such that the <<paint()>> function can adjust the drawing accordingly.
456
460
457
461
For the purposes of the <a>object size negotiation</a> algorithm, the paint image has no
458
462
<a>intrinsic dimensions</a> .
@@ -463,15 +467,15 @@ Note: In a future version of the spec, the author could have the ability to spec
463
467
dimensions</a> based on computed style and size changes.
464
468
465
469
The {{PaintSize}} object represents the size of the image that the author should draw. This is
466
- the <a>concrete object size</a> given by the user agent.
470
+ the |snappedConcreteObjectSize| given by the user agent.
467
471
468
472
Note: See [[css-images-3#object-sizing-examples]] for examples on how the <a>concrete object
469
473
size</a> is calculated.
470
474
471
475
The <a>draw a paint image</a> function may be speculatively invoked by the user agent at any point,
472
- with any |concreteObjectSize |. The resulting image is not displayed.
476
+ with any |snappedConcreteObjectSize |. The resulting image is not displayed.
473
477
474
- Note: User agents may use any heuristic to speculate a possible future value for |concretObjectSize |,
478
+ Note: User agents may use any heuristic to speculate a possible future value for |snappedConcretObjectSize |,
475
479
for example speculating that the size remains unchanged.
476
480
477
481
Note: Although the image is not displayed, it may still be cached, and subsequent invocations of
@@ -488,12 +492,12 @@ interface PaintSize {
488
492
<div algorithm>
489
493
When the user agent wants to <dfn>draw a paint image</dfn> of a <<paint()>> function for a |box|
490
494
into its appropriate stacking level (as defined by the property the CSS property its associated
491
- with), given |concreteObjectSize | it <em> must</em> run the following steps:
495
+ with), given |snappedConcreteObjectSize | it <em> must</em> run the following steps:
492
496
1. Let |paintFunction| be the <<paint()>> function on the |box| which the user agent wants to
493
497
draw.
494
498
495
499
2. If the <a>paint valid flag</a> for the |paintFunction| is <a>paint-valid</a> , and the
496
- previous invocation had the same |concreteObjectSize |, the user agent <em> may</em> use the
500
+ previous invocation had the same |snappedConcreteObjectSize |, the user agent <em> may</em> use the
497
501
drawn image from the previous invocation. If so it <em> may</em> abort all these steps and
498
502
use the previously drawn image.
499
503
@@ -572,7 +576,7 @@ with), given |concreteObjectSize| it <em>must</em> run the following steps:
572
576
The user agent <em> may</em> also <a>create a WorkletGlobalScope</a> at this time, given the
573
577
paint {{Worklet}} .
574
578
575
- 13. Run <a>invoke a paint callback</a> given |name|, |inputArguments|, |concreteObjectSize |,
579
+ 13. Run <a>invoke a paint callback</a> given |name|, |inputArguments|, |snappedConcreteObjectSize |,
576
580
|workletGlobalScope| optionally <a>in parallel</a> .
577
581
578
582
Note: If the user agent runs <a>invoke a paint callback</a> on a thread <a>in parallel</a> ,
@@ -581,7 +585,7 @@ with), given |concreteObjectSize| it <em>must</em> run the following steps:
581
585
582
586
<div algorithm>
583
587
When the user agent wants to <dfn>invoke a paint callback</dfn> given |name|, |inputArguments|,
584
- |concreteObjectSize |, and |workletGlobalScope|, it <em> must</em> run the following steps:
588
+ |snappedConcreteObjectSize |, and |workletGlobalScope|, it <em> must</em> run the following steps:
585
589
586
590
1. Let |paintDefinitionMap| be |workletGlobalScope|'s <a>paint definitions</a> map.
587
591
@@ -646,7 +650,7 @@ When the user agent wants to <dfn>invoke a paint callback</dfn> given |name|, |i
646
650
images.
647
651
648
652
9. Let |paintSize| be a new {{PaintSize}} initialized to the width and height defined by
649
- |concreteObjectSize |.
653
+ |snappedConcreteObjectSize |.
650
654
651
655
10. At this stage the user agent may re-use an image from a previous invocation if |paintSize|,
652
656
|styleMap|, |inputArguments| are equivalent to that previous invocation. If so let the image
0 commit comments