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

Method READ_PIXEL

java/com/tigervnc/rfb/RREDecoder.java:54–68  ·  view source on GitHub ↗
(InStream is, PixelFormat pf)

Source from the content-addressed store, hash-verified

52 }
53
54 private static ByteBuffer READ_PIXEL(InStream is, PixelFormat pf) {
55 ByteBuffer b = ByteBuffer.allocate(4);
56 switch (pf.bpp) {
57 case 8:
58 b.putInt(is.readOpaque8());
59 return ByteBuffer.allocate(1).put(b.get(3));
60 case 16:
61 b.putInt(is.readOpaque16());
62 return ByteBuffer.allocate(2).put(b.array(), 2, 2);
63 case 32:
64 default:
65 b.putInt(is.readOpaque32());
66 return b;
67 }
68 }
69
70 private void RRE_DECODE(Rect r, InStream is,
71 PixelFormat pf, ModifiablePixelBuffer pb)

Callers 1

RRE_DECODEMethod · 0.95

Calls 6

putIntMethod · 0.80
readOpaque8Method · 0.45
putMethod · 0.45
getMethod · 0.45
readOpaque16Method · 0.45
readOpaque32Method · 0.45

Tested by

no test coverage detected