fix recursive proxy rendering to just show a black rectangle

This commit is contained in:
Mike Blumenkrantz 2013-04-22 16:41:24 +01:00
parent c2da27328b
commit 715c77adb9
3 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,7 @@
2013-04-22 Mike Blumenkrantz
* Evas: Fix recursive proxy image rendering to just render black
2013-04-22 WooHyun Jung 2013-04-22 WooHyun Jung
* Edje: When selected word exists, selection is cleared and cursor * Edje: When selected word exists, selection is cleared and cursor

1
NEWS
View File

@ -253,3 +253,4 @@ Fixes:
* Edje: Fix useless ecore_imf_context_reset call in case of pressing ESC and Return key * Edje: Fix useless ecore_imf_context_reset call in case of pressing ESC and Return key
* Edje: When selected word exists, selection is cleared and cursor remains on the current entry by additional key input. * Edje: When selected word exists, selection is cleared and cursor remains on the current entry by additional key input.
* Ecore-X: Fix selection parser to not overrun buffer read by using longs on 64bit. * Ecore-X: Fix selection parser to not overrun buffer read by using longs on 64bit.
* Evas: Fix recursive proxy image rendering to just render black

View File

@ -121,6 +121,7 @@ struct _Evas_Object_Image
Eina_Bool video_surface : 1; Eina_Bool video_surface : 1;
Eina_Bool video_visible : 1; Eina_Bool video_visible : 1;
Eina_Bool created : 1; Eina_Bool created : 1;
Eina_Bool proxyerror : 1;
}; };
/* private methods for image objects */ /* private methods for image objects */
@ -2225,6 +2226,7 @@ _image_load_size_set(Eo *eo_obj, void *_pd, va_list *list)
o->changed = EINA_TRUE; o->changed = EINA_TRUE;
evas_object_change(eo_obj, obj); evas_object_change(eo_obj, obj);
} }
o->proxyerror = 0;
} }
EAPI void EAPI void
@ -3124,6 +3126,7 @@ _proxy_set(Evas_Object *eo_proxy, Evas_Object *eo_src)
state_write->source = eo_src; state_write->source = eo_src;
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write); EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
o->load_error = EVAS_LOAD_ERROR_NONE; o->load_error = EVAS_LOAD_ERROR_NONE;
o->proxyerror = 0;
EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, src->proxy, Evas_Object_Proxy_Data, proxy_src_write) EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, src->proxy, Evas_Object_Proxy_Data, proxy_src_write)
{ {
@ -3142,17 +3145,14 @@ _proxy_error(Evas_Object *eo_proxy, void *context, void *output, void *surface,
int x, int y, Eina_Bool do_async) int x, int y, Eina_Bool do_async)
{ {
Evas_Func *func; Evas_Func *func;
int r = rand() % 255; Evas_Object_Image *o = eo_data_get(eo_proxy, MY_CLASS);
int g = rand() % 255;
int b = rand() % 255;
/* XXX: Eina log error or something I'm sure if (!o->proxyerror) printf("Err: Argh! Recursive proxies.\n");
* If it bugs you, just fix it. Don't tell me */ o->proxyerror = 1;
if (VERBOSE_PROXY_ERROR) printf("Err: Argh! Recursive proxies.\n");
Evas_Object_Protected_Data *proxy = eo_data_get(eo_proxy, EVAS_OBJ_CLASS); Evas_Object_Protected_Data *proxy = eo_data_get(eo_proxy, EVAS_OBJ_CLASS);
func = proxy->layer->evas->engine.func; func = proxy->layer->evas->engine.func;
func->context_color_set(output, context, r, g, b, 255); func->context_color_set(output, context, 0, 0, 0, 255);
func->context_multiplier_unset(output, context); func->context_multiplier_unset(output, context);
func->context_render_op_set(output, context, proxy->cur->render_op); func->context_render_op_set(output, context, proxy->cur->render_op);
func->rectangle_draw(output, context, surface, proxy->cur->geometry.x + x, func->rectangle_draw(output, context, surface, proxy->cur->geometry.x + x,