Lines Matching refs:client

79 static int HandleZRLETile(rfbClient* client,
84 HandleZRLE (rfbClient* client, int rx, int ry, int rw, int rh) in HandleZRLE() argument
98 if ( client->raw_buffer_size < min_buffer_size) { in HandleZRLE()
100 if ( client->raw_buffer != NULL ) { in HandleZRLE()
102 free( client->raw_buffer ); in HandleZRLE()
106 client->raw_buffer_size = min_buffer_size; in HandleZRLE()
107 client->raw_buffer = (char*) malloc( client->raw_buffer_size ); in HandleZRLE()
111 if (!ReadFromRFBServer(client, (char *)&header, sz_rfbZRLEHeader)) in HandleZRLE()
117 client->decompStream.next_in = ( Bytef * )client->buffer; in HandleZRLE()
118 client->decompStream.avail_in = 0; in HandleZRLE()
119 client->decompStream.next_out = ( Bytef * )client->raw_buffer; in HandleZRLE()
120 client->decompStream.avail_out = client->raw_buffer_size; in HandleZRLE()
121 client->decompStream.data_type = Z_BINARY; in HandleZRLE()
124 if ( client->decompStreamInited == FALSE ) { in HandleZRLE()
126 inflateResult = inflateInit( &client->decompStream ); in HandleZRLE()
132 client->decompStream.msg); in HandleZRLE()
136 client->decompStreamInited = TRUE; in HandleZRLE()
156 if (!ReadFromRFBServer(client, client->buffer,toRead)) in HandleZRLE()
159 client->decompStream.next_in = ( Bytef * )client->buffer; in HandleZRLE()
160 client->decompStream.avail_in = toRead; in HandleZRLE()
163 inflateResult = inflate( &client->decompStream, Z_SYNC_FLUSH ); in HandleZRLE()
174 client->decompStream.msg); in HandleZRLE()
181 if (( client->decompStream.avail_in > 0 ) && in HandleZRLE()
182 ( client->decompStream.avail_out <= 0 )) { in HandleZRLE()
192 char* buf=client->raw_buffer; in HandleZRLE()
195 remaining = client->raw_buffer_size-client->decompStream.avail_out; in HandleZRLE()
201 int result=HandleZRLETile(client,buf,remaining,rx+i,ry+j,subWidth,subHeight); in HandleZRLE()
218 client->decompStream.msg); in HandleZRLE()
236 static int HandleZRLETile(rfbClient* client, in HandleZRLETile() argument
243 uint8_t zywrle_level = (client->appData.qualityLevel & 0x80) ? in HandleZRLETile()
244 0 : (3 - client->appData.qualityLevel / 3); in HandleZRLETile()
256 CARDBPP* pFrame = (CARDBPP*)client->frameBuffer + y*client->width+x; in HandleZRLETile()
258 client->appData.qualityLevel |= 0x80; in HandleZRLETile()
259 ret = HandleZRLETile(client, buffer, buffer_end-buffer, x, y, w, h); in HandleZRLETile()
260 client->appData.qualityLevel &= 0x7F; in HandleZRLETile()
264 … ZYWRLE_SYNTHESIZE( pFrame, pFrame, w, h, client->width, zywrle_level, (int*)client->zlib_buffer ); in HandleZRLETile()
277 for(j=y*client->width; j<(y+h)*client->width; j+=client->width) in HandleZRLETile()
279 ((CARDBPP*)client->frameBuffer)[j+i] = UncompressCPixel(buffer); in HandleZRLETile()
281 CopyRectangle(client, buffer, x, y, w, h); in HandleZRLETile()
292 FillRectangle(client, x, y, w, h, color); in HandleZRLETile()
313 for(j=y*client->width; j<(y+h)*client->width; j+=client->width) { in HandleZRLETile()
315 ((CARDBPP*)client->frameBuffer)[j+i] = palette[((*buffer)>>shift)&mask]; in HandleZRLETile()
349 ((CARDBPP*)client->frameBuffer)[(y+j)*client->width+x+i] = color; in HandleZRLETile()
401 ((CARDBPP*)client->frameBuffer)[(y+j)*client->width+x+i] = color; in HandleZRLETile()