summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_scale_sample.c
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-09-19 13:59:05 +0900
committerHermet Park <hermetpark@gmail.com>2019-09-19 14:01:31 +0900
commit6f3841e4b4fd17485789ae142d1e9b373235d858 (patch)
tree20753108eefe25cb8fc691be7b2e879b1dd0b373 /src/lib/evas/common/evas_scale_sample.c
parentcdfe9463589a5a2aac3344161bb6c6bba81af3a8 (diff)
evas mask: refactoring code.
This clearly separate the condition cases clear so that the analizyer tool doesn't bother us anymore. No logical changes.
Diffstat (limited to '')
-rw-r--r--src/lib/evas/common/evas_scale_sample.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/lib/evas/common/evas_scale_sample.c b/src/lib/evas/common/evas_scale_sample.c
index 136813e208..cfd59726fc 100644
--- a/src/lib/evas/common/evas_scale_sample.c
+++ b/src/lib/evas/common/evas_scale_sample.c
@@ -103,34 +103,35 @@ _evas_common_scale_rgba_sample_scale_nomask(int y,
103 DATA32 *dptr, RGBA_Gfx_Func func, unsigned int mul_col, 103 DATA32 *dptr, RGBA_Gfx_Func func, unsigned int mul_col,
104 DATA32 *srcptr, int src_w) 104 DATA32 *srcptr, int src_w)
105{ 105{
106 DATA32 *buf = NULL;
107 int x; 106 int x;
108
109 /* a scanline buffer */
110 if (!srcptr)
111 buf = alloca(dst_clip_w * sizeof(DATA32));
112
113 dptr = dptr + dst_w * y; 107 dptr = dptr + dst_w * y;
114 for (; y < dst_clip_h; y++) 108
109 if (srcptr)
115 { 110 {
116 if (!srcptr) 111 for (; y < dst_clip_h; y++)
112 {
113 /* * blend here [clip_w *] buf -> dptr * */
114 func(srcptr, NULL, mul_col, dptr, dst_clip_w);
115 dptr += dst_w;
116 srcptr += src_w;
117 }
118 }
119 else
120 {
121 DATA32 *buf = alloca(dst_clip_w * sizeof(DATA32));
122 for (; y < dst_clip_h; y++)
117 { 123 {
118 DATA32 *dst_ptr = buf; 124 DATA32 *dst_ptr = buf;
119 for (x = 0; x < dst_clip_w; x++) 125 for (x = 0; x < dst_clip_w; x++)
120 { 126 {
121 DATA32 *ptr; 127 DATA32 *ptr = row_ptr[y] + lin_ptr[x];
122
123 ptr = row_ptr[y] + lin_ptr[x];
124 *dst_ptr = *ptr; 128 *dst_ptr = *ptr;
125 dst_ptr++; 129 dst_ptr++;
126 } 130 }
131 /* * blend here [clip_w *] buf -> dptr * */
132 func(buf, NULL, mul_col, dptr, dst_clip_w);
133 dptr += dst_w;
127 } 134 }
128
129 /* * blend here [clip_w *] buf -> dptr * */
130 func(srcptr ?: buf, NULL, mul_col, dptr, dst_clip_w);
131
132 dptr += dst_w;
133 if (srcptr) srcptr += src_w;
134 } 135 }
135} 136}
136 137