Changeset 0d62c10 in mainline for uspace/srv/hid/rfb/main.c
- Timestamp:
- 2020-10-09T20:27:24Z (3 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f80690a
- Parents:
- 8bf9058
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/rfb/main.c
r8bf9058 r0d62c10 196 196 197 197 /* Check that we support all required flags */ 198 if ((params->flags & ~ bmpf_color_key) != 0)198 if ((params->flags & ~(bmpf_color_key | bmpf_colorize)) != 0) 199 199 return ENOTSUP; 200 200 … … 287 287 288 288 if ((rfbbm->flags & bmpf_color_key) == 0) { 289 /* Simple copy */ 289 290 for (y = srect.p0.y; y < srect.p1.y; y++) { 290 291 for (x = srect.p0.x; x < srect.p1.x; x++) { … … 294 295 } 295 296 } 296 } else { 297 } else if ((rfbbm->flags & bmpf_colorize) == 0) { 298 /* Color key */ 297 299 for (y = srect.p0.y; y < srect.p1.y; y++) { 298 300 for (x = srect.p0.x; x < srect.p1.x; x++) { … … 304 306 } 305 307 } 308 } else { 309 /* Color key & colorization */ 310 for (y = srect.p0.y; y < srect.p1.y; y++) { 311 for (x = srect.p0.x; x < srect.p1.x; x++) { 312 color = pixelmap_get_pixel(&pbm, x, y); 313 if (color != rfbbm->key_color) { 314 pixelmap_put_pixel(&rfbbm->rfb->rfb.framebuffer, 315 x + offs.x, y + offs.y, 316 rfbbm->rfb->color); 317 } 318 } 319 } 306 320 } 307 321
Note:
See TracChangeset
for help on using the changeset viewer.