Glop SkiaShader support
Change-Id: I894a0b62701bd02367ab970813e4c332147351a2
diff --git a/libs/hwui/FloatColor.h b/libs/hwui/FloatColor.h
index 803b9d4..b3bd5fd 100644
--- a/libs/hwui/FloatColor.h
+++ b/libs/hwui/FloatColor.h
@@ -18,10 +18,19 @@
#include "utils/Macros.h"
+#include <stdint.h>
+
namespace android {
namespace uirenderer {
struct FloatColor {
+ void set(uint32_t color) {
+ a = ((color >> 24) & 0xff) / 255.0f;
+ r = a * ((color >> 16) & 0xff) / 255.0f;
+ g = a * ((color >> 8) & 0xff) / 255.0f;
+ b = a * ((color ) & 0xff) / 255.0f;
+ }
+
float r;
float g;
float b;