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

Unified Diff: samples/openglui/src/openglui_raytrace.dart

Issue 12506004: Added window.requestAnimationFrame. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/openglui/src/openglui_canvas_tests.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/openglui/src/openglui_raytrace.dart
===================================================================
--- samples/openglui/src/openglui_raytrace.dart (revision 19664)
+++ samples/openglui/src/openglui_raytrace.dart (working copy)
@@ -345,6 +345,7 @@
gl.clearDepth(1.0);
initBuffers();
resize(w, h);
+ requestAnimationFrame(update);
log("Done setup");
}
@@ -355,8 +356,9 @@
drawScene();
}
-void update() {
+void update(when) {
drawScene();
+ requestAnimationFrame(update);
}
onMotionDown(num when, num x, num y) {
« no previous file with comments | « samples/openglui/src/openglui_canvas_tests.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698