(ctl, x, y, width, height, sock, display, depth)
| 98 | } |
| 99 | |
| 100 | _basicRect(ctl, x, y, width, height, sock, display, depth) { |
| 101 | if (this._filter === null) { |
| 102 | if (ctl & 0x4) { |
| 103 | if (sock.rQwait("TIGHT", 1)) { |
| 104 | return false; |
| 105 | } |
| 106 | |
| 107 | this._filter = sock.rQshift8(); |
| 108 | } else { |
| 109 | // Implicit CopyFilter |
| 110 | this._filter = 0; |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | let streamId = ctl & 0x3; |
| 115 | |
| 116 | let ret; |
| 117 | |
| 118 | switch (this._filter) { |
| 119 | case 0: // CopyFilter |
| 120 | ret = this._copyFilter(streamId, x, y, width, height, |
| 121 | sock, display, depth); |
| 122 | break; |
| 123 | case 1: // PaletteFilter |
| 124 | ret = this._paletteFilter(streamId, x, y, width, height, |
| 125 | sock, display, depth); |
| 126 | break; |
| 127 | case 2: // GradientFilter |
| 128 | ret = this._gradientFilter(streamId, x, y, width, height, |
| 129 | sock, display, depth); |
| 130 | break; |
| 131 | default: |
| 132 | throw new Error("Illegal tight filter received (ctl: " + |
| 133 | this._filter + ")"); |
| 134 | } |
| 135 | |
| 136 | if (ret) { |
| 137 | this._filter = null; |
| 138 | } |
| 139 | |
| 140 | return ret; |
| 141 | } |
| 142 | |
| 143 | _copyFilter(streamId, x, y, width, height, sock, display, depth) { |
| 144 | const uncompressedSize = width * height * 3; |
no test coverage detected