Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1172)

Unified Diff: experimental/SkV8Example/speed.js

Issue 121303004: Fleshed out a lot of the Path interfac (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: unused imports Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/SkV8Example/sample.js ('k') | gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « experimental/SkV8Example/sample.js ('k') | gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698