From: Mike Blumenkrantz Date: Thu, 7 Mar 2019 21:06:03 +0000 (-0500) Subject: Revert "Emile: Move colorspaces to Efl.Gfx" X-Git-Tag: submit/tizen/20190318.043110~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3517feb38d86d82d42e4268ec3645d8ca279b34f;p=platform%2Fupstream%2Fefl.git 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 Differential Revision: https://phab.enlightenment.org/D8243 Change-Id: I0fc806fc83cc37648c5a99cdb465a888474647cc --- diff --git a/configure.ac b/configure.ac index 9d77ccd..7673e9e 100755 --- a/configure.ac +++ b/configure.ac @@ -1590,8 +1590,6 @@ fi EFL_CHECK_LIBS([EMILE], [zlib]) EFL_INTERNAL_DEPEND_PKG([EMILE], [eina]) -requirements_cflags_emile="${requirements_cflags_emile} -I\${top_srcdir}/src/lib/efl -I\${top_builddir}/src/lib/efl" -requirements_pc_emile="efl >= ${PACKAGE_VERSION} ${requirements_pc_emile}" EFL_EVAL_PKGS([EMILE]) @@ -1643,8 +1641,6 @@ fi EFL_INTERNAL_DEPEND_PKG([EET], [eina]) EFL_INTERNAL_DEPEND_PKG([EET], [emile]) -requirements_pc_eet="${requirements_pc_eet} ${requirements_pc_emile}" -requirements_cflags_eet="${requirements_cflags_eet} ${requirements_cflags_emile}" EFL_EVAL_PKGS([EET]) diff --git a/src/Makefile_Ector.am b/src/Makefile_Ector.am index ccd96d1..c74346a 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 \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/ector\" \ +-DEFL_BETA_API_SUPPORT=1 \ @VALGRIND_CFLAGS@ \ @SSE3_CFLAGS@ diff --git a/src/lib/emile/Emile.h b/src/lib/emile/Emile.h index 741905e..e517b6b 100644 --- a/src/lib/emile/Emile.h +++ b/src/lib/emile/Emile.h @@ -20,7 +20,6 @@ #define EMILE_H_ #include -#include #ifdef EAPI # undef EAPI diff --git a/src/lib/emile/emile_image.h b/src/lib/emile/emile_image.h index b39dc11..6693776 100644 --- a/src/lib/emile/emile_image.h +++ b/src/lib/emile/emile_image.h @@ -9,29 +9,39 @@ * @{ */ -typedef Efl_Gfx_Colorspace Emile_Colorspace; - -#define EMILE_COLORSPACE_ARGB8888 EFL_GFX_COLORSPACE_ARGB8888 -#define EMILE_COLORSPACE_YCBCR422P601_PL EFL_GFX_COLORSPACE_YCBCR422P601_PL -#define EMILE_COLORSPACE_YCBCR422P709_PL EFL_GFX_COLORSPACE_YCBCR422P709_PL -#define EMILE_COLORSPACE_RGB565_A5P EFL_GFX_COLORSPACE_RGB565_A5P -#define EMILE_COLORSPACE_GRY8 EFL_GFX_COLORSPACE_GRY8 -#define EMILE_COLORSPACE_YCBCR422601_PL EFL_GFX_COLORSPACE_YCBCR422601_PL -#define EMILE_COLORSPACE_YCBCR420NV12601_PL EFL_GFX_COLORSPACE_YCBCR420NV12601_PL -#define EMILE_COLORSPACE_YCBCR420TM12601_PL EFL_GFX_COLORSPACE_YCBCR420TM12601_PL -#define EMILE_COLORSPACE_AGRY88 EFL_GFX_COLORSPACE_AGRY88 - // ETC1/2 support -#define EMILE_COLORSPACE_ETC1 EFL_GFX_COLORSPACE_ETC1 -#define EMILE_COLORSPACE_RGB8_ETC2 EFL_GFX_COLORSPACE_RGB8_ETC2 -#define EMILE_COLORSPACE_RGBA8_ETC2_EAC EFL_GFX_COLORSPACE_RGBA8_ETC2_EAC -#define EMILE_COLORSPACE_ETC1_ALPHA EFL_GFX_COLORSPACE_ETC1_ALPHA - // S3TC support -#define EMILE_COLORSPACE_RGB_S3TC_DXT1 EFL_GFX_COLORSPACE_RGB_S3TC_DXT1 -#define EMILE_COLORSPACE_RGBA_S3TC_DXT1 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT1 -#define EMILE_COLORSPACE_RGBA_S3TC_DXT2 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT2 -#define EMILE_COLORSPACE_RGBA_S3TC_DXT3 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT3 -#define EMILE_COLORSPACE_RGBA_S3TC_DXT4 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT4 -#define EMILE_COLORSPACE_RGBA_S3TC_DXT5 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT5 +/** + * @typedef Emile_Colorspace + * + * Flags that describe all colorspace known by EFL. Some routine may not know all of them. + * All the value from below enum should be the same as in Evas_Loader.h + * + * @see Evas_Colorspace + * @see Eet_Colorspace + * + * @since 1.14 + */ +typedef enum _Emile_Colorspace +{ + EMILE_COLORSPACE_ARGB8888,/**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */ + 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 */ + 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 */ + EMILE_COLORSPACE_RGB565_A5P, /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */ + EMILE_COLORSPACE_GRY8 = 4, + 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 */ + 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. */ + 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. */ + EMILE_COLORSPACE_AGRY88 = 8, /**< AY 8bits Alpha and 8bits Grey, accessed 1 16bits at a time */ + EMILE_COLORSPACE_ETC1 = 9, /**< OpenGL ETC1 encoding of RGB texture (4 bit per pixel) @since 1.10 */ + EMILE_COLORSPACE_RGB8_ETC2 = 10, /**< OpenGL GL_COMPRESSED_RGB8_ETC2 texture compression format (4 bit per pixel) @since 1.10 */ + EMILE_COLORSPACE_RGBA8_ETC2_EAC = 11, /**< OpenGL GL_COMPRESSED_RGBA8_ETC2_EAC texture compression format, supports alpha (8 bit per pixel) @since 1.10 */ + EMILE_COLORSPACE_ETC1_ALPHA = 12, /**< ETC1 with alpha support using two planes: ETC1 RGB and ETC1 grey for alpha @since 1.11 */ + EMILE_COLORSPACE_RGB_S3TC_DXT1 = 13, /**< OpenGL COMPRESSED_RGB_S3TC_DXT1_EXT format with RGB only. @since 1.11 */ + EMILE_COLORSPACE_RGBA_S3TC_DXT1 = 14, /**< OpenGL COMPRESSED_RGBA_S3TC_DXT1_EXT format with RGBA punchthrough. @since 1.11 */ + EMILE_COLORSPACE_RGBA_S3TC_DXT2 = 15, /**< DirectDraw DXT2 format with premultiplied RGBA. Not supported by OpenGL itself. @since 1.11 */ + EMILE_COLORSPACE_RGBA_S3TC_DXT3 = 16, /**< OpenGL COMPRESSED_RGBA_S3TC_DXT3_EXT format with RGBA. @since 1.11 */ + EMILE_COLORSPACE_RGBA_S3TC_DXT4 = 17, /**< DirectDraw DXT4 format with premultiplied RGBA. Not supported by OpenGL itself. @since 1.11 */ + EMILE_COLORSPACE_RGBA_S3TC_DXT5 = 18 /**< OpenGL COMPRESSED_RGBA_S3TC_DXT5_EXT format with RGBA. @since 1.11 */ +} Emile_Colorspace; /** * @typedef Emile_Image_Encoding diff --git a/src/lib/evas/Evas_Loader.h b/src/lib/evas/Evas_Loader.h index ed73d2e..dd620bf 100644 --- a/src/lib/evas/Evas_Loader.h +++ b/src/lib/evas/Evas_Loader.h @@ -162,30 +162,32 @@ typedef Emile_Image_Scale_Hint Evas_Image_Scale_Hint; /**< How an image's data i * Colorspaces for pixel data supported by Evas * @ingroup Evas_Object_Image */ -typedef Efl_Gfx_Colorspace Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */ - -#define EVAS_COLORSPACE_ARGB8888 EFL_GFX_COLORSPACE_ARGB8888 -#define EVAS_COLORSPACE_YCBCR422P601_PL EFL_GFX_COLORSPACE_YCBCR422P601_PL -#define EVAS_COLORSPACE_YCBCR422P709_PL EFL_GFX_COLORSPACE_YCBCR422P709_PL -#define EVAS_COLORSPACE_RGB565_A5P EFL_GFX_COLORSPACE_RGB565_A5P -#define EVAS_COLORSPACE_GRY8 EFL_GFX_COLORSPACE_GRY8 -#define EVAS_COLORSPACE_YCBCR422601_PL EFL_GFX_COLORSPACE_YCBCR422601_PL -#define EVAS_COLORSPACE_YCBCR420NV12601_PL EFL_GFX_COLORSPACE_YCBCR420NV12601_PL -#define EVAS_COLORSPACE_YCBCR420TM12601_PL EFL_GFX_COLORSPACE_YCBCR420TM12601_PL -#define EVAS_COLORSPACE_AGRY88 EFL_GFX_COLORSPACE_AGRY88 +typedef Emile_Colorspace Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */ + +#define EVAS_COLORSPACE_ARGB8888 EMILE_COLORSPACE_ARGB8888 +#define EVAS_COLORSPACE_YCBCR422P601_PL EMILE_COLORSPACE_YCBCR422P601_PL +#define EVAS_COLORSPACE_YCBCR422P709_PL EMILE_COLORSPACE_YCBCR422P709_PL +#define EVAS_COLORSPACE_RGB565_A5P EMILE_COLORSPACE_RGB565_A5P +#define EVAS_COLORSPACE_GRY8 EMILE_COLORSPACE_GRY8 +#define EVAS_COLORSPACE_YCBCR422601_PL EMILE_COLORSPACE_YCBCR422601_PL +#define EVAS_COLORSPACE_YCBCR420NV12601_PL EMILE_COLORSPACE_YCBCR420NV12601_PL +#define EVAS_COLORSPACE_YCBCR420TM12601_PL EMILE_COLORSPACE_YCBCR420TM12601_PL +#define EVAS_COLORSPACE_AGRY88 EMILE_COLORSPACE_AGRY88 // ETC1/2 support -#define EVAS_COLORSPACE_ETC1 EFL_GFX_COLORSPACE_ETC1 -#define EVAS_COLORSPACE_RGB8_ETC2 EFL_GFX_COLORSPACE_RGB8_ETC2 -#define EVAS_COLORSPACE_RGBA8_ETC2_EAC EFL_GFX_COLORSPACE_RGBA8_ETC2_EAC -#define EVAS_COLORSPACE_ETC1_ALPHA EFL_GFX_COLORSPACE_ETC1_ALPHA +#define EVAS_COLORSPACE_ETC1 EMILE_COLORSPACE_ETC1 +#define EVAS_COLORSPACE_RGB8_ETC2 EMILE_COLORSPACE_RGB8_ETC2 +#define EVAS_COLORSPACE_RGBA8_ETC2_EAC EMILE_COLORSPACE_RGBA8_ETC2_EAC +#define EVAS_COLORSPACE_ETC1_ALPHA EMILE_COLORSPACE_ETC1_ALPHA // S3TC support -#define EVAS_COLORSPACE_RGB_S3TC_DXT1 EFL_GFX_COLORSPACE_RGB_S3TC_DXT1 -#define EVAS_COLORSPACE_RGBA_S3TC_DXT1 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT1 -#define EVAS_COLORSPACE_RGBA_S3TC_DXT2 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT2 -#define EVAS_COLORSPACE_RGBA_S3TC_DXT3 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT3 -#define EVAS_COLORSPACE_RGBA_S3TC_DXT4 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT4 -#define EVAS_COLORSPACE_RGBA_S3TC_DXT5 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT5 +#define EVAS_COLORSPACE_RGB_S3TC_DXT1 EMILE_COLORSPACE_RGB_S3TC_DXT1 +#define EVAS_COLORSPACE_RGBA_S3TC_DXT1 EMILE_COLORSPACE_RGBA_S3TC_DXT1 +#define EVAS_COLORSPACE_RGBA_S3TC_DXT2 EMILE_COLORSPACE_RGBA_S3TC_DXT2 +#define EVAS_COLORSPACE_RGBA_S3TC_DXT3 EMILE_COLORSPACE_RGBA_S3TC_DXT3 +#define EVAS_COLORSPACE_RGBA_S3TC_DXT4 EMILE_COLORSPACE_RGBA_S3TC_DXT4 +#define EVAS_COLORSPACE_RGBA_S3TC_DXT5 EMILE_COLORSPACE_RGBA_S3TC_DXT5 +//TIZEN_ONLY(20180510): png: prototype colormap load #define EVAS_COLORSPACE_PALETTE EFL_GFX_COLORSPACE_PALETTE +// struct _Evas_Image_Load_Func { diff --git a/src/lib/evas/canvas/efl_canvas_image.c b/src/lib/evas/canvas/efl_canvas_image.c index c89ee21..434c427 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, ENFN->image_size_get(ENC, o->engine_data, &iw, &ih); ics = ENFN->image_colorspace_get(ENC, o->engine_data); alpha = ENFN->image_alpha_get(ENC, o->engine_data); - if ((w != iw) || (h != ih) || (ics != cspace) || (alpha != o->cur->has_alpha)) + if ((w != iw) || (h != ih) || (ics != (Evas_Colorspace)cspace) || (alpha != o->cur->has_alpha)) { ENFN->image_free(ENC, o->engine_data); o->engine_data = NULL; @@ -639,7 +639,7 @@ _image_pixels_set(Evas_Object_Protected_Data *obj, ENFN->image_stride_get(ENC, o->engine_data, &int_stride); if (resized || o->cur->f || o->cur->key || - (o->cur->image.stride != int_stride) || (cspace != o->cur->cspace)) + (o->cur->image.stride != int_stride) || (cspace != (Efl_Gfx_Colorspace)o->cur->cspace)) { EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, cur) { 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 ce88c8d..caee177 100755 --- a/src/modules/evas/engines/gl_common/evas_gl_image.c +++ b/src/modules/evas/engines/gl_common/evas_gl_image.c @@ -917,9 +917,9 @@ evas_gl_common_image_surface_update(Evas_GL_Image *im) if (!im || !im->gc || !im->im || !im->im->image.data) goto fail; - if (im->im->cache_entry.space == EFL_GFX_COLORSPACE_ARGB8888) + if (im->im->cache_entry.space == (Evas_Colorspace)EFL_GFX_COLORSPACE_ARGB8888) alpha = EINA_FALSE; - else if (im->im->cache_entry.space == EFL_GFX_COLORSPACE_GRY8) + else if (im->im->cache_entry.space == (Evas_Colorspace)EFL_GFX_COLORSPACE_GRY8) alpha = EINA_TRUE; else goto fail; 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 a34b0b9..bd6b5c3 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) if (!im || !im->image.data || !file) return 0; - if ((im->cache_entry.space != EFL_GFX_COLORSPACE_ARGB8888) && - (im->cache_entry.space != EFL_GFX_COLORSPACE_AGRY88) && - (im->cache_entry.space != EFL_GFX_COLORSPACE_GRY8)) + if (((Efl_Gfx_Colorspace)im->cache_entry.space != EFL_GFX_COLORSPACE_ARGB8888) && + ((Efl_Gfx_Colorspace)im->cache_entry.space != EFL_GFX_COLORSPACE_AGRY88) && + ((Efl_Gfx_Colorspace)im->cache_entry.space != EFL_GFX_COLORSPACE_GRY8)) return 0; f = fopen(file, "wb"); @@ -76,7 +76,7 @@ save_image_png(RGBA_Image *im, const char *file, int do_compress, int interlace) else interlace = PNG_INTERLACE_NONE; - if (im->cache_entry.space == EFL_GFX_COLORSPACE_GRY8) + if ((Efl_Gfx_Colorspace)im->cache_entry.space == EFL_GFX_COLORSPACE_GRY8) { gry8 = EINA_TRUE; pixel_size = 1; @@ -86,7 +86,7 @@ save_image_png(RGBA_Image *im, const char *file, int do_compress, int interlace) PNG_COLOR_TYPE_GRAY, interlace, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); } - else if (im->cache_entry.space == EFL_GFX_COLORSPACE_AGRY88) + else if ((Efl_Gfx_Colorspace)im->cache_entry.space == EFL_GFX_COLORSPACE_AGRY88) { agry88 = EINA_TRUE; pixel_size = 2;