Off-screen paint event

123 views
Skip to first unread message

Duc H. Bui

unread,
Dec 1, 2014, 1:24:40 AM12/1/14
to google-chrome-...@googlegroups.com
Hello,

On Chrome DevTools timeline, a Paint event has the following details:

Location: (351378, -15)
Dimensions: 8832 × 76
Layer root: header.top-bar.top-bar-new

Does this Paint event completely out of view port? Is it a unnecessary paint? I see a lot of Paint events like this.

I wonder why the Location is somewhere off screen (351378, -15). The dimension is even bigger than the view port size 576 x 360.

By the way, what is the meaning of Layer root? Does it mean this paint happens on the layer corresponding to the header.top-bar.top-bar-new element?

I got the timeline events on Android Chrome over DevTools Remote Debugging.


Thanks.


Best regards,
Duc H. Bui

Andrey Kosyakov

unread,
Dec 1, 2014, 2:17:46 AM12/1/14
to Google Chrome Developer Tools
Hi Duc,

On Mon, Dec 1, 2014 at 9:24 AM, Duc H. Bui <ducbu...@gmail.com> wrote:
Hello,

On Chrome DevTools timeline, a Paint event has the following details:

Location: (351378, -15)
Dimensions: 8832 × 76
Layer root: header.top-bar.top-bar-new

Does this Paint event completely out of view port? Is it a unnecessary paint? I see a lot of Paint events like this.

I wonder why the Location is somewhere off screen (351378, -15). The dimension is even bigger than the view port size 576 x 360.

Is this a Paint  event on the main thread (solid green if you're using old (waterfall) view)? If so, with impl-side painting on (which is currently the default for most platforms) this Paint is supposed to be cheap, isn't it? Thing is, Paint here now means that we only record the draw commands required to paint an element with its children, but don't actually paint the pixels -- we do rasterize later, on a different thread and on demand. So what you observe is that we record the list of commands to paint the layer on the main thread, so that in case the layer is scrolled into view we could rasterize it to pixels without blocking on the main thread. I reckon this may be confusing as we use Paint to refer to two different thing...

 

By the way, what is the meaning of Layer root? Does it mean this paint happens on the layer corresponding to the header.top-bar.top-bar-new element?

Yes. As long as you're looking on the Timeline with the inspected page still on, we highlight the related node on hover (and you can reveal it in Elements via a context menu action).

Best regards,
Andrey.

Duc H. Bui

unread,
Dec 1, 2014, 3:13:29 AM12/1/14
to google-chrome-...@googlegroups.com
Is this a Paint  event on the main thread (solid green if you're using old (waterfall) view)?
 
Yes, there will be solid green rectangle if the Paint is inside the viewport. In this case, since the Paint location is far from the viewport so I see no such rectangle :)

I still have some questions:

 So what you observe is that we record the list of commands to paint the layer on the main thread, so that in case the layer is scrolled into view we could rasterize it to pixels without blocking on the main thread.

Does it mean if I do not scroll down, the Compositor thread will not rasterize the SkPicture and paint to screen?
Does Compositor thread rasterize, on RasterizationWorker, the SkPictures separately one-by-one (i.e. not combine the commands)?


Thank you for your time.

Best regards,
Duc H. Bui


--
You received this message because you are subscribed to a topic in the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-chrome-developer-tools/Ri9S1o2AEAo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/CABapexdTwTnkNGf9EjX-qsX%2BLZ%2B3dj011vYCgS5pPvXDmJJrng%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages