[Webkit-unassigned] [Bug 105513] Add a performance test for Accelerated Compositing.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 2 20:50:34 PST 2013
https://bugs.webkit.org/show_bug.cgi?id=105513
Simon Fraser (smfr) <simon.fraser at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #180313|review?, commit-queue? |review-, commit-queue-
Flag| |
--- Comment #8 from Simon Fraser (smfr) <simon.fraser at apple.com> 2013-01-02 20:52:34 PST ---
(From update of attachment 180313)
View in context: https://bugs.webkit.org/attachment.cgi?id=180313&action=review
> PerformanceTests/Animation/resources/leaves.js:178
> +window.onload = function () {
> + PerfTestRunner.prepareToMeasureValuesAsync({iterationCount: 10, done: onCompletedRun, unit: 'fps'});
> + window.webkitRequestAnimationFrame(onAnimationFrame);
> +}
window.addEventListener('load', ...) is better style.
> PerformanceTests/Animation/resources/leaves.js:201
> +function onAnimationFrame() {
> + if ((iteration++ % FRAMES_PER_TIMER_READING) == 0) {
> + var currTime = new Date();
> +
> + // Calculate the framerate based upon the difference between the absolute times of the oldest and newest frames, subdivided by how macany frames were drawn inbetween
> + var frameRateVal = (FRAMES_PER_TIMER_READING * 1000) / (currTime - lastMeasuredTime);
> + if (!isNaN(frameRateVal))
> + PerfTestRunner.measureValueAsync(frameRateVal);
> +
> + lastMeasuredTime = currTime;
> + }
> + if (!measureCompleted) {
> + window.webkitRequestAnimationFrame(onAnimationFrame);
> + }
> +}
You're assuming that RAF frequency is related to the frequency with which CSS animations are rendered. This is not true on some platforms, so I don't think this is really a useful way to measure CSS animation performance.
There are other interesting things to measure: how fast this animations runs when driven via RAF, or how expensive it is to do layout on a page with lots of accelerated compositing layers. But I don't think this test useful for all platforms.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list