I stumbled upon it while looking at things in our codebase that use protobuf, and I got curious as to what it does. I discovered the following things:
1. To use it, first you have to flip gfx.layerscope.enabled. This opens a WebSocket at ws://localhost:23456
2. The main UI for this feature is not in the browser at all, it's on GitHub: http://mozilla.github.io/layerscope/
3. The project is no longer active: https://github.com/mozilla/layerscope
4. The code has been removed by Mozilla upstream, without comment: https://bugzilla.mozilla.org/show_bug.cgi?id=1728193
I've looked at it, and I can't figure out what precisely this does or how to use the frame/layer data collected... is this anything that would actually help us with developing the CSS parser or debugging WebGL, or is it just some weird leftover from b2g that was primarily used for remote debugging?
Not a pressing priority, but I'm wondering if this is dead code that's just bloating the binary size, or a hidden feature we have yet to make use of.
Does anyone understand what LayerScope actually does?
Moderators: trava90, athenian200
-
athenian200
- Contributing developer

- Posts: 1932
- Joined: 2018-10-28, 19:56
- Location: Georgia
Does anyone understand what LayerScope actually does?
"Linux makes everything difficult." -- Lyceus Anubite
"Linux is a cancer that attaches itself in an intellectual property sense to everything it touches. That's the way that the license works." -- Steve Ballmer
"We always overestimate the change that will occur in the next two years and underestimate the change that will occur in ten." -- Bill Gates
"Linux is a cancer that attaches itself in an intellectual property sense to everything it touches. That's the way that the license works." -- Steve Ballmer
"We always overestimate the change that will occur in the next two years and underestimate the change that will occur in ten." -- Bill Gates
-
Moonchild
- Project founder

- Posts: 39644
- Joined: 2011-08-28, 17:27
- Location: Sweden
Re: Does anyone understand what LayerScope actually does?
It seems to dump ordering and texture data for from the layer managerathenian200 wrote: ↑2023-11-13, 00:22I've looked at it, and I can't figure out what precisely this does
No idea.
Very unlikely. the layer manager deals with layer composition, that's like 2 levels deeper than either CSS or WebGL.athenian200 wrote: ↑2023-11-13, 00:22is this anything that would actually help us with developing the CSS parser or debugging WebGL
It would only be useful to debug issues with the underpinnings of HWA acceleration and the likes.
No, this would apply to all OSes with accelerated compositing.athenian200 wrote: ↑2023-11-13, 00:22is it just some weird leftover from b2g that was primarily used for remote debugging?
And the fact it uses a websocket doesn't mean it's remote debugging
Certainly doesn't seem like we'll ever use this in our development.
"Sales hates anything that can't be turned into a confident sentence." - anonymous warehouse worker
"Why debate someone you fundamentally don't trust?" - Dario Amodei
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Why debate someone you fundamentally don't trust?" - Dario Amodei
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite