summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-07 16:06:03 -0500
committerCedric BAIL <cedric.bail@free.fr>2019-03-08 12:06:20 -0800
commit58fb597acc362a225f84110026d73979caa62268 (patch)
tree08c6d87e9ade74f6229d0433a092257fd55633b3
parent04ccdefb3bba4070e38946c070403936aaf80898 (diff)
Revert "Emile: Move colorspaces to Efl.Gfx"
This reverts commit 0d41ad0c837a2e1655a4d41c28ec7f0ccf10639c. stop defining legacy types to eo types!!!! https://i.redd.it/95mmznk5wo021.gif Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8243
-rw-r--r--configure.ac4
-rw-r--r--src/Makefile_Ector.am1
-rw-r--r--src/lib/emile/Emile.h1
-rw-r--r--src/lib/emile/emile_image.h56
-rw-r--r--src/lib/evas/Evas_Loader.h42
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.c4
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_image.c4
-rw-r--r--src/modules/evas/image_savers/png/evas_image_save_png.c10
8 files changed, 64 insertions, 58 deletions
diff --git a/configure.ac b/configure.ac
index 232f504666..34d6abb4a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1581,8 +1581,6 @@ fi
1581EFL_CHECK_LIBS([EMILE], [zlib]) 1581EFL_CHECK_LIBS([EMILE], [zlib])
1582 1582
1583EFL_INTERNAL_DEPEND_PKG([EMILE], [eina]) 1583EFL_INTERNAL_DEPEND_PKG([EMILE], [eina])
1584requirements_cflags_emile="${requirements_cflags_emile} -I\${top_srcdir}/src/lib/efl -I\${top_builddir}/src/lib/efl"
1585requirements_pc_emile="efl >= ${PACKAGE_VERSION} ${requirements_pc_emile}"
1586 1584
1587EFL_EVAL_PKGS([EMILE]) 1585EFL_EVAL_PKGS([EMILE])
1588 1586
@@ -1634,8 +1632,6 @@ fi
1634 1632
1635EFL_INTERNAL_DEPEND_PKG([EET], [eina]) 1633EFL_INTERNAL_DEPEND_PKG([EET], [eina])
1636EFL_INTERNAL_DEPEND_PKG([EET], [emile]) 1634EFL_INTERNAL_DEPEND_PKG([EET], [emile])
1637requirements_pc_eet="${requirements_pc_eet} ${requirements_pc_emile}"
1638requirements_cflags_eet="${requirements_cflags_eet} ${requirements_cflags_emile}"
1639 1635
1640EFL_EVAL_PKGS([EET]) 1636EFL_EVAL_PKGS([EET])
1641 1637
diff --git a/src/Makefile_Ector.am b/src/Makefile_Ector.am
index ccd96d14d1..c74346a9d9 100644
--- a/src/Makefile_Ector.am
+++ b/src/Makefile_Ector.am
@@ -163,6 +163,7 @@ lib_ector_libector_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
163-DPACKAGE_BIN_DIR=\"$(bindir)\" \ 163-DPACKAGE_BIN_DIR=\"$(bindir)\" \
164-DPACKAGE_LIB_DIR=\"$(libdir)\" \ 164-DPACKAGE_LIB_DIR=\"$(libdir)\" \
165-DPACKAGE_DATA_DIR=\"$(datadir)/ector\" \ 165-DPACKAGE_DATA_DIR=\"$(datadir)/ector\" \
166-DEFL_BETA_API_SUPPORT=1 \
166@VALGRIND_CFLAGS@ \ 167@VALGRIND_CFLAGS@ \
167@SSE3_CFLAGS@ 168@SSE3_CFLAGS@
168 169
diff --git a/src/lib/emile/Emile.h b/src/lib/emile/Emile.h
index 741905ef2f..e517b6bb48 100644
--- a/src/lib/emile/Emile.h
+++ b/src/lib/emile/Emile.h
@@ -20,7 +20,6 @@
20#define EMILE_H_ 20#define EMILE_H_
21 21
22#include <Eina.h> 22#include <Eina.h>
23#include <interfaces/efl_gfx_types.eot.h>
24 23
25#ifdef EAPI 24#ifdef EAPI
26# undef EAPI 25# undef EAPI
diff --git a/src/lib/emile/emile_image.h b/src/lib/emile/emile_image.h
index 3c1c6f2333..8877a6008e 100644
--- a/src/lib/emile/emile_image.h
+++ b/src/lib/emile/emile_image.h
@@ -9,29 +9,39 @@
9 * @{ 9 * @{
10 */ 10 */
11 11
12typedef Efl_Gfx_Colorspace Emile_Colorspace; 12/**
13 13 * @typedef Emile_Colorspace
14#define EMILE_COLORSPACE_ARGB8888 EFL_GFX_COLORSPACE_ARGB8888 14 *
15#define EMILE_COLORSPACE_YCBCR422P601_PL EFL_GFX_COLORSPACE_YCBCR422P601_PL 15 * Flags that describe all colorspace known by EFL. Some routine may not know all of them.
16#define EMILE_COLORSPACE_YCBCR422P709_PL EFL_GFX_COLORSPACE_YCBCR422P709_PL 16 * All the value from below enum should be the same as in Evas_Loader.h
17#define EMILE_COLORSPACE_RGB565_A5P EFL_GFX_COLORSPACE_RGB565_A5P 17 *
18#define EMILE_COLORSPACE_GRY8 EFL_GFX_COLORSPACE_GRY8 18 * @see Evas_Colorspace
19#define EMILE_COLORSPACE_YCBCR422601_PL EFL_GFX_COLORSPACE_YCBCR422601_PL 19 * @see Eet_Colorspace
20#define EMILE_COLORSPACE_YCBCR420NV12601_PL EFL_GFX_COLORSPACE_YCBCR420NV12601_PL 20 *
21#define EMILE_COLORSPACE_YCBCR420TM12601_PL EFL_GFX_COLORSPACE_YCBCR420TM12601_PL 21 * @since 1.14
22#define EMILE_COLORSPACE_AGRY88 EFL_GFX_COLORSPACE_AGRY88 22 */
23 // ETC1/2 support 23typedef enum _Emile_Colorspace
24#define EMILE_COLORSPACE_ETC1 EFL_GFX_COLORSPACE_ETC1 24{
25#define EMILE_COLORSPACE_RGB8_ETC2 EFL_GFX_COLORSPACE_RGB8_ETC2 25 EMILE_COLORSPACE_ARGB8888,/**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */
26#define EMILE_COLORSPACE_RGBA8_ETC2_EAC EFL_GFX_COLORSPACE_RGBA8_ETC2_EAC 26 EMILE_COLORSPACE_YCBCR422P601_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-601 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */
27#define EMILE_COLORSPACE_ETC1_ALPHA EFL_GFX_COLORSPACE_ETC1_ALPHA 27 EMILE_COLORSPACE_YCBCR422P709_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-709 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */
28 // S3TC support 28 EMILE_COLORSPACE_RGB565_A5P, /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */
29#define EMILE_COLORSPACE_RGB_S3TC_DXT1 EFL_GFX_COLORSPACE_RGB_S3TC_DXT1 29 EMILE_COLORSPACE_GRY8 = 4,
30#define EMILE_COLORSPACE_RGBA_S3TC_DXT1 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT1 30 EMILE_COLORSPACE_YCBCR422601_PL, /**< YCbCr 4:2:2, ITU.BT-601 specifications. The data pointed to is just an array of row pointer, pointing to line of Y,Cb,Y,Cr bytes */
31#define EMILE_COLORSPACE_RGBA_S3TC_DXT2 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT2 31 EMILE_COLORSPACE_YCBCR420NV12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb,Cr rows. */
32#define EMILE_COLORSPACE_RGBA_S3TC_DXT3 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT3 32 EMILE_COLORSPACE_YCBCR420TM12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of tiled row pointer, pointing to the Y rows, then the Cb,Cr rows. */
33#define EMILE_COLORSPACE_RGBA_S3TC_DXT4 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT4 33 EMILE_COLORSPACE_AGRY88 = 8, /**< AY 8bits Alpha and 8bits Grey, accessed 1 16bits at a time */
34#define EMILE_COLORSPACE_RGBA_S3TC_DXT5 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT5 34 EMILE_COLORSPACE_ETC1 = 9, /**< OpenGL ETC1 encoding of RGB texture (4 bit per pixel) @since 1.10 */
35 EMILE_COLORSPACE_RGB8_ETC2 = 10, /**< OpenGL GL_COMPRESSED_RGB8_ETC2 texture compression format (4 bit per pixel) @since 1.10 */
36 EMILE_COLORSPACE_RGBA8_ETC2_EAC = 11, /**< OpenGL GL_COMPRESSED_RGBA8_ETC2_EAC texture compression format, supports alpha (8 bit per pixel) @since 1.10 */
37 EMILE_COLORSPACE_ETC1_ALPHA = 12, /**< ETC1 with alpha support using two planes: ETC1 RGB and ETC1 grey for alpha @since 1.11 */
38 EMILE_COLORSPACE_RGB_S3TC_DXT1 = 13, /**< OpenGL COMPRESSED_RGB_S3TC_DXT1_EXT format with RGB only. @since 1.11 */
39 EMILE_COLORSPACE_RGBA_S3TC_DXT1 = 14, /**< OpenGL COMPRESSED_RGBA_S3TC_DXT1_EXT format with RGBA punchthrough. @since 1.11 */
40 EMILE_COLORSPACE_RGBA_S3TC_DXT2 = 15, /**< DirectDraw DXT2 format with premultiplied RGBA. Not supported by OpenGL itself. @since 1.11 */
41 EMILE_COLORSPACE_RGBA_S3TC_DXT3 = 16, /**< OpenGL COMPRESSED_RGBA_S3TC_DXT3_EXT format with RGBA. @since 1.11 */
42 EMILE_COLORSPACE_RGBA_S3TC_DXT4 = 17, /**< DirectDraw DXT4 format with premultiplied RGBA. Not supported by OpenGL itself. @since 1.11 */
43 EMILE_COLORSPACE_RGBA_S3TC_DXT5 = 18 /**< OpenGL COMPRESSED_RGBA_S3TC_DXT5_EXT format with RGBA. @since 1.11 */
44} Emile_Colorspace;
35 45
36/** 46/**
37 * @typedef Emile_Image_Encoding 47 * @typedef Emile_Image_Encoding
diff --git a/src/lib/evas/Evas_Loader.h b/src/lib/evas/Evas_Loader.h
index 2e61f1bf60..787df4e81f 100644
--- a/src/lib/evas/Evas_Loader.h
+++ b/src/lib/evas/Evas_Loader.h
@@ -162,29 +162,29 @@ typedef Emile_Image_Scale_Hint Evas_Image_Scale_Hint; /**< How an image's data i
162 * Colorspaces for pixel data supported by Evas 162 * Colorspaces for pixel data supported by Evas
163 * @ingroup Evas_Object_Image 163 * @ingroup Evas_Object_Image
164 */ 164 */
165typedef Efl_Gfx_Colorspace Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */ 165typedef Emile_Colorspace Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */
166 166
167#define EVAS_COLORSPACE_ARGB8888 EFL_GFX_COLORSPACE_ARGB8888 167#define EVAS_COLORSPACE_ARGB8888 EMILE_COLORSPACE_ARGB8888
168#define EVAS_COLORSPACE_YCBCR422P601_PL EFL_GFX_COLORSPACE_YCBCR422P601_PL 168#define EVAS_COLORSPACE_YCBCR422P601_PL EMILE_COLORSPACE_YCBCR422P601_PL
169#define EVAS_COLORSPACE_YCBCR422P709_PL EFL_GFX_COLORSPACE_YCBCR422P709_PL 169#define EVAS_COLORSPACE_YCBCR422P709_PL EMILE_COLORSPACE_YCBCR422P709_PL
170#define EVAS_COLORSPACE_RGB565_A5P EFL_GFX_COLORSPACE_RGB565_A5P 170#define EVAS_COLORSPACE_RGB565_A5P EMILE_COLORSPACE_RGB565_A5P
171#define EVAS_COLORSPACE_GRY8 EFL_GFX_COLORSPACE_GRY8 171#define EVAS_COLORSPACE_GRY8 EMILE_COLORSPACE_GRY8
172#define EVAS_COLORSPACE_YCBCR422601_PL EFL_GFX_COLORSPACE_YCBCR422601_PL 172#define EVAS_COLORSPACE_YCBCR422601_PL EMILE_COLORSPACE_YCBCR422601_PL
173#define EVAS_COLORSPACE_YCBCR420NV12601_PL EFL_GFX_COLORSPACE_YCBCR420NV12601_PL 173#define EVAS_COLORSPACE_YCBCR420NV12601_PL EMILE_COLORSPACE_YCBCR420NV12601_PL
174#define EVAS_COLORSPACE_YCBCR420TM12601_PL EFL_GFX_COLORSPACE_YCBCR420TM12601_PL 174#define EVAS_COLORSPACE_YCBCR420TM12601_PL EMILE_COLORSPACE_YCBCR420TM12601_PL
175#define EVAS_COLORSPACE_AGRY88 EFL_GFX_COLORSPACE_AGRY88 175#define EVAS_COLORSPACE_AGRY88 EMILE_COLORSPACE_AGRY88
176 // ETC1/2 support 176 // ETC1/2 support
177#define EVAS_COLORSPACE_ETC1 EFL_GFX_COLORSPACE_ETC1 177#define EVAS_COLORSPACE_ETC1 EMILE_COLORSPACE_ETC1
178#define EVAS_COLORSPACE_RGB8_ETC2 EFL_GFX_COLORSPACE_RGB8_ETC2 178#define EVAS_COLORSPACE_RGB8_ETC2 EMILE_COLORSPACE_RGB8_ETC2
179#define EVAS_COLORSPACE_RGBA8_ETC2_EAC EFL_GFX_COLORSPACE_RGBA8_ETC2_EAC 179#define EVAS_COLORSPACE_RGBA8_ETC2_EAC EMILE_COLORSPACE_RGBA8_ETC2_EAC
180#define EVAS_COLORSPACE_ETC1_ALPHA EFL_GFX_COLORSPACE_ETC1_ALPHA 180#define EVAS_COLORSPACE_ETC1_ALPHA EMILE_COLORSPACE_ETC1_ALPHA
181 // S3TC support 181 // S3TC support
182#define EVAS_COLORSPACE_RGB_S3TC_DXT1 EFL_GFX_COLORSPACE_RGB_S3TC_DXT1 182#define EVAS_COLORSPACE_RGB_S3TC_DXT1 EMILE_COLORSPACE_RGB_S3TC_DXT1
183#define EVAS_COLORSPACE_RGBA_S3TC_DXT1 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT1 183#define EVAS_COLORSPACE_RGBA_S3TC_DXT1 EMILE_COLORSPACE_RGBA_S3TC_DXT1
184#define EVAS_COLORSPACE_RGBA_S3TC_DXT2 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT2 184#define EVAS_COLORSPACE_RGBA_S3TC_DXT2 EMILE_COLORSPACE_RGBA_S3TC_DXT2
185#define EVAS_COLORSPACE_RGBA_S3TC_DXT3 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT3 185#define EVAS_COLORSPACE_RGBA_S3TC_DXT3 EMILE_COLORSPACE_RGBA_S3TC_DXT3
186#define EVAS_COLORSPACE_RGBA_S3TC_DXT4 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT4 186#define EVAS_COLORSPACE_RGBA_S3TC_DXT4 EMILE_COLORSPACE_RGBA_S3TC_DXT4
187#define EVAS_COLORSPACE_RGBA_S3TC_DXT5 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT5 187#define EVAS_COLORSPACE_RGBA_S3TC_DXT5 EMILE_COLORSPACE_RGBA_S3TC_DXT5
188 188
189struct _Evas_Image_Load_Func 189struct _Evas_Image_Load_Func
190{ 190{
diff --git a/src/lib/evas/canvas/efl_canvas_image.c b/src/lib/evas/canvas/efl_canvas_image.c
index c89ee213f8..434c427bb0 100644
--- a/src/lib/evas/canvas/efl_canvas_image.c
+++ b/src/lib/evas/canvas/efl_canvas_image.c
@@ -598,7 +598,7 @@ _image_pixels_set(Evas_Object_Protected_Data *obj,
598 ENFN->image_size_get(ENC, o->engine_data, &iw, &ih); 598 ENFN->image_size_get(ENC, o->engine_data, &iw, &ih);
599 ics = ENFN->image_colorspace_get(ENC, o->engine_data); 599 ics = ENFN->image_colorspace_get(ENC, o->engine_data);
600 alpha = ENFN->image_alpha_get(ENC, o->engine_data); 600 alpha = ENFN->image_alpha_get(ENC, o->engine_data);
601 if ((w != iw) || (h != ih) || (ics != cspace) || (alpha != o->cur->has_alpha)) 601 if ((w != iw) || (h != ih) || (ics != (Evas_Colorspace)cspace) || (alpha != o->cur->has_alpha))
602 { 602 {
603 ENFN->image_free(ENC, o->engine_data); 603 ENFN->image_free(ENC, o->engine_data);
604 o->engine_data = NULL; 604 o->engine_data = NULL;
@@ -639,7 +639,7 @@ _image_pixels_set(Evas_Object_Protected_Data *obj,
639 ENFN->image_stride_get(ENC, o->engine_data, &int_stride); 639 ENFN->image_stride_get(ENC, o->engine_data, &int_stride);
640 640
641 if (resized || o->cur->f || o->cur->key || 641 if (resized || o->cur->f || o->cur->key ||
642 (o->cur->image.stride != int_stride) || (cspace != o->cur->cspace)) 642 (o->cur->image.stride != int_stride) || (cspace != (Efl_Gfx_Colorspace)o->cur->cspace))
643 { 643 {
644 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, cur) 644 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, cur)
645 { 645 {
diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c
index c7a854f34d..ffe29e39b2 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_image.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_image.c
@@ -904,9 +904,9 @@ evas_gl_common_image_surface_update(Evas_GL_Image *im)
904 if (!im || !im->gc || !im->im || !im->im->image.data) 904 if (!im || !im->gc || !im->im || !im->im->image.data)
905 goto fail; 905 goto fail;
906 906
907 if (im->im->cache_entry.space == EFL_GFX_COLORSPACE_ARGB8888) 907 if (im->im->cache_entry.space == (Evas_Colorspace)EFL_GFX_COLORSPACE_ARGB8888)
908 alpha = EINA_FALSE; 908 alpha = EINA_FALSE;
909 else if (im->im->cache_entry.space == EFL_GFX_COLORSPACE_GRY8) 909 else if (im->im->cache_entry.space == (Evas_Colorspace)EFL_GFX_COLORSPACE_GRY8)
910 alpha = EINA_TRUE; 910 alpha = EINA_TRUE;
911 else goto fail; 911 else goto fail;
912 912
diff --git a/src/modules/evas/image_savers/png/evas_image_save_png.c b/src/modules/evas/image_savers/png/evas_image_save_png.c
index a34b0b9c58..bd6b5c31a1 100644
--- a/src/modules/evas/image_savers/png/evas_image_save_png.c
+++ b/src/modules/evas/image_savers/png/evas_image_save_png.c
@@ -40,9 +40,9 @@ save_image_png(RGBA_Image *im, const char *file, int do_compress, int interlace)
40 if (!im || !im->image.data || !file) 40 if (!im || !im->image.data || !file)
41 return 0; 41 return 0;
42 42
43 if ((im->cache_entry.space != EFL_GFX_COLORSPACE_ARGB8888) && 43 if (((Efl_Gfx_Colorspace)im->cache_entry.space != EFL_GFX_COLORSPACE_ARGB8888) &&
44 (im->cache_entry.space != EFL_GFX_COLORSPACE_AGRY88) && 44 ((Efl_Gfx_Colorspace)im->cache_entry.space != EFL_GFX_COLORSPACE_AGRY88) &&
45 (im->cache_entry.space != EFL_GFX_COLORSPACE_GRY8)) 45 ((Efl_Gfx_Colorspace)im->cache_entry.space != EFL_GFX_COLORSPACE_GRY8))
46 return 0; 46 return 0;
47 47
48 f = fopen(file, "wb"); 48 f = fopen(file, "wb");
@@ -76,7 +76,7 @@ save_image_png(RGBA_Image *im, const char *file, int do_compress, int interlace)
76 else 76 else
77 interlace = PNG_INTERLACE_NONE; 77 interlace = PNG_INTERLACE_NONE;
78 78
79 if (im->cache_entry.space == EFL_GFX_COLORSPACE_GRY8) 79 if ((Efl_Gfx_Colorspace)im->cache_entry.space == EFL_GFX_COLORSPACE_GRY8)
80 { 80 {
81 gry8 = EINA_TRUE; 81 gry8 = EINA_TRUE;
82 pixel_size = 1; 82 pixel_size = 1;
@@ -86,7 +86,7 @@ save_image_png(RGBA_Image *im, const char *file, int do_compress, int interlace)
86 PNG_COLOR_TYPE_GRAY, interlace, 86 PNG_COLOR_TYPE_GRAY, interlace,
87 PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); 87 PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
88 } 88 }
89 else if (im->cache_entry.space == EFL_GFX_COLORSPACE_AGRY88) 89 else if ((Efl_Gfx_Colorspace)im->cache_entry.space == EFL_GFX_COLORSPACE_AGRY88)
90 { 90 {
91 agry88 = EINA_TRUE; 91 agry88 = EINA_TRUE;
92 pixel_size = 2; 92 pixel_size = 2;