forked from enlightenment/efl
Revert "Emile: Move colorspaces to Efl.Gfx"
This reverts commit 0d41ad0c83
.
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
This commit is contained in:
parent
04ccdefb3b
commit
58fb597acc
|
@ -1581,8 +1581,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])
|
||||
|
||||
|
@ -1634,8 +1632,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])
|
||||
|
||||
|
|
|
@ -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@
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#define EMILE_H_
|
||||
|
||||
#include <Eina.h>
|
||||
#include <interfaces/efl_gfx_types.eot.h>
|
||||
|
||||
#ifdef EAPI
|
||||
# undef EAPI
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -162,29 +162,29 @@ 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 */
|
||||
typedef Emile_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
|
||||
#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
|
||||
|
||||
struct _Evas_Image_Load_Func
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -904,9 +904,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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue