Changeset ba733e83 in mainline for uspace/lib/draw/surface.c


Ignore:
Timestamp:
2012-11-23T10:08:02Z (12 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
563573b
Parents:
7dba813
Message:

Improved safety of the optimized pixel transfers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/draw/surface.c

    r7dba813 rba733e83  
    171171        surface->dirty_y_hi = surface->dirty_y_hi < y ? y : surface->dirty_y_hi;
    172172
    173         if (x < surface->pixmap.width && y < surface->pixmap.height) {
    174                 pixelmap_put_pixel(&surface->pixmap, x, y, pixel);
    175         }
     173        pixelmap_put_pixel(&surface->pixmap, x, y, pixel);
    176174}
    177175
    178176pixel_t surface_get_pixel(surface_t *surface, surface_coord_t x, surface_coord_t y)
    179177{
    180         if (x < surface->pixmap.width && y < surface->pixmap.height) {
    181                 return pixelmap_get_pixel(&surface->pixmap, x, y);
    182         } else {
    183                 return 0;
    184         }
     178        return pixelmap_get_pixel(&surface->pixmap, x, y);
    185179}
    186180
Note: See TracChangeset for help on using the changeset viewer.