Changeset 6d527cff in mainline


Ignore:
Timestamp:
2020-11-16T11:26:21Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
140e21a
Parents:
0d3bc7b1
git-author:
Jiri Svoboda <jiri@…> (2020-11-15 19:25:55)
git-committer:
Jiri Svoboda <jiri@…> (2020-11-16 11:26:21)
Message:

Remove headers which are no longer used

Location:
uspace
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/fb/kfb/port.c

    r0d3bc7b1 r6d527cff  
    5050#include <gfx/color.h>
    5151#include <gfx/coord.h>
    52 #include <io/mode.h>
    5352#include <io/pixelmap.h>
    5453#include <ipcgfx/server.h>
  • uspace/lib/c/include/io/pixelmap.h

    r0d3bc7b1 r6d527cff  
    4242#include <stddef.h>
    4343#include <io/pixel.h>
    44 
    45 /* Defines how a pixel outside of pixmap rectangle shall be treated */
    46 typedef enum {
    47         /* Pixels outside of a pixmap are PIXEL(0, 0, 0, 0) */
    48         PIXELMAP_EXTEND_TRANSPARENT_BLACK = 0,
    49 
    50         /* The pixmap is repeated infinetely */
    51         PIXELMAP_EXTEND_TILE,
    52 
    53         /* If outside of a pixmap, return closest pixel from the edge */
    54         PIXELMAP_EXTEND_SIDES,
    55 
    56         /*
    57          * If outside of a pixmap, return closest pixel from the edge,
    58          * with alpha = 0
    59          */
    60         PIXELMAP_EXTEND_TRANSPARENT_SIDES
    61 } pixelmap_extend_t;
    6244
    6345typedef struct {
     
    10688}
    10789
    108 static inline pixel_t pixelmap_get_extended_pixel(pixelmap_t *pixmap,
    109     native_t x, native_t y, pixelmap_extend_t extend)
    110 {
    111         bool transparent = false;
    112         if (extend == PIXELMAP_EXTEND_TILE) {
    113                 x %= pixmap->width;
    114                 y %= pixmap->height;
    115         } else if (extend == PIXELMAP_EXTEND_SIDES ||
    116             extend == PIXELMAP_EXTEND_TRANSPARENT_SIDES) {
    117                 bool transparent_outside =
    118                     (extend == PIXELMAP_EXTEND_TRANSPARENT_SIDES);
    119                 if (x < 0) {
    120                         x = 0;
    121                         transparent = transparent_outside;
    122                 } else if (((sysarg_t) x) >= pixmap->width) {
    123                         x = pixmap->width - 1;
    124                         transparent = transparent_outside;
    125                 }
    126 
    127                 if (y < 0) {
    128                         y = 0;
    129                         transparent = transparent_outside;
    130                 } else if (((sysarg_t) y) >= pixmap->height) {
    131                         y = pixmap->height - 1;
    132                         transparent = transparent_outside;
    133                 }
    134         }
    135 
    136         if (x < 0 || ((sysarg_t) x) >= pixmap->width ||
    137             y < 0 || ((sysarg_t) y) >= pixmap->height)
    138                 return PIXEL(0, 0, 0, 0);
    139 
    140         pixel_t pixel = pixelmap_get_pixel(pixmap, x, y);
    141 
    142         if (transparent)
    143                 pixel = PIXEL(0, RED(pixel), GREEN(pixel), BLUE(pixel));
    144 
    145         return pixel;
    146 }
    147 
    14890#endif
    14991
Note: See TracChangeset for help on using the changeset viewer.