summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2018-01-09 14:34:17 +0100
committerJesus Fernandez <Jesus.Fernandez@qt.io>2018-02-13 13:04:59 +0000
commit3ede2fe3a426675691c32e6ee07913fc3c27d0fd (patch)
treeda5b1f43bf7daf3e3a1516bfcf0dca49528a3bfe
parentd2180a878424a1a790ca8060071f1c2847aee45f (diff)
Remove an unused functionv5.11.0-alpha1
Moved its debug message to the one place where its code was almost duplicated, rather than changing this place to call the function and changing the function to accurately do what it did; there's no real sense to a function to send the resize event to the application. Change-Id: I0de3dbbcc762515a282b0192fe7c382d260d4da8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r--src/plugins/platforms/webgl/webqt.jsx18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/plugins/platforms/webgl/webqt.jsx b/src/plugins/platforms/webgl/webqt.jsx
index e3a2f29..c886733 100644
--- a/src/plugins/platforms/webgl/webqt.jsx
+++ b/src/plugins/platforms/webgl/webqt.jsx
@@ -90,16 +90,6 @@ window.onload = function () {
sendObject({ "type": "gl_response", "id": id, "value": value });
};
- var sendResize = function (width, height, physicalWidth, physicalHeight) {
- if (DEBUG)
- console.log("Resizing canvas to " + width + " x " + height);
- var object = { "type": "canvas_resize",
- "width": width, "height": height,
- "physicalWidth" : physicalWidth, "physicalHeight" : physicalHeight
- };
- sendObject(socket);
- };
-
var createLoadingCanvas = function(name, x, y, width, height) {
var canvas = document.createElement("canvas");
canvas.id = "loading_" + name;
@@ -1089,13 +1079,13 @@ window.onload = function () {
var width = size.width;
var height = size.height;
var physicalSize = physicalSizeRatio();
-
- var object = { "type" : "canvas_resize",
+ if (DEBUG)
+ console.log("Resizing canvas to " + width + " x " + height);
+ sendObject({ "type" : "canvas_resize",
"width" : width, "height" : height,
"physicalWidth" : width / physicalSize.width,
"physicalHeight" : height / physicalSize.height
- };
- sendObject(object);
+ });
};
window.addEventListener("resize",(function(){
if(doCheck){