#include "evas_common.h" /* Also includes international specific stuff */
#include "evas_engine.h"
-#include <dlfcn.h> /* dlopen,dlclose,etc */
-
static void* _sdl_output_setup (int w, int h, int fullscreen, int noframe);
int _evas_engine_GL_SDL_log_dom = -1;
break;
case EVAS_COLORSPACE_YCBCR422P601_PL:
case EVAS_COLORSPACE_YCBCR422P709_PL:
+ case EVAS_COLORSPACE_YCBCR422601_PL:
+ case EVAS_COLORSPACE_YCBCR420NV12601_PL:
+ case EVAS_COLORSPACE_YCBCR420TM12601_PL:
if (im->tex) evas_gl_common_texture_free(im->tex);
im->tex = NULL;
if (im->cs.data)
return image;
}
im_old = image;
- if ((eng_image_colorspace_get(data, image) == EVAS_COLORSPACE_YCBCR422P601_PL) ||
- (eng_image_colorspace_get(data, image) == EVAS_COLORSPACE_YCBCR422P709_PL))
- w &= ~0x1;
+
+ switch (eng_image_colorspace_get(data, image))
+ {
+ case EVAS_COLORSPACE_YCBCR422P601_PL:
+ case EVAS_COLORSPACE_YCBCR422P709_PL:
+ case EVAS_COLORSPACE_YCBCR422601_PL:
+ case EVAS_COLORSPACE_YCBCR420NV12601_PL:
+ case EVAS_COLORSPACE_YCBCR420TM12601_PL:
+ w &= ~0x1;
+ break;
+ }
+
if ((im_old) && (im_old->im->cache_entry.w == w) && (im_old->im->cache_entry.h == h))
return image;
if (im_old)
}
static void *
-eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
+eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, int *err)
{
Render_Engine *re;
Evas_GL_Image *im;
-
+ int error;
+
re = (Render_Engine *)data;
if (!image)
{
*image_data = NULL;
+ if (err) *err = EVAS_LOAD_ERROR_GENERIC;
return NULL;
}
im = image;
if (im->native.data)
{
*image_data = NULL;
+ if (err) *err = EVAS_LOAD_ERROR_NONE;
return im;
}
- evas_cache_image_load_data(&im->im->cache_entry);
+ error = evas_cache_image_load_data(&im->im->cache_entry);
switch (im->cs.space)
{
case EVAS_COLORSPACE_ARGB8888:
if (!im_new)
{
*image_data = NULL;
- return im;
+ if (err) *err = error;
+ return im;
}
evas_gl_common_image_free(im);
im = im_new;
break;
case EVAS_COLORSPACE_YCBCR422P601_PL:
case EVAS_COLORSPACE_YCBCR422P709_PL:
+ case EVAS_COLORSPACE_YCBCR422601_PL:
+ case EVAS_COLORSPACE_YCBCR420NV12601_PL:
+ case EVAS_COLORSPACE_YCBCR420TM12601_PL:
*image_data = im->cs.data;
break;
default:
abort();
break;
}
+ if (err) *err = error;
return im;
}
break;
case EVAS_COLORSPACE_YCBCR422P601_PL:
case EVAS_COLORSPACE_YCBCR422P709_PL:
+ case EVAS_COLORSPACE_YCBCR422601_PL:
+ case EVAS_COLORSPACE_YCBCR420NV12601_PL:
+ case EVAS_COLORSPACE_YCBCR420TM12601_PL:
if (image_data != im->cs.data)
{
if (im->cs.data)
}
static void
-eng_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map_Point *p, int smooth, int level)
+eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level)
{
Render_Engine *re;
re = (Render_Engine *)data;
evas_gl_common_context_target_surface_set(re->gl_context, surface);
re->gl_context->dc = context;
- evas_gl_common_image_map4_draw(re->gl_context, image, p, smooth, level);
+ evas_gl_common_image_map_draw(re->gl_context, image, npoints, p, smooth, level);
}
static void *
}
static void
-eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Eina_Unicode *text, const Evas_Text_Props *intl_props)
+eng_font_draw(void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props)
{
Render_Engine *re;
evas_gl_font_texture_new,
evas_gl_font_texture_free,
evas_gl_font_texture_draw);
- evas_common_font_draw(im, context, font, x, y, text, intl_props);
+ evas_common_font_draw(im, context, (RGBA_Font *) font, x, y,
+ intl_props);
evas_common_draw_context_font_ext_set(context,
NULL,
NULL,
}
static int
+eng_image_load_error_get(void *data __UNUSED__, void *image)
+{
+ Evas_GL_Image *im;
+
+ if (!image) return EVAS_LOAD_ERROR_NONE;
+ im = image;
+ return im->im->cache_entry.load_error;
+}
+
+
+static int
module_open(Evas_Module *em)
{
if (!em) return 0;
ORD(image_colorspace_get);
ORD(image_native_set);
ORD(image_native_get);
+#if 0 // filtering disabled
+// ORD(image_draw_filtered);
+// ORD(image_filtered_get);
+// ORD(image_filtered_save);
+// ORD(image_filtered_free);
+#endif
ORD(font_draw);
ORD(image_scale_hint_set);
ORD(image_scale_hint_get);
- ORD(image_map4_draw);
+ ORD(image_map_draw);
ORD(image_map_surface_new);
ORD(image_map_surface_free);
+
+// ORD(image_content_hint_set);
+// ORD(image_content_hint_get);
+
+// ORD(image_cache_flush);
+// ORD(image_cache_set);
+// ORD(image_cache_get);
+
+// ORD(gl_surface_create);
+// ORD(gl_surface_destroy);
+// ORD(gl_context_create);
+// ORD(gl_context_destroy);
+// ORD(gl_make_current);
+// ORD(gl_proc_address_get);
+// ORD(gl_native_surface_get);
+
+// ORD(gl_api_get);
+
+ ORD(image_load_error_get);
/* now advertise out own api */
em->functions = (void *)(&func);