Changeset 43ffecf in mainline
- Timestamp:
- 2021-05-06T17:26:49Z (4 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1167ad34
- Parents:
- fe333f8e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/memgfx/src/memgc.c
rfe333f8e r43ffecf 372 372 gfx_rect_t srect; 373 373 gfx_rect_t drect; 374 gfx_rect_t crect; 374 375 gfx_coord2_t offs; 375 376 gfx_coord_t x, y; … … 393 394 gfx_rect_translate(&offs, &srect, &drect); 394 395 395 /* XXX Clip destination rectangle?! */ 396 /* Clip destination rectangle */ 397 gfx_rect_clip(&drect, &mbm->mgc->clip_rect, &crect); 396 398 397 399 assert(mbm->alloc.pitch == (mbm->rect.p1.x - mbm->rect.p0.x) * … … 412 414 } else if ((mbm->flags & bmpf_color_key) == 0) { 413 415 /* Simple copy */ 414 for (y = drect.p0.y; y < drect.p1.y; y++) {415 for (x = drect.p0.x; x < drect.p1.x; x++) {416 for (y = crect.p0.y; y < crect.p1.y; y++) { 417 for (x = crect.p0.x; x < crect.p1.x; x++) { 416 418 pixel = pixelmap_get_pixel(&smap, 417 419 x - mbm->rect.p0.x - offs.x, … … 422 424 } else if ((mbm->flags & bmpf_colorize) == 0) { 423 425 /* Color key */ 424 for (y = drect.p0.y; y < drect.p1.y; y++) {425 for (x = drect.p0.x; x < drect.p1.x; x++) {426 for (y = crect.p0.y; y < crect.p1.y; y++) { 427 for (x = crect.p0.x; x < crect.p1.x; x++) { 426 428 pixel = pixelmap_get_pixel(&smap, 427 429 x - mbm->rect.p0.x - offs.x, … … 433 435 } else { 434 436 /* Color key & colorization */ 435 for (y = drect.p0.y; y < drect.p1.y; y++) {436 for (x = drect.p0.x; x < drect.p1.x; x++) {437 for (y = crect.p0.y; y < crect.p1.y; y++) { 438 for (x = crect.p0.x; x < crect.p1.x; x++) { 437 439 pixel = pixelmap_get_pixel(&smap, 438 440 x - mbm->rect.p0.x - offs.x, … … 445 447 } 446 448 447 mem_gc_invalidate_rect(mbm->mgc, & drect);449 mem_gc_invalidate_rect(mbm->mgc, &crect); 448 450 return EOK; 449 451 }
Note:
See TracChangeset
for help on using the changeset viewer.