| Index: samples/openglui/src/openglui_canvas_tests.dart
|
| ===================================================================
|
| --- samples/openglui/src/openglui_canvas_tests.dart (revision 19664)
|
| +++ samples/openglui/src/openglui_canvas_tests.dart (working copy)
|
| @@ -43,6 +43,7 @@
|
| throw "Failed to get 2D context";
|
| }
|
| resize(w, h);
|
| + window.requestAnimationFrame(update);
|
| log("Done setup");
|
| }
|
|
|
| @@ -499,6 +500,7 @@
|
| void loadImage() {
|
| initTest("Image loading");
|
| var imageObj = new ImageElement();
|
| + // TODO(Gram): Change gl.dart to handle to onLoad.listen.
|
| imageObj.on.load.add((e) {
|
| ctx.drawImage(e, 69, 50);
|
| });
|
| @@ -655,7 +657,8 @@
|
|
|
| int testnum = 0; // Set this to -1 to start with last test.
|
|
|
| -void update() {
|
| +void update(num when) {
|
| + window.requestAnimationFrame(update);
|
| if (testnum == 0) {
|
| anim();
|
| return;
|
| @@ -1003,6 +1006,3 @@
|
| }
|
| }
|
|
|
| -
|
| -
|
| -
|
|
|