(oldX, oldY, newX, newY, w, h, fromQueue)
| 331 | } |
| 332 | |
| 333 | copyImage(oldX, oldY, newX, newY, w, h, fromQueue) { |
| 334 | if (this._renderQ.length !== 0 && !fromQueue) { |
| 335 | this._renderQPush({ |
| 336 | 'type': 'copy', |
| 337 | 'oldX': oldX, |
| 338 | 'oldY': oldY, |
| 339 | 'x': newX, |
| 340 | 'y': newY, |
| 341 | 'width': w, |
| 342 | 'height': h, |
| 343 | }); |
| 344 | } else { |
| 345 | // Due to this bug among others [1] we need to disable the image-smoothing to |
| 346 | // avoid getting a blur effect when copying data. |
| 347 | // |
| 348 | // 1. https://bugzilla.mozilla.org/show_bug.cgi?id=1194719 |
| 349 | // |
| 350 | // We need to set these every time since all properties are reset |
| 351 | // when the size is changed |
| 352 | this._drawCtx.mozImageSmoothingEnabled = false; |
| 353 | this._drawCtx.webkitImageSmoothingEnabled = false; |
| 354 | this._drawCtx.msImageSmoothingEnabled = false; |
| 355 | this._drawCtx.imageSmoothingEnabled = false; |
| 356 | |
| 357 | this._drawCtx.drawImage(this._backbuffer, |
| 358 | oldX, oldY, w, h, |
| 359 | newX, newY, w, h); |
| 360 | this._damage(newX, newY, w, h); |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | imageRect(x, y, width, height, mime, arr) { |
| 365 | /* The internal logic cannot handle empty images, so bail early */ |
no test coverage detected