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

Side by Side Diff: experimental/SkV8Example/js/speed.js

Issue 677133002: Move .js files to their own directory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « experimental/SkV8Example/js/snow.js ('k') | experimental/SkV8Example/path.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * @fileoverview Sample onDraw script for use with SkV8Example. 2 * @fileoverview Sample onDraw script for use with SkV8Example.
3 */ 3 */
4 var onDraw = function(){ 4 var onDraw = function(){
5 var tick = 0; 5 var tick = 0;
6 function f(canvas) { 6 function f(canvas) {
7 tick += 0.1; 7 tick += 0.1;
8 canvas.fillStyle = '#0000ff'; 8 canvas.fillStyle = '#0000ff';
9 canvas.fillRect(100, 100, Math.sin(tick)*100, Math.cos(tick)*100); 9 canvas.fillRect(100, 100, Math.sin(tick)*100, Math.cos(tick)*100);
10 inval(); 10 inval();
11 }; 11 };
12 12
13 function onTimeout() { 13 function onTimeout() {
14 print(tick*10, " FPS"); 14 print(tick*10, " FPS");
15 setTimeout(onTimeout, 1000); 15 setTimeout(onTimeout, 1000);
16 tick=0; 16 tick=0;
17 } 17 }
18 18
19 setTimeout(onTimeout, 1000); 19 setTimeout(onTimeout, 1000);
20 20
21 return f; 21 return f;
22 }(); 22 }();
23 23
OLDNEW
« no previous file with comments | « experimental/SkV8Example/js/snow.js ('k') | experimental/SkV8Example/path.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698