summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-12 16:05:04 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-12 16:05:04 -0700
commit7f0a06540bc591946aa5bab0c1068baa0782afe9 (patch)
tree225932b71ac3a35fb2e67a667df11c9635864188 /src
parent67c05b0b515907ac9b08a1e10904da450320714f (diff)
proxy context attributes
Diffstat (limited to 'src')
-rw-r--r--src/proxyClient.js2
-rw-r--r--src/proxyWorker.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/proxyClient.js b/src/proxyClient.js
index 45915eaa..bcdf7166 100644
--- a/src/proxyClient.js
+++ b/src/proxyClient.js
@@ -54,7 +54,7 @@ worker.onmessage = function worker_onmessage(event) {
case 'canvas': {
switch (data.op) {
case 'getContext': {
- Module.ctx = Module.canvas.getContext(data.type);
+ Module.ctx = Module.canvas.getContext(data.type, data.attributes);
if (data.type !== '2d') Module.glClient = new WebGLClient();
break;
}
diff --git a/src/proxyWorker.js b/src/proxyWorker.js
index 820f0a34..dd572dad 100644
--- a/src/proxyWorker.js
+++ b/src/proxyWorker.js
@@ -56,8 +56,8 @@ document.createElement = function document_createElement(what) {
postMessage({ target: 'canvas', op: 'resize', width: canvas.width, height: canvas.height });
}
};
- canvas.getContext = function canvas_getContext(type) {
- postMessage({ target: 'canvas', op: 'getContext', type: type });
+ canvas.getContext = function canvas_getContext(type, attributes) {
+ postMessage({ target: 'canvas', op: 'getContext', type: type, attributes: attributes });
if (type === '2d') {
return {
getImageData: function(x, y, w, h) {