Bug 39635 - Improve canvas perf test accuracy.
Summary: Improve canvas perf test accuracy.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-24 18:09 PDT by David Levin
Modified: 2010-05-25 00:49 PDT (History)
1 user (show)

See Also:


Attachments
Patch (5.85 KB, patch)
2010-05-24 18:13 PDT, David Levin
no flags Details | Formatted Diff | Diff
Patch (9.26 KB, patch)
2010-05-24 23:58 PDT, David Levin
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Levin 2010-05-24 18:09:40 PDT
Improve canvas perf test fairness.
Comment 1 David Levin 2010-05-24 18:13:45 PDT
Created attachment 56953 [details]
Patch
Comment 2 David Levin 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
Comment 3 David Levin 2010-05-24 23:58:14 PDT
Created attachment 56981 [details]
Patch
Comment 4 David Levin 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)
Comment 5 Maciej Stachowiak 2010-05-25 00:36:55 PDT
Comment on attachment 56981 [details]
Patch

r=me
Comment 6 David Levin 2010-05-25 00:49:01 PDT
Committed as http://trac.webkit.org/changeset/60140