Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How are paint worklets picked? #471

Closed
dglazkov opened this issue Sep 24, 2017 · 2 comments
Closed

How are paint worklets picked? #471

dglazkov opened this issue Sep 24, 2017 · 2 comments

Comments

@dglazkov
Copy link

From https://groups.google.com/a/chromium.org/d/msg/blink-dev/Jex3idOld48/XWkgUzlxBQAJ

@bzbarsky:

What the spec defines is that a UA must have at least two paint worklets
and assign work to them somehow. The spec does not require randomness
of ordering of work assignment, randomness in which worklet is chosen,
or anything else.

This unfortunately makes it fairly easy to create worklets that depend
on specific assignment algorithms, and I expect pages to end up doing
just that if browsers do anything deterministic here. At which point
we'll end up having to specify those deterministic algorithms, and
whatever their limitations are (e.g. only two paint worklets, period).

@css-meeting-bot
Copy link
Member

The Working Group just discussed How to spec non-determinism, and agreed to the following resolutions:

  • RESOLVED: There must be at least two global scopes, can't reuse the same scope more than 1k times in a row, bounds will be improved over time.
The full IRC log of that discussion <TabAtkins> Topic: How to spec non-determinism
<TabAtkins> github: https://github.com//issues/471
<TabAtkins> iank_: How do we spec how to do non-determinism?
<TabAtkins> iank_: Proposal is to have it in a note, becaus eit's hard to test for.
<TabAtkins> iank_: foolip suggested speccing a limit that we can't use a context more than 1k times, or something
<TabAtkins> iank_: I'd prefer just having it be a note; we can't reasonable test it
<TabAtkins> dbaron: I feel like if it's something we require, it should be normative even if we can't test it.
<TabAtkins> astearns: I'm happy having examles in a note, but the "have to" part would b enormative.
<TabAtkins> iank_: So add normative text that there should be non-determinism, and give a bunch of examples of what it should look like
<TabAtkins> iank_: will give our internal impl where we switch after N calls, which is non-deterministic
<TabAtkins> Rossen: Any upper bound?
<TabAtkins> iank_: Yeah, we switch after 30 or so
<TabAtkins> Rossen: So 1k seems plenty high enough
<TabAtkins> iank_: Current text says there must be at least 2 scopes, but no language about swapping
<TabAtkins> xidorn: So if the UA discards every time...
<TabAtkins> iank_: You're passing
<TabAtkins> dbaron: But it's deterministic!
<TabAtkins> Rossen: But you can't deterministically tell what new scope you'll get
<TabAtkins> RESOLVED: There must be at least two global scopes, can't reuse the same scope more than 1k times in a row, bounds will be improved over time.

@bfgeek
Copy link
Contributor

bfgeek commented Apr 7, 2018

Fixed by b57b101

@bfgeek bfgeek closed this as completed Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants