Changeset 8aef01c in mainline for uspace/lib/memgfx/src/memgc.c
- Timestamp:
- 2020-06-07T10:18:14Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a65b0c8
- Parents:
- 6301a24f
- git-author:
- Jiri Svoboda <jiri@…> (2020-06-07 10:11:32)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-06-07 10:18:14)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/memgfx/src/memgc.c
r6301a24f r8aef01c 284 284 gfx_rect_t drect; 285 285 gfx_coord2_t offs; 286 gfx_coord2_t dim;287 286 gfx_coord_t x, y; 288 287 pixelmap_t smap; … … 305 304 gfx_rect_translate(&offs, &srect, &drect); 306 305 307 gfx_coord2_subtract(&drect.p1, &drect.p0, &dim); 308 309 assert(mbm->rect.p0.x == 0); 310 assert(mbm->rect.p0.y == 0); 311 assert(mbm->alloc.pitch == mbm->rect.p1.x * (int)sizeof(uint32_t)); 312 smap.width = mbm->rect.p1.x; 313 smap.height = mbm->rect.p1.y; 306 assert(mbm->alloc.pitch == (mbm->rect.p1.x - mbm->rect.p0.x) * 307 (int)sizeof(uint32_t)); 308 smap.width = mbm->rect.p1.x - mbm->rect.p0.x; 309 smap.height = mbm->rect.p1.y - mbm->rect.p0.y; 314 310 smap.data = mbm->alloc.pixels; 315 311 … … 324 320 for (y = drect.p0.y; y < drect.p1.y; y++) { 325 321 for (x = drect.p0.x; x < drect.p1.x; x++) { 326 pixel = pixelmap_get_pixel(&smap, x - offs.x, 327 y - offs.y); 322 pixel = pixelmap_get_pixel(&smap, 323 x - mbm->rect.p0.x - offs.x, 324 y - mbm->rect.p0.y - offs.y); 328 325 pixelmap_put_pixel(&dmap, x, y, pixel); 329 326 } … … 332 329 for (y = drect.p0.y; y < drect.p1.y; y++) { 333 330 for (x = drect.p0.x; x < drect.p1.x; x++) { 334 pixel = pixelmap_get_pixel(&smap, x - offs.x, 335 y - offs.y); 331 pixel = pixelmap_get_pixel(&smap, 332 x - mbm->rect.p0.x - offs.x, 333 y - mbm->rect.p0.y - offs.y); 336 334 if (pixel != mbm->key_color) 337 335 pixelmap_put_pixel(&dmap, x, y, pixel);
Note:
See TracChangeset
for help on using the changeset viewer.