forked from enlightenment/efl
Evas GL: Disable direct rendering if there is a map
The engine itself (gl_generic) will detect whether the target surface (canvas where to draw the gl stuff) is the window backbuffer or not.
This commit is contained in:
parent
796a0d7d34
commit
5e832dfa76
|
@ -2900,7 +2900,7 @@ evas_draw_image_map_async_check(Evas_Object_Protected_Data *obj,
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o,
|
evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o,
|
||||||
void *output, void *pixels)
|
void *output, void *surface, void *pixels)
|
||||||
{
|
{
|
||||||
Eina_Bool direct_override = EINA_FALSE, direct_force_off = EINA_FALSE;
|
Eina_Bool direct_override = EINA_FALSE, direct_force_off = EINA_FALSE;
|
||||||
|
|
||||||
|
@ -2923,7 +2923,7 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj,
|
||||||
if (ENFN->gl_direct_override_get)
|
if (ENFN->gl_direct_override_get)
|
||||||
ENFN->gl_direct_override_get(output, &direct_override, &direct_force_off);
|
ENFN->gl_direct_override_get(output, &direct_override, &direct_force_off);
|
||||||
if (ENFN->gl_surface_direct_renderable_get)
|
if (ENFN->gl_surface_direct_renderable_get)
|
||||||
direct_renderable = ENFN->gl_surface_direct_renderable_get(output, ns, &direct_override);
|
direct_renderable = ENFN->gl_surface_direct_renderable_get(output, ns, &direct_override, surface);
|
||||||
|
|
||||||
if ( ((direct_override) ||
|
if ( ((direct_override) ||
|
||||||
((direct_renderable) &&
|
((direct_renderable) &&
|
||||||
|
@ -2996,7 +2996,7 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj,
|
||||||
if (ENFN->gl_direct_override_get)
|
if (ENFN->gl_direct_override_get)
|
||||||
ENFN->gl_direct_override_get(output, &direct_override, &direct_force_off);
|
ENFN->gl_direct_override_get(output, &direct_override, &direct_force_off);
|
||||||
if (ENFN->gl_surface_direct_renderable_get)
|
if (ENFN->gl_surface_direct_renderable_get)
|
||||||
ENFN->gl_surface_direct_renderable_get(output, ns, &direct_override);
|
ENFN->gl_surface_direct_renderable_get(output, ns, &direct_override, surface);
|
||||||
|
|
||||||
if (direct_override && !direct_force_off)
|
if (direct_override && !direct_force_off)
|
||||||
{
|
{
|
||||||
|
@ -3130,7 +3130,7 @@ evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, v
|
||||||
}
|
}
|
||||||
else if (!o->cur->source)
|
else if (!o->cur->source)
|
||||||
{
|
{
|
||||||
pixels = evas_process_dirty_pixels(eo_obj, obj, o, output, o->engine_data);
|
pixels = evas_process_dirty_pixels(eo_obj, obj, o, output, surface, o->engine_data);
|
||||||
/* pixels = o->engine_data; */
|
/* pixels = o->engine_data; */
|
||||||
imagew = o->cur->image.w;
|
imagew = o->cur->image.w;
|
||||||
imageh = o->cur->image.h;
|
imageh = o->cur->image.h;
|
||||||
|
|
|
@ -1321,7 +1321,7 @@ struct _Evas_Func
|
||||||
void *(*gl_current_surface_get) (void *data);
|
void *(*gl_current_surface_get) (void *data);
|
||||||
int (*gl_rotation_angle_get) (void *data);
|
int (*gl_rotation_angle_get) (void *data);
|
||||||
Eina_Bool (*gl_surface_query) (void *data, void *surface, int attr, void *value);
|
Eina_Bool (*gl_surface_query) (void *data, void *surface, int attr, void *value);
|
||||||
Eina_Bool (*gl_surface_direct_renderable_get) (void *data, Evas_Native_Surface *ns, Eina_Bool *override);
|
Eina_Bool (*gl_surface_direct_renderable_get) (void *data, Evas_Native_Surface *ns, Eina_Bool *override, void *surface);
|
||||||
void (*gl_image_direct_set) (void *data, void *image, Eina_Bool direct);
|
void (*gl_image_direct_set) (void *data, void *image, Eina_Bool direct);
|
||||||
int (*gl_image_direct_get) (void *data, void *image);
|
int (*gl_image_direct_get) (void *data, void *image);
|
||||||
void (*gl_get_pixels_pre) (void *data);
|
void (*gl_get_pixels_pre) (void *data);
|
||||||
|
|
|
@ -1375,10 +1375,12 @@ eng_gl_direct_override_get(void *data, Eina_Bool *override, Eina_Bool *force_off
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
eng_gl_surface_direct_renderable_get(void *data, Evas_Native_Surface *ns, Eina_Bool *override)
|
eng_gl_surface_direct_renderable_get(void *data, Evas_Native_Surface *ns, Eina_Bool *override, void *surface)
|
||||||
{
|
{
|
||||||
Render_Engine_GL_Generic *re = data;
|
Render_Engine_GL_Generic *re = data;
|
||||||
Eina_Bool direct_render, client_side_rotation;
|
Eina_Bool direct_render, client_side_rotation;
|
||||||
|
Evas_Engine_GL_Context *gl_context;
|
||||||
|
Evas_GL_Image *sfc = surface;
|
||||||
|
|
||||||
EVGLINIT(data, EINA_FALSE);
|
EVGLINIT(data, EINA_FALSE);
|
||||||
if (!re || !ns) return EINA_FALSE;
|
if (!re || !ns) return EINA_FALSE;
|
||||||
|
@ -1391,6 +1393,10 @@ eng_gl_surface_direct_renderable_get(void *data, Evas_Native_Surface *ns, Eina_B
|
||||||
if ((re->software.outbuf_get_rot(re->software.ob) != 0) && (!client_side_rotation))
|
if ((re->software.outbuf_get_rot(re->software.ob) != 0) && (!client_side_rotation))
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
||||||
|
gl_context = re->window_gl_context_get(re->software.ob);
|
||||||
|
if (gl_context->def_surface != sfc)
|
||||||
|
return EINA_FALSE;
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue