Changeset 7e38970d in mainline for uspace/drv/fb/kfb/port.c
- Timestamp:
- 2020-12-07T00:08:37Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 25f26600
- Parents:
- 7a873f0 (diff), 8596474 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/fb/kfb/port.c
r7a873f0 r7e38970d 50 50 #include <gfx/color.h> 51 51 #include <gfx/coord.h> 52 #include <io/mode.h>53 52 #include <io/pixelmap.h> 54 53 #include <ipcgfx/server.h> … … 200 199 201 200 /* Check that we support all required flags */ 202 if ((params->flags & ~ bmpf_color_key) != 0)201 if ((params->flags & ~(bmpf_color_key | bmpf_colorize)) != 0) 203 202 return ENOTSUP; 204 203 … … 307 306 308 307 if ((kfbbm->flags & bmpf_color_key) != 0) { 308 /* Simple copy */ 309 309 for (pos.y = crect.p0.y; pos.y < crect.p1.y; pos.y++) { 310 310 for (pos.x = crect.p0.x; pos.x < crect.p1.x; pos.x++) { … … 319 319 } 320 320 } 321 } else if ((kfbbm->flags & bmpf_colorize) != 0) { 322 /* Color key */ 323 for (pos.y = crect.p0.y; pos.y < crect.p1.y; pos.y++) { 324 for (pos.x = crect.p0.x; pos.x < crect.p1.x; pos.x++) { 325 gfx_coord2_subtract(&pos, &kfbbm->rect.p0, &sp); 326 gfx_coord2_add(&pos, &offs, &dp); 327 328 color = pixelmap_get_pixel(&pbm, sp.x, sp.y); 329 kfb->pixel2visual(kfb->addr + 330 FB_POS(kfb, dp.x, dp.y), color); 331 } 332 } 321 333 } else { 334 /* Color key & colorize */ 322 335 for (pos.y = crect.p0.y; pos.y < crect.p1.y; pos.y++) { 323 336 for (pos.x = crect.p0.x; pos.x < crect.p1.x; pos.x++) {
Note:
See TracChangeset
for help on using the changeset viewer.