Changeset 95b9963 in mainline


Ignore:
Timestamp:
2009-02-12T20:04:19Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
af75db9
Parents:
0f81ceb7
Message:

add BGR 888 visual, remove FB_INVERT_ENDIAN

Location:
kernel/genarch
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/include/fb/fb.h

    r0f81ceb7 r95b9963  
    5050         * relative to "addr".
    5151         */
    52         unsigned int offset;   
     52        unsigned int offset;
    5353
    5454        /** Screen width in pixels. */
  • kernel/genarch/include/fb/visuals.h

    r0f81ceb7 r95b9963  
    4545
    4646#define VISUAL_BGR_0_8_8_8  6
     47#define VISUAL_BGR_8_8_8    7
    4748
    4849#endif
  • kernel/genarch/src/fb/fb.c

    r0f81ceb7 r95b9963  
    121121
    122122
     123/** RGB 8:8:8 conversion
     124 *
     125 */
     126static void rgb_888(void *dst, uint32_t rgb)
     127{
     128        ((uint8_t *) dst)[0] = BLUE(rgb, 8);
     129        ((uint8_t *) dst)[1] = GREEN(rgb, 8);
     130        ((uint8_t *) dst)[2] = RED(rgb, 8);
     131}
     132
     133
    123134/** BGR 8:8:8 conversion
    124135 *
    125136 */
    126 static void rgb_888(void *dst, uint32_t rgb)
    127 {
    128 #if defined(FB_INVERT_ENDIAN)
     137static void bgr_888(void *dst, uint32_t rgb)
     138{
    129139        ((uint8_t *) dst)[0] = RED(rgb, 8);
    130140        ((uint8_t *) dst)[1] = GREEN(rgb, 8);
    131141        ((uint8_t *) dst)[2] = BLUE(rgb, 8);
    132 #else
    133         ((uint8_t *) dst)[0] = BLUE(rgb, 8);
    134         ((uint8_t *) dst)[1] = GREEN(rgb, 8);
    135         ((uint8_t *) dst)[2] = RED(rgb, 8);
    136 #endif
    137142}
    138143
     
    450455                pixelbytes = 3;
    451456                break;
     457        case VISUAL_BGR_8_8_8:
     458                rgb_conv = bgr_888;
     459                pixelbytes = 3;
     460                break;
    452461        case VISUAL_RGB_8_8_8_0:
    453462                rgb_conv = rgb_888;
Note: See TracChangeset for help on using the changeset viewer.