Summary: | Improve canvas perf test accuracy. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | David Levin <levin> | ||||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | mjs | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Other | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
Description
David Levin
2010-05-24 18:09:40 PDT
Created attachment 56953 [details]
Patch
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 Created attachment 56981 [details]
Patch
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) Comment on attachment 56981 [details]
Patch
r=me
Committed as http://trac.webkit.org/changeset/60140 |