| Index: experimental/SkV8Example/speed.js
|
| diff --git a/experimental/SkV8Example/sample.js b/experimental/SkV8Example/speed.js
|
| similarity index 64%
|
| copy from experimental/SkV8Example/sample.js
|
| copy to experimental/SkV8Example/speed.js
|
| index 841dd5daa7848706e03e8265c59bea61b982597d..5b0f0013546d18c3e92a1a3e435e21bcdff4ef93 100644
|
| --- a/experimental/SkV8Example/sample.js
|
| +++ b/experimental/SkV8Example/speed.js
|
| @@ -7,13 +7,17 @@ var onDraw = function(){
|
| tick += 0.1;
|
| canvas.fillStyle = '#0000ff';
|
| canvas.fillRect(100, 100, Math.sin(tick)*100, Math.cos(tick)*100);
|
| + inval();
|
| };
|
| +
|
| + function onTimeout() {
|
| + print(tick*10, " FPS");
|
| + setTimeout(onTimeout, 1000);
|
| + tick=0;
|
| + }
|
| +
|
| + setTimeout(onTimeout, 1000);
|
| +
|
| return f;
|
| }();
|
|
|
| -function onTimeout() {
|
| - inval();
|
| - print(setTimeout(onTimeout, 33));
|
| -}
|
| -
|
| -setTimeout(onTimeout, 33);
|
|
|