Subversion Repositories HelenOS

Rev

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

Rev 3844 Rev 3876
Line 118... Line 118...
118
    *((uint32_t *) dst)
118
    *((uint32_t *) dst)
119
        = (BLUE(rgb, 8) << 16) | (GREEN(rgb, 8) << 8) | RED(rgb, 8);
119
        = (BLUE(rgb, 8) << 16) | (GREEN(rgb, 8) << 8) | RED(rgb, 8);
120
}
120
}
121
 
121
 
122
 
122
 
123
/** BGR 8:8:8 conversion
123
/** RGB 8:8:8 conversion
124
 *
124
 *
125
 */
125
 */
126
static void rgb_888(void *dst, uint32_t rgb)
126
static void rgb_888(void *dst, uint32_t rgb)
127
{
127
{
128
#if defined(FB_INVERT_ENDIAN)
-
 
129
    ((uint8_t *) dst)[0] = RED(rgb, 8);
-
 
130
    ((uint8_t *) dst)[1] = GREEN(rgb, 8);
-
 
131
    ((uint8_t *) dst)[2] = BLUE(rgb, 8);
-
 
132
#else
-
 
133
    ((uint8_t *) dst)[0] = BLUE(rgb, 8);
128
    ((uint8_t *) dst)[0] = BLUE(rgb, 8);
134
    ((uint8_t *) dst)[1] = GREEN(rgb, 8);
129
    ((uint8_t *) dst)[1] = GREEN(rgb, 8);
135
    ((uint8_t *) dst)[2] = RED(rgb, 8);
130
    ((uint8_t *) dst)[2] = RED(rgb, 8);
-
 
131
}
-
 
132
 
-
 
133
 
-
 
134
/** BGR 8:8:8 conversion
-
 
135
 *
136
#endif
136
 */
-
 
137
static void bgr_888(void *dst, uint32_t rgb)
-
 
138
{
-
 
139
    ((uint8_t *) dst)[0] = RED(rgb, 8);
-
 
140
    ((uint8_t *) dst)[1] = GREEN(rgb, 8);
-
 
141
    ((uint8_t *) dst)[2] = BLUE(rgb, 8);
137
}
142
}
138
 
143
 
139
 
144
 
140
/** RGB 5:5:5 conversion
145
/** RGB 5:5:5 conversion
141
 *
146
 *
Line 447... Line 452...
447
        break;
452
        break;
448
    case VISUAL_RGB_8_8_8:
453
    case VISUAL_RGB_8_8_8:
449
        rgb_conv = rgb_888;
454
        rgb_conv = rgb_888;
450
        pixelbytes = 3;
455
        pixelbytes = 3;
451
        break;
456
        break;
-
 
457
    case VISUAL_BGR_8_8_8:
-
 
458
        rgb_conv = bgr_888;
-
 
459
        pixelbytes = 3;
-
 
460
        break;
452
    case VISUAL_RGB_8_8_8_0:
461
    case VISUAL_RGB_8_8_8_0:
453
        rgb_conv = rgb_888;
462
        rgb_conv = rgb_888;
454
        pixelbytes = 4;
463
        pixelbytes = 4;
455
        break;
464
        break;
456
    case VISUAL_RGB_0_8_8_8:
465
    case VISUAL_RGB_0_8_8_8: