[Webkit-unassigned] [Bug 174176] Web Inspector: [META] Add 3D layer visualization

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 27 16:32:40 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=174176

--- Comment #12 from Ross Kirsling <ross.kirsling at sony.com> ---
> > Source/WebInspectorUI/UserInterface/Views/Layers3DContentView.js:93
> > +            WebInspector.layerTreeManager.layersForNode(node, (layerForNode, childLayers) => {
> > +                this._clearLayers();
> > +                for (let i = 0; i < childLayers.length; i++)
> > +                    this._addLayer(childLayers[i], i);
> > +            });
> 
> 
> Adding this to layout() means that anytime the view changes (such as a resize) you are fetching the layer information from the backend.  I'm not sure we want to do that.  It might be better to put this in its own function, which is called in shown() and _layerTreeDidChange.

Most of my "where should I put things" decisions here were a direct mimicry of LayerTreeDetailsSidebarPanel, though admittedly that view is making DOM updates while this one's just redrawing on the canvas.

Upon experimenting, it appears that fetching layer data on every _layerTreeDidChange is far more dangerous, since that fires MANY times when, e.g., scrolling down a page. By having _layerTreeDidChange simply report needsLayout, most of those fetches are avoided.

If nothing else though, we can and should early out when our layoutReason is Resize.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170727/9206dbd2/attachment.html>


More information about the webkit-unassigned mailing list