aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-09-14 12:01:23 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-09-14 12:01:23 -0700
commit3420f5b44feeafcb2e97f95aa15960ba1e99a72c (patch)
tree22b441c0ee619fe52e26dbc1370542905ee12100
parent6dd517fb22f22818db5998f409f80e36b9d769d6 (diff)
texture and imageData shims for shell replay
-rwxr-xr-xtools/reproduceriter.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/reproduceriter.py b/tools/reproduceriter.py
index 10979e1b..e6db454c 100755
--- a/tools/reproduceriter.py
+++ b/tools/reproduceriter.py
@@ -710,11 +710,32 @@ if (typeof nagivator == 'undefined') {
frontFace: function(){},
cullFace: function(){},
activeTexture: function(){},
+ createTexture: function() {
+ var id = this.id++;
+ this.items[id] = {
+ which: 'texture',
+ };
+ return id;
+ },
+ boundTextures: {},
+ bindTexture: function(target, texture) {
+ this.boundTextures[target] = texture;
+ },
+ texParameteri: function(){},
+ pixelStorei: function(){},
+ texImage2D: function(){},
};
}
case '2d': {
return {
drawImage: function(){},
+ getImageData: function(x, y, w, h) {
+ return {
+ width: w,
+ height: h,
+ data: new Uint8ClampedArray(w*h),
+ };
+ },
};
}
default: throw 'canvas.getContext: ' + which;