summaryrefslogtreecommitdiff
path: root/tests/test.display.js
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2020-06-07 13:44:20 +0200
committerPierre Ossman <ossman@cendio.se>2020-06-08 07:53:41 +0200
commitf5b5767c980da9fe5e2cb388eaa55c4368abd780 (patch)
treefd47a0de4ec9dd8e742edb1181cca10c8587db95 /tests/test.display.js
parent34f52a8f41ec677463dc331ae31b89db32883817 (diff)
downloadnovnc-f5b5767c980da9fe5e2cb388eaa55c4368abd780.tar.gz
Standardise on a single blit function
Keep everything simpler by always blitting in the same pixel format. It's up to the decoders to convert if they need to.
Diffstat (limited to 'tests/test.display.js')
-rw-r--r--tests/test.display.js19
1 files changed, 0 insertions, 19 deletions
diff --git a/tests/test.display.js b/tests/test.display.js
index 3492f1e..88c7607 100644
--- a/tests/test.display.js
+++ b/tests/test.display.js
@@ -322,18 +322,6 @@ describe('Display/Canvas Helper', function () {
expect(display).to.have.displayed(checkedData);
});
- it('should support drawing RGB blit images with true color via #blitRgbImage', function () {
- const data = [];
- for (let i = 0; i < 16; i++) {
- data[i * 3] = checkedData[i * 4];
- data[i * 3 + 1] = checkedData[i * 4 + 1];
- data[i * 3 + 2] = checkedData[i * 4 + 2];
- }
- display.blitRgbImage(0, 0, 4, 4, data, 0);
- display.flip();
- expect(display).to.have.displayed(checkedData);
- });
-
it('should support drawing an image object via #drawImage', function () {
const img = makeImageCanvas(checkedData);
display.drawImage(img, 0, 0);
@@ -416,13 +404,6 @@ describe('Display/Canvas Helper', function () {
expect(display.blitImage).to.have.been.calledWith(3, 4, 5, 6, [7, 8, 9], 0);
});
- it('should draw a blit RGB image on type "blitRgb"', function () {
- display.blitRgbImage = sinon.spy();
- display._renderQPush({ type: 'blitRgb', x: 3, y: 4, width: 5, height: 6, data: [7, 8, 9] });
- expect(display.blitRgbImage).to.have.been.calledOnce;
- expect(display.blitRgbImage).to.have.been.calledWith(3, 4, 5, 6, [7, 8, 9], 0);
- });
-
it('should copy a region on type "copy"', function () {
display.copyImage = sinon.spy();
display._renderQPush({ type: 'copy', x: 3, y: 4, width: 5, height: 6, oldX: 7, oldY: 8 });