Skip to content

Commit 562f985

Browse files
committed
[css-paint-api] Normatively require at least two PaintWorkletGlobalScopes.
Fixes #327.
1 parent 1aaa5e8 commit 562f985

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

css-paint-api/Overview.bs

+8-5
Original file line numberDiff line numberDiff line change
@@ -532,12 +532,15 @@ following steps:
532532
12. Let |workletGlobalScope| be a {{PaintWorkletGlobalScope}} from the list of <a>worklet's
533533
WorkletGlobalScopes</a> from the paint {{Worklet}}.
534534

535-
The user agent <em>may</em> also <a>create a WorkletGlobalScope</a> given the paint
536-
{{Worklet}} and use that.
535+
The user agent <em>must</em> have, and select from at least two {{PaintWorkletGlobalScope}}s
536+
in the <a>worklet's WorkletGlobalScopes</a> <a>list</a>, unless the user agent is under
537+
memory constraints.
537538

538-
Note: The user agent can use any policy for which {{PaintWorkletGlobalScope}} to select or
539-
create. For example it could use a single {{PaintWorkletGlobalScope}} or multiple and
540-
randomly assign between them.
539+
Note: This is to ensure that authors do not rely on being able to store state on the class
540+
or global object.
541+
542+
The user agent <em>may</em> also <a>create a WorkletGlobalScope</a> at this time, given the
543+
paint {{Worklet}}.
541544

542545
13. Run <a>invoke a paint callback</a> given |name|, |inputArguments|, |concreteObjectSize|,
543546
|workletGlobalScope| optionally <a>in parallel</a>.

0 commit comments

Comments
 (0)