summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-02-12 12:10:04 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-02-12 22:30:10 +0900
commitd3527da0ab8cd9d9727c9aeca08df115be3632e2 (patch)
treea6be9cf62c21dacfea05bc269c71925692998bdb /src
parent430169053570ba4c3dc21ec2ae07f5b295939f6a (diff)
evas - image obj - filled mode - never use invalid 0x0 fill
this fixes a lot of noise for filled image objects that set fill to 0x0 if objetc is 0x0. this clamps minimum fill at 1x1 and thus keeps things silent and sensible. also just silently ignore 0x0 filled image objects. noise is not that useful.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_object_image.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index cbeb11620d..4c9a87b528 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -3561,12 +3561,7 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
3561 /* if so what and where and add the appropriate redraw rectangles */ 3561 /* if so what and where and add the appropriate redraw rectangles */
3562 Evas_Public_Data *e = obj->layer->evas; 3562 Evas_Public_Data *e = obj->layer->evas;
3563 3563
3564 if ((o->cur->fill.w < 1) || (o->cur->fill.h < 1)) 3564 if ((o->cur->fill.w < 1) || (o->cur->fill.h < 1)) return;
3565 {
3566 ERR("%p has invalid fill size: %dx%d. Ignored",
3567 eo_obj, o->cur->fill.w, o->cur->fill.h);
3568 return;
3569 }
3570 3565
3571 /* if someone is clipping this obj - go calculate the clipper */ 3566 /* if someone is clipping this obj - go calculate the clipper */
3572 if (obj->cur->clipper) 3567 if (obj->cur->clipper)
@@ -4572,6 +4567,8 @@ evas_object_image_filled_resize_listener(void *data EINA_UNUSED, Evas *e EINA_UN
4572 Evas_Coord w, h; 4567 Evas_Coord w, h;
4573 4568
4574 evas_object_geometry_get(obj, NULL, NULL, &w, &h); 4569 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
4570 if (w < 1) w = 1;
4571 if (h < 1) h = 1;
4575 evas_object_image_fill_set(obj, 0, 0, w, h); 4572 evas_object_image_fill_set(obj, 0, 0, w, h);
4576} 4573}
4577 4574