jpeg pushed a commit to branch master.

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

commit 7e731ea10afc30246c6004a367deb09470640ff3
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Tue Mar 25 12:27:21 2014 +0900

    Evas filters: Ignore ox,oy when stretching in the same direction
    
    During padding calculation, ox and oy should be ignored unless the
    blend operation is neither repeating nor stretching. Otherwise,
    the buffer will grow without necessity.
---
 src/lib/evas/filters/evas_filter_parser.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index aaa9e7b..b72f8f6 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -263,6 +263,8 @@ static struct
    { "stretch_xy", EVAS_FILTER_FILL_MODE_STRETCH_XY }
 };
 
+static Evas_Filter_Fill_Mode _fill_mode_get(Evas_Filter_Instruction *instr);
+
 typedef enum
 {
    VT_NONE,
@@ -924,6 +926,7 @@ _blend_padding_update(Evas_Filter_Program *pgm, 
Evas_Filter_Instruction *instr,
                       int *padl, int *padr, int *padt, int *padb)
 {
    const char *inbuf, *outbuf;
+   Evas_Filter_Fill_Mode fillmode;
    Buffer *in, *out;
    int ox, oy, l = 0, r = 0, t = 0, b = 0;
 
@@ -938,6 +941,10 @@ _blend_padding_update(Evas_Filter_Program *pgm, 
Evas_Filter_Instruction *instr,
    out = _buffer_get(pgm, outbuf);
    EINA_SAFETY_ON_NULL_RETURN(out);
 
+   fillmode = _fill_mode_get(instr);
+   if (fillmode & (EVAS_FILTER_FILL_MODE_STRETCH_X | 
EVAS_FILTER_FILL_MODE_REPEAT_X)) ox = 0;
+   if (fillmode & (EVAS_FILTER_FILL_MODE_STRETCH_Y | 
EVAS_FILTER_FILL_MODE_REPEAT_Y)) oy = 0;
+
    if (ox < 0) l = (-ox) + in->pad.l;
    else r = ox + in->pad.r;
 

-- 


Reply via email to