summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d57d985)
raw | patch | inline | side by side (parent: d57d985)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Thu, 17 Mar 2016 16:47:31 +0000 (18:47 +0200) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Thu, 17 Mar 2016 16:47:31 +0000 (18:47 +0200) |
libkmstest/color.cpp | patch | blob | history | |
libkmstest/color.h | patch | blob | history |
diff --git a/libkmstest/color.cpp b/libkmstest/color.cpp
index 3ad8203955dd9fa448a1c7f3e757428470b2186e..490ff64c54ab1dd651f742f843a57c3535d1decc 100644 (file)
--- a/libkmstest/color.cpp
+++ b/libkmstest/color.cpp
this->a = (argb >> 24) & 0xff;
}
+uint32_t RGB::rgb888() const
+{
+ return (r << 16) | (g << 8) | (b << 0);
+}
+
uint32_t RGB::argb8888() const
{
return (a << 24) | (r << 16) | (g << 8) | (b << 0);
diff --git a/libkmstest/color.h b/libkmstest/color.h
index f99a951de739b6368ee5d180de4138ec94c530d3..ef85a674eada429127383e15c7e4448a860c5771 100644 (file)
--- a/libkmstest/color.h
+++ b/libkmstest/color.h
RGB(uint8_t a, uint8_t r, uint8_t g, uint8_t b);
RGB(uint32_t argb);
+ uint32_t rgb888() const;
uint32_t argb8888() const;
uint32_t abgr8888() const;
uint16_t rgb565() const;