forked from enlightenment/efl
ector: replace to use stack memory,
Guess stack is cheaper than heap in this case.
This commit is contained in:
parent
2acf8c0131
commit
a4d6fa4b53
|
@ -314,7 +314,7 @@ _blend_gradient_alpha(int count, const SW_FT_Span *spans, void *user_data)
|
|||
uint32_t *mbuffer = mask->pixels.u32;
|
||||
|
||||
//Temp buffer for intermediate processing
|
||||
uint32_t *tbuffer = malloc(sizeof(uint32_t) * sd->raster_buffer->generic->w);
|
||||
uint32_t *tbuffer = alloca(sizeof(uint32_t) * sd->raster_buffer->generic->w);
|
||||
|
||||
comp_func = efl_draw_func_span_get(sd->op, sd->mul_col, sd->gradient->alpha);
|
||||
|
||||
|
@ -347,7 +347,6 @@ _blend_gradient_alpha(int count, const SW_FT_Span *spans, void *user_data)
|
|||
}
|
||||
++spans;
|
||||
}
|
||||
free(tbuffer);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -371,7 +370,7 @@ _blend_gradient_alpha_inv(int count, const SW_FT_Span *spans, void *user_data)
|
|||
uint32_t *mbuffer = mask->pixels.u32;
|
||||
|
||||
//Temp buffer for intermediate processing
|
||||
uint32_t *tbuffer = malloc(sizeof(uint32_t) * sd->raster_buffer->generic->w);
|
||||
uint32_t *tbuffer = alloca(sizeof(uint32_t) * sd->raster_buffer->generic->w);
|
||||
|
||||
comp_func = efl_draw_func_span_get(sd->op, sd->mul_col, sd->gradient->alpha);
|
||||
|
||||
|
@ -405,7 +404,6 @@ _blend_gradient_alpha_inv(int count, const SW_FT_Span *spans, void *user_data)
|
|||
}
|
||||
++spans;
|
||||
}
|
||||
free(tbuffer);
|
||||
}
|
||||
/*!
|
||||
\internal
|
||||
|
|
Loading…
Reference in New Issue