Closed Bug 1163908 Opened 5 years ago Closed 5 years ago

[LayerScope] Add Heat map in viewer

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: u459114, Assigned: u459114)

References

(Blocks 1 open bug)

Details

(Whiteboard: gfx-noted)

Attachments

(5 files, 8 obsolete files)

Provide heat map image at viewer side. So that we know
1. how texture been composed
2. the level of overdraw
Attached patch Export heat map (obsolete) — Splinter Review
Attached patch Export heat map (obsolete) — Splinter Review
Attachment #8607565 - Attachment is obsolete: true
Attached file LayerScope viewer (obsolete) —
Comment on attachment 8607566 [details] [diff] [review]
Export heat map

jerry/boris, Have time to look through this change?
Attachment #8607566 - Flags: feedback?(hshih)
Attachment #8607566 - Flags: feedback?(boris.chiou)
Attached file LayerScope heat-map view on the viewer (obsolete) —
Attachment #8607570 - Attachment is obsolete: true
Attachment #8607633 - Flags: feedback?(hshih)
Attachment #8607633 - Flags: feedback?(boris.chiou)
By using heat-map view in layerscope, we are able to know how compositor draw squares, and tell the severity of overdraw in the current scene.
Attached image [Image] Heat-map view (obsolete) —
Attached patch export draw commands (obsolete) — Splinter Review
Attachment #8607566 - Attachment is obsolete: true
Attachment #8607566 - Flags: feedback?(hshih)
Attachment #8607566 - Flags: feedback?(boris.chiou)
Attachment #8608174 - Flags: feedback?(hshih)
Attachment #8608174 - Flags: feedback?(boris.chiou)
Attached image [Image] Heat-map view
Attachment #8607634 - Attachment is obsolete: true
Comment on attachment 8608174 [details] [diff] [review]
export draw commands

Review of attachment 8608174 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/LayerScope.cpp
@@ +450,5 @@
> +        DrawPacket* dp = packet.mutable_draw();
> +        dp->set_layerref(mLayerRef);
> +        dp->set_offsetx(mOffsetX);
> +        dp->set_offsety(mOffsetY);
> +        dp->set_mvmatrix((void *)&mMVMatrix, sizeof(Float) * 16);

sizeof(Matrix4x4)?

@@ +452,5 @@
> +        dp->set_offsetx(mOffsetX);
> +        dp->set_offsety(mOffsetY);
> +        dp->set_mvmatrix((void *)&mMVMatrix, sizeof(Float) * 16);
> +        dp->set_totalrects(mRects);
> +        for (size_t i = 0; i < mRects; i++) { 

If we only have 4 maximum of rects, add an assert here.
Attachment #8608174 - Flags: feedback?(hshih) → feedback+
Attached patch LayerScope heat map (obsolete) — Splinter Review
Comment on attachment 8608604 [details] [diff] [review]
LayerScope heat map

Review of attachment 8608604 [details] [diff] [review]:
-----------------------------------------------------------------

Hi Dan,
This patch is to export data layerscope::viewer need of display heat-map view.
1. Export uniform/ attribute of each draw call to layerscope.
2. Layerscope then package and forward draw information to the viewer.
Attachment #8608604 - Flags: review?(dglastonbury)
Attachment #8608174 - Attachment is obsolete: true
Attachment #8608174 - Flags: feedback?(boris.chiou)
Attached file LayerScope heat-map view on the viewer (obsolete) —
Hi Jerry/Boris,
Here is heap-map implementation on the viewer side.
1. Fetch draw data from the device and convert it to frame.draws object in dataprocessor worker.
2. Replay draw commands on the viewer side by webgl.
Attachment #8607633 - Attachment is obsolete: true
Attachment #8607633 - Flags: feedback?(hshih)
Attachment #8607633 - Flags: feedback?(boris.chiou)
Attachment #8608628 - Flags: review?(hshih)
Attachment #8608628 - Flags: review?(boris.chiou)
Comment on attachment 8608628 [details] [review]
LayerScope heat-map view on the viewer

>https://github.com/mozilla/layerscope/pull/23
Attached file Live demo
Attachment #8608604 - Flags: review?(dglastonbury) → review+
Comment on attachment 8608628 [details] [review]
LayerScope heat-map view on the viewer

Since we use the viewer at desktop, some performance issue might not noticeable.
I don't check the TwoDViewImp() very clearly. I don't really understand css selector and your dom structure.
Please check the comment at github.
Attachment #8608628 - Flags: review?(hshih) → review+
(In reply to Jerry Shih[:jerry] (UTC+8) from comment #20)
> Comment on attachment 8608628 [details] [review]
> LayerScope heat-map view on the viewer
> 
> Since we use the viewer at desktop, some performance issue might not
> noticeable.
> I don't check the TwoDViewImp() very clearly. I don't really understand css
> selector and your dom structure.
> Please check the comment at github.
OK, thank.
Testing result.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f05ff5576370
Attachment #8608604 - Attachment is obsolete: true
Attachment #8609556 - Flags: review+
Attachment #8608628 - Attachment is obsolete: true
Attachment #8608628 - Flags: review?(boris.chiou)
Attachment #8609937 - Flags: review?(boris.chiou)
Attachment #8609937 - Flags: review?(boris.chiou) → review+
We will merge viewer side after gecko side is checked in.
(In reply to Boris Chiou [:boris] from comment #24)
> We will merge viewer side after gecko side is checked in.
Pull request
https://github.com/mozilla/layerscope/pull/24/files
(In reply to C.J. Ku[:cjku] from comment #27)
> (In reply to Boris Chiou [:boris] from comment #24)
> > We will merge viewer side after gecko side is checked in.
> Pull request
> https://github.com/mozilla/layerscope/pull/24/files

Merged. You can resolve this bug after checking-in into mozilla-central.
Whiteboard: gfx-noted
Status: NEW → RESOLVED
Closed: 5 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.