MCPcopy Create free account
hub / github.com/TigerVNC/tigervnc / READ_PIXEL

Method READ_PIXEL

java/com/tigervnc/rfb/ZRLEDecoder.java:104–117  ·  view source on GitHub ↗
(InStream is, PIXEL_T type)

Source from the content-addressed store, hash-verified

102 private static enum PIXEL_T { U8, U16, U24A, U24B, U32 };
103
104 private static ByteBuffer READ_PIXEL(InStream is, PIXEL_T type) {
105 switch (type) {
106 case U8:
107 return ByteBuffer.allocate(1).put(0, (byte)is.readOpaque8());
108 case U16:
109 return ByteBuffer.allocate(2).putShort(0, (short)is.readOpaque16());
110 case U24A:
111 return readOpaque24A(is);
112 case U24B:
113 return readOpaque24B(is);
114 default:
115 return ByteBuffer.allocate(4).putInt(0, is.readOpaque32());
116 }
117 }
118
119 private void zrleDecode8(Rect r, InStream is,
120 ZlibInStream zis,

Callers 1

ZRLE_DECODEMethod · 0.95

Calls 7

readOpaque24AMethod · 0.95
readOpaque24BMethod · 0.95
putIntMethod · 0.80
putMethod · 0.45
readOpaque8Method · 0.45
readOpaque16Method · 0.45
readOpaque32Method · 0.45

Tested by

no test coverage detected