Subversion Repositories HelenOS

Rev

Rev 2089 | Rev 3672 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2089 Rev 2102
Line 121... Line 121...
121
        ((color >> 16) & 0xff);
121
        ((color >> 16) & 0xff);
122
}
122
}
123
 
123
 
124
static void rgb_byte888(void *dst, int rgb)
124
static void rgb_byte888(void *dst, int rgb)
125
{
125
{
126
    uint8_t *scr = dst;
126
    uint8_t *scr = (uint8_t *) dst;
127
#if defined(FB_INVERT_ENDIAN)
127
#if defined(FB_INVERT_ENDIAN)
128
    scr[0] = RED(rgb, 8);
128
    scr[0] = RED(rgb, 8);
129
    scr[1] = GREEN(rgb, 8);
129
    scr[1] = GREEN(rgb, 8);
130
    scr[2] = BLUE(rgb, 8);
130
    scr[2] = BLUE(rgb, 8);
131
#else
131
#else
Line 135... Line 135...
135
#endif
135
#endif
136
}
136
}
137
 
137
 
138
static int byte888_rgb(void *src)
138
static int byte888_rgb(void *src)
139
{
139
{
140
    uint8_t *scr = src;
140
    uint8_t *scr = (uint8_t *) src;
141
#if defined(FB_INVERT_ENDIAN)
141
#if defined(FB_INVERT_ENDIAN)
142
    return scr[0] << 16 | scr[1] << 8 | scr[2];
142
    return scr[0] << 16 | scr[1] << 8 | scr[2];
143
#else
143
#else
144
    return scr[2] << 16 | scr[1] << 8 | scr[0];
144
    return scr[2] << 16 | scr[1] << 8 | scr[0];
145
#endif  
145
#endif  
Line 263... Line 263...
263
             * in some way. For example, the SUNW,ffb framebuffer
263
             * in some way. For example, the SUNW,ffb framebuffer
264
             * wraps this area around the beginning of the same
264
             * wraps this area around the beginning of the same
265
             * line. To avoid troubles, copy only memory as
265
             * line. To avoid troubles, copy only memory as
266
             * specified by the resolution.
266
             * specified by the resolution.
267
             */
267
             */
268
            int i;
268
            unsigned int i;
269
 
269
 
270
            for (i = 0; i < first; i++)
270
            for (i = 0; i < first; i++)
271
                memcpy(&fbaddress[i * scanline],
271
                memcpy(&fbaddress[i * scanline],
272
                    &dbbuffer[(dboffset + i) * scanline],
272
                    &dbbuffer[(dboffset + i) * scanline],
273
                    xres * pixelbytes);
273
                    xres * pixelbytes);
Line 288... Line 288...
288
                ROW_BYTES);
288
                ROW_BYTES);
289
        } else {
289
        } else {
290
            /*
290
            /*
291
             * See the comment in the dbbuffer case.
291
             * See the comment in the dbbuffer case.
292
             */
292
             */
293
            int i;
293
            unsigned int i;
294
 
294
 
295
            /* Move all rows one row up */
295
            /* Move all rows one row up */
296
            for (i = 0; i < yres - FONT_SCANLINES; i++)
296
            for (i = 0; i < yres - FONT_SCANLINES; i++)
297
                memcpy(&fbaddress[i * scanline],
297
                memcpy(&fbaddress[i * scanline],
298
                    &fbaddress[(i + FONT_SCANLINES) * scanline],
298
                    &fbaddress[(i + FONT_SCANLINES) * scanline],