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

Unified Diff: experimental/docs/backend.js

Issue 1342523002: json based animation toy (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: wip whats next? Created 5 years, 1 month 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/docs/animationCommon.js ('k') | experimental/docs/canvasBackend.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/docs/backend.js
diff --git a/experimental/docs/backend.js b/experimental/docs/backend.js
new file mode 100644
index 0000000000000000000000000000000000000000..73959210dd7764b59fe8558957ff73e3286cf4af
--- /dev/null
+++ b/experimental/docs/backend.js
@@ -0,0 +1,44 @@
+function displayBackend(displayEngine, displayList) {
+ switch (displayEngine) {
+ case 'all':
+ displayCanvas(displayList);
+ displaySvg(displayList);
+ break;
+ case 'Canvas':
+ displayCanvas(displayList);
+ break;
+ case 'SVG':
+ displaySvg(displayList);
+ break;
+ default:
+ assert(0);
+ }
+}
+
+function keyframeBackendInit(displayEngine, displayList, first) {
+ switch (displayEngine) {
+ case 'all':
+ case 'Canvas':
+ keyframeCanvasInit(displayList, first);
+ break;
+ case 'SVG':
+ break;
+ default:
+ assert(0);
+ }
+}
+
+function setupBackend(displayEngine) {
+ switch (displayEngine) {
+ case 'all':
+ case 'Canvas':
+ setupCanvas();
+ setupSvg();
+ break;
+ case 'SVG':
+ setupSvg();
+ break;
+ default:
+ assert(0);
+ }
+}
« no previous file with comments | « experimental/docs/animationCommon.js ('k') | experimental/docs/canvasBackend.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698