summaryrefslogtreecommitdiff
path: root/src/lib/ector
diff options
context:
space:
mode:
authorse.osadchy <se.osadchy@samsung.com>2016-01-05 20:41:12 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-01-06 13:50:34 +0900
commit996d17bcc5a08e75febb952586b6a87f48b990e4 (patch)
tree5d4c961881b0b88ac896cc541fefbf1efdee3a5b /src/lib/ector
parentd2bb0eefc4a2eb640027334a88f0d9581bafe263 (diff)
evas: Update Ector_Color structure.
Summary: Add a field at the end of the structure for defining the color encoding. Reviewers: cedric, Hermet, raster, jpeg Reviewed By: jpeg Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3530
Diffstat (limited to 'src/lib/ector')
-rw-r--r--src/lib/ector/ector_util.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/lib/ector/ector_util.h b/src/lib/ector/ector_util.h
index 6cf4e0ae8b..426c9a8a74 100644
--- a/src/lib/ector/ector_util.h
+++ b/src/lib/ector/ector_util.h
@@ -7,12 +7,20 @@
7 7
8typedef struct _Ector_Color Ector_Color; 8typedef struct _Ector_Color Ector_Color;
9 9
10typedef enum _Ector_Color_Type
11 {
12 ECTOR_COLOR,
13 ECTOR_COLOR16
14 } Ector_Color_Type;
15
10struct _Ector_Color 16struct _Ector_Color
11{ 17{
12 unsigned short r; 18 unsigned short r;
13 unsigned short g; 19 unsigned short g;
14 unsigned short b; 20 unsigned short b;
15 unsigned short a; 21 unsigned short a;
22
23 Ector_Color_Type type;
16}; 24};
17 25
18static inline void 26static inline void
@@ -51,6 +59,8 @@ ector_color_set(Ector_Color *color, unsigned char r, unsigned char g,
51 color->g = ECTOR_COLOR_SET(g); 59 color->g = ECTOR_COLOR_SET(g);
52 color->b = ECTOR_COLOR_SET(b); 60 color->b = ECTOR_COLOR_SET(b);
53 color->a = ECTOR_COLOR_SET(a); 61 color->a = ECTOR_COLOR_SET(a);
62
63 color->type = ECTOR_COLOR;
54} 64}
55 65
56static inline void 66static inline void
@@ -61,6 +71,14 @@ ector_color16_set(Ector_Color *color, unsigned short r, unsigned short g,
61 color->g = ECTOR_COLOR16_SET(g); 71 color->g = ECTOR_COLOR16_SET(g);
62 color->b = ECTOR_COLOR16_SET(b); 72 color->b = ECTOR_COLOR16_SET(b);
63 color->a = ECTOR_COLOR16_SET(a); 73 color->a = ECTOR_COLOR16_SET(a);
74
75 color->type = ECTOR_COLOR16;
76}
77
78static inline Ector_Color_Type
79ector_color_type_get(Ector_Color *color)
80{
81 return color->type;
64} 82}
65 83
66#endif 84#endif