W3C home > Mailing lists > Public > public-houdini@w3.org > May 2015

Re: Properties of Custom Paint

From: Ian Kilpatrick <ikilpatrick@google.com>
Date: Thu, 21 May 2015 14:18:51 -0400
Message-ID: <CAJL3UpTGen1aDzTeXGBPw9-iXpjOMKTgO9_hzbYB_0EPdRhdCA@mail.gmail.com>
To: Dean Jackson <dino@apple.com>
Cc: "public-houdini@w3.org" <public-houdini@w3.org>, "Robert O'Callahan" <robert@ocallahan.org>
Hey Dean,

I would suggest adding, or rewording the footgun item, to have something
> more about performance. Setting a tainted flag to disallow readback helps
> some performance issues, but not all of them.
> Given the current storyline on how the Web isn't performant enough
> compared to native, I think we should be especially mindful about adding
> API that could cause painting and rendering to stutter. Maybe there should
> be consideration for whether a callback that runs too long can block
> painting (e.g. the developer could choose that they prefer the content from
> the previous render in this case).

Yeah we tried to capture this in - "Able to mark handlers as optional" (is
this the performance that you were concerned about, e.g. the browser being
able to drop callbacks if it doesn't think it has enough time/bad actors?),
but there was some debate around this. I'd love to get other peoples
thoughts if this is required or not.

There are a few different axis to consider here I believe.
1) The behavior from the developers point of view should be predictable.

If a custom paint behavior is absolutely required for a UI, then it should
always be painted. However, you could imagine that there might be lots of
effects that the paint code could drop, if not required. For example a
really complex to paint box-shadow might be in this category.
What concerns me about dropping callbacks is that there isn't anything in
CSS today which won't paint, under system load.

2) It's already possible for bad actors.

I don't see a difference in the bad actor case for custom paint vs. main
thread. You can have a bad actor on the main thread (doing canvas painting)
and block paint/frame for an indeterminate amount of time.


Received on Friday, 22 May 2015 11:19:08 UTC

This archive was generated by hypermail 2.3.1 : Friday, 22 May 2015 11:19:10 UTC