RESOLVED FIXED 39883
Adding tests to canvas.html performance test
https://bugs.webkit.org/show_bug.cgi?id=39883
Summary Adding tests to canvas.html performance test
Sterling Swigart
Reported 2010-05-28 10:15:10 PDT
Added tests for: strokeText fillText strokeLine
Attachments
Patch to canvas.html (4.50 KB, patch)
2010-05-28 10:21 PDT, Sterling Swigart
levin: review-
Patch to canvas.html (3.59 KB, patch)
2010-05-28 11:33 PDT, Sterling Swigart
levin: review-
Made the tests more asynchronous (4.10 KB, patch)
2010-05-28 13:30 PDT, Sterling Swigart
levin: review-
Added beginPath/closePath (4.17 KB, patch)
2010-05-28 14:38 PDT, Sterling Swigart
no flags
Sterling Swigart
Comment 1 2010-05-28 10:21:52 PDT
Created attachment 57339 [details] Patch to canvas.html
David Levin
Comment 2 2010-05-28 11:20:31 PDT
Comment on attachment 57339 [details] Patch to canvas.html In keeping with the C++ style, I would add spaces around the operators. For example here: "500*j/numStrings" WebKitSite/demos/canvas-perf/canvas.html:193 + */ You should get rid of the commented out code. WebKitSite/demos/canvas-perf/canvas.html:226 + */ Ditto.
Sterling Swigart
Comment 3 2010-05-28 11:33:09 PDT
Created attachment 57350 [details] Patch to canvas.html
David Levin
Comment 4 2010-05-28 12:34:02 PDT
Comment on attachment 57350 [details] Patch to canvas.html > + > +function doStrokeTextTests() { > + log("===== StrokeText Tests ====="); > + var strokeTextFunc = function(obj, str, x, y) { obj.strokeText(str, x, y); }; > + for (var i = 1; i < 1001; i *= 10) > + textTest(strokeTextFunc, i); One last comment: It would be nice if these were written in a more async manner to allow for any gc's to happen as done in other tests. Example: function doStrokeTextTests() { log("===== StrokeText Tests ====="); doNextStrokeTextTest(1); } function doNextStrokeTextTest(var lineCount) { var strokeTextFunc = function(canvas, str, x, y) { canvas.strokeText(str, x, y); }; textTest(strokeTextFunc, i); lineCount *= 10; if (lineCount < 1001) window.setTimeout(function () { doNextStrokeTextTest(lineCount); }, idleTimer); else { log(""); window.setTimeout(doFillTextTests, idleTimer); } }
Sterling Swigart
Comment 5 2010-05-28 13:30:00 PDT
Created attachment 57368 [details] Made the tests more asynchronous
David Levin
Comment 6 2010-05-28 14:29:13 PDT
Comment on attachment 57368 [details] Made the tests more asynchronous Please add the beginPath/closePath fix as discussed.
Sterling Swigart
Comment 7 2010-05-28 14:38:11 PDT
Created attachment 57383 [details] Added beginPath/closePath
WebKit Commit Bot
Comment 8 2010-05-29 08:18:17 PDT
Comment on attachment 57383 [details] Added beginPath/closePath Clearing flags on attachment: 57383 Committed r60407: <http://trac.webkit.org/changeset/60407>
WebKit Commit Bot
Comment 9 2010-05-29 08:18:22 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.