* for is when src_clip is false. Since inside_bounds is statically known,
* the last part of the if statement will normally be optimized away.
*/
-static inline uint32_t
+static force_inline uint32_t
do_fetch (bits_image_t *pict, int x, int y, fetchPixelProc32 fetch,
pixman_bool_t src_clip,
pixman_bool_t inside_bounds)
}
static void
-fbFetchTransformed_Convolution(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
+fbFetchTransformed_Convolution(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits,
+ pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
{
fetchPixelProc32 fetch;
int i;
unit.vector[0] = pict->common.transform->matrix[0][0];
unit.vector[1] = pict->common.transform->matrix[1][0];
unit.vector[2] = pict->common.transform->matrix[2][0];
- affine = v.vector[2] == pixman_fixed_1 && unit.vector[2] == 0;
+
+ affine = (v.vector[2] == pixman_fixed_1 && unit.vector[2] == 0);
}
else
{
}
/* This allows filtering code to pretend that pixels are located at integer coordinates */
- adjust (&v, &unit, -(pixman_fixed_1 / 2));
-
if (pict->common.filter == PIXMAN_FILTER_NEAREST || pict->common.filter == PIXMAN_FILTER_FAST)
{
fetchPixelProc32 fetch;
int i;
/* Round down to closest integer, ensuring that 0.5 rounds to 0, not 1 */
- adjust (&v, &unit, pixman_fixed_1 / 2 - pixman_fixed_e);
+ adjust (&v, &unit, - pixman_fixed_e);
- /* initialize the two function pointers */
fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
src_clip = pict->common.src_clip != &(pict->common.full_region);
pixman_bool_t src_clip;
fetchPixelProc32 fetch;
int i;
-
+
+ /* Let the bilinear code pretend that pixels fall on integer coordinaters */
+ adjust (&v, &unit, -(pixman_fixed_1 / 2));
+
fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
src_clip = pict->common.src_clip != &(pict->common.full_region);
else if (pict->common.filter == PIXMAN_FILTER_CONVOLUTION)
{
/* Round to closest integer, ensuring that 0.5 rounds to 0, not 1 */
- adjust (&v, &unit, pixman_fixed_1 / 2 - pixman_fixed_e);
+ adjust (&v, &unit, - pixman_fixed_e);
fbFetchTransformed_Convolution(pict, width, buffer, mask, maskBits, affine, v, unit);
}