Subversion Repositories HelenOS

Rev

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

Rev 4339 Rev 4342
Line 234... Line 234...
234
    *((uint32_t *) dst)
234
    *((uint32_t *) dst)
235
        = (BLUE(rgb, 8) << 16) | (GREEN(rgb, 8) << 8) | RED(rgb, 8);
235
        = (BLUE(rgb, 8) << 16) | (GREEN(rgb, 8) << 8) | RED(rgb, 8);
236
}
236
}
237
 
237
 
238
 
238
 
239
/** BGR 8:8:8 conversion
239
/** RGB 8:8:8 conversion
240
 *
240
 *
241
 */
241
 */
242
static void rgb_888(void *dst, uint32_t rgb)
242
static void rgb_888(void *dst, uint32_t rgb)
243
{
243
{
244
#if defined(FB_INVERT_ENDIAN)
-
 
245
    ((uint8_t *) dst)[0] = RED(rgb, 8);
-
 
246
    ((uint8_t *) dst)[1] = GREEN(rgb, 8);
-
 
247
    ((uint8_t *) dst)[2] = BLUE(rgb, 8);
-
 
248
#else
-
 
249
    ((uint8_t *) dst)[0] = BLUE(rgb, 8);
244
    ((uint8_t *) dst)[0] = BLUE(rgb, 8);
250
    ((uint8_t *) dst)[1] = GREEN(rgb, 8);
245
    ((uint8_t *) dst)[1] = GREEN(rgb, 8);
251
    ((uint8_t *) dst)[2] = RED(rgb, 8);
246
    ((uint8_t *) dst)[2] = RED(rgb, 8);
-
 
247
}
-
 
248
 
-
 
249
 
-
 
250
/** BGR 8:8:8 conversion
-
 
251
 *
252
#endif
252
 */
-
 
253
static void bgr_888(void *dst, uint32_t rgb)
-
 
254
{
-
 
255
    ((uint8_t *) dst)[0] = RED(rgb, 8);
-
 
256
    ((uint8_t *) dst)[1] = GREEN(rgb, 8);
-
 
257
    ((uint8_t *) dst)[2] = BLUE(rgb, 8);
253
}
258
}
254
 
259
 
255
 
260
 
256
/** RGB 5:5:5 conversion
261
/** RGB 5:5:5 conversion
257
 *
262
 *
Line 595... Line 600...
595
        break;
600
        break;
596
    case VISUAL_RGB_8_8_8:
601
    case VISUAL_RGB_8_8_8:
597
        screen.rgb_conv = rgb_888;
602
        screen.rgb_conv = rgb_888;
598
        screen.pixelbytes = 3;
603
        screen.pixelbytes = 3;
599
        break;
604
        break;
-
 
605
    case VISUAL_BGR_8_8_8:
-
 
606
        screen.rgb_conv = bgr_888;
-
 
607
        screen.pixelbytes = 3;
-
 
608
        break;
600
    case VISUAL_RGB_8_8_8_0:
609
    case VISUAL_RGB_8_8_8_0:
601
        screen.rgb_conv = rgb_888;
610
        screen.rgb_conv = rgb_888;
602
        screen.pixelbytes = 4;
611
        screen.pixelbytes = 4;
603
        break;
612
        break;
604
    case VISUAL_RGB_0_8_8_8:
613
    case VISUAL_RGB_0_8_8_8: