unsigned char tex_only : 1;
unsigned char locked : 1; // gl_surface_lock/unlock
unsigned char direct : 1; // evas gl direct renderable
+ /*Disable generate atlas for texture unit, EINA_FALSE by default*/
+ Eina_Bool disable_atlas : 1;
};
struct _Evas_GL_Font_Texture
void evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, int x, int y, int w, int h);
void evas_gl_texture_pool_empty(Evas_GL_Texture_Pool *pt);
-Evas_GL_Texture *evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im);
+Evas_GL_Texture *evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im, Eina_Bool disable_atlas);
Evas_GL_Texture *evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im);
Evas_GL_Texture *evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha);
Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im);
}
else
{
- im->tex = evas_gl_common_texture_new(im->gc, im->im);
+ im->tex = evas_gl_common_texture_new(im->gc, im->im, EINA_FALSE);
if (im->tex) evas_gl_common_texture_update(im->tex, im->im);
}
return im;
evas_cache_image_colorspace(&im->im->cache_entry, im->cs.space);
im->im = (RGBA_Image *)evas_cache_image_size_set(&im->im->cache_entry, im->w, im->h);
if (!im->tex)
- im->tex = evas_gl_common_texture_new(im->gc, im->im);
+ im->tex = evas_gl_common_texture_new(im->gc, im->im, EINA_FALSE);
}
}
if (evas_cache2_image_cached(ie))
{
evas_cache2_image_load_data(ie);
- im->tex = evas_gl_common_texture_new(gc, im->im);
+ im->tex = evas_gl_common_texture_new(gc, im->im, im->disable_atlas);
evas_cache2_image_unload_data(ie);
}
else
#endif
{
evas_cache_image_load_data(ie);
- im->tex = evas_gl_common_texture_new(gc, im->im);
+ im->tex = evas_gl_common_texture_new(gc, im->im, im->disable_atlas);
evas_cache_image_unload_data(ie);
}
}
static Evas_GL_Texture_Pool *
_pool_tex_find(Evas_Engine_GL_Context *gc, int w, int h,
GLenum intformat, GLenum format, int *u, int *v,
- Eina_Rectangle **apt, int atlas_w)
+ Eina_Rectangle **apt, int atlas_w, Eina_Bool disable_atlas)
{
Evas_GL_Texture_Pool *pt = NULL;
Eina_List *l;
int th2;
int pool_h;
-
+ /*Return texture unit without atlas*/
+ if (disable_atlas)
+ {
+ pt = _pool_tex_new(gc, w, h, intformat, format);
+ return pt ? pt : NULL;
+ }
if (atlas_w > gc->shared->info.max_texture_size)
atlas_w = gc->shared->info.max_texture_size;
if ((w > gc->shared->info.tune.atlas.max_w) ||
}
Evas_GL_Texture *
-evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im)
+evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im, Eina_Bool disable_atlas)
{
Evas_GL_Texture *tex;
GLsizei w, h;
*matching_format[lformat].intformat,
*matching_format[lformat].format,
&u, &v, &tex->apt,
- gc->shared->info.tune.atlas.max_alloc_size);
+ gc->shared->info.tune.atlas.max_alloc_size, disable_atlas);
if (!tex->pt)
{
evas_gl_common_texture_light_free(tex);
*matching_format[lformat].intformat,
*matching_format[lformat].format,
&u, &v, &tex->aptt,
- tex->gc->shared->info.tune.atlas.max_alloc_size);
+ tex->gc->shared->info.tune.atlas.max_alloc_size, EINA_FALSE);
if (!tex->ptt)
goto upload;
tex->pt = _pool_tex_find(gc, w + 3, fh, alpha_ifmt, alpha_fmt, &u, &v,
&tex->apt,
- gc->shared->info.tune.atlas.max_alloc_alpha_size);
+ gc->shared->info.tune.atlas.max_alloc_alpha_size, EINA_FALSE);
if (!tex->pt)
{
evas_gl_common_texture_light_free(tex);
re->window_use(re->software.ob);
gl_context = re->window_gl_context_get(re->software.ob);
- gim->tex = evas_gl_common_texture_new(gl_context, gim->im);
+ gim->tex = evas_gl_common_texture_new(gl_context, gim->im, EINA_FALSE);
}
evas_gl_preload_target_register(gim->tex, (Eo*) target);
}