summaryrefslogtreecommitdiff
path: root/libkmstest/color.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2015-10-07 10:30:23 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-10-07 10:30:23 +0300
commitc811a9c44cc9685211494f2daa62c9272c96eb90 (patch)
tree6fb3dee09422f2979cb4d48cb91f0ac77a719dd2 /libkmstest/color.h
parentdd43e09dd207430e3fc8d3b3749f21b1aa7d304e (diff)
libkmstest: cleanup colors and add xbgr8888 support
Diffstat (limited to 'libkmstest/color.h')
-rw-r--r--libkmstest/color.h34
1 files changed, 14 insertions, 20 deletions
diff --git a/libkmstest/color.h b/libkmstest/color.h
index 1db47e8..f84fc68 100644
--- a/libkmstest/color.h
+++ b/libkmstest/color.h
@@ -11,19 +11,17 @@ struct RGB
RGB();
RGB(uint8_t r, uint8_t g, uint8_t b);
+ uint32_t rgb888() const;
+ uint32_t bgr888() const;
uint16_t rgb565() const;
YUV yuv() const;
- union {
- struct
- {
- uint8_t b;
- uint8_t g;
- uint8_t r;
- uint8_t a;
- };
-
- uint32_t raw;
+ struct
+ {
+ uint8_t b;
+ uint8_t g;
+ uint8_t r;
+ uint8_t a;
};
};
@@ -33,16 +31,12 @@ struct YUV
YUV(uint8_t y, uint8_t u, uint8_t v);
YUV(const RGB& rgb);
- union {
- struct
- {
- uint8_t v;
- uint8_t u;
- uint8_t y;
- uint8_t a;
- };
-
- uint32_t raw;
+ struct
+ {
+ uint8_t v;
+ uint8_t u;
+ uint8_t y;
+ uint8_t a;
};
};
}