| Index: LayoutTests/fast/workers/resources/jank.js
|
| diff --git a/LayoutTests/fast/workers/resources/jank.js b/LayoutTests/fast/workers/resources/jank.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..287967bc0bab333acd97bf71f3d137684f2a31df
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/workers/resources/jank.js
|
| @@ -0,0 +1,31 @@
|
| +(function(scope) {
|
| + 'use strict';
|
| +
|
| + var tokens = null;
|
| + var transform = null;
|
| + var opacity = null;
|
| + var scroll = null;
|
| +
|
| + // An extremely cheesy animation.
|
| + function tick(context) {
|
| + var seconds = context.timestamp / 1000.0;
|
| + var matrix = context.getMatrix(transform);
|
| + matrix.m41 = 200.0 + 100 * Math.sin(seconds);
|
| +
|
| + context.setMatrix(transform, matrix);
|
| + context.setScalar(opacity, 0.5 + 0.5 * (Math.sin(seconds * 2.0)));
|
| + context.setScalar(scroll, 200.0 + 100.0 * (Math.sin(seconds * 0.75)));
|
| +
|
| + scope.teleportMessage(context, tick);
|
| + }
|
| +
|
| + scope.onmessage = function(e) {
|
| + tokens = e.data;
|
| + transform = tokens[0];
|
| + opacity = tokens[1];
|
| + scroll = tokens[2];
|
| + var context = new TeleportContext(tokens);
|
| + scope.teleportMessage(context, tick);
|
| + };
|
| +
|
| +})(self);
|
|
|