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

Unified Diff: experimental/SkV8Example/sample.js

Issue 111853008: Add command line flag for optionally loading JS from external files. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: retry. Created 7 years 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/SkV8Example.cpp ('k') | gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/SkV8Example/sample.js
diff --git a/experimental/SkV8Example/sample.js b/experimental/SkV8Example/sample.js
new file mode 100644
index 0000000000000000000000000000000000000000..3a95e551069c49bb230179098daf7a91af909c3d
--- /dev/null
+++ b/experimental/SkV8Example/sample.js
@@ -0,0 +1,13 @@
+/**
+ * @fileoverview Sample onDraw script for use with SkV8Example.
+ */
+var onDraw = function(){
+ var tick = 0;
+ function f(canvas) {
+ tick += 0.01;
+ canvas.fillStyle = '#0000ff';
+ canvas.fillRect(100, 100, Math.sin(tick)*100, Math.cos(tick)*100);
+ canvas.inval();
+ };
+ return f;
+}();
« no previous file with comments | « experimental/SkV8Example/SkV8Example.cpp ('k') | gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698