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

Method RRE_DECODE

java/com/tigervnc/rfb/RREDecoder.java:70–85  ·  view source on GitHub ↗
(Rect r, InStream is,
                          PixelFormat pf, ModifiablePixelBuffer pb)

Source from the content-addressed store, hash-verified

68 }
69
70 private void RRE_DECODE(Rect r, InStream is,
71 PixelFormat pf, ModifiablePixelBuffer pb)
72 {
73 int nSubrects = is.readU32();
74 byte[] bg = READ_PIXEL(is, pf).array();
75 pb.fillRect(pf, r, bg);
76
77 for (int i = 0; i < nSubrects; i++) {
78 byte[] pix = READ_PIXEL(is, pf).array();
79 int x = is.readU16();
80 int y = is.readU16();
81 int w = is.readU16();
82 int h = is.readU16();
83 pb.fillRect(pf, new Rect(r.tl.x+x, r.tl.y+y, r.tl.x+x+w, r.tl.y+y+h), pix);
84 }
85 }
86
87 private void rreDecode8(Rect r, InStream is,
88 PixelFormat pf,

Callers 3

rreDecode8Method · 0.95
rreDecode16Method · 0.95
rreDecode32Method · 0.95

Calls 4

READ_PIXELMethod · 0.95
readU32Method · 0.45
fillRectMethod · 0.45
readU16Method · 0.45

Tested by

no test coverage detected