MCPcopy Create free account
hub / github.com/apache/cloudstack / _readPixels

Method _readPixels

systemvm/agent/noVNC/core/decoders/zrle.js:83–93  ·  view source on GitHub ↗
(pixels)

Source from the content-addressed store, hash-verified

81 }
82
83 _readPixels(pixels) {
84 let data = this._pixelBuffer;
85 const buffer = this._inflator.inflate(3*pixels);
86 for (let i = 0, j = 0; i < pixels*4; i += 4, j += 3) {
87 data[i] = buffer[j];
88 data[i + 1] = buffer[j + 1];
89 data[i + 2] = buffer[j + 2];
90 data[i + 3] = 255; // Add the Alpha
91 }
92 return data;
93 }
94
95 _decodePaletteTile(paletteSize, tileSize, tilew, tileh) {
96 const data = this._tileBuffer;

Callers 4

decodeRectMethod · 0.95
_decodePaletteTileMethod · 0.95
_decodeRLETileMethod · 0.95
_decodeRLEPaletteTileMethod · 0.95

Calls 1

inflateMethod · 0.80

Tested by

no test coverage detected