RESOLVED FIXED 39635
Improve canvas perf test accuracy.
https://bugs.webkit.org/show_bug.cgi?id=39635
Summary Improve canvas perf test accuracy.
David Levin
Reported 2010-05-24 18:09:40 PDT
Improve canvas perf test fairness.
Attachments
Patch (5.85 KB, patch)
2010-05-24 18:13 PDT, David Levin
no flags
Patch (9.26 KB, patch)
2010-05-24 23:58 PDT, David Levin
mjs: review+
David Levin
Comment 1 2010-05-24 18:13:45 PDT
David Levin
Comment 2 2010-05-24 18:17:19 PDT
With these changes the results in chromium are nearly unchanged, but now the results from the gpu enabled firefox show how long the underlying operations really take. From my run with Firefox 3.7a4 with the DirectX enabled: Direct image copy: 93.5ms Indirect copy with (via ImageData): 121.25ms Copy with 2x scale: 492ms Copy with 0.5x scale 171ms Copy with rotate: 10.5 ms
David Levin
Comment 3 2010-05-24 23:58:14 PDT
David Levin
Comment 4 2010-05-25 00:17:00 PDT
From last time, I remove the scale calls that I was sure were needed but apparently were not. (I must have made a mistake in the Javascript code with the context I was using when I hit this issue.) I fixed a few issues in my last patch: > output.innerHTML += "Indirect copy with (via ImageData): " + (time/2) + "ms<br>"; ^^^^ the /2 shouldn't be here. > time = (new Date()) - startDate; Old time calculation was present before the result for 0.5 scale. > time = timeCanvasOperation(scaledDownContext, ^^^^ flushing the wrong context. > function () { > rotatedContext.drawImage(original, 0, -original.height); > }); As such the results changed to more accurately reflect perf, for Firefox 3.7a4 Direct image copy: 96ms Indirect copy with (via ImageData): 346ms (No longer dividing by 2 when we shouldn't) Copy with 2x scale: 277ms (likely lower due to allowing garbage collection) Copy with 0.5x scale: 44ms (now calc'ing time correctly with subtracting out the overhead) Copy with rotate: 120 ms (now flushing the correct context)
Maciej Stachowiak
Comment 5 2010-05-25 00:36:55 PDT
Comment on attachment 56981 [details] Patch r=me
David Levin
Comment 6 2010-05-25 00:49:01 PDT
Note You need to log in before you can comment on or make changes to this bug.