1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

Added support for webgl2 (?)

This commit is contained in:
kkapsner 2015-09-10 01:58:38 +02:00
parent 0640008459
commit 5fe5ec1d64
2 changed files with 5 additions and 1 deletions

Binary file not shown.

View File

@ -13,7 +13,11 @@
source = imageData.data;
}
else {
context = window.HTMLCanvasElement.prototype.getContext.call(original, "webgl");
context =
window.HTMLCanvasElement.prototype.getContext.call(original, "webgl") ||
window.HTMLCanvasElement.prototype.getContext.call(original, "experimental-webgl") ||
window.HTMLCanvasElement.prototype.getContext.call(original, "webgl2") ||
window.HTMLCanvasElement.prototype.getContext.call(original, "experimental-webgl2");
imageData = new window.wrappedJSObject.ImageData(original.width, original.height);
source = new window.wrappedJSObject.Uint8Array(imageData.data.length);
window.WebGLRenderingContext.prototype.readPixels.call(