testpat: cleanup and fix drawing yuv pixels
[android/external-libkmsxx.git] / libkmstest / color.h
index 1db47e8a930be9ddb7d72ea25a33cd4a7ff2fc5d..f84fc689d6c0d28406b6acfac2d55a87977648bb 100644 (file)
@@ -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;
        };
 };
 }