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

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

Issue 177963005: Rename Path to Path2D (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 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/path.js ('k') | gyp/v8.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var IS_SKV8 = typeof document == "undefined"; 1 var IS_SKV8 = typeof document == "undefined";
2 var HAS_PATH = typeof Path != "undefined"; 2 var HAS_PATH = typeof Path2D != "undefined";
3 3
4 function circlePath(r) { 4 function circlePath(r) {
5 if (HAS_PATH) { 5 if (HAS_PATH) {
6 var p = new Path(); 6 var p = new Path2D();
7 p.arc(0, 0, r, 0, 2*Math.PI); 7 p.arc(0, 0, r, 0, 2*Math.PI);
8 p.closePath(); 8 p.closePath();
9 return p; 9 return p;
10 } else { 10 } else {
11 return null; 11 return null;
12 } 12 }
13 } 13 }
14 14
15 var onDraw = function() { 15 var onDraw = function() {
16 var W = 500; 16 var W = 500;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 var ctx = canvas.getContext("2d"); 86 var ctx = canvas.getContext("2d");
87 function drawCallback() { 87 function drawCallback() {
88 onDraw(ctx); 88 onDraw(ctx);
89 setTimeout(drawCallback, 1); 89 setTimeout(drawCallback, 1);
90 } 90 }
91 setTimeout(drawCallback, 1); 91 setTimeout(drawCallback, 1);
92 } 92 }
93 } 93 }
94 94
95 console.log("HAS_PATH: " + HAS_PATH); 95 console.log("HAS_PATH: " + HAS_PATH);
OLDNEW
« no previous file with comments | « experimental/SkV8Example/path.js ('k') | gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698