jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b031bbee9bf0b66bbe125abfaf066cd90042879a

commit b031bbee9bf0b66bbe125abfaf066cd90042879a
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Tue Oct 6 20:18:32 2015 +0900

    Evas textblock: Force relayout during proxy render
    
    If the textblock object was not visible in the main canvas, but
    still needs to be rendered in a proxy surface, then _relayout may
    not have been called. This forces generation of paragraphs based on
    the current geometry.
    
    This patch is ugly. I know. This is evas render :)
---
 src/lib/evas/canvas/evas_object_textblock.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index ce419c2..ca37af4 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -11566,6 +11566,17 @@ evas_object_textblock_render(Evas_Object *eo_obj 
EINA_UNUSED,
          {0, 1, 2, 1, 0}
      };
 
+   /* [FIXME!!!] rare case when relayout was not called: cache.clip made
+    * the object not visible (eg. clipped out), but it is actually visible
+    * in this context (eg. inside a proxy) - UGLY DIRTY FIX */
+   if (obj->layer->evas->is_frozen &&
+       (o->changed || o->content_changed || o->format_changed || 
o->obstacle_changed))
+       _relayout_if_needed(eo_obj, o);
+
+   /* If there are no paragraphs and thus there are no lines,
+    * there's nothing left to do. */
+   if (!o->paragraphs) return;
+
    /* render object to surface with context, and offxet by x,y */
    ENFN->context_multiplier_unset(output, context);
    ENFN->context_multiplier_set(output, context, 0, 0, 0, 0);
@@ -11577,9 +11588,6 @@ evas_object_textblock_render(Evas_Object *eo_obj 
EINA_UNUSED,
                               obj->cur->geometry.w,
                               obj->cur->geometry.h);
    clip = ENFN->context_clip_get(output, context, &cx, &cy, &cw, &ch);
-   /* If there are no paragraphs and thus there are no lines,
-    * there's nothing left to do. */
-   if (!o->paragraphs) return;
 
    ENFN->context_color_set(output, context, 0, 0, 0, 0);
    ca = cr = cg = cb = 0;

-- 


Reply via email to