RESOLVED FIXED 94696
Web Inspector: [WebGL] Simple experimental frontend implementation
https://bugs.webkit.org/show_bug.cgi?id=94696
Summary Web Inspector: [WebGL] Simple experimental frontend implementation
Andrey Adaikin
Reported 2012-08-22 05:43:56 PDT
Just a simple frontend to start with. Patch and a screenshot to follow.
Attachments
Screenshot (132.26 KB, image/png)
2012-08-22 05:45 PDT, Andrey Adaikin
no flags
Patch (18.06 KB, patch)
2012-08-22 05:48 PDT, Andrey Adaikin
no flags
Patch (18.13 KB, patch)
2012-08-22 06:10 PDT, Andrey Adaikin
no flags
Screenshot 2 (306.38 KB, image/png)
2012-08-22 06:17 PDT, Andrey Adaikin
no flags
Patch (20.93 KB, patch)
2012-08-22 09:04 PDT, Andrey Adaikin
no flags
Made it a profile type (18.77 KB, patch)
2012-08-24 04:54 PDT, Andrey Adaikin
vsevik: review+
Screenshot, WebGL profile type (2.13 MB, image/png)
2012-08-24 05:06 PDT, Andrey Adaikin
no flags
Patch to land (18.83 KB, patch)
2012-08-27 07:48 PDT, Andrey Adaikin
no flags
Andrey Adaikin
Comment 1 2012-08-22 05:45:09 PDT
Created attachment 159914 [details] Screenshot
Andrey Adaikin
Comment 2 2012-08-22 05:48:08 PDT
Andrey Adaikin
Comment 3 2012-08-22 06:10:06 PDT
Andrey Adaikin
Comment 4 2012-08-22 06:17:23 PDT
Created attachment 159919 [details] Screenshot 2
Andrey Kosyakov
Comment 5 2012-08-22 07:48:14 PDT
Comment on attachment 159917 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=159917&action=review > Source/WebCore/inspector/front-end/WebGLPanel.js:88 > + wasShown: function() > + { > + WebInspector.Panel.prototype.wasShown.call(this); > + }, > + > + willHide: function() > + { > + WebInspector.Panel.prototype.willHide.call(this); > + }, > + Redundant? > Source/WebCore/inspector/front-end/WebGLPanel.js:106 > + WebInspector.webGLManager.captureFrame(function(traceLogId) { > + var elm = document.createElement("div"); > + elm.textContent = traceLogId; > + elm.traceLogId = traceLogId; > + elm.addEventListener("click", this._onTraceLogListItemClick.bind(this), false); > + this._traceLogsListElement.appendChild(elm); > + }.bind(this)); Please extract the function. > Source/WebCore/inspector/front-end/WebGLPanel.js:112 > + WebInspector.webGLManager.getTraceLog(listItem.traceLogId, function(traceLog) { ditto. > Source/WebCore/inspector/front-end/WebGLPanel.js:136 > + WebInspector.webGLManager.replayTraceLog(elm.traceLogId, elm.stepNo, function(dataUrl) { ditto > Source/WebCore/inspector/front-end/WebGLPanel.js:168 > + this._enablementCount++; > + if (this._enablementCount === 1) I'd swap these two statements and checked for !this._enablementCount
Pavel Feldman
Comment 6 2012-08-22 08:05:11 PDT
Comment on attachment 159917 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=159917&action=review > Source/WebCore/WebCore.gypi:6389 > + 'inspector/front-end/WebGLPanel.js', This panel should not be a part of the core, please load WebGLPanel as a module (lazily). > Source/WebCore/inspector/front-end/inspector.html:161 > + <script type="text/javascript" src="WebGLPanel.js"></script> Should be a module.
Andrey Adaikin
Comment 7 2012-08-22 08:52:53 PDT
Comment on attachment 159917 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=159917&action=review >> Source/WebCore/inspector/front-end/WebGLPanel.js:88 >> + > > Redundant? removed >> Source/WebCore/inspector/front-end/WebGLPanel.js:106 >> + }.bind(this)); > > Please extract the function. done >> Source/WebCore/inspector/front-end/WebGLPanel.js:112 >> + WebInspector.webGLManager.getTraceLog(listItem.traceLogId, function(traceLog) { > > ditto. done >> Source/WebCore/inspector/front-end/WebGLPanel.js:136 >> + WebInspector.webGLManager.replayTraceLog(elm.traceLogId, elm.stepNo, function(dataUrl) { > > ditto done >> Source/WebCore/inspector/front-end/WebGLPanel.js:168 >> + if (this._enablementCount === 1) > > I'd swap these two statements and checked for !this._enablementCount FYI, I copied this from WebInspector.TimelineManager class. And I like this way better, because it's safer - someone may call start() from within a callback of WebGLAgent.enable (i.e. from an event listener handler of WebInspector.WebGLManager.EventTypes.WebGLStarted) >> Source/WebCore/inspector/front-end/inspector.html:161 >> + <script type="text/javascript" src="WebGLPanel.js"></script> > > Should be a module. okay...
Andrey Adaikin
Comment 8 2012-08-22 09:04:18 PDT
Pavel Feldman
Comment 9 2012-08-23 04:49:49 PDT
As we agreed offline, lets make it a profile type.
Andrey Adaikin
Comment 10 2012-08-23 06:22:05 PDT
Work is in progress...
Andrey Adaikin
Comment 11 2012-08-24 04:54:12 PDT
Created attachment 160397 [details] Made it a profile type
Andrey Adaikin
Comment 12 2012-08-24 05:06:27 PDT
Created attachment 160399 [details] Screenshot, WebGL profile type
Vsevolod Vlasov
Comment 13 2012-08-27 07:14:42 PDT
Comment on attachment 160397 [details] Made it a profile type View in context: https://bugs.webkit.org/attachment.cgi?id=160397&action=review > Source/WebCore/inspector/front-end/WebGLProfileView.js:103 > + for (var i = 0, n = calls.length; i < n; ++i) { for (var i = 0; i < calls.length; ++i) ? > Source/WebCore/inspector/front-end/WebGLProfileView.js:105 > + var elm = document.createElement("div"); traceLogItem > Source/WebCore/inspector/front-end/WebGLProfileView.js:121 > + function didReplayTraceLog(error, dataUrl) dataURL
Andrey Adaikin
Comment 14 2012-08-27 07:48:16 PDT
Created attachment 160717 [details] Patch to land
Andrey Kosyakov
Comment 15 2012-08-28 01:32:24 PDT
Note You need to log in before you can comment on or make changes to this bug.