forked from enlightenment/efl
evas - add engine api to get a specific fbo/surf that wont be scaled
this is to allow gl to specifically use an fbo as an atlas for these kinds of buffers
This commit is contained in:
parent
a479745e4f
commit
622277c82a
|
@ -1390,6 +1390,8 @@ struct _Evas_Func
|
|||
|
||||
void (*image_prepare) (void *data, void *image);
|
||||
|
||||
void *(*image_surface_noscale_new) (void *data, int w, int h, int alpha);
|
||||
|
||||
int (*image_native_init) (void *data, Evas_Native_Surface_Type type);
|
||||
void (*image_native_shutdown) (void *data, Evas_Native_Surface_Type type);
|
||||
void *(*image_native_set) (void *data, void *image, void *native);
|
||||
|
|
|
@ -3098,6 +3098,18 @@ eng_image_prepare(void *engdata EINA_UNUSED, void *image)
|
|||
evas_gl_common_image_update(im->gc, im);
|
||||
}
|
||||
|
||||
static void *
|
||||
eng_image_surface_noscale_new(void *engdata, int w, int h, int alpha)
|
||||
{
|
||||
Evas_Engine_GL_Context *gl_context;
|
||||
Render_Engine_GL_Generic *re = engdata;
|
||||
|
||||
re->window_use(re->software.ob);
|
||||
gl_context = re->window_gl_context_get(re->software.ob);
|
||||
// XXX: FIXME: need a special surface new func that can use an atlas
|
||||
return evas_gl_common_image_surface_new(gl_context, w, h, alpha);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
module_open(Evas_Module *em)
|
||||
|
@ -3185,6 +3197,7 @@ module_open(Evas_Module *em)
|
|||
ORD(image_data_slice_add);
|
||||
|
||||
ORD(image_prepare);
|
||||
ORD(image_surface_noscale_new);
|
||||
|
||||
ORD(font_cache_flush);
|
||||
ORD(font_cache_set);
|
||||
|
|
|
@ -415,6 +415,9 @@ struct _Evas_Thread_Command_Ector_Surface
|
|||
int x, y;
|
||||
};
|
||||
|
||||
// declare here as it is re-used
|
||||
static void *eng_image_map_surface_new(void *data, int w, int h, int alpha);
|
||||
|
||||
Eina_Mempool *_mp_command_rect = NULL;
|
||||
Eina_Mempool *_mp_command_line = NULL;
|
||||
Eina_Mempool *_mp_command_polygon = NULL;
|
||||
|
@ -1945,6 +1948,13 @@ eng_image_prepare(void *engdata EINA_UNUSED, void *image EINA_UNUSED)
|
|||
// some thread jobs for loading in the bg.
|
||||
}
|
||||
|
||||
static void *
|
||||
eng_image_surface_noscale_new(void *engdata, int w, int h, int alpha)
|
||||
{
|
||||
// simply call the map surface new as all we need is a basic buffer
|
||||
return eng_image_map_surface_new(engdata, w, h, alpha);
|
||||
}
|
||||
|
||||
static void
|
||||
_image_flip_horizontal(DATA32 *pixels_out, const DATA32 *pixels_in,
|
||||
int iw, int ih)
|
||||
|
@ -4658,6 +4668,7 @@ static Evas_Func func =
|
|||
eng_image_data_maps_get,
|
||||
eng_image_data_slice_add,
|
||||
eng_image_prepare,
|
||||
eng_image_surface_noscale_new,
|
||||
eng_image_native_init,
|
||||
eng_image_native_shutdown,
|
||||
eng_image_native_set,
|
||||
|
|
Loading…
Reference in New Issue