From a98b71eff4041df58c9dcc2b1e25cefa38f364ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Sun, 5 Jul 2009 01:35:14 -0400 Subject: [PATCH] Convert CamelCase names to underscore_names. s/sizeRI/size_ri/g; s/numRI/num_ri/g; s/RepeatNone/REPEAT_NONE/g; s/fbOver/over/g; s/fbIn/in/g; s/iSrc/src_image/g; s/iMask/mask_image/g; s/iDst/dest_image/g; s/SaDa/Sa.Da/g; s/FbMaskBits/MASK_BITS/g; s/RenderSamplesX/RENDER_SAMPLES_X/g; s/MMXData/mmx_data_t/g; s/RegionInfo/region_info_t/g; s/([^0x])([a-z])([A-Z])/$1$2_\l$3/g; s/([^0x])([A-Z])([A-Z])([a-z])/$1$2_\l$3$4/g; s/([^0x])([A-Z])([a-z]+)_([a-z])/$1\l$2$3_$4/g; s/([a-z])_([A-Z])/$1_\l$2/g; s/su_sE/SuSE/g; s/X_Free86/XFree86/g; s/X_free86/XFree86/g; s/_ULL/ULL/g; s/_uLL/ULL/g; s/U_nc/UNc/g; s/combine ##/combine_ ##/g; s/## U/## _u/g; s/## C/## _c/g; s/UNc_aDD/UNc_ADD/g; s/BLEND_MODE \((.+)\)/BLEND_MODE (\l$1)/g; s/blend_(.+)/blend_\l$1/g; s/AN_ds/ANDs/g; s/O_rs/ORs/g; s/over565/over_565/g; s/8pix/8_pix/g; s/Over565/over_565/g; s/inU/in_u/g; s/inPart/in_part/g; s/inC/in_c/g; s/inreverse/in_reverse/g; s/get_exception_code/GetExceptionCode/g; # GetExceptionCode is WinCE API s/CP_us/CPUs/g; s/authentic_aMD/AuthenticAMD/g; s/op_sR_cx_mAS_kx_dST/op_src_mask_dest/g; s/no_VERBOSE/noVERBOSE/g; s/mc_cormack/McCormack/g; s/r1band/r1_band/g; s/r2band/r2_band/g; s/as GOOD things/as good things/g; s/brokendata/broken_data/g; s/X_render/XRender/g; s/__open_bSD__/__OpenBSD__/g; s/^Quick/quick/g; s/NextRect/next_rect/g; s/RectIn/rect_in/g; s/pboxout/pbox_out/g; s/F_sorted/FSorted/g; s/usse2/u_sse2/g; s/csse2/c_sse2/g; s/cPixelsse2/c_pixel_sse2/g; s/Mask565/mask_565/g; s/565fix_rB/565_fix_rb/g; s/565fix_g/565_fix_g/g; s/565r/565_r/g; s/565g/565_g/g; s/565b/565_b/g; s/uPixelsse2/u_pixel_sse2/g; s/Mask00ff/mask_00ff/g; s/Mask0080/mask_0080/g; s/Mask0101/mask_0101/g; s/Maskffff/mask_ffff/g; s/Maskff000000/mask_ff000000/g; s/load128Aligned/load_128_aligned/g; s/load128Unaligned/load_128_unaligned/g; s/save128Aligned/save_128_aligned/g; s/save128Unaligned/save_128_unaligned/g; s/fillsse2/fill_sse2/g; s/unpack565/unpack_565/g; s/pack565/pack_565/g; s/bltsse2/blt_sse2/g; s/x565Unpack/x565_unpack/g; s/r1End/r1_end/g; s/r2End/r2_end/g; s/argb8Pixels/argb8_pixels/g; --- pixman/pixman-access.c | 12 +- pixman/pixman-arm-neon.c | 702 +++---- pixman/pixman-arm-simd.c | 86 +- pixman/pixman-bits-image.c | 6 +- pixman/pixman-combine.c.template | 672 +++---- pixman/pixman-conical-gradient.c | 6 +- pixman/pixman-edge-imp.h | 14 +- pixman/pixman-edge.c | 4 +- pixman/pixman-fast-path.c | 464 ++--- pixman/pixman-general.c | 74 +- pixman/pixman-gradient-walker.c | 2 +- pixman/pixman-image.c | 4 +- pixman/pixman-linear-gradient.c | 6 +- pixman/pixman-mmx.c | 646 +++---- pixman/pixman-private.h | 6 +- pixman/pixman-radial-gradient.c | 6 +- pixman/pixman-region.c | 890 ++++----- pixman/pixman-region16.c | 6 +- pixman/pixman-solid-fill.c | 2 +- pixman/pixman-sse2.c | 3062 +++++++++++++++--------------- pixman/pixman-utils.c | 20 +- pixman/pixman-vmx.c | 192 +- pixman/pixman.c | 12 +- pixman/pixman.h | 32 +- 24 files changed, 3463 insertions(+), 3463 deletions(-) diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c index 47f4c52..4a4df07 100644 --- a/pixman/pixman-access.c +++ b/pixman/pixman-access.c @@ -2638,22 +2638,22 @@ store_scanline_g1 (bits_image_t *image, static void store_scanline_generic_64 (bits_image_t *image, int x, int y, int width, const uint32_t *values) { - uint32_t *argb8Pixels; + uint32_t *argb8_pixels; assert(image->common.type == BITS); - argb8Pixels = pixman_malloc_ab (width, sizeof(uint32_t)); - if (!argb8Pixels) + argb8_pixels = pixman_malloc_ab (width, sizeof(uint32_t)); + if (!argb8_pixels) return; /* Contract the scanline. We could do this in place if values weren't * const. */ - pixman_contract(argb8Pixels, (uint64_t *)values, width); + pixman_contract(argb8_pixels, (uint64_t *)values, width); - image->store_scanline_raw_32 (image, x, y, width, argb8Pixels); + image->store_scanline_raw_32 (image, x, y, width, argb8_pixels); - free(argb8Pixels); + free(argb8_pixels); } /* Despite the type, this function expects both buffer and mask to be uint64_t */ diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c index f88785c..eeecede 100644 --- a/pixman/pixman-arm-neon.c +++ b/pixman/pixman-arm-neon.c @@ -124,7 +124,7 @@ static force_inline uint8x8x4_t neon8qadd(uint8x8x4_t x, uint8x8x4_t y) static void -neon_CompositeAdd_8000_8000 ( +neon_composite_add_8000_8000 ( pixman_implementation_t * impl, pixman_op_t op, pixman_image_t * src_image, @@ -139,23 +139,23 @@ neon_CompositeAdd_8000_8000 ( int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *srcLine, *src; - int dstStride, srcStride; + uint8_t *dst_line, *dst; + uint8_t *src_line, *src; + int dst_stride, src_stride; uint16_t w; - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); if (width>=8) { // Use overlapping 8-pixel method while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; uint8_t *keep_dst=0; @@ -230,10 +230,10 @@ neon_CompositeAdd_8000_8000 ( while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; uint8x8_t sval=vnil, dval=vnil; uint8_t *dst4=0, *dst2=0; @@ -289,23 +289,23 @@ neon_composite_over_8888_8888 ( int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; - int dstStride, srcStride; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; + int dst_stride, src_stride; uint32_t w; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); if (width>=8) { // Use overlapping 8-pixel method while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; uint32_t *keep_dst=0; @@ -399,10 +399,10 @@ neon_composite_over_8888_8888 ( // Handle width<8 while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w>=2) @@ -450,15 +450,15 @@ neon_composite_over_8888_n_8888 ( int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; uint32_t mask; - int dstStride, srcStride; + int dst_stride, src_stride; uint32_t w; uint8x8_t mask_alpha; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); mask = _pixman_image_get_solid (mask_image, dst_image->bits.format); mask_alpha = vdup_n_u8((mask) >> 24); @@ -468,10 +468,10 @@ neon_composite_over_8888_n_8888 ( // Use overlapping 8-pixel method while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; uint32_t *keep_dst=0; @@ -585,10 +585,10 @@ neon_composite_over_8888_n_8888 ( // Handle width<8 while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w>=2) @@ -632,7 +632,7 @@ neon_composite_over_8888_n_8888 ( static void -neon_CompositeOver_n_8_8888 ( +neon_composite_over_n_8_8888 ( pixman_implementation_t * impl, pixman_op_t op, pixman_image_t * src_image, @@ -648,9 +648,9 @@ neon_CompositeOver_n_8_8888 ( int32_t height) { uint32_t src, srca; - uint32_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint32_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint32_t w; uint8x8_t sval2; uint8x8x4_t sval8; @@ -670,8 +670,8 @@ neon_CompositeOver_n_8_8888 ( sval8.val[2]=vdup_lane_u8(sval2,2); sval8.val[3]=vdup_lane_u8(sval2,3); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); if (width>=8) { @@ -680,10 +680,10 @@ neon_CompositeOver_n_8_8888 ( { uint32_t *keep_dst=0; - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; #ifndef USE_GCC_INLINE_ASM @@ -799,10 +799,10 @@ neon_CompositeOver_n_8_8888 ( { uint8x8_t alpha; - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; while (w>=2) @@ -839,7 +839,7 @@ neon_CompositeOver_n_8_8888 ( static void -neon_CompositeAdd_8888_8_8 ( +neon_composite_add_8888_8_8 ( pixman_implementation_t * impl, pixman_op_t op, pixman_image_t * src_image, @@ -854,15 +854,15 @@ neon_CompositeAdd_8888_8_8 ( int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint8_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint32_t w; uint32_t src; uint8x8_t sa; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); src = _pixman_image_get_solid (src_image, dst_image->bits.format); sa = vdup_n_u8((src) >> 24); @@ -871,10 +871,10 @@ neon_CompositeAdd_8888_8_8 ( // Use overlapping 8-pixel method, modified to avoid rewritten dest being reused while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; uint8x8_t mval, dval, res; @@ -911,10 +911,10 @@ neon_CompositeAdd_8888_8_8 ( // Use 4/2/1 load/store method to handle 1-7 pixels while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; uint8x8_t mval=sa, dval=sa, res; @@ -958,7 +958,7 @@ neon_CompositeAdd_8888_8_8 ( #ifdef USE_GCC_INLINE_ASM static void -neon_CompositeSrc_16_16 ( +neon_composite_src_16_16 ( pixman_implementation_t * impl, pixman_op_t op, pixman_image_t * src_image, @@ -973,19 +973,19 @@ neon_CompositeSrc_16_16 ( int32_t width, int32_t height) { - uint16_t *dstLine, *srcLine; - uint32_t dstStride, srcStride; + uint16_t *dst_line, *src_line; + uint32_t dst_stride, src_stride; if(!height || !width) return; /* We simply copy 16-bit-aligned pixels from one place to another. */ - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint16_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint16_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); /* Preload the first input scanline */ { - uint16_t *srcPtr = srcLine; + uint16_t *src_ptr = src_line; uint32_t count = width; asm volatile ( @@ -996,15 +996,15 @@ neon_CompositeSrc_16_16 ( " bgt 0b \n" // Clobbered input registers marked as input/outputs - : [src] "+r" (srcPtr), [count] "+r" (count) + : [src] "+r" (src_ptr), [count] "+r" (count) : // no unclobbered inputs : "cc" ); } while(height--) { - uint16_t *dstPtr = dstLine; - uint16_t *srcPtr = srcLine; + uint16_t *dst_ptr = dst_line; + uint16_t *src_ptr = src_line; uint32_t count = width; uint32_t tmp = 0; @@ -1015,11 +1015,11 @@ neon_CompositeSrc_16_16 ( " cmp %[count], #64 \n" " blt 1f @ skip oversized fragments \n" "0: @ start with eight quadwords at a time \n" - " pld [%[src], %[srcStride], LSL #1] \n" // preload from next scanline + " pld [%[src], %[src_stride], LSL #1] \n" // preload from next scanline " sub %[count], %[count], #64 \n" " vld1.16 {d16,d17,d18,d19}, [%[src]]! \n" " vld1.16 {d20,d21,d22,d23}, [%[src]]! \n" - " pld [%[src], %[srcStride], LSL #1] \n" // preload from next scanline + " pld [%[src], %[src_stride], LSL #1] \n" // preload from next scanline " vld1.16 {d24,d25,d26,d27}, [%[src]]! \n" " vld1.16 {d28,d29,d30,d31}, [%[src]]! \n" " cmp %[count], #64 \n" @@ -1033,7 +1033,7 @@ neon_CompositeSrc_16_16 ( "1: @ four quadwords \n" " tst %[count], #32 \n" " beq 2f @ skip oversized fragment \n" - " pld [%[src], %[srcStride], LSL #1] \n" // preload from next scanline + " pld [%[src], %[src_stride], LSL #1] \n" // preload from next scanline " vld1.16 {d16,d17,d18,d19}, [%[src]]! \n" " vld1.16 {d20,d21,d22,d23}, [%[src]]! \n" " vst1.16 {d16,d17,d18,d19}, [%[dst]]! \n" @@ -1041,7 +1041,7 @@ neon_CompositeSrc_16_16 ( "2: @ two quadwords \n" " tst %[count], #16 \n" " beq 3f @ skip oversized fragment \n" - " pld [%[src], %[srcStride], LSL #1] \n" // preload from next scanline + " pld [%[src], %[src_stride], LSL #1] \n" // preload from next scanline " vld1.16 {d16,d17,d18,d19}, [%[src]]! \n" " vst1.16 {d16,d17,d18,d19}, [%[dst]]! \n" "3: @ one quadword \n" @@ -1067,25 +1067,25 @@ neon_CompositeSrc_16_16 ( "7: @ end \n" // Clobbered input registers marked as input/outputs - : [dst] "+r" (dstPtr), [src] "+r" (srcPtr), [count] "+r" (count), [tmp] "+r" (tmp) + : [dst] "+r" (dst_ptr), [src] "+r" (src_ptr), [count] "+r" (count), [tmp] "+r" (tmp) // Unclobbered input - : [srcStride] "r" (srcStride) + : [src_stride] "r" (src_stride) // Clobbered vector registers // NB: these are the quad aliases of the double registers used in the asm : "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15", "cc", "memory" ); - srcLine += srcStride; - dstLine += dstStride; + src_line += src_stride; + dst_line += dst_stride; } } #endif /* USE_GCC_INLINE_ASM */ static void -neon_CompositeSrc_24_16 ( +neon_composite_src_24_16 ( pixman_implementation_t * impl, pixman_op_t op, pixman_image_t * src_image, @@ -1100,20 +1100,20 @@ neon_CompositeSrc_24_16 ( int32_t width, int32_t height) { - uint16_t *dstLine; - uint32_t *srcLine; - uint32_t dstStride, srcStride; + uint16_t *dst_line; + uint32_t *src_line; + uint32_t dst_stride, src_stride; if(!width || !height) return; /* We simply copy pixels from one place to another, assuming that the source's alpha is opaque. */ - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); /* Preload the first input scanline */ { - uint8_t *srcPtr = (uint8_t*) srcLine; + uint8_t *src_ptr = (uint8_t*) src_line; uint32_t count = (width + 15) / 16; #ifdef USE_GCC_INLINE_ASM @@ -1125,21 +1125,21 @@ neon_CompositeSrc_24_16 ( " bgt 0b \n" // Clobbered input registers marked as input/outputs - : [src] "+r" (srcPtr), [count] "+r" (count) + : [src] "+r" (src_ptr), [count] "+r" (count) : // no unclobbered inputs : "cc" ); #else do { - __pld(srcPtr); - srcPtr += 64; + __pld(src_ptr); + src_ptr += 64; } while(--count); #endif } while(height--) { - uint16_t *dstPtr = dstLine; - uint32_t *srcPtr = srcLine; + uint16_t *dst_ptr = dst_line; + uint32_t *src_ptr = src_line; uint32_t count = width; const uint32_t rb_mask = 0x1F; const uint32_t g_mask = 0x3F; @@ -1147,7 +1147,7 @@ neon_CompositeSrc_24_16 ( // If you're going to complain about a goto, take a long hard look // at the massive blocks of assembler this skips over. ;-) if(count < 8) - goto smallStuff; + goto small_stuff; #ifdef USE_GCC_INLINE_ASM @@ -1159,7 +1159,7 @@ neon_CompositeSrc_24_16 ( " blt 1f @ skip oversized fragments \n" "0: @ start with sixteen pixels at a time \n" " sub %[count], %[count], #16 \n" - " pld [%[src], %[srcStride], lsl #2] @ preload from next scanline \n" + " pld [%[src], %[src_stride], lsl #2] @ preload from next scanline \n" " vld4.8 {d0,d1,d2,d3}, [%[src]]! @ d3 is alpha and ignored, d2-0 are rgb. \n" " vld4.8 {d4,d5,d6,d7}, [%[src]]! @ d7 is alpha and ignored, d6-4 are rgb. \n" " vshll.u8 q8, d2, #8 @ expand first red for repacking \n" @@ -1179,7 +1179,7 @@ neon_CompositeSrc_24_16 ( " cmp %[count], #8 @ can we still do an 8-pixel block? \n" " blt 2f \n" " sub %[count], %[count], #8 \n" - " pld [%[src], %[srcStride], lsl #2] @ preload from next scanline \n" + " pld [%[src], %[src_stride], lsl #2] @ preload from next scanline \n" " vld4.8 {d0,d1,d2,d3}, [%[src]]! @ d3 is alpha and ignored, d2-0 are rgb. \n" " vshll.u8 q8, d2, #8 @ expand first red for repacking \n" " vshll.u8 q10, d1, #8 @ expand first green for repacking \n" @@ -1190,10 +1190,10 @@ neon_CompositeSrc_24_16 ( "2: @ end \n" // Clobbered input and working registers marked as input/outputs - : [dst] "+r" (dstPtr), [src] "+r" (srcPtr), [count] "+r" (count) + : [dst] "+r" (dst_ptr), [src] "+r" (src_ptr), [count] "+r" (count) // Unclobbered input - : [srcStride] "r" (srcStride) + : [src_stride] "r" (src_stride) // Clobbered vector registers // NB: these are the quad aliases of the double registers used in the asm @@ -1203,101 +1203,101 @@ neon_CompositeSrc_24_16 ( // A copy of the above code, in intrinsics-form. // This should be pretty self-documenting... while(count >= 16) { - uint8x8x4_t pixelSetA, pixelSetB; - uint16x8_t redA, greenA, blueA; - uint16x8_t redB, greenB, blueB; - uint16x8_t destPixelsA, destPixelsB; + uint8x8x4_t pixel_set_a, pixel_set_b; + uint16x8_t red_a, green_a, blue_a; + uint16x8_t red_b, green_b, blue_b; + uint16x8_t dest_pixels_a, dest_pixels_b; count -= 16; - __pld(srcPtr + srcStride); - pixelSetA = vld4_u8((uint8_t*)(srcPtr)); - pixelSetB = vld4_u8((uint8_t*)(srcPtr+8)); - srcPtr += 16; + __pld(src_ptr + src_stride); + pixel_set_a = vld4_u8((uint8_t*)(src_ptr)); + pixel_set_b = vld4_u8((uint8_t*)(src_ptr+8)); + src_ptr += 16; - redA = vshll_n_u8(pixelSetA.val[2], 8); - greenA = vshll_n_u8(pixelSetA.val[1], 8); - blueA = vshll_n_u8(pixelSetA.val[0], 8); - redB = vshll_n_u8(pixelSetB.val[2], 8); - greenB = vshll_n_u8(pixelSetB.val[1], 8); - blueB = vshll_n_u8(pixelSetB.val[0], 8); - destPixelsA = vsriq_n_u16(redA, greenA, 5); - destPixelsB = vsriq_n_u16(redB, greenB, 5); - destPixelsA = vsriq_n_u16(destPixelsA, blueA, 11); - destPixelsB = vsriq_n_u16(destPixelsB, blueB, 11); + red_a = vshll_n_u8(pixel_set_a.val[2], 8); + green_a = vshll_n_u8(pixel_set_a.val[1], 8); + blue_a = vshll_n_u8(pixel_set_a.val[0], 8); + red_b = vshll_n_u8(pixel_set_b.val[2], 8); + green_b = vshll_n_u8(pixel_set_b.val[1], 8); + blue_b = vshll_n_u8(pixel_set_b.val[0], 8); + dest_pixels_a = vsriq_n_u16(red_a, green_a, 5); + dest_pixels_b = vsriq_n_u16(red_b, green_b, 5); + dest_pixels_a = vsriq_n_u16(dest_pixels_a, blue_a, 11); + dest_pixels_b = vsriq_n_u16(dest_pixels_b, blue_b, 11); // There doesn't seem to be an intrinsic for the double-quadword variant - vst1q_u16(dstPtr , destPixelsA); - vst1q_u16(dstPtr+8, destPixelsB); - dstPtr += 16; + vst1q_u16(dst_ptr , dest_pixels_a); + vst1q_u16(dst_ptr+8, dest_pixels_b); + dst_ptr += 16; } // 8-pixel loop if(count >= 8) { - uint8x8x4_t pixelSetA; - uint16x8_t redA, greenA, blueA; - uint16x8_t destPixelsA; + uint8x8x4_t pixel_set_a; + uint16x8_t red_a, green_a, blue_a; + uint16x8_t dest_pixels_a; - __pld(srcPtr + srcStride); + __pld(src_ptr + src_stride); count -= 8; - pixelSetA = vld4_u8((uint8_t*)(srcPtr)); - srcPtr += 8; + pixel_set_a = vld4_u8((uint8_t*)(src_ptr)); + src_ptr += 8; - redA = vshll_n_u8(pixelSetA.val[2], 8); - greenA = vshll_n_u8(pixelSetA.val[1], 8); - blueA = vshll_n_u8(pixelSetA.val[0], 8); - destPixelsA = vsriq_n_u16(redA, greenA, 5); - destPixelsA = vsriq_n_u16(destPixelsA, blueA, 11); + red_a = vshll_n_u8(pixel_set_a.val[2], 8); + green_a = vshll_n_u8(pixel_set_a.val[1], 8); + blue_a = vshll_n_u8(pixel_set_a.val[0], 8); + dest_pixels_a = vsriq_n_u16(red_a, green_a, 5); + dest_pixels_a = vsriq_n_u16(dest_pixels_a, blue_a, 11); - vst1q_u16(dstPtr , destPixelsA); - dstPtr += 8; + vst1q_u16(dst_ptr , dest_pixels_a); + dst_ptr += 8; } #endif // USE_GCC_INLINE_ASM - smallStuff: + small_stuff: if(count) - __pld(srcPtr + srcStride); + __pld(src_ptr + src_stride); while(count >= 2) { - uint32_t srcPixelA = *srcPtr++; - uint32_t srcPixelB = *srcPtr++; + uint32_t src_pixel_a = *src_ptr++; + uint32_t src_pixel_b = *src_ptr++; // ARM is really good at shift-then-ALU ops. // This should be a total of six shift-ANDs and five shift-ORs. - uint32_t dstPixelsA; - uint32_t dstPixelsB; + uint32_t dst_pixels_a; + uint32_t dst_pixels_b; - dstPixelsA = ((srcPixelA >> 3) & rb_mask); - dstPixelsA |= ((srcPixelA >> 10) & g_mask) << 5; - dstPixelsA |= ((srcPixelA >> 19) & rb_mask) << 11; + dst_pixels_a = ((src_pixel_a >> 3) & rb_mask); + dst_pixels_a |= ((src_pixel_a >> 10) & g_mask) << 5; + dst_pixels_a |= ((src_pixel_a >> 19) & rb_mask) << 11; - dstPixelsB = ((srcPixelB >> 3) & rb_mask); - dstPixelsB |= ((srcPixelB >> 10) & g_mask) << 5; - dstPixelsB |= ((srcPixelB >> 19) & rb_mask) << 11; + dst_pixels_b = ((src_pixel_b >> 3) & rb_mask); + dst_pixels_b |= ((src_pixel_b >> 10) & g_mask) << 5; + dst_pixels_b |= ((src_pixel_b >> 19) & rb_mask) << 11; // little-endian mode only - *((uint32_t*) dstPtr) = dstPixelsA | (dstPixelsB << 16); - dstPtr += 2; + *((uint32_t*) dst_ptr) = dst_pixels_a | (dst_pixels_b << 16); + dst_ptr += 2; count -= 2; } if(count) { - uint32_t srcPixel = *srcPtr++; + uint32_t src_pixel = *src_ptr++; // ARM is really good at shift-then-ALU ops. // This block should end up as three shift-ANDs and two shift-ORs. - uint32_t tmpBlue = (srcPixel >> 3) & rb_mask; - uint32_t tmpGreen = (srcPixel >> 10) & g_mask; - uint32_t tmpRed = (srcPixel >> 19) & rb_mask; - uint16_t dstPixel = (tmpRed << 11) | (tmpGreen << 5) | tmpBlue; + uint32_t tmp_blue = (src_pixel >> 3) & rb_mask; + uint32_t tmp_green = (src_pixel >> 10) & g_mask; + uint32_t tmp_red = (src_pixel >> 19) & rb_mask; + uint16_t dst_pixel = (tmp_red << 11) | (tmp_green << 5) | tmp_blue; - *dstPtr++ = dstPixel; + *dst_ptr++ = dst_pixel; count--; } - srcLine += srcStride; - dstLine += dstStride; + src_line += src_stride; + dst_line += dst_stride; } } @@ -1508,10 +1508,10 @@ static inline void neon_quadword_copy( void* dst, void* src, uint32_t count, // of quadwords - uint32_t trailerCount // of bytes + uint32_t trailer_count // of bytes ) { - uint8_t *tDst = dst, *tSrc = src; + uint8_t *t_dst = dst, *t_src = src; // Uses aligned multi-register loads to maximise read bandwidth // on uncached memory such as framebuffers @@ -1556,7 +1556,7 @@ static inline void neon_quadword_copy( "4: @ end \n" // Clobbered input registers marked as input/outputs - : [dst] "+r" (tDst), [src] "+r" (tSrc), [count] "+r" (count) + : [dst] "+r" (t_dst), [src] "+r" (t_src), [count] "+r" (count) // No unclobbered inputs : @@ -1569,70 +1569,70 @@ static inline void neon_quadword_copy( #else while(count >= 8) { - uint8x16x4_t t1 = vld4q_u8(tSrc); - uint8x16x4_t t2 = vld4q_u8(tSrc + sizeof(uint8x16x4_t)); - tSrc += sizeof(uint8x16x4_t) * 2; - vst4q_u8(tDst, t1); - vst4q_u8(tDst + sizeof(uint8x16x4_t), t2); - tDst += sizeof(uint8x16x4_t) * 2; + uint8x16x4_t t1 = vld4q_u8(t_src); + uint8x16x4_t t2 = vld4q_u8(t_src + sizeof(uint8x16x4_t)); + t_src += sizeof(uint8x16x4_t) * 2; + vst4q_u8(t_dst, t1); + vst4q_u8(t_dst + sizeof(uint8x16x4_t), t2); + t_dst += sizeof(uint8x16x4_t) * 2; count -= 8; } if(count & 4) { - uint8x16x4_t t1 = vld4q_u8(tSrc); - tSrc += sizeof(uint8x16x4_t); - vst4q_u8(tDst, t1); - tDst += sizeof(uint8x16x4_t); + uint8x16x4_t t1 = vld4q_u8(t_src); + t_src += sizeof(uint8x16x4_t); + vst4q_u8(t_dst, t1); + t_dst += sizeof(uint8x16x4_t); } if(count & 2) { - uint8x8x4_t t1 = vld4_u8(tSrc); - tSrc += sizeof(uint8x8x4_t); - vst4_u8(tDst, t1); - tDst += sizeof(uint8x8x4_t); + uint8x8x4_t t1 = vld4_u8(t_src); + t_src += sizeof(uint8x8x4_t); + vst4_u8(t_dst, t1); + t_dst += sizeof(uint8x8x4_t); } if(count & 1) { - uint8x16_t t1 = vld1q_u8(tSrc); - tSrc += sizeof(uint8x16_t); - vst1q_u8(tDst, t1); - tDst += sizeof(uint8x16_t); + uint8x16_t t1 = vld1q_u8(t_src); + t_src += sizeof(uint8x16_t); + vst1q_u8(t_dst, t1); + t_dst += sizeof(uint8x16_t); } #endif // !USE_GCC_INLINE_ASM - if(trailerCount) { - if(trailerCount & 8) { - uint8x8_t t1 = vld1_u8(tSrc); - tSrc += sizeof(uint8x8_t); - vst1_u8(tDst, t1); - tDst += sizeof(uint8x8_t); + if(trailer_count) { + if(trailer_count & 8) { + uint8x8_t t1 = vld1_u8(t_src); + t_src += sizeof(uint8x8_t); + vst1_u8(t_dst, t1); + t_dst += sizeof(uint8x8_t); } - if(trailerCount & 4) { - *((uint32_t*) tDst) = *((uint32_t*) tSrc); - tDst += 4; - tSrc += 4; + if(trailer_count & 4) { + *((uint32_t*) t_dst) = *((uint32_t*) t_src); + t_dst += 4; + t_src += 4; } - if(trailerCount & 2) { - *((uint16_t*) tDst) = *((uint16_t*) tSrc); - tDst += 2; - tSrc += 2; + if(trailer_count & 2) { + *((uint16_t*) t_dst) = *((uint16_t*) t_src); + t_dst += 2; + t_src += 2; } - if(trailerCount & 1) { - *tDst++ = *tSrc++; + if(trailer_count & 1) { + *t_dst++ = *t_src++; } } } -static inline void SolidOver565_8pix_neon( - uint32_t glyphColour, +static inline void solid_over_565_8_pix_neon( + uint32_t glyph_colour, uint16_t *dest, - uint8_t *inMask, - uint32_t destStride, // bytes, not elements - uint32_t maskStride, + uint8_t *in_mask, + uint32_t dest_stride, // bytes, not elements + uint32_t mask_stride, uint32_t count // 8-pixel groups ) { @@ -1641,10 +1641,10 @@ static inline void SolidOver565_8pix_neon( #ifdef USE_GCC_INLINE_ASM asm volatile ( - " vld4.8 {d20[],d21[],d22[],d23[]}, [%[glyphColour]] @ splat solid colour components \n" + " vld4.8 {d20[],d21[],d22[],d23[]}, [%[glyph_colour]] @ splat solid colour components \n" "0: @ loop \n" " vld1.16 {d0,d1}, [%[dest]] @ load first pixels from framebuffer \n" - " vld1.8 {d17}, [%[inMask]] @ load alpha mask of glyph \n" + " vld1.8 {d17}, [%[in_mask]] @ load alpha mask of glyph \n" " vmull.u8 q9, d17, d23 @ apply glyph colour alpha to mask \n" " vshrn.u16 d17, q9, #8 @ reformat it to match original mask \n" " vmvn d18, d17 @ we need the inverse mask for the background \n" @@ -1661,18 +1661,18 @@ static inline void SolidOver565_8pix_neon( " vmlal.u8 q1, d17, d22 @ add masked foreground red... \n" " vmlal.u8 q2, d17, d21 @ ...green... \n" " vmlal.u8 q3, d17, d20 @ ...blue \n" - " add %[inMask], %[inMask], %[maskStride] @ advance mask pointer, while we wait \n" + " add %[in_mask], %[in_mask], %[mask_stride] @ advance mask pointer, while we wait \n" " vsri.16 q1, q2, #5 @ pack green behind red \n" " vsri.16 q1, q3, #11 @ pack blue into pixels \n" " vst1.16 {d2,d3}, [%[dest]] @ store composited pixels \n" - " add %[dest], %[dest], %[destStride] @ advance framebuffer pointer \n" + " add %[dest], %[dest], %[dest_stride] @ advance framebuffer pointer \n" " bne 0b @ next please \n" // Clobbered registers marked as input/outputs - : [dest] "+r" (dest), [inMask] "+r" (inMask), [count] "+r" (count) + : [dest] "+r" (dest), [in_mask] "+r" (in_mask), [count] "+r" (count) // Inputs - : [destStride] "r" (destStride), [maskStride] "r" (maskStride), [glyphColour] "r" (&glyphColour) + : [dest_stride] "r" (dest_stride), [mask_stride] "r" (mask_stride), [glyph_colour] "r" (&glyph_colour) // Clobbers, including the inputs we modify, and potentially lots of memory : "q0", "q1", "q2", "q3", "d17", "q9", "q10", "q11", "q12", "cc", "memory" @@ -1680,39 +1680,39 @@ static inline void SolidOver565_8pix_neon( #else - uint8x8x4_t solidColour = vld4_dup_u8((uint8_t*) &glyphColour); + uint8x8x4_t solid_colour = vld4_dup_u8((uint8_t*) &glyph_colour); while(count--) { uint16x8_t pixels = vld1q_u16(dest); - uint8x8_t mask = vshrn_n_u16(vmull_u8(solidColour.val[3], vld1_u8(inMask)), 8); - uint8x8_t iMask = vmvn_u8(mask); + uint8x8_t mask = vshrn_n_u16(vmull_u8(solid_colour.val[3], vld1_u8(in_mask)), 8); + uint8x8_t mask_image = vmvn_u8(mask); - uint8x8_t tRed = vshrn_n_u16(pixels, 8); - uint8x8_t tGreen = vshrn_n_u16(pixels, 3); - uint8x8_t tBlue = vshrn_n_u16(vsli_n_u8(pixels, pixels, 5), 2); + uint8x8_t t_red = vshrn_n_u16(pixels, 8); + uint8x8_t t_green = vshrn_n_u16(pixels, 3); + uint8x8_t t_blue = vshrn_n_u16(vsli_n_u8(pixels, pixels, 5), 2); - uint16x8_t sRed = vmull_u8(vsri_n_u8(tRed , tRed , 5), iMask); - uint16x8_t sGreen = vmull_u8(vsri_n_u8(tGreen, tGreen, 6), iMask); - uint16x8_t sBlue = vmull_u8( tBlue , iMask); + uint16x8_t s_red = vmull_u8(vsri_n_u8(t_red , t_red , 5), mask_image); + uint16x8_t s_green = vmull_u8(vsri_n_u8(t_green, t_green, 6), mask_image); + uint16x8_t s_blue = vmull_u8( t_blue , mask_image); - sRed = vmlal(sRed , mask, solidColour.val[2]); - sGreen = vmlal(sGreen, mask, solidColour.val[1]); - sBlue = vmlal(sBlue , mask, solidColour.val[0]); + s_red = vmlal(s_red , mask, solid_colour.val[2]); + s_green = vmlal(s_green, mask, solid_colour.val[1]); + s_blue = vmlal(s_blue , mask, solid_colour.val[0]); - pixels = vsri_n_u16(sRed, sGreen, 5); - pixels = vsri_n_u16(pixels, sBlue, 11); + pixels = vsri_n_u16(s_red, s_green, 5); + pixels = vsri_n_u16(pixels, s_blue, 11); vst1q_u16(dest, pixels); - dest += destStride; - mask += maskStride; + dest += dest_stride; + mask += mask_stride; } #endif } static void -neon_CompositeOver_n_8_0565 ( +neon_composite_over_n_8_0565 ( pixman_implementation_t * impl, pixman_op_t op, pixman_image_t * src_image, @@ -1728,11 +1728,11 @@ neon_CompositeOver_n_8_0565 ( int32_t height) { uint32_t src, srca; - uint16_t *dstLine, *alignedLine; - uint8_t *maskLine; - uint32_t dstStride, maskStride; - uint32_t kernelCount, copyCount, copyTail; - uint8_t kernelOffset, copyOffset; + uint16_t *dst_line, *aligned_line; + uint8_t *mask_line; + uint32_t dst_stride, mask_stride; + uint32_t kernel_count, copy_count, copy_tail; + uint8_t kernel_offset, copy_offset; src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -1748,82 +1748,82 @@ neon_CompositeOver_n_8_0565 ( // TODO: there must be a more elegant way of doing this. int x; for(x=0; x < width; x += NEON_SCANLINE_BUFFER_PIXELS) { - neon_CompositeOver_n_8_0565(impl, op, src_image, mask_image, dst_image, src_x+x, src_y, mask_x+x, mask_y, dest_x+x, dest_y, + neon_composite_over_n_8_0565(impl, op, src_image, mask_image, dst_image, src_x+x, src_y, mask_x+x, mask_y, dest_x+x, dest_y, (x+NEON_SCANLINE_BUFFER_PIXELS > width) ? width-x : NEON_SCANLINE_BUFFER_PIXELS, height); } return; } - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); // keep within minimum number of aligned quadwords on width // while also keeping the minimum number of columns to process { - unsigned long alignedLeft = (unsigned long)(dstLine) & ~0xF; - unsigned long alignedRight = (((unsigned long)(dstLine + width)) + 0xF) & ~0xF; - unsigned long ceilingLength = (((unsigned long) width) * sizeof(*dstLine) + 0xF) & ~0xF; + unsigned long aligned_left = (unsigned long)(dst_line) & ~0xF; + unsigned long aligned_right = (((unsigned long)(dst_line + width)) + 0xF) & ~0xF; + unsigned long ceiling_length = (((unsigned long) width) * sizeof(*dst_line) + 0xF) & ~0xF; // the fast copy should be quadword aligned - copyOffset = dstLine - ((uint16_t*) alignedLeft); - alignedLine = dstLine - copyOffset; - copyCount = (uint32_t) ((alignedRight - alignedLeft) >> 4); - copyTail = 0; + copy_offset = dst_line - ((uint16_t*) aligned_left); + aligned_line = dst_line - copy_offset; + copy_count = (uint32_t) ((aligned_right - aligned_left) >> 4); + copy_tail = 0; - if(alignedRight - alignedLeft > ceilingLength) { + if(aligned_right - aligned_left > ceiling_length) { // unaligned routine is tightest - kernelCount = (uint32_t) (ceilingLength >> 4); - kernelOffset = copyOffset; + kernel_count = (uint32_t) (ceiling_length >> 4); + kernel_offset = copy_offset; } else { // aligned routine is equally tight, so it is safer to align - kernelCount = copyCount; - kernelOffset = 0; + kernel_count = copy_count; + kernel_offset = 0; } // We should avoid reading beyond scanline ends for safety - if(alignedLine < (dstLine - xDst) || - (alignedLine + (copyCount * 16 / sizeof(*dstLine))) > ((dstLine - xDst) + pDst->bits.width)) + if(aligned_line < (dst_line - x_dst) || + (aligned_line + (copy_count * 16 / sizeof(*dst_line))) > ((dst_line - x_dst) + p_dst->bits.width)) { // switch to precise read - copyOffset = kernelOffset = 0; - alignedLine = dstLine; - kernelCount = (uint32_t) (ceilingLength >> 4); - copyCount = (width * sizeof(*dstLine)) >> 4; - copyTail = (width * sizeof(*dstLine)) & 0xF; + copy_offset = kernel_offset = 0; + aligned_line = dst_line; + kernel_count = (uint32_t) (ceiling_length >> 4); + copy_count = (width * sizeof(*dst_line)) >> 4; + copy_tail = (width * sizeof(*dst_line)) & 0xF; } } { - uint16_t scanLine[NEON_SCANLINE_BUFFER_PIXELS + 8]; // deliberately not initialised - uint8_t glyphLine[NEON_SCANLINE_BUFFER_PIXELS + 8]; + uint16_t scan_line[NEON_SCANLINE_BUFFER_PIXELS + 8]; // deliberately not initialised + uint8_t glyph_line[NEON_SCANLINE_BUFFER_PIXELS + 8]; int y = height; // row-major order // left edge, middle block, right edge - for( ; y--; maskLine += maskStride, alignedLine += dstStride, dstLine += dstStride) { + for( ; y--; mask_line += mask_stride, aligned_line += dst_stride, dst_line += dst_stride) { // We don't want to overrun the edges of the glyph, so realign the edge data into known buffers - neon_quadword_copy(glyphLine + copyOffset, maskLine, width >> 4, width & 0xF); + neon_quadword_copy(glyph_line + copy_offset, mask_line, width >> 4, width & 0xF); // Uncached framebuffer access is really, really slow if we do it piecemeal. // It should be much faster if we grab it all at once. // One scanline should easily fit in L1 cache, so this should not waste RAM bandwidth. - neon_quadword_copy(scanLine, alignedLine, copyCount, copyTail); + neon_quadword_copy(scan_line, aligned_line, copy_count, copy_tail); // Apply the actual filter - SolidOver565_8pix_neon(src, scanLine + kernelOffset, glyphLine + kernelOffset, 8 * sizeof(*dstLine), 8, kernelCount); + solid_over_565_8_pix_neon(src, scan_line + kernel_offset, glyph_line + kernel_offset, 8 * sizeof(*dst_line), 8, kernel_count); // Copy the modified scanline back - neon_quadword_copy(dstLine, scanLine + copyOffset, width >> 3, (width & 7) * 2); + neon_quadword_copy(dst_line, scan_line + copy_offset, width >> 3, (width & 7) * 2); } } } #ifdef USE_GCC_INLINE_ASM -static inline void PlainOver565_8pix_neon( +static inline void plain_over_565_8_pix_neon( uint32_t colour, uint16_t *dest, - uint32_t destStride, // bytes, not elements + uint32_t dest_stride, // bytes, not elements uint32_t count // 8-pixel groups ) { @@ -1852,14 +1852,14 @@ static inline void PlainOver565_8pix_neon( " vsri.16 q0, q1, #5 @ pack green behind red \n" " vsri.16 q0, q2, #11 @ pack blue into pixels \n" " vst1.16 {d0,d1}, [%[dest]] @ store composited pixels \n" - " add %[dest], %[dest], %[destStride] @ advance framebuffer pointer \n" + " add %[dest], %[dest], %[dest_stride] @ advance framebuffer pointer \n" " bne 0b @ next please \n" // Clobbered registers marked as input/outputs : [dest] "+r" (dest), [count] "+r" (count) // Inputs - : [destStride] "r" (destStride), [colour] "r" (&colour) + : [dest_stride] "r" (dest_stride), [colour] "r" (&colour) // Clobbers, including the inputs we modify, and potentially lots of memory : "q0", "q1", "q2", "q3", "q9", "q10", "q11", "q12", "q13", "q14", "cc", "memory" @@ -1867,7 +1867,7 @@ static inline void PlainOver565_8pix_neon( } static void -neon_CompositeOver_n_0565 ( +neon_composite_over_n_0565 ( pixman_implementation_t * impl, pixman_op_t op, pixman_image_t * src_image, @@ -1883,10 +1883,10 @@ neon_CompositeOver_n_0565 ( int32_t height) { uint32_t src, srca; - uint16_t *dstLine, *alignedLine; - uint32_t dstStride; - uint32_t kernelCount, copyCount, copyTail; - uint8_t kernelOffset, copyOffset; + uint16_t *dst_line, *aligned_line; + uint32_t dst_stride; + uint32_t kernel_count, copy_count, copy_tail; + uint8_t kernel_offset, copy_offset; src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -1902,81 +1902,81 @@ neon_CompositeOver_n_0565 ( // TODO: there must be a more elegant way of doing this. int x; for(x=0; x < width; x += NEON_SCANLINE_BUFFER_PIXELS) { - neon_CompositeOver_n_0565(impl, op, src_image, mask_image, dst_image, src_x+x, src_y, mask_x+x, mask_y, dest_x+x, dest_y, + neon_composite_over_n_0565(impl, op, src_image, mask_image, dst_image, src_x+x, src_y, mask_x+x, mask_y, dest_x+x, dest_y, (x+NEON_SCANLINE_BUFFER_PIXELS > width) ? width-x : NEON_SCANLINE_BUFFER_PIXELS, height); } return; } - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); // keep within minimum number of aligned quadwords on width // while also keeping the minimum number of columns to process { - unsigned long alignedLeft = (unsigned long)(dstLine) & ~0xF; - unsigned long alignedRight = (((unsigned long)(dstLine + width)) + 0xF) & ~0xF; - unsigned long ceilingLength = (((unsigned long) width) * sizeof(*dstLine) + 0xF) & ~0xF; + unsigned long aligned_left = (unsigned long)(dst_line) & ~0xF; + unsigned long aligned_right = (((unsigned long)(dst_line + width)) + 0xF) & ~0xF; + unsigned long ceiling_length = (((unsigned long) width) * sizeof(*dst_line) + 0xF) & ~0xF; // the fast copy should be quadword aligned - copyOffset = dstLine - ((uint16_t*) alignedLeft); - alignedLine = dstLine - copyOffset; - copyCount = (uint32_t) ((alignedRight - alignedLeft) >> 4); - copyTail = 0; + copy_offset = dst_line - ((uint16_t*) aligned_left); + aligned_line = dst_line - copy_offset; + copy_count = (uint32_t) ((aligned_right - aligned_left) >> 4); + copy_tail = 0; - if(alignedRight - alignedLeft > ceilingLength) { + if(aligned_right - aligned_left > ceiling_length) { // unaligned routine is tightest - kernelCount = (uint32_t) (ceilingLength >> 4); - kernelOffset = copyOffset; + kernel_count = (uint32_t) (ceiling_length >> 4); + kernel_offset = copy_offset; } else { // aligned routine is equally tight, so it is safer to align - kernelCount = copyCount; - kernelOffset = 0; + kernel_count = copy_count; + kernel_offset = 0; } // We should avoid reading beyond scanline ends for safety - if(alignedLine < (dstLine - xDst) || - (alignedLine + (copyCount * 16 / sizeof(*dstLine))) > ((dstLine - xDst) + pDst->bits.width)) + if(aligned_line < (dst_line - x_dst) || + (aligned_line + (copy_count * 16 / sizeof(*dst_line))) > ((dst_line - x_dst) + p_dst->bits.width)) { // switch to precise read - copyOffset = kernelOffset = 0; - alignedLine = dstLine; - kernelCount = (uint32_t) (ceilingLength >> 4); - copyCount = (width * sizeof(*dstLine)) >> 4; - copyTail = (width * sizeof(*dstLine)) & 0xF; + copy_offset = kernel_offset = 0; + aligned_line = dst_line; + kernel_count = (uint32_t) (ceiling_length >> 4); + copy_count = (width * sizeof(*dst_line)) >> 4; + copy_tail = (width * sizeof(*dst_line)) & 0xF; } } { - uint16_t scanLine[NEON_SCANLINE_BUFFER_PIXELS + 8]; // deliberately not initialised + uint16_t scan_line[NEON_SCANLINE_BUFFER_PIXELS + 8]; // deliberately not initialised // row-major order // left edge, middle block, right edge - for( ; height--; alignedLine += dstStride, dstLine += dstStride) { + for( ; height--; aligned_line += dst_stride, dst_line += dst_stride) { // Uncached framebuffer access is really, really slow if we do it piecemeal. // It should be much faster if we grab it all at once. // One scanline should easily fit in L1 cache, so this should not waste RAM bandwidth. - neon_quadword_copy(scanLine, alignedLine, copyCount, copyTail); + neon_quadword_copy(scan_line, aligned_line, copy_count, copy_tail); // Apply the actual filter - PlainOver565_8pix_neon(src, scanLine + kernelOffset, 8 * sizeof(*dstLine), kernelCount); + plain_over_565_8_pix_neon(src, scan_line + kernel_offset, 8 * sizeof(*dst_line), kernel_count); // Copy the modified scanline back - neon_quadword_copy(dstLine, scanLine + copyOffset, width >> 3, (width & 7) * 2); + neon_quadword_copy(dst_line, scan_line + copy_offset, width >> 3, (width & 7) * 2); } } } -static inline void ARGB8_Over565_8pix_neon( +static inline void ARGB8_over_565_8_pix_neon( uint32_t *src, uint16_t *dest, - uint32_t srcStride, // bytes, not elements + uint32_t src_stride, // bytes, not elements uint32_t count // 8-pixel groups ) { asm volatile ( "0: @ loop\n" - " pld [%[src], %[srcStride]] @ preload from next scanline \n" + " pld [%[src], %[src_stride]] @ preload from next scanline \n" " vld1.16 {d0,d1}, [%[dest]] @ load pixels from framebuffer \n" " vld4.8 {d20,d21,d22,d23},[%[src]]! @ load source image pixels \n" " vsli.u16 q3, q0, #5 @ duplicate framebuffer blue bits \n" @@ -2002,7 +2002,7 @@ static inline void ARGB8_Over565_8pix_neon( : [dest] "+r" (dest), [src] "+r" (src), [count] "+r" (count) // Inputs - : [srcStride] "r" (srcStride) + : [src_stride] "r" (src_stride) // Clobbers, including the inputs we modify, and potentially lots of memory : "q0", "q1", "q2", "q3", "d17", "d18", "q10", "q11", "cc", "memory" @@ -2010,7 +2010,7 @@ static inline void ARGB8_Over565_8pix_neon( } static void -neon_CompositeOver_8888_0565 ( +neon_composite_over_8888_0565 ( pixman_implementation_t * impl, pixman_op_t op, pixman_image_t * src_image, @@ -2025,11 +2025,11 @@ neon_CompositeOver_8888_0565 ( int32_t width, int32_t height) { - uint32_t *srcLine; - uint16_t *dstLine, *alignedLine; - uint32_t dstStride, srcStride; - uint32_t kernelCount, copyCount, copyTail; - uint8_t kernelOffset, copyOffset; + uint32_t *src_line; + uint16_t *dst_line, *aligned_line; + uint32_t dst_stride, src_stride; + uint32_t kernel_count, copy_count, copy_tail; + uint8_t kernel_offset, copy_offset; // we assume mask is opaque // so the only alpha to deal with is embedded in src @@ -2038,54 +2038,54 @@ neon_CompositeOver_8888_0565 ( // split the blit, so we can use a fixed-size scanline buffer int x; for(x=0; x < width; x += NEON_SCANLINE_BUFFER_PIXELS) { - neon_CompositeOver_8888_0565(impl, op, src_image, mask_image, dst_image, src_x+x, src_y, mask_x+x, mask_y, dest_x+x, dest_y, + neon_composite_over_8888_0565(impl, op, src_image, mask_image, dst_image, src_x+x, src_y, mask_x+x, mask_y, dest_x+x, dest_y, (x+NEON_SCANLINE_BUFFER_PIXELS > width) ? width-x : NEON_SCANLINE_BUFFER_PIXELS, height); } return; } - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); // keep within minimum number of aligned quadwords on width // while also keeping the minimum number of columns to process { - unsigned long alignedLeft = (unsigned long)(dstLine) & ~0xF; - unsigned long alignedRight = (((unsigned long)(dstLine + width)) + 0xF) & ~0xF; - unsigned long ceilingLength = (((unsigned long) width) * sizeof(*dstLine) + 0xF) & ~0xF; + unsigned long aligned_left = (unsigned long)(dst_line) & ~0xF; + unsigned long aligned_right = (((unsigned long)(dst_line + width)) + 0xF) & ~0xF; + unsigned long ceiling_length = (((unsigned long) width) * sizeof(*dst_line) + 0xF) & ~0xF; // the fast copy should be quadword aligned - copyOffset = dstLine - ((uint16_t*) alignedLeft); - alignedLine = dstLine - copyOffset; - copyCount = (uint32_t) ((alignedRight - alignedLeft) >> 4); - copyTail = 0; + copy_offset = dst_line - ((uint16_t*) aligned_left); + aligned_line = dst_line - copy_offset; + copy_count = (uint32_t) ((aligned_right - aligned_left) >> 4); + copy_tail = 0; - if(alignedRight - alignedLeft > ceilingLength) { + if(aligned_right - aligned_left > ceiling_length) { // unaligned routine is tightest - kernelCount = (uint32_t) (ceilingLength >> 4); - kernelOffset = copyOffset; + kernel_count = (uint32_t) (ceiling_length >> 4); + kernel_offset = copy_offset; } else { // aligned routine is equally tight, so it is safer to align - kernelCount = copyCount; - kernelOffset = 0; + kernel_count = copy_count; + kernel_offset = 0; } // We should avoid reading beyond scanline ends for safety - if(alignedLine < (dstLine - xDst) || - (alignedLine + (copyCount * 16 / sizeof(*dstLine))) > ((dstLine - xDst) + pDst->bits.width)) + if(aligned_line < (dst_line - x_dst) || + (aligned_line + (copy_count * 16 / sizeof(*dst_line))) > ((dst_line - x_dst) + p_dst->bits.width)) { // switch to precise read - copyOffset = kernelOffset = 0; - alignedLine = dstLine; - kernelCount = (uint32_t) (ceilingLength >> 4); - copyCount = (width * sizeof(*dstLine)) >> 4; - copyTail = (width * sizeof(*dstLine)) & 0xF; + copy_offset = kernel_offset = 0; + aligned_line = dst_line; + kernel_count = (uint32_t) (ceiling_length >> 4); + copy_count = (width * sizeof(*dst_line)) >> 4; + copy_tail = (width * sizeof(*dst_line)) & 0xF; } } /* Preload the first input scanline */ { - uint8_t *srcPtr = (uint8_t*) srcLine; + uint8_t *src_ptr = (uint8_t*) src_line; uint32_t count = (width + 15) / 16; #ifdef USE_GCC_INLINE_ASM @@ -2097,34 +2097,34 @@ neon_CompositeOver_8888_0565 ( " bgt 0b \n" // Clobbered input registers marked as input/outputs - : [src] "+r" (srcPtr), [count] "+r" (count) + : [src] "+r" (src_ptr), [count] "+r" (count) : // no unclobbered inputs : "cc" ); #else do { - __pld(srcPtr); - srcPtr += 64; + __pld(src_ptr); + src_ptr += 64; } while(--count); #endif } { - uint16_t scanLine[NEON_SCANLINE_BUFFER_PIXELS + 8]; // deliberately not initialised + uint16_t scan_line[NEON_SCANLINE_BUFFER_PIXELS + 8]; // deliberately not initialised // row-major order // left edge, middle block, right edge - for( ; height--; srcLine += srcStride, alignedLine += dstStride) { + for( ; height--; src_line += src_stride, aligned_line += dst_stride) { // Uncached framebuffer access is really, really slow if we do it piecemeal. // It should be much faster if we grab it all at once. // One scanline should easily fit in L1 cache, so this should not waste RAM bandwidth. - neon_quadword_copy(scanLine, alignedLine, copyCount, copyTail); + neon_quadword_copy(scan_line, aligned_line, copy_count, copy_tail); // Apply the actual filter - ARGB8_Over565_8pix_neon(srcLine, scanLine + kernelOffset, srcStride * sizeof(*srcLine), kernelCount); + ARGB8_over_565_8_pix_neon(src_line, scan_line + kernel_offset, src_stride * sizeof(*src_line), kernel_count); // Copy the modified scanline back - neon_quadword_copy(dstLine, scanLine + copyOffset, width >> 3, (width & 7) * 2); + neon_quadword_copy(dst_line, scan_line + copy_offset, width >> 3, (width & 7) * 2); } } } @@ -2133,21 +2133,21 @@ neon_CompositeOver_8888_0565 ( static const pixman_fast_path_t arm_neon_fast_path_array[] = { - { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, neon_CompositeAdd_8888_8_8, 0 }, - { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, neon_CompositeAdd_8000_8000, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, neon_CompositeOver_n_8_0565, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, neon_CompositeOver_n_8_0565, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, neon_CompositeSrc_24_16, 0 }, - { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, neon_CompositeSrc_24_16, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, neon_CompositeSrc_24_16, 0 }, - { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, neon_CompositeSrc_24_16, 0 }, + { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, neon_composite_add_8888_8_8, 0 }, + { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, neon_composite_add_8000_8000, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, neon_composite_over_n_8_0565, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, neon_composite_over_n_8_0565, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, neon_composite_src_24_16, 0 }, + { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, neon_composite_src_24_16, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, neon_composite_src_24_16, 0 }, + { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, neon_composite_src_24_16, 0 }, #ifdef USE_GCC_INLINE_ASM - { PIXMAN_OP_SRC, PIXMAN_r5g6b5, PIXMAN_null, PIXMAN_r5g6b5, neon_CompositeSrc_16_16, 0 }, - { PIXMAN_OP_SRC, PIXMAN_b5g6r5, PIXMAN_null, PIXMAN_b5g6r5, neon_CompositeSrc_16_16, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, neon_CompositeOver_n_0565, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_b5g6r5, neon_CompositeOver_n_0565, 0 }, - { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, neon_CompositeOver_8888_0565, 0 }, - { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, neon_CompositeOver_8888_0565, 0 }, + { PIXMAN_OP_SRC, PIXMAN_r5g6b5, PIXMAN_null, PIXMAN_r5g6b5, neon_composite_src_16_16, 0 }, + { PIXMAN_OP_SRC, PIXMAN_b5g6r5, PIXMAN_null, PIXMAN_b5g6r5, neon_composite_src_16_16, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, neon_composite_over_n_0565, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_b5g6r5, neon_composite_over_n_0565, 0 }, + { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, neon_composite_over_8888_0565, 0 }, + { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, neon_composite_over_8888_0565, 0 }, #endif { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, neon_composite_over_8888_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, neon_composite_over_8888_8888, 0 }, @@ -2155,10 +2155,10 @@ static const pixman_fast_path_t arm_neon_fast_path_array[] = { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, neon_composite_over_8888_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, neon_composite_over_8888_n_8888, NEED_SOLID_MASK }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, neon_composite_over_8888_n_8888, NEED_SOLID_MASK }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, neon_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, neon_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, neon_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, neon_CompositeOver_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, neon_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, neon_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, neon_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, neon_composite_over_n_8_8888, 0 }, { PIXMAN_OP_NONE }, }; diff --git a/pixman/pixman-arm-simd.c b/pixman/pixman-arm-simd.c index 71689fe..d16ca18 100644 --- a/pixman/pixman-arm-simd.c +++ b/pixman/pixman-arm-simd.c @@ -30,7 +30,7 @@ #include "pixman-private.h" static void -arm_CompositeAdd_8000_8000 ( +arm_composite_add_8000_8000 ( pixman_implementation_t * impl, pixman_op_t op, pixman_image_t * src_image, @@ -45,21 +45,21 @@ arm_CompositeAdd_8000_8000 ( int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *srcLine, *src; - int dstStride, srcStride; + uint8_t *dst_line, *dst; + uint8_t *src_line, *src; + int dst_stride, src_stride; uint16_t w; uint8_t s, d; - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; /* ensure both src and dst are properly aligned before doing 32 bit reads @@ -115,23 +115,23 @@ arm_composite_over_8888_8888 ( int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; - int dstStride, srcStride; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; + int dst_stride, src_stride; uint16_t w; uint32_t component_half = 0x800080; uint32_t upper_component_mask = 0xff00ff00; uint32_t alpha_mask = 0xff; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; //#define inner_branch @@ -208,26 +208,26 @@ arm_composite_over_8888_n_8888 ( int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; uint32_t mask; - int dstStride, srcStride; + int dst_stride, src_stride; uint16_t w; uint32_t component_half = 0x800080; uint32_t alpha_mask = 0xff; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); mask = _pixman_image_get_solid (mask_image, dst_image->bits.format); mask = (mask) >> 24; while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; //#define inner_branch @@ -302,7 +302,7 @@ arm_composite_over_8888_n_8888 ( } static void -arm_CompositeOver_n_8_8888 ( +arm_composite_over_n_8_8888 ( pixman_implementation_t * impl, pixman_op_t op, pixman_image_t * src_image, @@ -318,9 +318,9 @@ arm_CompositeOver_n_8_8888 ( int32_t height) { uint32_t src, srca; - uint32_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint32_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint16_t w; src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -336,15 +336,15 @@ arm_CompositeOver_n_8_8888 ( uint32_t src_hi = (src >> 8) & component_mask; uint32_t src_lo = src & component_mask; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; //#define inner_branch @@ -426,12 +426,12 @@ static const pixman_fast_path_t arm_simd_fast_path_array[] = { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, arm_composite_over_8888_n_8888, NEED_SOLID_MASK }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, arm_composite_over_8888_n_8888, NEED_SOLID_MASK }, - { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, arm_CompositeAdd_8000_8000, 0 }, + { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, arm_composite_add_8000_8000, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, arm_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, arm_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, arm_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, arm_CompositeOver_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, arm_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, arm_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, arm_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, arm_composite_over_n_8_8888, 0 }, { PIXMAN_OP_NONE }, }; diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c index f22765a..8036705 100644 --- a/pixman/pixman-bits-image.c +++ b/pixman/pixman-bits-image.c @@ -490,7 +490,7 @@ bits_image_fetch_filtered (bits_image_t *pict, uint32_t *buffer, int n_pixels) static void bits_image_fetch_transformed (pixman_image_t * pict, int x, int y, int width, uint32_t *buffer, - const uint32_t *mask, uint32_t maskBits) + const uint32_t *mask, uint32_t mask_bits) { uint32_t *bits; int32_t stride; @@ -585,7 +585,7 @@ bits_image_fetch_transformed (pixman_image_t * pict, int x, int y, static void bits_image_fetch_solid_32 (pixman_image_t * image, int x, int y, int width, uint32_t *buffer, - const uint32_t *mask, uint32_t maskBits) + const uint32_t *mask, uint32_t mask_bits) { uint32_t color[2]; uint32_t *end; @@ -696,7 +696,7 @@ bits_image_fetch_untransformed_repeat_normal (bits_image_t *image, pixman_bool_t static void bits_image_fetch_untransformed_32 (pixman_image_t * image, int x, int y, int width, uint32_t *buffer, - const uint32_t *mask, uint32_t maskBits) + const uint32_t *mask, uint32_t mask_bits) { if (image->common.repeat == PIXMAN_REPEAT_NONE) { diff --git a/pixman/pixman-combine.c.template b/pixman/pixman-combine.c.template index 030bbc9..b794000 100644 --- a/pixman/pixman-combine.c.template +++ b/pixman/pixman-combine.c.template @@ -12,7 +12,7 @@ /*** per channel helper functions ***/ static void -combineMaskC (comp4_t *src, comp4_t *mask) +combine_mask_c (comp4_t *src, comp4_t *mask) { comp4_t a = *mask; @@ -43,7 +43,7 @@ combineMaskC (comp4_t *src, comp4_t *mask) } static void -combineMaskValueC (comp4_t *src, const comp4_t *mask) +combine_mask_value_c (comp4_t *src, const comp4_t *mask) { comp4_t a = *mask; comp4_t x; @@ -63,7 +63,7 @@ combineMaskValueC (comp4_t *src, const comp4_t *mask) } static void -combineMaskAlphaC (const comp4_t *src, comp4_t *mask) +combine_mask_alpha_c (const comp4_t *src, comp4_t *mask) { comp4_t a = *(mask); comp4_t x; @@ -102,7 +102,7 @@ combineMaskAlphaC (const comp4_t *src, comp4_t *mask) */ static force_inline comp4_t -combineMask (const comp4_t *src, const comp4_t *mask, int i) +combine_mask (const comp4_t *src, const comp4_t *mask, int i) { comp4_t s, m; @@ -123,14 +123,14 @@ combineMask (const comp4_t *src, const comp4_t *mask, int i) } static void -combineClear (pixman_implementation_t *imp, pixman_op_t op, +combine_clear (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { memset(dest, 0, width*sizeof(comp4_t)); } static void -combineSrcU (pixman_implementation_t *imp, pixman_op_t op, +combine_src_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -141,21 +141,21 @@ combineSrcU (pixman_implementation_t *imp, pixman_op_t op, { for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); *(dest + i) = s; } } } -/* if the Src is opaque, call combineSrcU */ +/* if the Src is opaque, call combine_src_u */ static void -combineOverU (pixman_implementation_t *imp, pixman_op_t op, +combine_over_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t d = *(dest + i); comp4_t ia = ALPHA_c(~s); @@ -166,12 +166,12 @@ combineOverU (pixman_implementation_t *imp, pixman_op_t op, /* if the Dst is opaque, this is a noop */ static void -combineOverReverseU (pixman_implementation_t *imp, pixman_op_t op, +combine_over_reverse_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t d = *(dest + i); comp4_t ia = ALPHA_c(~*(dest + i)); UNcx4_MUL_UNc_ADD_UNcx4(s, ia, d); @@ -179,14 +179,14 @@ combineOverReverseU (pixman_implementation_t *imp, pixman_op_t op, } } -/* if the Dst is opaque, call combineSrcU */ +/* if the Dst is opaque, call combine_src_u */ static void -combineInU (pixman_implementation_t *imp, pixman_op_t op, +combine_in_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t a = ALPHA_c(*(dest + i)); UNcx4_MUL_UNc(s, a); *(dest + i) = s; @@ -195,12 +195,12 @@ combineInU (pixman_implementation_t *imp, pixman_op_t op, /* if the Src is opaque, this is a noop */ static void -combineInReverseU (pixman_implementation_t *imp, pixman_op_t op, +combine_in_reverse_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t d = *(dest + i); comp4_t a = ALPHA_c(s); UNcx4_MUL_UNc(d, a); @@ -208,28 +208,28 @@ combineInReverseU (pixman_implementation_t *imp, pixman_op_t op, } } -/* if the Dst is opaque, call combineClear */ +/* if the Dst is opaque, call combine_clear */ static void -combineOutU (pixman_implementation_t *imp, pixman_op_t op, +combine_out_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t a = ALPHA_c(~*(dest + i)); UNcx4_MUL_UNc(s, a); *(dest + i) = s; } } -/* if the Src is opaque, call combineClear */ +/* if the Src is opaque, call combine_clear */ static void -combineOutReverseU (pixman_implementation_t *imp, pixman_op_t op, +combine_out_reverse_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t d = *(dest + i); comp4_t a = ALPHA_c(~s); UNcx4_MUL_UNc(d, a); @@ -237,16 +237,16 @@ combineOutReverseU (pixman_implementation_t *imp, pixman_op_t op, } } -/* if the Src is opaque, call combineInU */ -/* if the Dst is opaque, call combineOverU */ -/* if both the Src and Dst are opaque, call combineSrcU */ +/* if the Src is opaque, call combine_in_u */ +/* if the Dst is opaque, call combine_over_u */ +/* if both the Src and Dst are opaque, call combine_src_u */ static void -combineAtopU (pixman_implementation_t *imp, pixman_op_t op, +combine_atop_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t d = *(dest + i); comp4_t dest_a = ALPHA_c(d); comp4_t src_ia = ALPHA_c(~s); @@ -256,16 +256,16 @@ combineAtopU (pixman_implementation_t *imp, pixman_op_t op, } } -/* if the Src is opaque, call combineOverReverseU */ -/* if the Dst is opaque, call combineInReverseU */ -/* if both the Src and Dst are opaque, call combineDstU */ +/* if the Src is opaque, call combine_over_reverse_u */ +/* if the Dst is opaque, call combine_in_reverse_u */ +/* if both the Src and Dst are opaque, call combine_dst_u */ static void -combineAtopReverseU (pixman_implementation_t *imp, pixman_op_t op, +combine_atop_reverse_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t d = *(dest + i); comp4_t src_a = ALPHA_c(s); comp4_t dest_ia = ALPHA_c(~d); @@ -275,16 +275,16 @@ combineAtopReverseU (pixman_implementation_t *imp, pixman_op_t op, } } -/* if the Src is opaque, call combineOverU */ -/* if the Dst is opaque, call combineOverReverseU */ -/* if both the Src and Dst are opaque, call combineClear */ +/* if the Src is opaque, call combine_over_u */ +/* if the Dst is opaque, call combine_over_reverse_u */ +/* if both the Src and Dst are opaque, call combine_clear */ static void -combineXorU (pixman_implementation_t *imp, pixman_op_t op, +combine_xor_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t d = *(dest + i); comp4_t src_ia = ALPHA_c(~s); comp4_t dest_ia = ALPHA_c(~d); @@ -295,28 +295,28 @@ combineXorU (pixman_implementation_t *imp, pixman_op_t op, } static void -combineAddU (pixman_implementation_t *imp, pixman_op_t op, +combine_add_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t d = *(dest + i); UNcx4_ADD_UNcx4(d, s); *(dest + i) = d; } } -/* if the Src is opaque, call combineAddU */ -/* if the Dst is opaque, call combineAddU */ -/* if both the Src and Dst are opaque, call combineAddU */ +/* if the Src is opaque, call combine_add_u */ +/* if the Dst is opaque, call combine_add_u */ +/* if both the Src and Dst are opaque, call combine_add_u */ static void -combineSaturateU (pixman_implementation_t *imp, pixman_op_t op, +combine_saturate_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t d = *(dest + i); comp2_t sa, da; @@ -361,12 +361,12 @@ combineSaturateU (pixman_implementation_t *imp, pixman_op_t op, */ static void -combineMultiplyU (pixman_implementation_t *imp, pixman_op_t op, +combine_multiply_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t d = *(dest + i); comp4_t ss = s; comp4_t src_ia = ALPHA_c (~s); @@ -380,7 +380,7 @@ combineMultiplyU (pixman_implementation_t *imp, pixman_op_t op, } static void -combineMultiplyC (pixman_implementation_t *imp, pixman_op_t op, +combine_multiply_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -391,7 +391,7 @@ combineMultiplyC (pixman_implementation_t *imp, pixman_op_t op, comp4_t r = d; comp4_t dest_ia = ALPHA_c (~d); - combineMaskValueC (&s, &m); + combine_mask_value_c (&s, &m); UNcx4_MUL_UNcx4_ADD_UNcx4_MUL_UNc (r, ~m, s, dest_ia); UNcx4_MUL_UNcx4 (d, s); @@ -403,12 +403,12 @@ combineMultiplyC (pixman_implementation_t *imp, pixman_op_t op, #define PDF_SEPARABLE_BLEND_MODE(name) \ static void \ -combine ## name ## U (pixman_implementation_t *imp, pixman_op_t op, \ +combine_ ## name ## _u (pixman_implementation_t *imp, pixman_op_t op, \ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) \ { \ int i; \ for (i = 0; i < width; ++i) { \ - comp4_t s = combineMask (src, mask, i); \ + comp4_t s = combine_mask (src, mask, i); \ comp4_t d = *(dest + i); \ comp1_t sa = ALPHA_c(s); \ comp1_t isa = ~sa; \ @@ -428,7 +428,7 @@ combine ## name ## U (pixman_implementation_t *imp, pixman_op_t op, \ } \ \ static void \ -combine ## name ## C (pixman_implementation_t *imp, pixman_op_t op, \ +combine_ ## name ## _c (pixman_implementation_t *imp, pixman_op_t op, \ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) \ { \ int i; \ @@ -440,7 +440,7 @@ combine ## name ## C (pixman_implementation_t *imp, pixman_op_t op, \ comp1_t ida = ~da; \ comp4_t result; \ \ - combineMaskValueC (&s, &m); \ + combine_mask_value_c (&s, &m); \ \ result = d; \ UNcx4_MUL_UNcx4_ADD_UNcx4_MUL_UNc (result, ~m, s, ida); \ @@ -461,12 +461,12 @@ combine ## name ## C (pixman_implementation_t *imp, pixman_op_t op, \ */ static inline comp4_t -blend_Screen (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) +blend_screen (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) { return DIV_ONE_UNc (sca * da + dca * sa - sca * dca); } -PDF_SEPARABLE_BLEND_MODE (Screen) +PDF_SEPARABLE_BLEND_MODE (screen) /* * Overlay @@ -478,7 +478,7 @@ PDF_SEPARABLE_BLEND_MODE (Screen) */ static inline comp4_t -blend_Overlay (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) +blend_overlay (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) { comp4_t rca; @@ -489,7 +489,7 @@ blend_Overlay (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) return DIV_ONE_UNc (rca); } -PDF_SEPARABLE_BLEND_MODE (Overlay) +PDF_SEPARABLE_BLEND_MODE (overlay) /* * Darken @@ -497,7 +497,7 @@ PDF_SEPARABLE_BLEND_MODE (Overlay) */ static inline comp4_t -blend_Darken (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) +blend_darken (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) { comp4_t s, d; @@ -506,7 +506,7 @@ blend_Darken (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) return DIV_ONE_UNc (s > d ? d : s); } -PDF_SEPARABLE_BLEND_MODE (Darken) +PDF_SEPARABLE_BLEND_MODE (darken) /* * Lighten @@ -514,7 +514,7 @@ PDF_SEPARABLE_BLEND_MODE (Darken) */ static inline comp4_t -blend_Lighten (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) +blend_lighten (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) { comp4_t s, d; @@ -523,7 +523,7 @@ blend_Lighten (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) return DIV_ONE_UNc (s > d ? s : d); } -PDF_SEPARABLE_BLEND_MODE (Lighten) +PDF_SEPARABLE_BLEND_MODE (lighten) /* * Color dodge @@ -535,7 +535,7 @@ PDF_SEPARABLE_BLEND_MODE (Lighten) */ static inline comp4_t -blend_ColorDodge (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) +blend_color_dodge (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) { if (sca >= sa) { return DIV_ONE_UNc (sa * da); @@ -545,19 +545,19 @@ blend_ColorDodge (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) } } -PDF_SEPARABLE_BLEND_MODE (ColorDodge) +PDF_SEPARABLE_BLEND_MODE (color_dodge) /* * Color burn * B(Dca, ab, Sca, as) = * if Sca. == 0 - * (Da == Dca).SaDa + * (Da == Dca).Sa.Da * otherwise * Sa.Da.(1 - min (1, (1 - Dca/Da).Sa / Sca)) */ static inline comp4_t -blend_ColorBurn (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) +blend_color_burn (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) { if (sca == 0) { return 0; @@ -568,7 +568,7 @@ blend_ColorBurn (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) } } -PDF_SEPARABLE_BLEND_MODE (ColorBurn) +PDF_SEPARABLE_BLEND_MODE (color_burn) /* * Hard light @@ -579,7 +579,7 @@ PDF_SEPARABLE_BLEND_MODE (ColorBurn) * Sa.Da - 2.(Da - Dca).(Sa - Sca) */ static inline comp4_t -blend_HardLight (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) +blend_hard_light (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) { if (2 * sca < sa) return DIV_ONE_UNc (2 * sca * dca); @@ -587,7 +587,7 @@ blend_HardLight (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) return DIV_ONE_UNc (sa * da - 2 * (da - dca) * (sa - sca)); } -PDF_SEPARABLE_BLEND_MODE (HardLight) +PDF_SEPARABLE_BLEND_MODE (hard_light) /* * Soft light @@ -601,7 +601,7 @@ PDF_SEPARABLE_BLEND_MODE (HardLight) */ static inline comp4_t -blend_SoftLight (comp4_t dca_org, comp4_t da_org, comp4_t sca_org, comp4_t sa_org) +blend_soft_light (comp4_t dca_org, comp4_t da_org, comp4_t sca_org, comp4_t sa_org) { double dca = dca_org * (1.0 / MASK); double da = da_org * (1.0 / MASK); @@ -624,7 +624,7 @@ blend_SoftLight (comp4_t dca_org, comp4_t da_org, comp4_t sca_org, comp4_t sa_or return rca * MASK + 0.5; } -PDF_SEPARABLE_BLEND_MODE (SoftLight) +PDF_SEPARABLE_BLEND_MODE (soft_light) /* * Difference @@ -632,7 +632,7 @@ PDF_SEPARABLE_BLEND_MODE (SoftLight) */ static inline comp4_t -blend_Difference (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) +blend_difference (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) { comp4_t dcasa = dca * sa; comp4_t scada = sca * da; @@ -643,7 +643,7 @@ blend_Difference (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) return DIV_ONE_UNc (scada - dcasa); } -PDF_SEPARABLE_BLEND_MODE (Difference) +PDF_SEPARABLE_BLEND_MODE (difference) /* * Exclusion @@ -654,12 +654,12 @@ PDF_SEPARABLE_BLEND_MODE (Difference) * PDF_SEPARABLE_BLEND_MODE, but that's a performance optimization */ static inline comp4_t -blend_Exclusion (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) +blend_exclusion (comp4_t dca, comp4_t da, comp4_t sca, comp4_t sa) { return DIV_ONE_UNc (sca * da + dca * sa - 2 * dca * sca); } -PDF_SEPARABLE_BLEND_MODE (Exclusion) +PDF_SEPARABLE_BLEND_MODE (exclusion) #undef PDF_SEPARABLE_BLEND_MODE @@ -670,7 +670,7 @@ PDF_SEPARABLE_BLEND_MODE (Exclusion) * * LUM (C) = 0.3 × Cred + 0.59 × Cgreen + 0.11 × Cblue * - * ClipColor (C): + * clip_color (C): * l = LUM (C) * min = Cmin * max = Cmax @@ -683,7 +683,7 @@ PDF_SEPARABLE_BLEND_MODE (Exclusion) * set_lum (C, l): * d = l – LUM (C) * C += d - * return ClipColor (C) + * return clip_color (C) * * SAT (C) = CH_MAX (C) - CH_MIN (C) * @@ -702,7 +702,7 @@ PDF_SEPARABLE_BLEND_MODE (Exclusion) * * LUM (r × C) = r × LUM (C) SAT (r * C) = r * SAT (C) * - * If we extend ClipColor with an extra argument a and change + * If we extend clip_color with an extra argument a and change * * if x >= 1.0 * @@ -710,20 +710,20 @@ PDF_SEPARABLE_BLEND_MODE (Exclusion) * * if x >= a * - * then ClipColor is also linear: + * then clip_color is also linear: * - * r * ClipColor (C, a) = ClipColor (rC, ra); + * r * clip_color (C, a) = clip_color (r_c, ra); * * for positive r. * * Similarly, we can extend set_lum with an extra argument that is just passed - * on to ClipColor: + * on to clip_color: * * r * set_lum ( C, l, a) * - * = r × ClipColor ( C + l - LUM (C), a) + * = r × clip_color ( C + l - LUM (C), a) * - * = ClipColor ( r * C + r × l - r * LUM (C), r * a) + * = clip_color ( r * C + r × l - r * LUM (C), r * a) * * = set_lum ( r * C, r * l, r * a) * @@ -734,7 +734,7 @@ PDF_SEPARABLE_BLEND_MODE (Exclusion) * The above holds for all non-zero x, because they x'es in the fraction for * C_mid cancel out. Specifically, it holds for x = r: * - * r * set_sat (C, s) = set_sat (rC, rs) + * r * set_sat (C, s) = set_sat (r_c, rs) * */ @@ -777,12 +777,12 @@ PDF_SEPARABLE_BLEND_MODE (Exclusion) #define PDF_NON_SEPARABLE_BLEND_MODE(name) \ static void \ -combine ## name ## U (pixman_implementation_t *imp, pixman_op_t op, \ +combine_ ## name ## _u (pixman_implementation_t *imp, pixman_op_t op, \ comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) \ { \ int i; \ for (i = 0; i < width; ++i) { \ - comp4_t s = combineMask (src, mask, i); \ + comp4_t s = combine_mask (src, mask, i); \ comp4_t d = *(dest + i); \ comp1_t sa = ALPHA_c(s); \ comp1_t isa = ~sa; \ @@ -825,7 +825,7 @@ set_lum (comp4_t dest[3], comp4_t src[3], comp4_t sa, comp4_t lum) tmp[1] += l; tmp[2] += l; - /* ClipColor */ + /* clip_color */ l = LUM (tmp); min = CH_MIN (tmp); max = CH_MAX (tmp); @@ -898,7 +898,7 @@ set_sat (comp4_t dest[3], comp4_t src[3], comp4_t sat) * B(Cb, Cs) = set_lum (set_sat (Cs, SAT (Cb)), LUM (Cb)) */ static inline void -blend_HslHue (comp4_t c[3], comp4_t dc[3], comp4_t da, comp4_t sc[3], comp4_t sa) +blend_hsl_hue (comp4_t c[3], comp4_t dc[3], comp4_t da, comp4_t sc[3], comp4_t sa) { c[0] = sc[0] * da; c[1] = sc[1] * da; @@ -907,14 +907,14 @@ blend_HslHue (comp4_t c[3], comp4_t dc[3], comp4_t da, comp4_t sc[3], comp4_t sa set_lum (c, c, sa * da, LUM (dc) * sa); } -PDF_NON_SEPARABLE_BLEND_MODE (HslHue) +PDF_NON_SEPARABLE_BLEND_MODE (hsl_hue) /* * Saturation: * B(Cb, Cs) = set_lum (set_sat (Cb, SAT (Cs)), LUM (Cb)) */ static inline void -blend_HslSaturation (comp4_t c[3], comp4_t dc[3], comp4_t da, comp4_t sc[3], comp4_t sa) +blend_hsl_saturation (comp4_t c[3], comp4_t dc[3], comp4_t da, comp4_t sc[3], comp4_t sa) { c[0] = dc[0] * sa; c[1] = dc[1] * sa; @@ -923,14 +923,14 @@ blend_HslSaturation (comp4_t c[3], comp4_t dc[3], comp4_t da, comp4_t sc[3], com set_lum (c, c, sa * da, LUM (dc) * sa); } -PDF_NON_SEPARABLE_BLEND_MODE (HslSaturation) +PDF_NON_SEPARABLE_BLEND_MODE (hsl_saturation) /* * Color: * B(Cb, Cs) = set_lum (Cs, LUM (Cb)) */ static inline void -blend_HslColor (comp4_t c[3], comp4_t dc[3], comp4_t da, comp4_t sc[3], comp4_t sa) +blend_hsl_color (comp4_t c[3], comp4_t dc[3], comp4_t da, comp4_t sc[3], comp4_t sa) { c[0] = sc[0] * da; c[1] = sc[1] * da; @@ -938,14 +938,14 @@ blend_HslColor (comp4_t c[3], comp4_t dc[3], comp4_t da, comp4_t sc[3], comp4_t set_lum (c, c, sa * da, LUM (dc) * sa); } -PDF_NON_SEPARABLE_BLEND_MODE (HslColor) +PDF_NON_SEPARABLE_BLEND_MODE (hsl_color) /* * Luminosity: * B(Cb, Cs) = set_lum (Cb, LUM (Cs)) */ static inline void -blend_HslLuminosity (comp4_t c[3], comp4_t dc[3], comp4_t da, comp4_t sc[3], comp4_t sa) +blend_hsl_luminosity (comp4_t c[3], comp4_t dc[3], comp4_t da, comp4_t sc[3], comp4_t sa) { c[0] = dc[0] * sa; c[1] = dc[1] * sa; @@ -953,7 +953,7 @@ blend_HslLuminosity (comp4_t c[3], comp4_t dc[3], comp4_t da, comp4_t sc[3], com set_lum (c, c, sa * da, LUM (sc) * da); } -PDF_NON_SEPARABLE_BLEND_MODE (HslLuminosity) +PDF_NON_SEPARABLE_BLEND_MODE (hsl_luminosity) #undef SAT #undef LUM @@ -1003,7 +1003,7 @@ PDF_NON_SEPARABLE_BLEND_MODE (HslLuminosity) /* portion covered by a but not b */ static comp1_t -combineDisjointOutPart (comp1_t a, comp1_t b) +combine_disjoint_out_part (comp1_t a, comp1_t b) { /* min (1, (1-b) / a) */ @@ -1015,7 +1015,7 @@ combineDisjointOutPart (comp1_t a, comp1_t b) /* portion covered by both a and b */ static comp1_t -combineDisjointInPart (comp1_t a, comp1_t b) +combine_disjoint_in_part (comp1_t a, comp1_t b) { /* max (1-(1-b)/a,0) */ /* = - min ((1-b)/a - 1, 0) */ @@ -1029,7 +1029,7 @@ combineDisjointInPart (comp1_t a, comp1_t b) /* portion covered by a but not b */ static comp1_t -combineConjointOutPart (comp1_t a, comp1_t b) +combine_conjoint_out_part (comp1_t a, comp1_t b) { /* max (1-b/a,0) */ /* = 1-min(b/a,1) */ @@ -1043,7 +1043,7 @@ combineConjointOutPart (comp1_t a, comp1_t b) /* portion covered by both a and b */ static comp1_t -combineConjointInPart (comp1_t a, comp1_t b) +combine_conjoint_in_part (comp1_t a, comp1_t b) { /* min (1,b/a) */ @@ -1063,11 +1063,11 @@ combineConjointInPart (comp1_t a, comp1_t b) (0 - ((t) >> G_SHIFT)))) << (i)) static void -combineDisjointGeneralU (comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width, comp1_t combine) +combine_disjoint_general_u (comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width, comp1_t combine) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t d = *(dest + i); comp4_t m,n,o,p; comp2_t Fa, Fb, t, u, v; @@ -1079,10 +1079,10 @@ combineDisjointGeneralU (comp4_t *dest, const comp4_t *src, const comp4_t *mask, Fa = 0; break; case COMBINE_A_OUT: - Fa = combineDisjointOutPart (sa, da); + Fa = combine_disjoint_out_part (sa, da); break; case COMBINE_A_IN: - Fa = combineDisjointInPart (sa, da); + Fa = combine_disjoint_in_part (sa, da); break; case COMBINE_A: Fa = MASK; @@ -1094,10 +1094,10 @@ combineDisjointGeneralU (comp4_t *dest, const comp4_t *src, const comp4_t *mask, Fb = 0; break; case COMBINE_B_OUT: - Fb = combineDisjointOutPart (da, sa); + Fb = combine_disjoint_out_part (da, sa); break; case COMBINE_B_IN: - Fb = combineDisjointInPart (da, sa); + Fb = combine_disjoint_in_part (da, sa); break; case COMBINE_B: Fb = MASK; @@ -1113,12 +1113,12 @@ combineDisjointGeneralU (comp4_t *dest, const comp4_t *src, const comp4_t *mask, } static void -combineDisjointOverU (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_over_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp2_t a = s >> A_SHIFT; if (a != 0x00) @@ -1126,7 +1126,7 @@ combineDisjointOverU (pixman_implementation_t *imp, pixman_op_t op, if (a != MASK) { comp4_t d = *(dest + i); - a = combineDisjointOutPart (d >> A_SHIFT, a); + a = combine_disjoint_out_part (d >> A_SHIFT, a); UNcx4_MUL_UNc_ADD_UNcx4(d, a, s); s = d; } @@ -1136,60 +1136,60 @@ combineDisjointOverU (pixman_implementation_t *imp, pixman_op_t op, } static void -combineDisjointInU (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_in_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralU (dest, src, mask, width, COMBINE_A_IN); + combine_disjoint_general_u (dest, src, mask, width, COMBINE_A_IN); } static void -combineDisjointInReverseU (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_in_reverse_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralU (dest, src, mask, width, COMBINE_B_IN); + combine_disjoint_general_u (dest, src, mask, width, COMBINE_B_IN); } static void -combineDisjointOutU (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_out_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralU (dest, src, mask, width, COMBINE_A_OUT); + combine_disjoint_general_u (dest, src, mask, width, COMBINE_A_OUT); } static void -combineDisjointOutReverseU (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_out_reverse_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralU (dest, src, mask, width, COMBINE_B_OUT); + combine_disjoint_general_u (dest, src, mask, width, COMBINE_B_OUT); } static void -combineDisjointAtopU (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_atop_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralU (dest, src, mask, width, COMBINE_A_ATOP); + combine_disjoint_general_u (dest, src, mask, width, COMBINE_A_ATOP); } static void -combineDisjointAtopReverseU (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_atop_reverse_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralU (dest, src, mask, width, COMBINE_B_ATOP); + combine_disjoint_general_u (dest, src, mask, width, COMBINE_B_ATOP); } static void -combineDisjointXorU (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_xor_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralU (dest, src, mask, width, COMBINE_XOR); + combine_disjoint_general_u (dest, src, mask, width, COMBINE_XOR); } static void -combineConjointGeneralU (comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width, comp1_t combine) +combine_conjoint_general_u (comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width, comp1_t combine) { int i; for (i = 0; i < width; ++i) { - comp4_t s = combineMask (src, mask, i); + comp4_t s = combine_mask (src, mask, i); comp4_t d = *(dest + i); comp4_t m,n,o,p; comp2_t Fa, Fb, t, u, v; @@ -1201,10 +1201,10 @@ combineConjointGeneralU (comp4_t *dest, const comp4_t *src, const comp4_t *mask, Fa = 0; break; case COMBINE_A_OUT: - Fa = combineConjointOutPart (sa, da); + Fa = combine_conjoint_out_part (sa, da); break; case COMBINE_A_IN: - Fa = combineConjointInPart (sa, da); + Fa = combine_conjoint_in_part (sa, da); break; case COMBINE_A: Fa = MASK; @@ -1216,10 +1216,10 @@ combineConjointGeneralU (comp4_t *dest, const comp4_t *src, const comp4_t *mask, Fb = 0; break; case COMBINE_B_OUT: - Fb = combineConjointOutPart (da, sa); + Fb = combine_conjoint_out_part (da, sa); break; case COMBINE_B_IN: - Fb = combineConjointInPart (da, sa); + Fb = combine_conjoint_in_part (da, sa); break; case COMBINE_B: Fb = MASK; @@ -1235,69 +1235,69 @@ combineConjointGeneralU (comp4_t *dest, const comp4_t *src, const comp4_t *mask, } static void -combineConjointOverU (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_over_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralU (dest, src, mask, width, COMBINE_A_OVER); + combine_conjoint_general_u (dest, src, mask, width, COMBINE_A_OVER); } static void -combineConjointOverReverseU (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_over_reverse_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralU (dest, src, mask, width, COMBINE_B_OVER); + combine_conjoint_general_u (dest, src, mask, width, COMBINE_B_OVER); } static void -combineConjointInU (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_in_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralU (dest, src, mask, width, COMBINE_A_IN); + combine_conjoint_general_u (dest, src, mask, width, COMBINE_A_IN); } static void -combineConjointInReverseU (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_in_reverse_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralU (dest, src, mask, width, COMBINE_B_IN); + combine_conjoint_general_u (dest, src, mask, width, COMBINE_B_IN); } static void -combineConjointOutU (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_out_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralU (dest, src, mask, width, COMBINE_A_OUT); + combine_conjoint_general_u (dest, src, mask, width, COMBINE_A_OUT); } static void -combineConjointOutReverseU (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_out_reverse_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralU (dest, src, mask, width, COMBINE_B_OUT); + combine_conjoint_general_u (dest, src, mask, width, COMBINE_B_OUT); } static void -combineConjointAtopU (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_atop_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralU (dest, src, mask, width, COMBINE_A_ATOP); + combine_conjoint_general_u (dest, src, mask, width, COMBINE_A_ATOP); } static void -combineConjointAtopReverseU (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_atop_reverse_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralU (dest, src, mask, width, COMBINE_B_ATOP); + combine_conjoint_general_u (dest, src, mask, width, COMBINE_B_ATOP); } static void -combineConjointXorU (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_xor_u (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralU (dest, src, mask, width, COMBINE_XOR); + combine_conjoint_general_u (dest, src, mask, width, COMBINE_XOR); } /********************************************************************************/ @@ -1305,14 +1305,14 @@ combineConjointXorU (pixman_implementation_t *imp, pixman_op_t op, /********************************************************************************/ static void -combineClearC (pixman_implementation_t *imp, pixman_op_t op, +combine_clear_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { memset(dest, 0, width*sizeof(comp4_t)); } static void -combineSrcC (pixman_implementation_t *imp, pixman_op_t op, +combine_src_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -1321,14 +1321,14 @@ combineSrcC (pixman_implementation_t *imp, pixman_op_t op, comp4_t s = *(src + i); comp4_t m = *(mask + i); - combineMaskValueC (&s, &m); + combine_mask_value_c (&s, &m); *(dest) = s; } } static void -combineOverC (pixman_implementation_t *imp, pixman_op_t op, +combine_over_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -1338,7 +1338,7 @@ combineOverC (pixman_implementation_t *imp, pixman_op_t op, comp4_t m = *(mask + i); comp4_t a; - combineMaskC (&s, &m); + combine_mask_c (&s, &m); a = ~m; if (a != ~0) @@ -1355,7 +1355,7 @@ combineOverC (pixman_implementation_t *imp, pixman_op_t op, } static void -combineOverReverseC (pixman_implementation_t *imp, pixman_op_t op, +combine_over_reverse_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -1369,7 +1369,7 @@ combineOverReverseC (pixman_implementation_t *imp, pixman_op_t op, comp4_t s = *(src + i); comp4_t m = *(mask + i); - combineMaskValueC (&s, &m); + combine_mask_value_c (&s, &m); if (a != MASK) { @@ -1381,7 +1381,7 @@ combineOverReverseC (pixman_implementation_t *imp, pixman_op_t op, } static void -combineInC (pixman_implementation_t *imp, pixman_op_t op, +combine_in_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -1395,7 +1395,7 @@ combineInC (pixman_implementation_t *imp, pixman_op_t op, comp4_t m = *(mask + i); s = *(src + i); - combineMaskValueC (&s, &m); + combine_mask_value_c (&s, &m); if (a != MASK) { UNcx4_MUL_UNc(s, a); @@ -1406,7 +1406,7 @@ combineInC (pixman_implementation_t *imp, pixman_op_t op, } static void -combineInReverseC (pixman_implementation_t *imp, pixman_op_t op, +combine_in_reverse_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -1416,7 +1416,7 @@ combineInReverseC (pixman_implementation_t *imp, pixman_op_t op, comp4_t m = *(mask + i); comp4_t a; - combineMaskAlphaC (&s, &m); + combine_mask_alpha_c (&s, &m); a = m; if (a != ~0) @@ -1433,7 +1433,7 @@ combineInReverseC (pixman_implementation_t *imp, pixman_op_t op, } static void -combineOutC (pixman_implementation_t *imp, pixman_op_t op, +combine_out_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -1447,7 +1447,7 @@ combineOutC (pixman_implementation_t *imp, pixman_op_t op, comp4_t m = *(mask + i); s = *(src + i); - combineMaskValueC (&s, &m); + combine_mask_value_c (&s, &m); if (a != MASK) { @@ -1459,7 +1459,7 @@ combineOutC (pixman_implementation_t *imp, pixman_op_t op, } static void -combineOutReverseC (pixman_implementation_t *imp, pixman_op_t op, +combine_out_reverse_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -1469,7 +1469,7 @@ combineOutReverseC (pixman_implementation_t *imp, pixman_op_t op, comp4_t m = *(mask + i); comp4_t a; - combineMaskAlphaC (&s, &m); + combine_mask_alpha_c (&s, &m); a = ~m; if (a != ~0) @@ -1486,7 +1486,7 @@ combineOutReverseC (pixman_implementation_t *imp, pixman_op_t op, } static void -combineAtopC (pixman_implementation_t *imp, pixman_op_t op, +combine_atop_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -1498,7 +1498,7 @@ combineAtopC (pixman_implementation_t *imp, pixman_op_t op, comp4_t ad; comp2_t as = d >> A_SHIFT; - combineMaskC (&s, &m); + combine_mask_c (&s, &m); ad = ~m; @@ -1508,7 +1508,7 @@ combineAtopC (pixman_implementation_t *imp, pixman_op_t op, } static void -combineAtopReverseC (pixman_implementation_t *imp, pixman_op_t op, +combine_atop_reverse_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -1521,7 +1521,7 @@ combineAtopReverseC (pixman_implementation_t *imp, pixman_op_t op, comp4_t ad; comp2_t as = ~d >> A_SHIFT; - combineMaskC (&s, &m); + combine_mask_c (&s, &m); ad = m; @@ -1531,7 +1531,7 @@ combineAtopReverseC (pixman_implementation_t *imp, pixman_op_t op, } static void -combineXorC (pixman_implementation_t *imp, pixman_op_t op, +combine_xor_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -1543,7 +1543,7 @@ combineXorC (pixman_implementation_t *imp, pixman_op_t op, comp4_t ad; comp2_t as = ~d >> A_SHIFT; - combineMaskC (&s, &m); + combine_mask_c (&s, &m); ad = ~m; @@ -1553,7 +1553,7 @@ combineXorC (pixman_implementation_t *imp, pixman_op_t op, } static void -combineAddC (pixman_implementation_t *imp, pixman_op_t op, +combine_add_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -1563,7 +1563,7 @@ combineAddC (pixman_implementation_t *imp, pixman_op_t op, comp4_t m = *(mask + i); comp4_t d = *(dest + i); - combineMaskValueC (&s, &m); + combine_mask_value_c (&s, &m); UNcx4_ADD_UNcx4(d, s); *(dest + i) = d; @@ -1571,7 +1571,7 @@ combineAddC (pixman_implementation_t *imp, pixman_op_t op, } static void -combineSaturateC (pixman_implementation_t *imp, pixman_op_t op, +combine_saturate_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { int i; @@ -1586,7 +1586,7 @@ combineSaturateC (pixman_implementation_t *imp, pixman_op_t op, s = *(src + i); m = *(mask + i); - combineMaskC (&s, &m); + combine_mask_c (&s, &m); sa = (m >> A_SHIFT); sr = (m >> R_SHIFT) & MASK; @@ -1619,7 +1619,7 @@ combineSaturateC (pixman_implementation_t *imp, pixman_op_t op, } static void -combineDisjointGeneralC (comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width, comp1_t combine) +combine_disjoint_general_c (comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width, comp1_t combine) { int i; @@ -1636,7 +1636,7 @@ combineDisjointGeneralC (comp4_t *dest, const comp4_t *src, const comp4_t *mask, d = *(dest + i); da = d >> A_SHIFT; - combineMaskC (&s, &m); + combine_mask_c (&s, &m); sa = m; @@ -1645,17 +1645,17 @@ combineDisjointGeneralC (comp4_t *dest, const comp4_t *src, const comp4_t *mask, Fa = 0; break; case COMBINE_A_OUT: - m = (comp4_t)combineDisjointOutPart ((comp1_t) (sa >> 0), da); - n = (comp4_t)combineDisjointOutPart ((comp1_t) (sa >> G_SHIFT), da) << G_SHIFT; - o = (comp4_t)combineDisjointOutPart ((comp1_t) (sa >> R_SHIFT), da) << R_SHIFT; - p = (comp4_t)combineDisjointOutPart ((comp1_t) (sa >> A_SHIFT), da) << A_SHIFT; + m = (comp4_t)combine_disjoint_out_part ((comp1_t) (sa >> 0), da); + n = (comp4_t)combine_disjoint_out_part ((comp1_t) (sa >> G_SHIFT), da) << G_SHIFT; + o = (comp4_t)combine_disjoint_out_part ((comp1_t) (sa >> R_SHIFT), da) << R_SHIFT; + p = (comp4_t)combine_disjoint_out_part ((comp1_t) (sa >> A_SHIFT), da) << A_SHIFT; Fa = m|n|o|p; break; case COMBINE_A_IN: - m = (comp4_t)combineDisjointInPart ((comp1_t) (sa >> 0), da); - n = (comp4_t)combineDisjointInPart ((comp1_t) (sa >> G_SHIFT), da) << G_SHIFT; - o = (comp4_t)combineDisjointInPart ((comp1_t) (sa >> R_SHIFT), da) << R_SHIFT; - p = (comp4_t)combineDisjointInPart ((comp1_t) (sa >> A_SHIFT), da) << A_SHIFT; + m = (comp4_t)combine_disjoint_in_part ((comp1_t) (sa >> 0), da); + n = (comp4_t)combine_disjoint_in_part ((comp1_t) (sa >> G_SHIFT), da) << G_SHIFT; + o = (comp4_t)combine_disjoint_in_part ((comp1_t) (sa >> R_SHIFT), da) << R_SHIFT; + p = (comp4_t)combine_disjoint_in_part ((comp1_t) (sa >> A_SHIFT), da) << A_SHIFT; Fa = m|n|o|p; break; case COMBINE_A: @@ -1668,17 +1668,17 @@ combineDisjointGeneralC (comp4_t *dest, const comp4_t *src, const comp4_t *mask, Fb = 0; break; case COMBINE_B_OUT: - m = (comp4_t)combineDisjointOutPart (da, (comp1_t) (sa >> 0)); - n = (comp4_t)combineDisjointOutPart (da, (comp1_t) (sa >> G_SHIFT)) << G_SHIFT; - o = (comp4_t)combineDisjointOutPart (da, (comp1_t) (sa >> R_SHIFT)) << R_SHIFT; - p = (comp4_t)combineDisjointOutPart (da, (comp1_t) (sa >> A_SHIFT)) << A_SHIFT; + m = (comp4_t)combine_disjoint_out_part (da, (comp1_t) (sa >> 0)); + n = (comp4_t)combine_disjoint_out_part (da, (comp1_t) (sa >> G_SHIFT)) << G_SHIFT; + o = (comp4_t)combine_disjoint_out_part (da, (comp1_t) (sa >> R_SHIFT)) << R_SHIFT; + p = (comp4_t)combine_disjoint_out_part (da, (comp1_t) (sa >> A_SHIFT)) << A_SHIFT; Fb = m|n|o|p; break; case COMBINE_B_IN: - m = (comp4_t)combineDisjointInPart (da, (comp1_t) (sa >> 0)); - n = (comp4_t)combineDisjointInPart (da, (comp1_t) (sa >> G_SHIFT)) << G_SHIFT; - o = (comp4_t)combineDisjointInPart (da, (comp1_t) (sa >> R_SHIFT)) << R_SHIFT; - p = (comp4_t)combineDisjointInPart (da, (comp1_t) (sa >> A_SHIFT)) << A_SHIFT; + m = (comp4_t)combine_disjoint_in_part (da, (comp1_t) (sa >> 0)); + n = (comp4_t)combine_disjoint_in_part (da, (comp1_t) (sa >> G_SHIFT)) << G_SHIFT; + o = (comp4_t)combine_disjoint_in_part (da, (comp1_t) (sa >> R_SHIFT)) << R_SHIFT; + p = (comp4_t)combine_disjoint_in_part (da, (comp1_t) (sa >> A_SHIFT)) << A_SHIFT; Fb = m|n|o|p; break; case COMBINE_B: @@ -1695,63 +1695,63 @@ combineDisjointGeneralC (comp4_t *dest, const comp4_t *src, const comp4_t *mask, } static void -combineDisjointOverC (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_over_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralC (dest, src, mask, width, COMBINE_A_OVER); + combine_disjoint_general_c (dest, src, mask, width, COMBINE_A_OVER); } static void -combineDisjointInC (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_in_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralC (dest, src, mask, width, COMBINE_A_IN); + combine_disjoint_general_c (dest, src, mask, width, COMBINE_A_IN); } static void -combineDisjointInReverseC (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_in_reverse_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralC (dest, src, mask, width, COMBINE_B_IN); + combine_disjoint_general_c (dest, src, mask, width, COMBINE_B_IN); } static void -combineDisjointOutC (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_out_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralC (dest, src, mask, width, COMBINE_A_OUT); + combine_disjoint_general_c (dest, src, mask, width, COMBINE_A_OUT); } static void -combineDisjointOutReverseC (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_out_reverse_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralC (dest, src, mask, width, COMBINE_B_OUT); + combine_disjoint_general_c (dest, src, mask, width, COMBINE_B_OUT); } static void -combineDisjointAtopC (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_atop_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralC (dest, src, mask, width, COMBINE_A_ATOP); + combine_disjoint_general_c (dest, src, mask, width, COMBINE_A_ATOP); } static void -combineDisjointAtopReverseC (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_atop_reverse_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralC (dest, src, mask, width, COMBINE_B_ATOP); + combine_disjoint_general_c (dest, src, mask, width, COMBINE_B_ATOP); } static void -combineDisjointXorC (pixman_implementation_t *imp, pixman_op_t op, +combine_disjoint_xor_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineDisjointGeneralC (dest, src, mask, width, COMBINE_XOR); + combine_disjoint_general_c (dest, src, mask, width, COMBINE_XOR); } static void -combineConjointGeneralC (comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width, comp1_t combine) +combine_conjoint_general_c (comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width, comp1_t combine) { int i; @@ -1768,7 +1768,7 @@ combineConjointGeneralC (comp4_t *dest, const comp4_t *src, const comp4_t *mask, d = *(dest + i); da = d >> A_SHIFT; - combineMaskC (&s, &m); + combine_mask_c (&s, &m); sa = m; @@ -1777,17 +1777,17 @@ combineConjointGeneralC (comp4_t *dest, const comp4_t *src, const comp4_t *mask, Fa = 0; break; case COMBINE_A_OUT: - m = (comp4_t)combineConjointOutPart ((comp1_t) (sa >> 0), da); - n = (comp4_t)combineConjointOutPart ((comp1_t) (sa >> G_SHIFT), da) << G_SHIFT; - o = (comp4_t)combineConjointOutPart ((comp1_t) (sa >> R_SHIFT), da) << R_SHIFT; - p = (comp4_t)combineConjointOutPart ((comp1_t) (sa >> A_SHIFT), da) << A_SHIFT; + m = (comp4_t)combine_conjoint_out_part ((comp1_t) (sa >> 0), da); + n = (comp4_t)combine_conjoint_out_part ((comp1_t) (sa >> G_SHIFT), da) << G_SHIFT; + o = (comp4_t)combine_conjoint_out_part ((comp1_t) (sa >> R_SHIFT), da) << R_SHIFT; + p = (comp4_t)combine_conjoint_out_part ((comp1_t) (sa >> A_SHIFT), da) << A_SHIFT; Fa = m|n|o|p; break; case COMBINE_A_IN: - m = (comp4_t)combineConjointInPart ((comp1_t) (sa >> 0), da); - n = (comp4_t)combineConjointInPart ((comp1_t) (sa >> G_SHIFT), da) << G_SHIFT; - o = (comp4_t)combineConjointInPart ((comp1_t) (sa >> R_SHIFT), da) << R_SHIFT; - p = (comp4_t)combineConjointInPart ((comp1_t) (sa >> A_SHIFT), da) << A_SHIFT; + m = (comp4_t)combine_conjoint_in_part ((comp1_t) (sa >> 0), da); + n = (comp4_t)combine_conjoint_in_part ((comp1_t) (sa >> G_SHIFT), da) << G_SHIFT; + o = (comp4_t)combine_conjoint_in_part ((comp1_t) (sa >> R_SHIFT), da) << R_SHIFT; + p = (comp4_t)combine_conjoint_in_part ((comp1_t) (sa >> A_SHIFT), da) << A_SHIFT; Fa = m|n|o|p; break; case COMBINE_A: @@ -1800,17 +1800,17 @@ combineConjointGeneralC (comp4_t *dest, const comp4_t *src, const comp4_t *mask, Fb = 0; break; case COMBINE_B_OUT: - m = (comp4_t)combineConjointOutPart (da, (comp1_t) (sa >> 0)); - n = (comp4_t)combineConjointOutPart (da, (comp1_t) (sa >> G_SHIFT)) << G_SHIFT; - o = (comp4_t)combineConjointOutPart (da, (comp1_t) (sa >> R_SHIFT)) << R_SHIFT; - p = (comp4_t)combineConjointOutPart (da, (comp1_t) (sa >> A_SHIFT)) << A_SHIFT; + m = (comp4_t)combine_conjoint_out_part (da, (comp1_t) (sa >> 0)); + n = (comp4_t)combine_conjoint_out_part (da, (comp1_t) (sa >> G_SHIFT)) << G_SHIFT; + o = (comp4_t)combine_conjoint_out_part (da, (comp1_t) (sa >> R_SHIFT)) << R_SHIFT; + p = (comp4_t)combine_conjoint_out_part (da, (comp1_t) (sa >> A_SHIFT)) << A_SHIFT; Fb = m|n|o|p; break; case COMBINE_B_IN: - m = (comp4_t)combineConjointInPart (da, (comp1_t) (sa >> 0)); - n = (comp4_t)combineConjointInPart (da, (comp1_t) (sa >> G_SHIFT)) << G_SHIFT; - o = (comp4_t)combineConjointInPart (da, (comp1_t) (sa >> R_SHIFT)) << R_SHIFT; - p = (comp4_t)combineConjointInPart (da, (comp1_t) (sa >> A_SHIFT)) << A_SHIFT; + m = (comp4_t)combine_conjoint_in_part (da, (comp1_t) (sa >> 0)); + n = (comp4_t)combine_conjoint_in_part (da, (comp1_t) (sa >> G_SHIFT)) << G_SHIFT; + o = (comp4_t)combine_conjoint_in_part (da, (comp1_t) (sa >> R_SHIFT)) << R_SHIFT; + p = (comp4_t)combine_conjoint_in_part (da, (comp1_t) (sa >> A_SHIFT)) << A_SHIFT; Fb = m|n|o|p; break; case COMBINE_B: @@ -1827,186 +1827,186 @@ combineConjointGeneralC (comp4_t *dest, const comp4_t *src, const comp4_t *mask, } static void -combineConjointOverC (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_over_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralC (dest, src, mask, width, COMBINE_A_OVER); + combine_conjoint_general_c (dest, src, mask, width, COMBINE_A_OVER); } static void -combineConjointOverReverseC (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_over_reverse_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralC (dest, src, mask, width, COMBINE_B_OVER); + combine_conjoint_general_c (dest, src, mask, width, COMBINE_B_OVER); } static void -combineConjointInC (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_in_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralC (dest, src, mask, width, COMBINE_A_IN); + combine_conjoint_general_c (dest, src, mask, width, COMBINE_A_IN); } static void -combineConjointInReverseC (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_in_reverse_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralC (dest, src, mask, width, COMBINE_B_IN); + combine_conjoint_general_c (dest, src, mask, width, COMBINE_B_IN); } static void -combineConjointOutC (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_out_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralC (dest, src, mask, width, COMBINE_A_OUT); + combine_conjoint_general_c (dest, src, mask, width, COMBINE_A_OUT); } static void -combineConjointOutReverseC (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_out_reverse_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralC (dest, src, mask, width, COMBINE_B_OUT); + combine_conjoint_general_c (dest, src, mask, width, COMBINE_B_OUT); } static void -combineConjointAtopC (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_atop_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralC (dest, src, mask, width, COMBINE_A_ATOP); + combine_conjoint_general_c (dest, src, mask, width, COMBINE_A_ATOP); } static void -combineConjointAtopReverseC (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_atop_reverse_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralC (dest, src, mask, width, COMBINE_B_ATOP); + combine_conjoint_general_c (dest, src, mask, width, COMBINE_B_ATOP); } static void -combineConjointXorC (pixman_implementation_t *imp, pixman_op_t op, +combine_conjoint_xor_c (pixman_implementation_t *imp, pixman_op_t op, comp4_t *dest, const comp4_t *src, const comp4_t *mask, int width) { - combineConjointGeneralC (dest, src, mask, width, COMBINE_XOR); + combine_conjoint_general_c (dest, src, mask, width, COMBINE_XOR); } void _pixman_setup_combiner_functions_width (pixman_implementation_t *imp) { /* Unified alpha */ - imp->combine_width[PIXMAN_OP_CLEAR] = combineClear; - imp->combine_width[PIXMAN_OP_SRC] = combineSrcU; + imp->combine_width[PIXMAN_OP_CLEAR] = combine_clear; + imp->combine_width[PIXMAN_OP_SRC] = combine_src_u; /* dest */ - imp->combine_width[PIXMAN_OP_OVER] = combineOverU; - imp->combine_width[PIXMAN_OP_OVER_REVERSE] = combineOverReverseU; - imp->combine_width[PIXMAN_OP_IN] = combineInU; - imp->combine_width[PIXMAN_OP_IN_REVERSE] = combineInReverseU; - imp->combine_width[PIXMAN_OP_OUT] = combineOutU; - imp->combine_width[PIXMAN_OP_OUT_REVERSE] = combineOutReverseU; - imp->combine_width[PIXMAN_OP_ATOP] = combineAtopU; - imp->combine_width[PIXMAN_OP_ATOP_REVERSE] = combineAtopReverseU; - imp->combine_width[PIXMAN_OP_XOR] = combineXorU; - imp->combine_width[PIXMAN_OP_ADD] = combineAddU; - imp->combine_width[PIXMAN_OP_SATURATE] = combineSaturateU; + imp->combine_width[PIXMAN_OP_OVER] = combine_over_u; + imp->combine_width[PIXMAN_OP_OVER_REVERSE] = combine_over_reverse_u; + imp->combine_width[PIXMAN_OP_IN] = combine_in_u; + imp->combine_width[PIXMAN_OP_IN_REVERSE] = combine_in_reverse_u; + imp->combine_width[PIXMAN_OP_OUT] = combine_out_u; + imp->combine_width[PIXMAN_OP_OUT_REVERSE] = combine_out_reverse_u; + imp->combine_width[PIXMAN_OP_ATOP] = combine_atop_u; + imp->combine_width[PIXMAN_OP_ATOP_REVERSE] = combine_atop_reverse_u; + imp->combine_width[PIXMAN_OP_XOR] = combine_xor_u; + imp->combine_width[PIXMAN_OP_ADD] = combine_add_u; + imp->combine_width[PIXMAN_OP_SATURATE] = combine_saturate_u; /* Disjoint, unified */ - imp->combine_width[PIXMAN_OP_DISJOINT_CLEAR] = combineClear; - imp->combine_width[PIXMAN_OP_DISJOINT_SRC] = combineSrcU; + imp->combine_width[PIXMAN_OP_DISJOINT_CLEAR] = combine_clear; + imp->combine_width[PIXMAN_OP_DISJOINT_SRC] = combine_src_u; /* dest */ - imp->combine_width[PIXMAN_OP_DISJOINT_OVER] = combineDisjointOverU; - imp->combine_width[PIXMAN_OP_DISJOINT_OVER_REVERSE] = combineSaturateU; - imp->combine_width[PIXMAN_OP_DISJOINT_IN] = combineDisjointInU; - imp->combine_width[PIXMAN_OP_DISJOINT_IN_REVERSE] = combineDisjointInReverseU; - imp->combine_width[PIXMAN_OP_DISJOINT_OUT] = combineDisjointOutU; - imp->combine_width[PIXMAN_OP_DISJOINT_OUT_REVERSE] = combineDisjointOutReverseU; - imp->combine_width[PIXMAN_OP_DISJOINT_ATOP] = combineDisjointAtopU; - imp->combine_width[PIXMAN_OP_DISJOINT_ATOP_REVERSE] = combineDisjointAtopReverseU; - imp->combine_width[PIXMAN_OP_DISJOINT_XOR] = combineDisjointXorU; + imp->combine_width[PIXMAN_OP_DISJOINT_OVER] = combine_disjoint_over_u; + imp->combine_width[PIXMAN_OP_DISJOINT_OVER_REVERSE] = combine_saturate_u; + imp->combine_width[PIXMAN_OP_DISJOINT_IN] = combine_disjoint_in_u; + imp->combine_width[PIXMAN_OP_DISJOINT_IN_REVERSE] = combine_disjoint_in_reverse_u; + imp->combine_width[PIXMAN_OP_DISJOINT_OUT] = combine_disjoint_out_u; + imp->combine_width[PIXMAN_OP_DISJOINT_OUT_REVERSE] = combine_disjoint_out_reverse_u; + imp->combine_width[PIXMAN_OP_DISJOINT_ATOP] = combine_disjoint_atop_u; + imp->combine_width[PIXMAN_OP_DISJOINT_ATOP_REVERSE] = combine_disjoint_atop_reverse_u; + imp->combine_width[PIXMAN_OP_DISJOINT_XOR] = combine_disjoint_xor_u; /* Conjoint, unified */ - imp->combine_width[PIXMAN_OP_CONJOINT_CLEAR] = combineClear; - imp->combine_width[PIXMAN_OP_CONJOINT_SRC] = combineSrcU; + imp->combine_width[PIXMAN_OP_CONJOINT_CLEAR] = combine_clear; + imp->combine_width[PIXMAN_OP_CONJOINT_SRC] = combine_src_u; /* dest */ - imp->combine_width[PIXMAN_OP_CONJOINT_OVER] = combineConjointOverU; - imp->combine_width[PIXMAN_OP_CONJOINT_OVER_REVERSE] = combineConjointOverReverseU; - imp->combine_width[PIXMAN_OP_CONJOINT_IN] = combineConjointInU; - imp->combine_width[PIXMAN_OP_CONJOINT_IN_REVERSE] = combineConjointInReverseU; - imp->combine_width[PIXMAN_OP_CONJOINT_OUT] = combineConjointOutU; - imp->combine_width[PIXMAN_OP_CONJOINT_OUT_REVERSE] = combineConjointOutReverseU; - imp->combine_width[PIXMAN_OP_CONJOINT_ATOP] = combineConjointAtopU; - imp->combine_width[PIXMAN_OP_CONJOINT_ATOP_REVERSE] = combineConjointAtopReverseU; - imp->combine_width[PIXMAN_OP_CONJOINT_XOR] = combineConjointXorU; + imp->combine_width[PIXMAN_OP_CONJOINT_OVER] = combine_conjoint_over_u; + imp->combine_width[PIXMAN_OP_CONJOINT_OVER_REVERSE] = combine_conjoint_over_reverse_u; + imp->combine_width[PIXMAN_OP_CONJOINT_IN] = combine_conjoint_in_u; + imp->combine_width[PIXMAN_OP_CONJOINT_IN_REVERSE] = combine_conjoint_in_reverse_u; + imp->combine_width[PIXMAN_OP_CONJOINT_OUT] = combine_conjoint_out_u; + imp->combine_width[PIXMAN_OP_CONJOINT_OUT_REVERSE] = combine_conjoint_out_reverse_u; + imp->combine_width[PIXMAN_OP_CONJOINT_ATOP] = combine_conjoint_atop_u; + imp->combine_width[PIXMAN_OP_CONJOINT_ATOP_REVERSE] = combine_conjoint_atop_reverse_u; + imp->combine_width[PIXMAN_OP_CONJOINT_XOR] = combine_conjoint_xor_u; - imp->combine_width[PIXMAN_OP_MULTIPLY] = combineMultiplyU; - imp->combine_width[PIXMAN_OP_SCREEN] = combineScreenU; - imp->combine_width[PIXMAN_OP_OVERLAY] = combineOverlayU; - imp->combine_width[PIXMAN_OP_DARKEN] = combineDarkenU; - imp->combine_width[PIXMAN_OP_LIGHTEN] = combineLightenU; - imp->combine_width[PIXMAN_OP_COLOR_DODGE] = combineColorDodgeU; - imp->combine_width[PIXMAN_OP_COLOR_BURN] = combineColorBurnU; - imp->combine_width[PIXMAN_OP_HARD_LIGHT] = combineHardLightU; - imp->combine_width[PIXMAN_OP_SOFT_LIGHT] = combineSoftLightU; - imp->combine_width[PIXMAN_OP_DIFFERENCE] = combineDifferenceU; - imp->combine_width[PIXMAN_OP_EXCLUSION] = combineExclusionU; - imp->combine_width[PIXMAN_OP_HSL_HUE] = combineHslHueU; - imp->combine_width[PIXMAN_OP_HSL_SATURATION] = combineHslSaturationU; - imp->combine_width[PIXMAN_OP_HSL_COLOR] = combineHslColorU; - imp->combine_width[PIXMAN_OP_HSL_LUMINOSITY] = combineHslLuminosityU; + imp->combine_width[PIXMAN_OP_MULTIPLY] = combine_multiply_u; + imp->combine_width[PIXMAN_OP_SCREEN] = combine_screen_u; + imp->combine_width[PIXMAN_OP_OVERLAY] = combine_overlay_u; + imp->combine_width[PIXMAN_OP_DARKEN] = combine_darken_u; + imp->combine_width[PIXMAN_OP_LIGHTEN] = combine_lighten_u; + imp->combine_width[PIXMAN_OP_COLOR_DODGE] = combine_color_dodge_u; + imp->combine_width[PIXMAN_OP_COLOR_BURN] = combine_color_burn_u; + imp->combine_width[PIXMAN_OP_HARD_LIGHT] = combine_hard_light_u; + imp->combine_width[PIXMAN_OP_SOFT_LIGHT] = combine_soft_light_u; + imp->combine_width[PIXMAN_OP_DIFFERENCE] = combine_difference_u; + imp->combine_width[PIXMAN_OP_EXCLUSION] = combine_exclusion_u; + imp->combine_width[PIXMAN_OP_HSL_HUE] = combine_hsl_hue_u; + imp->combine_width[PIXMAN_OP_HSL_SATURATION] = combine_hsl_saturation_u; + imp->combine_width[PIXMAN_OP_HSL_COLOR] = combine_hsl_color_u; + imp->combine_width[PIXMAN_OP_HSL_LUMINOSITY] = combine_hsl_luminosity_u; /* Component alpha combiners */ - imp->combine_width_ca[PIXMAN_OP_CLEAR] = combineClearC; - imp->combine_width_ca[PIXMAN_OP_SRC] = combineSrcC; + imp->combine_width_ca[PIXMAN_OP_CLEAR] = combine_clear_c; + imp->combine_width_ca[PIXMAN_OP_SRC] = combine_src_c; /* dest */ - imp->combine_width_ca[PIXMAN_OP_OVER] = combineOverC; - imp->combine_width_ca[PIXMAN_OP_OVER_REVERSE] = combineOverReverseC; - imp->combine_width_ca[PIXMAN_OP_IN] = combineInC; - imp->combine_width_ca[PIXMAN_OP_IN_REVERSE] = combineInReverseC; - imp->combine_width_ca[PIXMAN_OP_OUT] = combineOutC; - imp->combine_width_ca[PIXMAN_OP_OUT_REVERSE] = combineOutReverseC; - imp->combine_width_ca[PIXMAN_OP_ATOP] = combineAtopC; - imp->combine_width_ca[PIXMAN_OP_ATOP_REVERSE] = combineAtopReverseC; - imp->combine_width_ca[PIXMAN_OP_XOR] = combineXorC; - imp->combine_width_ca[PIXMAN_OP_ADD] = combineAddC; - imp->combine_width_ca[PIXMAN_OP_SATURATE] = combineSaturateC; + imp->combine_width_ca[PIXMAN_OP_OVER] = combine_over_c; + imp->combine_width_ca[PIXMAN_OP_OVER_REVERSE] = combine_over_reverse_c; + imp->combine_width_ca[PIXMAN_OP_IN] = combine_in_c; + imp->combine_width_ca[PIXMAN_OP_IN_REVERSE] = combine_in_reverse_c; + imp->combine_width_ca[PIXMAN_OP_OUT] = combine_out_c; + imp->combine_width_ca[PIXMAN_OP_OUT_REVERSE] = combine_out_reverse_c; + imp->combine_width_ca[PIXMAN_OP_ATOP] = combine_atop_c; + imp->combine_width_ca[PIXMAN_OP_ATOP_REVERSE] = combine_atop_reverse_c; + imp->combine_width_ca[PIXMAN_OP_XOR] = combine_xor_c; + imp->combine_width_ca[PIXMAN_OP_ADD] = combine_add_c; + imp->combine_width_ca[PIXMAN_OP_SATURATE] = combine_saturate_c; /* Disjoint CA */ - imp->combine_width_ca[PIXMAN_OP_DISJOINT_CLEAR] = combineClearC; - imp->combine_width_ca[PIXMAN_OP_DISJOINT_SRC] = combineSrcC; + imp->combine_width_ca[PIXMAN_OP_DISJOINT_CLEAR] = combine_clear_c; + imp->combine_width_ca[PIXMAN_OP_DISJOINT_SRC] = combine_src_c; /* dest */ - imp->combine_width_ca[PIXMAN_OP_DISJOINT_OVER] = combineDisjointOverC; - imp->combine_width_ca[PIXMAN_OP_DISJOINT_OVER_REVERSE] = combineSaturateC; - imp->combine_width_ca[PIXMAN_OP_DISJOINT_IN] = combineDisjointInC; - imp->combine_width_ca[PIXMAN_OP_DISJOINT_IN_REVERSE] = combineDisjointInReverseC; - imp->combine_width_ca[PIXMAN_OP_DISJOINT_OUT] = combineDisjointOutC; - imp->combine_width_ca[PIXMAN_OP_DISJOINT_OUT_REVERSE] = combineDisjointOutReverseC; - imp->combine_width_ca[PIXMAN_OP_DISJOINT_ATOP] = combineDisjointAtopC; - imp->combine_width_ca[PIXMAN_OP_DISJOINT_ATOP_REVERSE] = combineDisjointAtopReverseC; - imp->combine_width_ca[PIXMAN_OP_DISJOINT_XOR] = combineDisjointXorC; + imp->combine_width_ca[PIXMAN_OP_DISJOINT_OVER] = combine_disjoint_over_c; + imp->combine_width_ca[PIXMAN_OP_DISJOINT_OVER_REVERSE] = combine_saturate_c; + imp->combine_width_ca[PIXMAN_OP_DISJOINT_IN] = combine_disjoint_in_c; + imp->combine_width_ca[PIXMAN_OP_DISJOINT_IN_REVERSE] = combine_disjoint_in_reverse_c; + imp->combine_width_ca[PIXMAN_OP_DISJOINT_OUT] = combine_disjoint_out_c; + imp->combine_width_ca[PIXMAN_OP_DISJOINT_OUT_REVERSE] = combine_disjoint_out_reverse_c; + imp->combine_width_ca[PIXMAN_OP_DISJOINT_ATOP] = combine_disjoint_atop_c; + imp->combine_width_ca[PIXMAN_OP_DISJOINT_ATOP_REVERSE] = combine_disjoint_atop_reverse_c; + imp->combine_width_ca[PIXMAN_OP_DISJOINT_XOR] = combine_disjoint_xor_c; /* Conjoint CA */ - imp->combine_width_ca[PIXMAN_OP_CONJOINT_CLEAR] = combineClearC; - imp->combine_width_ca[PIXMAN_OP_CONJOINT_SRC] = combineSrcC; + imp->combine_width_ca[PIXMAN_OP_CONJOINT_CLEAR] = combine_clear_c; + imp->combine_width_ca[PIXMAN_OP_CONJOINT_SRC] = combine_src_c; /* dest */ - imp->combine_width_ca[PIXMAN_OP_CONJOINT_OVER] = combineConjointOverC; - imp->combine_width_ca[PIXMAN_OP_CONJOINT_OVER_REVERSE] = combineConjointOverReverseC; - imp->combine_width_ca[PIXMAN_OP_CONJOINT_IN] = combineConjointInC; - imp->combine_width_ca[PIXMAN_OP_CONJOINT_IN_REVERSE] = combineConjointInReverseC; - imp->combine_width_ca[PIXMAN_OP_CONJOINT_OUT] = combineConjointOutC; - imp->combine_width_ca[PIXMAN_OP_CONJOINT_OUT_REVERSE] = combineConjointOutReverseC; - imp->combine_width_ca[PIXMAN_OP_CONJOINT_ATOP] = combineConjointAtopC; - imp->combine_width_ca[PIXMAN_OP_CONJOINT_ATOP_REVERSE] = combineConjointAtopReverseC; - imp->combine_width_ca[PIXMAN_OP_CONJOINT_XOR] = combineConjointXorC; + imp->combine_width_ca[PIXMAN_OP_CONJOINT_OVER] = combine_conjoint_over_c; + imp->combine_width_ca[PIXMAN_OP_CONJOINT_OVER_REVERSE] = combine_conjoint_over_reverse_c; + imp->combine_width_ca[PIXMAN_OP_CONJOINT_IN] = combine_conjoint_in_c; + imp->combine_width_ca[PIXMAN_OP_CONJOINT_IN_REVERSE] = combine_conjoint_in_reverse_c; + imp->combine_width_ca[PIXMAN_OP_CONJOINT_OUT] = combine_conjoint_out_c; + imp->combine_width_ca[PIXMAN_OP_CONJOINT_OUT_REVERSE] = combine_conjoint_out_reverse_c; + imp->combine_width_ca[PIXMAN_OP_CONJOINT_ATOP] = combine_conjoint_atop_c; + imp->combine_width_ca[PIXMAN_OP_CONJOINT_ATOP_REVERSE] = combine_conjoint_atop_reverse_c; + imp->combine_width_ca[PIXMAN_OP_CONJOINT_XOR] = combine_conjoint_xor_c; - imp->combine_width_ca[PIXMAN_OP_MULTIPLY] = combineMultiplyC; - imp->combine_width_ca[PIXMAN_OP_SCREEN] = combineScreenC; - imp->combine_width_ca[PIXMAN_OP_OVERLAY] = combineOverlayC; - imp->combine_width_ca[PIXMAN_OP_DARKEN] = combineDarkenC; - imp->combine_width_ca[PIXMAN_OP_LIGHTEN] = combineLightenC; - imp->combine_width_ca[PIXMAN_OP_COLOR_DODGE] = combineColorDodgeC; - imp->combine_width_ca[PIXMAN_OP_COLOR_BURN] = combineColorBurnC; - imp->combine_width_ca[PIXMAN_OP_HARD_LIGHT] = combineHardLightC; - imp->combine_width_ca[PIXMAN_OP_SOFT_LIGHT] = combineSoftLightC; - imp->combine_width_ca[PIXMAN_OP_DIFFERENCE] = combineDifferenceC; - imp->combine_width_ca[PIXMAN_OP_EXCLUSION] = combineExclusionC; + imp->combine_width_ca[PIXMAN_OP_MULTIPLY] = combine_multiply_c; + imp->combine_width_ca[PIXMAN_OP_SCREEN] = combine_screen_c; + imp->combine_width_ca[PIXMAN_OP_OVERLAY] = combine_overlay_c; + imp->combine_width_ca[PIXMAN_OP_DARKEN] = combine_darken_c; + imp->combine_width_ca[PIXMAN_OP_LIGHTEN] = combine_lighten_c; + imp->combine_width_ca[PIXMAN_OP_COLOR_DODGE] = combine_color_dodge_c; + imp->combine_width_ca[PIXMAN_OP_COLOR_BURN] = combine_color_burn_c; + imp->combine_width_ca[PIXMAN_OP_HARD_LIGHT] = combine_hard_light_c; + imp->combine_width_ca[PIXMAN_OP_SOFT_LIGHT] = combine_soft_light_c; + imp->combine_width_ca[PIXMAN_OP_DIFFERENCE] = combine_difference_c; + imp->combine_width_ca[PIXMAN_OP_EXCLUSION] = combine_exclusion_c; /* It is not clear that these make sense, so leave them out for now */ imp->combine_width_ca[PIXMAN_OP_HSL_HUE] = NULL; imp->combine_width_ca[PIXMAN_OP_HSL_SATURATION] = NULL; diff --git a/pixman/pixman-conical-gradient.c b/pixman/pixman-conical-gradient.c index cff58d4..8e7d1c5 100644 --- a/pixman/pixman-conical-gradient.c +++ b/pixman/pixman-conical-gradient.c @@ -31,7 +31,7 @@ static void conical_gradient_get_scanline_32 (pixman_image_t *image, int x, int y, int width, uint32_t *buffer, - const uint32_t *mask, uint32_t maskBits) + const uint32_t *mask, uint32_t mask_bits) { source_image_t *source = (source_image_t *)image; gradient_t *gradient = (gradient_t *)source; @@ -74,7 +74,7 @@ conical_gradient_get_scanline_32 (pixman_image_t *image, int x, int y, while (buffer < end) { double angle; - if (!mask || *mask++ & maskBits) + if (!mask || *mask++ & mask_bits) { pixman_fixed_48_16_t t; @@ -93,7 +93,7 @@ conical_gradient_get_scanline_32 (pixman_image_t *image, int x, int y, double x, y; double angle; - if (!mask || *mask++ & maskBits) + if (!mask || *mask++ & mask_bits) { pixman_fixed_48_16_t t; diff --git a/pixman/pixman-edge-imp.h b/pixman/pixman-edge-imp.h index 36fc5e3..a30f821 100644 --- a/pixman/pixman-edge-imp.h +++ b/pixman/pixman-edge-imp.h @@ -20,7 +20,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#ifndef rasterizeSpan +#ifndef rasterize_span #endif static void @@ -50,7 +50,7 @@ RASTERIZE_EDGES (pixman_image_t *image, #if N_BITS == 1 /* For the non-antialiased case, round the coordinates up, in effect * sampling the center of the pixel. (The AA case does a similar - * adjustment in RenderSamplesX) */ + * adjustment in RENDER_SAMPLES_X) */ lx += X_FRAC_FIRST(1); rx += X_FRAC_FIRST(1); #endif @@ -94,7 +94,7 @@ RASTERIZE_EDGES (pixman_image_t *image, (((32 - (x)) & 0x1f) ? \ SCREEN_SHIFT_LEFT (0xffffffff, (32 - (x)) & 0x1f) : 0) -#define FbMaskBits(x,w,l,n,r) { \ +#define MASK_BITS(x,w,l,n,r) { \ n = (w); \ r = RIGHT_MASK ((x) + n); \ l = LEFT_MASK (x); \ @@ -119,7 +119,7 @@ RASTERIZE_EDGES (pixman_image_t *image, a += x >> 5; x &= 0x1f; - FbMaskBits (x, width, startmask, nmiddle, endmask); + MASK_BITS (x, width, startmask, nmiddle, endmask); if (startmask) { WRITE(image, a, READ(image, a) | startmask); @@ -137,8 +137,8 @@ RASTERIZE_EDGES (pixman_image_t *image, int rxs; /* Sample coverage for edge pixels */ - lxs = RenderSamplesX (lx, N_BITS); - rxs = RenderSamplesX (rx, N_BITS); + lxs = RENDER_SAMPLES_X (lx, N_BITS); + rxs = RENDER_SAMPLES_X (rx, N_BITS); /* Add coverage across row */ if (lxi == rxi) @@ -183,4 +183,4 @@ RASTERIZE_EDGES (pixman_image_t *image, } } -#undef rasterizeSpan +#undef rasterize_span diff --git a/pixman/pixman-edge.c b/pixman/pixman-edge.c index f6a580e..82d6385 100644 --- a/pixman/pixman-edge.c +++ b/pixman/pixman-edge.c @@ -190,8 +190,8 @@ rasterize_edges_8 (pixman_image_t *image, rxi = pixman_fixed_to_int (rx); /* Sample coverage for edge pixels */ - lxs = RenderSamplesX (lx, 8); - rxs = RenderSamplesX (rx, 8); + lxs = RENDER_SAMPLES_X (lx, 8); + rxs = RENDER_SAMPLES_X (rx, 8); /* Add coverage across row */ if (lxi == rxi) diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c index db8a51c..a255080 100644 --- a/pixman/pixman-fast-path.c +++ b/pixman/pixman-fast-path.c @@ -75,7 +75,7 @@ store_24 (uint8_t *a, uint32_t v) } static force_inline uint32_t -fbOver (uint32_t src, uint32_t dest) +over (uint32_t src, uint32_t dest) { uint32_t a = ~src >> 24; @@ -85,7 +85,7 @@ fbOver (uint32_t src, uint32_t dest) } static uint32_t -fbIn (uint32_t x, uint8_t y) +in (uint32_t x, uint8_t y) { uint16_t a = y; @@ -97,10 +97,10 @@ fbIn (uint32_t x, uint8_t y) /* * Naming convention: * - * opSRCxMASKxDST + * op_src_mask_dest */ static void -fast_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, +fast_composite_over_x888_8_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -114,26 +114,26 @@ fast_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *src, *srcLine; - uint32_t *dst, *dstLine; - uint8_t *mask, *maskLine; - int srcStride, maskStride, dstStride; + uint32_t *src, *src_line; + uint32_t *dst, *dst_line; + uint8_t *mask, *mask_line; + int src_stride, mask_stride, dst_stride; uint8_t m; uint32_t s, d; uint16_t w; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); while (height--) { - src = srcLine; - srcLine += srcStride; - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + src = src_line; + src_line += src_stride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; while (w--) @@ -147,8 +147,8 @@ fast_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, *dst = s; else { - d = fbIn (s, m); - *dst = fbOver (d, *dst); + d = in (s, m); + *dst = over (d, *dst); } } src++; @@ -158,11 +158,11 @@ fast_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, } static void -fast_CompositeIn_n_8_8 (pixman_implementation_t *imp, +fast_composite_in_n_8_8 (pixman_implementation_t *imp, pixman_op_t op, - pixman_image_t *iSrc, - pixman_image_t *iMask, - pixman_image_t *iDst, + pixman_image_t *src_image, + pixman_image_t *mask_image, + pixman_image_t *dest_image, int32_t src_x, int32_t src_y, int32_t mask_x, @@ -173,26 +173,26 @@ fast_CompositeIn_n_8_8 (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint8_t *dstLine, *dst; - uint8_t *maskLine, *mask, m; - int dstStride, maskStride; + uint8_t *dst_line, *dst; + uint8_t *mask_line, *mask, m; + int dst_stride, mask_stride; uint16_t w; uint16_t t; - src = _pixman_image_get_solid(iSrc, iDst->bits.format); + src = _pixman_image_get_solid(src_image, dest_image->bits.format); srca = src >> 24; - PIXMAN_IMAGE_GET_LINE (iDst, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (iMask, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); if (srca == 0xff) { while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; while (w--) @@ -214,10 +214,10 @@ fast_CompositeIn_n_8_8 (pixman_implementation_t *imp, { while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; while (w--) @@ -240,11 +240,11 @@ fast_CompositeIn_n_8_8 (pixman_implementation_t *imp, static void -fast_CompositeIn_8_8 (pixman_implementation_t *imp, +fast_composite_in_8_8 (pixman_implementation_t *imp, pixman_op_t op, - pixman_image_t *iSrc, - pixman_image_t *iMask, - pixman_image_t *iDst, + pixman_image_t *src_image, + pixman_image_t *mask_image, + pixman_image_t *dest_image, int32_t src_x, int32_t src_y, int32_t mask_x, @@ -254,22 +254,22 @@ fast_CompositeIn_8_8 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *srcLine, *src; - int dstStride, srcStride; + uint8_t *dst_line, *dst; + uint8_t *src_line, *src; + int dst_stride, src_stride; uint16_t w; uint8_t s; uint16_t t; - PIXMAN_IMAGE_GET_LINE (iSrc, src_x, src_y, uint8_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (iDst, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w--) @@ -289,7 +289,7 @@ fast_CompositeIn_8_8 (pixman_implementation_t *imp, } static void -fast_CompositeOver_n_8_8888 (pixman_implementation_t *imp, +fast_composite_over_n_8_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -304,9 +304,9 @@ fast_CompositeOver_n_8_8888 (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint32_t *dstLine, *dst, d; - uint8_t *maskLine, *mask, m; - int dstStride, maskStride; + uint32_t *dst_line, *dst, d; + uint8_t *mask_line, *mask, m; + int dst_stride, mask_stride; uint16_t w; src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -315,15 +315,15 @@ fast_CompositeOver_n_8_8888 (pixman_implementation_t *imp, if (src == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; while (w--) @@ -334,12 +334,12 @@ fast_CompositeOver_n_8_8888 (pixman_implementation_t *imp, if (srca == 0xff) *dst = src; else - *dst = fbOver (src, *dst); + *dst = over (src, *dst); } else if (m) { - d = fbIn (src, m); - *dst = fbOver (d, *dst); + d = in (src, m); + *dst = over (d, *dst); } dst++; } @@ -347,7 +347,7 @@ fast_CompositeOver_n_8_8888 (pixman_implementation_t *imp, } static void -fast_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, +fast_composite_over_n_8888_8888_ca (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -362,9 +362,9 @@ fast_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint32_t *dstLine, *dst, d; - uint32_t *maskLine, *mask, ma; - int dstStride, maskStride; + uint32_t *dst_line, *dst, d; + uint32_t *mask_line, *mask, ma; + int dst_stride, mask_stride; uint16_t w; src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -373,15 +373,15 @@ fast_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, if (src == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, mask_stride, mask_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; while (w--) @@ -392,7 +392,7 @@ fast_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, if (srca == 0xff) *dst = src; else - *dst = fbOver (src, *dst); + *dst = over (src, *dst); } else if (ma) { @@ -412,7 +412,7 @@ fast_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, } static void -fast_CompositeOver_n_8_0888 (pixman_implementation_t *imp, +fast_composite_over_n_8_0888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -427,10 +427,10 @@ fast_CompositeOver_n_8_0888 (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint8_t *dstLine, *dst; + uint8_t *dst_line, *dst; uint32_t d; - uint8_t *maskLine, *mask, m; - int dstStride, maskStride; + uint8_t *mask_line, *mask, m; + int dst_stride, mask_stride; uint16_t w; src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -439,15 +439,15 @@ fast_CompositeOver_n_8_0888 (pixman_implementation_t *imp, if (src == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 3); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 3); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; while (w--) @@ -460,13 +460,13 @@ fast_CompositeOver_n_8_0888 (pixman_implementation_t *imp, else { d = fetch_24(dst); - d = fbOver (src, d); + d = over (src, d); } store_24(dst, d); } else if (m) { - d = fbOver (fbIn(src,m), fetch_24(dst)); + d = over (in(src,m), fetch_24(dst)); store_24(dst, d); } dst += 3; @@ -475,7 +475,7 @@ fast_CompositeOver_n_8_0888 (pixman_implementation_t *imp, } static void -fast_CompositeOver_n_8_0565 (pixman_implementation_t *imp, +fast_composite_over_n_8_0565 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -490,10 +490,10 @@ fast_CompositeOver_n_8_0565 (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint16_t *dstLine, *dst; + uint16_t *dst_line, *dst; uint32_t d; - uint8_t *maskLine, *mask, m; - int dstStride, maskStride; + uint8_t *mask_line, *mask, m; + int dst_stride, mask_stride; uint16_t w; src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -502,15 +502,15 @@ fast_CompositeOver_n_8_0565 (pixman_implementation_t *imp, if (src == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; while (w--) @@ -523,14 +523,14 @@ fast_CompositeOver_n_8_0565 (pixman_implementation_t *imp, else { d = *dst; - d = fbOver (src, CONVERT_0565_TO_0888(d)); + d = over (src, CONVERT_0565_TO_0888(d)); } *dst = CONVERT_8888_TO_0565(d); } else if (m) { d = *dst; - d = fbOver (fbIn(src,m), CONVERT_0565_TO_0888(d)); + d = over (in(src,m), CONVERT_0565_TO_0888(d)); *dst = CONVERT_8888_TO_0565(d); } dst++; @@ -539,7 +539,7 @@ fast_CompositeOver_n_8_0565 (pixman_implementation_t *imp, } static void -fast_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, +fast_composite_over_n_8888_0565_ca (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -555,10 +555,10 @@ fast_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, { uint32_t src, srca; uint16_t src16; - uint16_t *dstLine, *dst; + uint16_t *dst_line, *dst; uint32_t d; - uint32_t *maskLine, *mask, ma; - int dstStride, maskStride; + uint32_t *mask_line, *mask, ma; + int dst_stride, mask_stride; uint16_t w; src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -569,15 +569,15 @@ fast_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, src16 = CONVERT_8888_TO_0565(src); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, mask_stride, mask_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; while (w--) @@ -592,7 +592,7 @@ fast_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, else { d = *dst; - d = fbOver (src, CONVERT_0565_TO_0888(d)); + d = over (src, CONVERT_0565_TO_0888(d)); *dst = CONVERT_8888_TO_0565(d); } } @@ -628,21 +628,21 @@ fast_composite_over_8888_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src, s; - int dstStride, srcStride; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src, s; + int dst_stride, src_stride; uint8_t a; uint16_t w; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w--) @@ -652,14 +652,14 @@ fast_composite_over_8888_8888 (pixman_implementation_t *imp, if (a == 0xff) *dst = s; else if (s) - *dst = fbOver (s, *dst); + *dst = over (s, *dst); dst++; } } } static void -fast_CompositeSrc_8888_0888 (pixman_implementation_t *imp, +fast_composite_src_8888_0888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -673,22 +673,22 @@ fast_CompositeSrc_8888_0888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint8_t *dstLine, *dst; + uint8_t *dst_line, *dst; uint32_t d; - uint32_t *srcLine, *src, s; + uint32_t *src_line, *src, s; uint8_t a; - int dstStride, srcStride; + int dst_stride, src_stride; uint16_t w; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 3); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 3); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w--) @@ -700,7 +700,7 @@ fast_CompositeSrc_8888_0888 (pixman_implementation_t *imp, if (a == 0xff) d = s; else - d = fbOver (s, fetch_24(dst)); + d = over (s, fetch_24(dst)); store_24(dst, d); } @@ -724,22 +724,22 @@ fast_composite_over_8888_0565 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint16_t *dstLine, *dst; + uint16_t *dst_line, *dst; uint32_t d; - uint32_t *srcLine, *src, s; + uint32_t *src_line, *src, s; uint8_t a; - int dstStride, srcStride; + int dst_stride, src_stride; uint16_t w; - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w--) @@ -753,7 +753,7 @@ fast_composite_over_8888_0565 (pixman_implementation_t *imp, else { d = *dst; - d = fbOver (s, CONVERT_0565_TO_0888(d)); + d = over (s, CONVERT_0565_TO_0888(d)); } *dst = CONVERT_8888_TO_0565(d); } @@ -763,7 +763,7 @@ fast_composite_over_8888_0565 (pixman_implementation_t *imp, } static void -fast_CompositeSrc_x888_0565 (pixman_implementation_t *imp, +fast_composite_src_x888_0565 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -777,20 +777,20 @@ fast_CompositeSrc_x888_0565 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint16_t *dstLine, *dst; - uint32_t *srcLine, *src, s; - int dstStride, srcStride; + uint16_t *dst_line, *dst; + uint32_t *src_line, *src, s; + int dst_stride, src_stride; uint16_t w; - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w--) @@ -803,7 +803,7 @@ fast_CompositeSrc_x888_0565 (pixman_implementation_t *imp, } static void -fast_CompositeAdd_8000_8000 (pixman_implementation_t *imp, +fast_composite_add_8000_8000 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -817,22 +817,22 @@ fast_CompositeAdd_8000_8000 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *srcLine, *src; - int dstStride, srcStride; + uint8_t *dst_line, *dst; + uint8_t *src_line, *src; + int dst_stride, src_stride; uint16_t w; uint8_t s, d; uint16_t t; - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w--) @@ -854,7 +854,7 @@ fast_CompositeAdd_8000_8000 (pixman_implementation_t *imp, } static void -fast_CompositeAdd_8888_8888 (pixman_implementation_t *imp, +fast_composite_add_8888_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -868,21 +868,21 @@ fast_CompositeAdd_8888_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; - int dstStride, srcStride; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; + int dst_stride, src_stride; uint16_t w; uint32_t s, d; - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w--) @@ -904,7 +904,7 @@ fast_CompositeAdd_8888_8888 (pixman_implementation_t *imp, } static void -fast_CompositeAdd_8888_8_8 (pixman_implementation_t *imp, +fast_composite_add_8888_8_8 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -918,24 +918,24 @@ fast_CompositeAdd_8888_8_8 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint8_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint16_t w; uint32_t src; uint8_t sa; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); src = _pixman_image_get_solid (src_image, dst_image->bits.format); sa = (src >> 24); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; while (w--) @@ -961,7 +961,7 @@ fast_CompositeAdd_8888_8_8 (pixman_implementation_t *imp, */ static void -fast_CompositeSolidFill (pixman_implementation_t *imp, +fast_composite_solid_fill (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -993,7 +993,7 @@ fast_CompositeSolidFill (pixman_implementation_t *imp, } static void -fast_CompositeSrc_8888_x888 (pixman_implementation_t *imp, +fast_composite_src_8888_x888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -1009,72 +1009,72 @@ fast_CompositeSrc_8888_x888 (pixman_implementation_t *imp, { uint32_t *dst; uint32_t *src; - int dstStride, srcStride; + int dst_stride, src_stride; uint32_t n_bytes = width * sizeof (uint32_t); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, src, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dst, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst, 1); while (height--) { memcpy (dst, src, n_bytes); - dst += dstStride; - src += srcStride; + dst += dst_stride; + src += src_stride; } } static const pixman_fast_path_t c_fast_paths[] = { - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, fast_CompositeOver_n_8_0565, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, fast_CompositeOver_n_8_0565, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r8g8b8, fast_CompositeOver_n_8_0888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b8g8r8, fast_CompositeOver_n_8_0888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fast_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fast_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fast_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fast_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, fast_CompositeOver_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, fast_CompositeOver_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, fast_CompositeOver_n_8888_0565_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, fast_CompositeOver_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, fast_CompositeOver_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, fast_CompositeOver_n_8888_0565_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fast_CompositeOver_x888_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fast_CompositeOver_x888_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fast_CompositeOver_x888_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, fast_CompositeOver_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, fast_composite_over_n_8_0565, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, fast_composite_over_n_8_0565, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r8g8b8, fast_composite_over_n_8_0888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b8g8r8, fast_composite_over_n_8_0888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, fast_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, fast_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, fast_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, fast_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, fast_composite_over_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, fast_composite_over_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, fast_composite_over_n_8888_0565_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, fast_composite_over_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, fast_composite_over_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, fast_composite_over_n_8888_0565_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, fast_composite_over_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, fast_composite_over_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, fast_composite_over_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, fast_composite_over_x888_8_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fast_composite_over_8888_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fast_composite_over_8888_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fast_composite_over_8888_0565, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fast_composite_over_8888_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fast_composite_over_8888_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fast_composite_over_8888_0565, 0 }, - { PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fast_CompositeAdd_8888_8888, 0 }, - { PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fast_CompositeAdd_8888_8888, 0 }, - { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fast_CompositeAdd_8000_8000, 0 }, - { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fast_CompositeAdd_8888_8_8, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_a8r8g8b8, fast_CompositeSolidFill, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_x8r8g8b8, fast_CompositeSolidFill, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_a8b8g8r8, fast_CompositeSolidFill, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_x8b8g8r8, fast_CompositeSolidFill, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_a8, fast_CompositeSolidFill, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, fast_CompositeSolidFill, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fast_CompositeSrc_8888_x888, 0 }, - { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fast_CompositeSrc_8888_x888, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fast_CompositeSrc_8888_x888, 0 }, - { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fast_CompositeSrc_8888_x888, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fast_CompositeSrc_x888_0565, 0 }, - { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fast_CompositeSrc_x888_0565, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fast_CompositeSrc_x888_0565, 0 }, - { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fast_CompositeSrc_x888_0565, 0 }, - { PIXMAN_OP_IN, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fast_CompositeIn_8_8, 0 }, - { PIXMAN_OP_IN, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fast_CompositeIn_n_8_8, 0 }, + { PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, fast_composite_add_8888_8888, 0 }, + { PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, fast_composite_add_8888_8888, 0 }, + { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fast_composite_add_8000_8000, 0 }, + { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fast_composite_add_8888_8_8, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_a8r8g8b8, fast_composite_solid_fill, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_x8r8g8b8, fast_composite_solid_fill, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_a8b8g8r8, fast_composite_solid_fill, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_x8b8g8r8, fast_composite_solid_fill, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_a8, fast_composite_solid_fill, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, fast_composite_solid_fill, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fast_composite_src_8888_x888, 0 }, + { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, fast_composite_src_8888_x888, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fast_composite_src_8888_x888, 0 }, + { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, fast_composite_src_8888_x888, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fast_composite_src_x888_0565, 0 }, + { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, fast_composite_src_x888_0565, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fast_composite_src_x888_0565, 0 }, + { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, fast_composite_src_x888_0565, 0 }, + { PIXMAN_OP_IN, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, fast_composite_in_8_8, 0 }, + { PIXMAN_OP_IN, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, fast_composite_in_n_8_8, 0 }, { PIXMAN_OP_NONE }, }; static void -fast_CompositeSrcScaleNearest (pixman_implementation_t *imp, +fast_composite_src_scale_nearest (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t *src_image, pixman_image_t *mask_image, @@ -1090,14 +1090,14 @@ fast_CompositeSrcScaleNearest (pixman_implementation_t *imp, { uint32_t *dst; uint32_t *src; - int dstStride, srcStride; + int dst_stride, src_stride; int i, j; pixman_vector_t v; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dst, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst, 1); /* pass in 0 instead of src_x and src_y because src_x and src_y need to be * transformed from destination space to source space */ - PIXMAN_IMAGE_GET_LINE (src_image, 0, 0, uint32_t, srcStride, src, 1); + PIXMAN_IMAGE_GET_LINE (src_image, 0, 0, uint32_t, src_stride, src, 1); /* reference point is the center of the pixel */ v.vector[0] = pixman_int_to_fixed(src_x) + pixman_fixed_1 / 2; @@ -1153,7 +1153,7 @@ fast_CompositeSrcScaleNearest (pixman_implementation_t *imp, if (inside_bounds) { //XXX: we should move this multiplication out of the loop - result = *(src + y * srcStride + x); + result = *(src + y * src_stride + x); } else { result = 0; } @@ -1166,7 +1166,7 @@ fast_CompositeSrcScaleNearest (pixman_implementation_t *imp, /* adjust the y location by a unit vector in the y direction * this is equivalent to transforming y+1 of the destination point to source space */ v.vector[1] += src_image->common.transform->matrix[1][1]; - dst += dstStride; + dst += dst_stride; } } @@ -1209,7 +1209,7 @@ fast_path_composite (pixman_implementation_t *imp, mask_x, mask_y, dest_x, dest_y, width, height, - fast_CompositeSrcScaleNearest); + fast_composite_src_scale_nearest); return; } } diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c index 3da6afb..d9bdad7 100644 --- a/pixman/pixman-general.c +++ b/pixman/pixman-general.c @@ -55,20 +55,20 @@ general_composite_rect (pixman_implementation_t *imp, int32_t height) { uint8_t stack_scanline_buffer[SCANLINE_BUFFER_LENGTH * 3]; - const pixman_format_code_t srcFormat = src->type == BITS ? src->bits.format : 0; - const pixman_format_code_t maskFormat = mask && mask->type == BITS ? mask->bits.format : 0; - const pixman_format_code_t destFormat = dest->type == BITS ? dest->bits.format : 0; - const int srcWide = PIXMAN_FORMAT_IS_WIDE(srcFormat); - const int maskWide = mask && PIXMAN_FORMAT_IS_WIDE(maskFormat); - const int destWide = PIXMAN_FORMAT_IS_WIDE(destFormat); - const int wide = srcWide || maskWide || destWide; + const pixman_format_code_t src_format = src->type == BITS ? src->bits.format : 0; + const pixman_format_code_t mask_format = mask && mask->type == BITS ? mask->bits.format : 0; + const pixman_format_code_t dest_format = dest->type == BITS ? dest->bits.format : 0; + const int src_wide = PIXMAN_FORMAT_IS_WIDE(src_format); + const int mask_wide = mask && PIXMAN_FORMAT_IS_WIDE(mask_format); + const int dest_wide = PIXMAN_FORMAT_IS_WIDE(dest_format); + const int wide = src_wide || mask_wide || dest_wide; const int Bpp = wide ? 8 : 4; uint8_t *scanline_buffer = stack_scanline_buffer; uint8_t *src_buffer, *mask_buffer, *dest_buffer; - fetch_scanline_t fetchSrc = NULL, fetchMask = NULL, fetchDest = NULL; + fetch_scanline_t fetch_src = NULL, fetch_mask = NULL, fetch_dest = NULL; pixman_combine_32_func_t compose; store_scanline_t store; - source_pict_class_t srcClass, maskClass; + source_pict_class_t src_class, mask_class; pixman_bool_t component_alpha; uint32_t *bits; int32_t stride; @@ -86,38 +86,38 @@ general_composite_rect (pixman_implementation_t *imp, mask_buffer = src_buffer + width * Bpp; dest_buffer = mask_buffer + width * Bpp; - srcClass = _pixman_image_classify (src, + src_class = _pixman_image_classify (src, src_x, src_y, width, height); - maskClass = SOURCE_IMAGE_CLASS_UNKNOWN; + mask_class = SOURCE_IMAGE_CLASS_UNKNOWN; if (mask) { - maskClass = _pixman_image_classify (mask, + mask_class = _pixman_image_classify (mask, src_x, src_y, width, height); } if (op == PIXMAN_OP_CLEAR) - fetchSrc = NULL; + fetch_src = NULL; else if (wide) - fetchSrc = _pixman_image_get_scanline_64; + fetch_src = _pixman_image_get_scanline_64; else - fetchSrc = _pixman_image_get_scanline_32; + fetch_src = _pixman_image_get_scanline_32; if (!mask || op == PIXMAN_OP_CLEAR) - fetchMask = NULL; + fetch_mask = NULL; else if (wide) - fetchMask = _pixman_image_get_scanline_64; + fetch_mask = _pixman_image_get_scanline_64; else - fetchMask = _pixman_image_get_scanline_32; + fetch_mask = _pixman_image_get_scanline_32; if (op == PIXMAN_OP_CLEAR || op == PIXMAN_OP_SRC) - fetchDest = NULL; + fetch_dest = NULL; else if (wide) - fetchDest = _pixman_image_get_scanline_64; + fetch_dest = _pixman_image_get_scanline_64; else - fetchDest = _pixman_image_get_scanline_32; + fetch_dest = _pixman_image_get_scanline_32; if (wide) store = _pixman_image_store_scanline_64; @@ -150,8 +150,8 @@ general_composite_rect (pixman_implementation_t *imp, } component_alpha = - fetchSrc && - fetchMask && + fetch_src && + fetch_mask && mask && mask->common.type == BITS && mask->common.component_alpha && @@ -175,49 +175,49 @@ general_composite_rect (pixman_implementation_t *imp, if (!compose) return; - if (!fetchMask) + if (!fetch_mask) mask_buffer = NULL; for (i = 0; i < height; ++i) { /* fill first half of scanline with source */ - if (fetchSrc) + if (fetch_src) { - if (fetchMask) + if (fetch_mask) { /* fetch mask before source so that fetching of source can be optimized */ - fetchMask (mask, mask_x, mask_y + i, + fetch_mask (mask, mask_x, mask_y + i, width, (void *)mask_buffer, 0, 0); - if (maskClass == SOURCE_IMAGE_CLASS_HORIZONTAL) - fetchMask = NULL; + if (mask_class == SOURCE_IMAGE_CLASS_HORIZONTAL) + fetch_mask = NULL; } - if (srcClass == SOURCE_IMAGE_CLASS_HORIZONTAL) + if (src_class == SOURCE_IMAGE_CLASS_HORIZONTAL) { - fetchSrc (src, src_x, src_y + i, + fetch_src (src, src_x, src_y + i, width, (void *)src_buffer, 0, 0); - fetchSrc = NULL; + fetch_src = NULL; } else { - fetchSrc (src, src_x, src_y + i, + fetch_src (src, src_x, src_y + i, width, (void *)src_buffer, (void *)mask_buffer, 0xffffffff); } } - else if (fetchMask) + else if (fetch_mask) { - fetchMask (mask, mask_x, mask_y + i, + fetch_mask (mask, mask_x, mask_y + i, width, (void *)mask_buffer, 0, 0); } if (store) { /* fill dest into second half of scanline */ - if (fetchDest) - fetchDest (dest, dest_x, dest_y + i, + if (fetch_dest) + fetch_dest (dest, dest_x, dest_y + i, width, (void *)dest_buffer, 0, 0); /* blend */ diff --git a/pixman/pixman-gradient-walker.c b/pixman/pixman-gradient-walker.c index bb554dc..79010a2 100644 --- a/pixman/pixman-gradient-walker.c +++ b/pixman/pixman-gradient-walker.c @@ -146,7 +146,7 @@ _pixman_gradient_walker_reset (pixman_gradient_walker_t *walker, right_x += (pos - x); break; - default: /* RepeatNone */ + default: /* REPEAT_NONE */ for (n = 0; n < count; n++) if (pos < stops[n].x) break; diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c index 5c0a15f..f95bf3f 100644 --- a/pixman/pixman-image.c +++ b/pixman/pixman-image.c @@ -64,7 +64,7 @@ _pixman_init_gradient (gradient_t *gradient, void _pixman_image_get_scanline_generic_64 (pixman_image_t * pict, int x, int y, int width, uint32_t *buffer, - const uint32_t *mask, uint32_t maskBits) + const uint32_t *mask, uint32_t mask_bits) { uint32_t *mask8 = NULL; @@ -80,7 +80,7 @@ _pixman_image_get_scanline_generic_64 (pixman_image_t * pict, int x, int y, // Fetch the source image into the first half of buffer. _pixman_image_get_scanline_32 (pict, x, y, width, (uint32_t*)buffer, mask8, - maskBits); + mask_bits); // Expand from 32bpp to 64bpp in place. pixman_expand ((uint64_t *)buffer, buffer, PIXMAN_a8r8g8b8, width); diff --git a/pixman/pixman-linear-gradient.c b/pixman/pixman-linear-gradient.c index f5c9a5a..54330e7 100644 --- a/pixman/pixman-linear-gradient.c +++ b/pixman/pixman-linear-gradient.c @@ -89,7 +89,7 @@ linear_gradient_classify (pixman_image_t *image, static void linear_gradient_get_scanline_32 (pixman_image_t *image, int x, int y, int width, uint32_t *buffer, - const uint32_t *mask, uint32_t maskBits) + const uint32_t *mask, uint32_t mask_bits) { pixman_vector_t v, unit; pixman_fixed_32_32_t l; @@ -156,7 +156,7 @@ linear_gradient_get_scanline_32 (pixman_image_t *image, int x, int y, int width, } } else { while (buffer < end) { - if (*mask++ & maskBits) + if (*mask++ & mask_bits) { *(buffer) = _pixman_gradient_walker_pixel (&walker, t); } @@ -195,7 +195,7 @@ linear_gradient_get_scanline_32 (pixman_image_t *image, int x, int y, int width, { while (buffer < end) { - if (!mask || *mask++ & maskBits) + if (!mask || *mask++ & mask_bits) { if (v.vector[2] == 0) { t = 0; diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c index 60259b4..6a62b44 100644 --- a/pixman/pixman-mmx.c +++ b/pixman/pixman-mmx.c @@ -39,10 +39,10 @@ #include "pixman-private.h" #include "pixman-combine32.h" -#define noVERBOSE +#define no_vERBOSE #ifdef VERBOSE -#define CHECKPOINT() ErrorF ("at %s %d\n", __FUNCTION__, __LINE__) +#define CHECKPOINT() error_f ("at %s %d\n", __FUNCTION__, __LINE__) #else #define CHECKPOINT() #endif @@ -98,7 +98,7 @@ typedef struct mmxdatafield mmx_ffff0000ffff0000; mmxdatafield mmx_0000ffff00000000; mmxdatafield mmx_000000000000ffff; -} MMXData; +} mmx_data_t; #if defined(_MSC_VER) # define MMXDATA_INIT(field, val) { val##UI64 } @@ -108,7 +108,7 @@ typedef struct # define MMXDATA_INIT(field, val) field = val##ULL #endif -static const MMXData c = +static const mmx_data_t c = { MMXDATA_INIT(.mmx_4x00ff, 0x00ff00ff00ff00ff), MMXDATA_INIT(.mmx_4x0080, 0x0080008000800080), @@ -363,7 +363,7 @@ expandx888 (__m64 in, int pos) } static force_inline __m64 -pack565 (__m64 pixel, __m64 target, int pos) +pack_565 (__m64 pixel, __m64 target, int pos) { __m64 p = pixel; __m64 t = target; @@ -437,7 +437,7 @@ combine (const uint32_t *src, const uint32_t *mask) } static void -mmxCombineOverU (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_over_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = dest + width; @@ -462,7 +462,7 @@ mmxCombineOverU (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineOverReverseU (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_over_reverse_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = dest + width; @@ -482,7 +482,7 @@ mmxCombineOverReverseU (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineInU (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_in_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = dest + width; @@ -503,7 +503,7 @@ mmxCombineInU (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineInReverseU (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_in_reverse_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = dest + width; @@ -524,7 +524,7 @@ mmxCombineInReverseU (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineOutU (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_out_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = dest + width; @@ -546,7 +546,7 @@ mmxCombineOutU (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineOutReverseU (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_out_reverse_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = dest + width; @@ -568,7 +568,7 @@ mmxCombineOutReverseU (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineAtopU (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_atop_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = dest + width; @@ -591,7 +591,7 @@ mmxCombineAtopU (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineAtopReverseU (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_atop_reverse_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end; @@ -616,7 +616,7 @@ mmxCombineAtopReverseU (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineXorU (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_xor_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = dest + width; @@ -640,7 +640,7 @@ mmxCombineXorU (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineAddU (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_add_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = dest + width; @@ -659,7 +659,7 @@ mmxCombineAddU (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineSaturateU (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_saturate_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = dest + width; @@ -688,7 +688,7 @@ mmxCombineSaturateU (pixman_implementation_t *imp, pixman_op_t op, static void -mmxCombineSrcC (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_src_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = src + width; @@ -705,7 +705,7 @@ mmxCombineSrcC (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineOverC (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_over_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = src + width; @@ -725,7 +725,7 @@ mmxCombineOverC (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineOverReverseC (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_over_reverse_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = src + width; @@ -746,7 +746,7 @@ mmxCombineOverReverseC (pixman_implementation_t *imp, pixman_op_t op, static void -mmxCombineInC (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_in_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = src + width; @@ -766,7 +766,7 @@ mmxCombineInC (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineInReverseC (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_in_reverse_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = src + width; @@ -786,7 +786,7 @@ mmxCombineInReverseC (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineOutC (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_out_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = src + width; @@ -807,7 +807,7 @@ mmxCombineOutC (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineOutReverseC (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_out_reverse_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = src + width; @@ -828,7 +828,7 @@ mmxCombineOutReverseC (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineAtopC (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_atop_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = src + width; @@ -851,7 +851,7 @@ mmxCombineAtopC (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineAtopReverseC (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_atop_reverse_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = src + width; @@ -874,7 +874,7 @@ mmxCombineAtopReverseC (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineXorC (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_xor_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = src + width; @@ -898,7 +898,7 @@ mmxCombineXorC (pixman_implementation_t *imp, pixman_op_t op, } static void -mmxCombineAddC (pixman_implementation_t *imp, pixman_op_t op, +mmx_combine_add_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { const uint32_t *end = src + width; @@ -919,7 +919,7 @@ mmxCombineAddC (pixman_implementation_t *imp, pixman_op_t op, /* ------------------ MMX code paths called from fbpict.c ----------------------- */ static void -mmx_CompositeOver_n_8888 (pixman_implementation_t *imp, +mmx_composite_over_n_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -934,9 +934,9 @@ mmx_CompositeOver_n_8888 (pixman_implementation_t *imp, int32_t height) { uint32_t src; - uint32_t *dstLine, *dst; + uint32_t *dst_line, *dst; uint16_t w; - int dstStride; + int dst_stride; __m64 vsrc, vsrca; CHECKPOINT(); @@ -946,15 +946,15 @@ mmx_CompositeOver_n_8888 (pixman_implementation_t *imp, if (src >> 24 == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); vsrc = load8888 (src); vsrca = expand_alpha (vsrc); while (height--) { - dst = dstLine; - dstLine += dstStride; + dst = dst_line; + dst_line += dst_stride; w = width; CHECKPOINT(); @@ -998,7 +998,7 @@ mmx_CompositeOver_n_8888 (pixman_implementation_t *imp, } static void -mmx_CompositeOver_n_0565 (pixman_implementation_t *imp, +mmx_composite_over_n_0565 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -1013,9 +1013,9 @@ mmx_CompositeOver_n_0565 (pixman_implementation_t *imp, int32_t height) { uint32_t src; - uint16_t *dstLine, *dst; + uint16_t *dst_line, *dst; uint16_t w; - int dstStride; + int dst_stride; __m64 vsrc, vsrca; CHECKPOINT(); @@ -1025,15 +1025,15 @@ mmx_CompositeOver_n_0565 (pixman_implementation_t *imp, if (src >> 24 == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); vsrc = load8888 (src); vsrca = expand_alpha (vsrc); while (height--) { - dst = dstLine; - dstLine += dstStride; + dst = dst_line; + dst_line += dst_stride; w = width; CHECKPOINT(); @@ -1042,7 +1042,7 @@ mmx_CompositeOver_n_0565 (pixman_implementation_t *imp, { uint64_t d = *dst; __m64 vdest = expand565 (M64(d), 0); - vdest = pack565(over(vsrc, vsrca, vdest), vdest, 0); + vdest = pack_565(over(vsrc, vsrca, vdest), vdest, 0); *dst = UINT64(vdest); w--; @@ -1055,10 +1055,10 @@ mmx_CompositeOver_n_0565 (pixman_implementation_t *imp, vdest = *(__m64 *)dst; - vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 0)), vdest, 0); - vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 1)), vdest, 1); - vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 2)), vdest, 2); - vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 3)), vdest, 3); + vdest = pack_565 (over(vsrc, vsrca, expand565(vdest, 0)), vdest, 0); + vdest = pack_565 (over(vsrc, vsrca, expand565(vdest, 1)), vdest, 1); + vdest = pack_565 (over(vsrc, vsrca, expand565(vdest, 2)), vdest, 2); + vdest = pack_565 (over(vsrc, vsrca, expand565(vdest, 3)), vdest, 3); *(__m64 *)dst = vdest; @@ -1072,7 +1072,7 @@ mmx_CompositeOver_n_0565 (pixman_implementation_t *imp, { uint64_t d = *dst; __m64 vdest = expand565 (M64(d), 0); - vdest = pack565(over(vsrc, vsrca, vdest), vdest, 0); + vdest = pack_565(over(vsrc, vsrca, vdest), vdest, 0); *dst = UINT64(vdest); w--; @@ -1084,7 +1084,7 @@ mmx_CompositeOver_n_0565 (pixman_implementation_t *imp, } static void -mmx_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, +mmx_composite_over_n_8888_8888_ca (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -1099,9 +1099,9 @@ mmx_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint32_t *dstLine; - uint32_t *maskLine; - int dstStride, maskStride; + uint32_t *dst_line; + uint32_t *mask_line; + int dst_stride, mask_stride; __m64 vsrc, vsrca; CHECKPOINT(); @@ -1112,8 +1112,8 @@ mmx_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, if (srca == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, mask_stride, mask_line, 1); vsrc = load8888(src); vsrca = expand_alpha(vsrc); @@ -1121,8 +1121,8 @@ mmx_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, while (height--) { int twidth = width; - uint32_t *p = (uint32_t *)maskLine; - uint32_t *q = (uint32_t *)dstLine; + uint32_t *p = (uint32_t *)mask_line; + uint32_t *q = (uint32_t *)dst_line; while (twidth && (unsigned long)q & 7) { @@ -1180,8 +1180,8 @@ mmx_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, q++; } - dstLine += dstStride; - maskLine += maskStride; + dst_line += dst_stride; + mask_line += mask_stride; } _mm_empty(); @@ -1202,18 +1202,18 @@ mmx_composite_over_8888_n_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; uint32_t mask; __m64 vmask; - int dstStride, srcStride; + int dst_stride, src_stride; uint16_t w; __m64 srca; CHECKPOINT(); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); mask = _pixman_image_get_solid (mask_image, dst_image->bits.format); mask = mask | mask >> 8 | mask >> 16 | mask >> 24; @@ -1222,10 +1222,10 @@ mmx_composite_over_8888_n_8888 (pixman_implementation_t *imp, while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w && (unsigned long)dst & 7) @@ -1273,7 +1273,7 @@ mmx_composite_over_8888_n_8888 (pixman_implementation_t *imp, } static void -mmx_Composite_over_x888_n_8888 (pixman_implementation_t *imp, +mmx_composite_over_x888_n_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -1287,18 +1287,18 @@ mmx_Composite_over_x888_n_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; uint32_t mask; __m64 vmask; - int dstStride, srcStride; + int dst_stride, src_stride; uint16_t w; __m64 srca; CHECKPOINT(); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); mask = _pixman_image_get_solid (mask_image, dst_image->bits.format); mask = mask | mask >> 8 | mask >> 16 | mask >> 24; @@ -1307,10 +1307,10 @@ mmx_Composite_over_x888_n_8888 (pixman_implementation_t *imp, while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w && (unsigned long)dst & 7) @@ -1422,24 +1422,24 @@ mmx_composite_over_8888_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; uint32_t s; - int dstStride, srcStride; + int dst_stride, src_stride; uint8_t a; uint16_t w; CHECKPOINT(); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w--) @@ -1475,15 +1475,15 @@ mmx_composite_over_8888_0565 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint16_t *dstLine, *dst; - uint32_t *srcLine, *src; - int dstStride, srcStride; + uint16_t *dst_line, *dst; + uint32_t *src_line, *src; + int dst_stride, src_stride; uint16_t w; CHECKPOINT(); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); #if 0 /* FIXME */ @@ -1492,10 +1492,10 @@ mmx_composite_over_8888_0565 (pixman_implementation_t *imp, while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; CHECKPOINT(); @@ -1506,7 +1506,7 @@ mmx_composite_over_8888_0565 (pixman_implementation_t *imp, uint64_t d = *dst; __m64 vdest = expand565 (M64(d), 0); - vdest = pack565(over(vsrc, expand_alpha(vsrc), vdest), vdest, 0); + vdest = pack_565(over(vsrc, expand_alpha(vsrc), vdest), vdest, 0); *dst = UINT64(vdest); @@ -1529,10 +1529,10 @@ mmx_composite_over_8888_0565 (pixman_implementation_t *imp, vdest = *(__m64 *)dst; - vdest = pack565(over(vsrc0, expand_alpha(vsrc0), expand565(vdest, 0)), vdest, 0); - vdest = pack565(over(vsrc1, expand_alpha(vsrc1), expand565(vdest, 1)), vdest, 1); - vdest = pack565(over(vsrc2, expand_alpha(vsrc2), expand565(vdest, 2)), vdest, 2); - vdest = pack565(over(vsrc3, expand_alpha(vsrc3), expand565(vdest, 3)), vdest, 3); + vdest = pack_565(over(vsrc0, expand_alpha(vsrc0), expand565(vdest, 0)), vdest, 0); + vdest = pack_565(over(vsrc1, expand_alpha(vsrc1), expand565(vdest, 1)), vdest, 1); + vdest = pack_565(over(vsrc2, expand_alpha(vsrc2), expand565(vdest, 2)), vdest, 2); + vdest = pack_565(over(vsrc3, expand_alpha(vsrc3), expand565(vdest, 3)), vdest, 3); *(__m64 *)dst = vdest; @@ -1549,7 +1549,7 @@ mmx_composite_over_8888_0565 (pixman_implementation_t *imp, uint64_t d = *dst; __m64 vdest = expand565 (M64(d), 0); - vdest = pack565(over(vsrc, expand_alpha(vsrc), vdest), vdest, 0); + vdest = pack_565(over(vsrc, expand_alpha(vsrc), vdest), vdest, 0); *dst = UINT64(vdest); @@ -1563,7 +1563,7 @@ mmx_composite_over_8888_0565 (pixman_implementation_t *imp, } static void -mmx_CompositeOver_n_8_8888 (pixman_implementation_t *imp, +mmx_composite_over_n_8_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -1578,9 +1578,9 @@ mmx_CompositeOver_n_8_8888 (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint32_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint32_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint16_t w; __m64 vsrc, vsrca; uint64_t srcsrc; @@ -1595,18 +1595,18 @@ mmx_CompositeOver_n_8_8888 (pixman_implementation_t *imp, srcsrc = (uint64_t)src << 32 | src; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); vsrc = load8888 (src); vsrca = expand_alpha (vsrc); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; CHECKPOINT(); @@ -1835,7 +1835,7 @@ pixman_fill_mmx (uint32_t *bits, } static void -mmx_CompositeSrc_n_8_8888 (pixman_implementation_t *imp, +mmx_composite_src_n_8_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -1850,9 +1850,9 @@ mmx_CompositeSrc_n_8_8888 (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint32_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint32_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint16_t w; __m64 vsrc, vsrca; uint64_t srcsrc; @@ -1871,18 +1871,18 @@ mmx_CompositeSrc_n_8_8888 (pixman_implementation_t *imp, srcsrc = (uint64_t)src << 32 | src; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); vsrc = load8888 (src); vsrca = expand_alpha (vsrc); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; CHECKPOINT(); @@ -1967,7 +1967,7 @@ mmx_CompositeSrc_n_8_8888 (pixman_implementation_t *imp, } static void -mmx_CompositeOver_n_8_0565 (pixman_implementation_t *imp, +mmx_composite_over_n_8_0565 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -1982,9 +1982,9 @@ mmx_CompositeOver_n_8_0565 (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint16_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint16_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint16_t w; __m64 vsrc, vsrca, tmp; uint64_t srcsrcsrcsrc, src16; @@ -1997,13 +1997,13 @@ mmx_CompositeOver_n_8_0565 (pixman_implementation_t *imp, if (srca == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); vsrc = load8888 (src); vsrca = expand_alpha (vsrc); - tmp = pack565(vsrc, _mm_setzero_si64(), 0); + tmp = pack_565(vsrc, _mm_setzero_si64(), 0); src16 = UINT64(tmp); srcsrcsrcsrc = (uint64_t)src16 << 48 | (uint64_t)src16 << 32 | @@ -2011,10 +2011,10 @@ mmx_CompositeOver_n_8_0565 (pixman_implementation_t *imp, while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; CHECKPOINT(); @@ -2028,7 +2028,7 @@ mmx_CompositeOver_n_8_0565 (pixman_implementation_t *imp, uint64_t d = *dst; __m64 vd = M64(d); __m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev (M64 (m)), expand565(vd, 0)); - vd = pack565(vdest, _mm_setzero_si64(), 0); + vd = pack_565(vdest, _mm_setzero_si64(), 0); *dst = UINT64(vd); } @@ -2059,13 +2059,13 @@ mmx_CompositeOver_n_8_0565 (pixman_implementation_t *imp, vdest = *(__m64 *)dst; vm0 = M64(m0); - vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm0), expand565(vdest, 0)), vdest, 0); + vdest = pack_565(in_over(vsrc, vsrca, expand_alpha_rev(vm0), expand565(vdest, 0)), vdest, 0); vm1 = M64(m1); - vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm1), expand565(vdest, 1)), vdest, 1); + vdest = pack_565(in_over(vsrc, vsrca, expand_alpha_rev(vm1), expand565(vdest, 1)), vdest, 1); vm2 = M64(m2); - vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm2), expand565(vdest, 2)), vdest, 2); + vdest = pack_565(in_over(vsrc, vsrca, expand_alpha_rev(vm2), expand565(vdest, 2)), vdest, 2); vm3 = M64(m3); - vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm3), expand565(vdest, 3)), vdest, 3); + vdest = pack_565(in_over(vsrc, vsrca, expand_alpha_rev(vm3), expand565(vdest, 3)), vdest, 3); *(__m64 *)dst = vdest; } @@ -2086,7 +2086,7 @@ mmx_CompositeOver_n_8_0565 (pixman_implementation_t *imp, uint64_t d = *dst; __m64 vd = M64(d); __m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev (M64(m)), expand565(vd, 0)); - vd = pack565(vdest, _mm_setzero_si64(), 0); + vd = pack_565(vdest, _mm_setzero_si64(), 0); *dst = UINT64(vd); } @@ -2100,7 +2100,7 @@ mmx_CompositeOver_n_8_0565 (pixman_implementation_t *imp, } static void -mmx_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, +mmx_composite_over_pixbuf_0565 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2114,15 +2114,15 @@ mmx_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint16_t *dstLine, *dst; - uint32_t *srcLine, *src; - int dstStride, srcStride; + uint16_t *dst_line, *dst; + uint32_t *src_line, *src; + int dst_stride, src_stride; uint16_t w; CHECKPOINT(); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); #if 0 /* FIXME */ @@ -2131,10 +2131,10 @@ mmx_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; CHECKPOINT(); @@ -2145,7 +2145,7 @@ mmx_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, uint64_t d = *dst; __m64 vdest = expand565 (M64(d), 0); - vdest = pack565(over_rev_non_pre(vsrc, vdest), vdest, 0); + vdest = pack_565(over_rev_non_pre(vsrc, vdest), vdest, 0); *dst = UINT64(vdest); @@ -2174,10 +2174,10 @@ mmx_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, if ((a0 & a1 & a2 & a3) == 0xFF) { __m64 vdest; - vdest = pack565(invert_colors(load8888(s0)), _mm_setzero_si64(), 0); - vdest = pack565(invert_colors(load8888(s1)), vdest, 1); - vdest = pack565(invert_colors(load8888(s2)), vdest, 2); - vdest = pack565(invert_colors(load8888(s3)), vdest, 3); + vdest = pack_565(invert_colors(load8888(s0)), _mm_setzero_si64(), 0); + vdest = pack_565(invert_colors(load8888(s1)), vdest, 1); + vdest = pack_565(invert_colors(load8888(s2)), vdest, 2); + vdest = pack_565(invert_colors(load8888(s3)), vdest, 3); *(__m64 *)dst = vdest; } @@ -2185,10 +2185,10 @@ mmx_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, { __m64 vdest = *(__m64 *)dst; - vdest = pack565(over_rev_non_pre(load8888(s0), expand565(vdest, 0)), vdest, 0); - vdest = pack565(over_rev_non_pre(load8888(s1), expand565(vdest, 1)), vdest, 1); - vdest = pack565(over_rev_non_pre(load8888(s2), expand565(vdest, 2)), vdest, 2); - vdest = pack565(over_rev_non_pre(load8888(s3), expand565(vdest, 3)), vdest, 3); + vdest = pack_565(over_rev_non_pre(load8888(s0), expand565(vdest, 0)), vdest, 0); + vdest = pack_565(over_rev_non_pre(load8888(s1), expand565(vdest, 1)), vdest, 1); + vdest = pack_565(over_rev_non_pre(load8888(s2), expand565(vdest, 2)), vdest, 2); + vdest = pack_565(over_rev_non_pre(load8888(s3), expand565(vdest, 3)), vdest, 3); *(__m64 *)dst = vdest; } @@ -2206,7 +2206,7 @@ mmx_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, uint64_t d = *dst; __m64 vdest = expand565 (M64(d), 0); - vdest = pack565(over_rev_non_pre(vsrc, vdest), vdest, 0); + vdest = pack_565(over_rev_non_pre(vsrc, vdest), vdest, 0); *dst = UINT64(vdest); @@ -2220,7 +2220,7 @@ mmx_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, } static void -mmx_Composite_over_pixbuf_8888 (pixman_implementation_t *imp, +mmx_composite_over_pixbuf_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2234,15 +2234,15 @@ mmx_Composite_over_pixbuf_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; - int dstStride, srcStride; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; + int dst_stride, src_stride; uint16_t w; CHECKPOINT(); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); #if 0 /* FIXME */ @@ -2251,10 +2251,10 @@ mmx_Composite_over_pixbuf_8888 (pixman_implementation_t *imp, while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w && (unsigned long)dst & 7) @@ -2320,7 +2320,7 @@ mmx_Composite_over_pixbuf_8888 (pixman_implementation_t *imp, } static void -mmx_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, +mmx_composite_over_n_8888_0565_ca (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2335,9 +2335,9 @@ mmx_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint16_t *dstLine; - uint32_t *maskLine; - int dstStride, maskStride; + uint16_t *dst_line; + uint32_t *mask_line; + int dst_stride, mask_stride; __m64 vsrc, vsrca; CHECKPOINT(); @@ -2348,8 +2348,8 @@ mmx_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, if (srca == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, mask_stride, mask_line, 1); vsrc = load8888 (src); vsrca = expand_alpha (vsrc); @@ -2357,8 +2357,8 @@ mmx_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, while (height--) { int twidth = width; - uint32_t *p = (uint32_t *)maskLine; - uint16_t *q = (uint16_t *)dstLine; + uint32_t *p = (uint32_t *)mask_line; + uint16_t *q = (uint16_t *)dst_line; while (twidth && ((unsigned long)q & 7)) { @@ -2368,7 +2368,7 @@ mmx_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, { uint64_t d = *q; __m64 vdest = expand565 (M64(d), 0); - vdest = pack565 (in_over (vsrc, vsrca, load8888 (m), vdest), vdest, 0); + vdest = pack_565 (in_over (vsrc, vsrca, load8888 (m), vdest), vdest, 0); *q = UINT64(vdest); } @@ -2390,10 +2390,10 @@ mmx_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, { __m64 vdest = *(__m64 *)q; - vdest = pack565(in_over(vsrc, vsrca, load8888(m0), expand565(vdest, 0)), vdest, 0); - vdest = pack565(in_over(vsrc, vsrca, load8888(m1), expand565(vdest, 1)), vdest, 1); - vdest = pack565(in_over(vsrc, vsrca, load8888(m2), expand565(vdest, 2)), vdest, 2); - vdest = pack565(in_over(vsrc, vsrca, load8888(m3), expand565(vdest, 3)), vdest, 3); + vdest = pack_565(in_over(vsrc, vsrca, load8888(m0), expand565(vdest, 0)), vdest, 0); + vdest = pack_565(in_over(vsrc, vsrca, load8888(m1), expand565(vdest, 1)), vdest, 1); + vdest = pack_565(in_over(vsrc, vsrca, load8888(m2), expand565(vdest, 2)), vdest, 2); + vdest = pack_565(in_over(vsrc, vsrca, load8888(m3), expand565(vdest, 3)), vdest, 3); *(__m64 *)q = vdest; } @@ -2411,7 +2411,7 @@ mmx_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, { uint64_t d = *q; __m64 vdest = expand565(M64(d), 0); - vdest = pack565 (in_over(vsrc, vsrca, load8888(m), vdest), vdest, 0); + vdest = pack_565 (in_over(vsrc, vsrca, load8888(m), vdest), vdest, 0); *q = UINT64(vdest); } @@ -2420,15 +2420,15 @@ mmx_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, q++; } - maskLine += maskStride; - dstLine += dstStride; + mask_line += mask_stride; + dst_line += dst_stride; } _mm_empty (); } static void -mmx_CompositeIn_n_8_8 (pixman_implementation_t *imp, +mmx_composite_in_n_8_8 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2442,16 +2442,16 @@ mmx_CompositeIn_n_8_8 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint8_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint16_t w; uint32_t src; uint8_t sa; __m64 vsrc, vsrca; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -2464,10 +2464,10 @@ mmx_CompositeIn_n_8_8 (pixman_implementation_t *imp, while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; if ((((unsigned long)dst_image & 3) == 0) && @@ -2512,7 +2512,7 @@ mmx_CompositeIn_n_8_8 (pixman_implementation_t *imp, } static void -mmx_CompositeIn_8_8 (pixman_implementation_t *imp, +mmx_composite_in_8_8 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2526,20 +2526,20 @@ mmx_CompositeIn_8_8 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *srcLine, *src; - int srcStride, dstStride; + uint8_t *dst_line, *dst; + uint8_t *src_line, *src; + int src_stride, dst_stride; uint16_t w; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, src_stride, src_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; if ((((unsigned long)dst_image & 3) == 0) && @@ -2577,7 +2577,7 @@ mmx_CompositeIn_8_8 (pixman_implementation_t *imp, } static void -mmx_CompositeAdd_8888_8_8 (pixman_implementation_t *imp, +mmx_composite_add_8888_8_8 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2591,16 +2591,16 @@ mmx_CompositeAdd_8888_8_8 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint8_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint16_t w; uint32_t src; uint8_t sa; __m64 vsrc, vsrca; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -2613,10 +2613,10 @@ mmx_CompositeAdd_8888_8_8 (pixman_implementation_t *imp, while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; if ((((unsigned long)mask_image & 3) == 0) && @@ -2656,7 +2656,7 @@ mmx_CompositeAdd_8888_8_8 (pixman_implementation_t *imp, } static void -mmx_CompositeAdd_8000_8000 (pixman_implementation_t *imp, +mmx_composite_add_8000_8000 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2670,24 +2670,24 @@ mmx_CompositeAdd_8000_8000 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *srcLine, *src; - int dstStride, srcStride; + uint8_t *dst_line, *dst; + uint8_t *src_line, *src; + int dst_stride, src_stride; uint16_t w; uint8_t s, d; uint16_t t; CHECKPOINT(); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w && (unsigned long)dst & 7) @@ -2729,7 +2729,7 @@ mmx_CompositeAdd_8000_8000 (pixman_implementation_t *imp, } static void -mmx_CompositeAdd_8888_8888 (pixman_implementation_t *imp, +mmx_composite_add_8888_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2744,22 +2744,22 @@ mmx_CompositeAdd_8888_8888 (pixman_implementation_t *imp, int32_t height) { __m64 dst64; - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; - int dstStride, srcStride; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; + int dst_stride, src_stride; uint16_t w; CHECKPOINT(); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; while (w && (unsigned long)dst & 7) @@ -2928,7 +2928,7 @@ pixman_blt_mmx (uint32_t *src_bits, } static void -mmx_CompositeCopyArea (pixman_implementation_t *imp, +mmx_composite_copy_area (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2952,7 +2952,7 @@ mmx_CompositeCopyArea (pixman_implementation_t *imp, } static void -mmx_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, +mmx_composite_over_x888_8_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2966,24 +2966,24 @@ mmx_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *src, *srcLine; - uint32_t *dst, *dstLine; - uint8_t *mask, *maskLine; - int srcStride, maskStride, dstStride; + uint32_t *src, *src_line; + uint32_t *dst, *dst_line; + uint8_t *mask, *mask_line; + int src_stride, mask_stride, dst_stride; uint16_t w; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); while (height--) { - src = srcLine; - srcLine += srcStride; - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + src = src_line; + src_line += src_stride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; @@ -3018,50 +3018,50 @@ mmx_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, static const pixman_fast_path_t mmx_fast_paths[] = { - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, mmx_CompositeOver_n_8_0565, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, mmx_CompositeOver_n_8_0565, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, mmx_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, mmx_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, mmx_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, mmx_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, mmx_CompositeOver_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, mmx_CompositeOver_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, mmx_CompositeOver_n_8888_0565_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, mmx_CompositeOver_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, mmx_CompositeOver_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, mmx_CompositeOver_n_8888_0565_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, mmx_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_a8r8g8b8, mmx_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, mmx_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_x8r8g8b8, mmx_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, mmx_Composite_over_pixbuf_0565, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_r5g6b5, mmx_Composite_over_pixbuf_0565, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_a8b8g8r8, mmx_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, mmx_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_x8b8g8r8, mmx_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, mmx_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_b5g6r5, mmx_Composite_over_pixbuf_0565, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, mmx_Composite_over_pixbuf_0565, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, mmx_Composite_over_x888_n_8888, NEED_SOLID_MASK }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, mmx_Composite_over_x888_n_8888, NEED_SOLID_MASK }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, mmx_Composite_over_x888_n_8888, NEED_SOLID_MASK }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, mmx_Composite_over_x888_n_8888, NEED_SOLID_MASK }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, mmx_composite_over_n_8_0565, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, mmx_composite_over_n_8_0565, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, mmx_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, mmx_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, mmx_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, mmx_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, mmx_composite_over_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, mmx_composite_over_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, mmx_composite_over_n_8888_0565_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, mmx_composite_over_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, mmx_composite_over_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, mmx_composite_over_n_8888_0565_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, mmx_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_a8r8g8b8, mmx_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, mmx_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_x8r8g8b8, mmx_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, mmx_composite_over_pixbuf_0565, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_r5g6b5, mmx_composite_over_pixbuf_0565, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_a8b8g8r8, mmx_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, mmx_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_x8b8g8r8, mmx_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, mmx_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_b5g6r5, mmx_composite_over_pixbuf_0565, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, mmx_composite_over_pixbuf_0565, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, mmx_composite_over_x888_n_8888, NEED_SOLID_MASK }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, mmx_composite_over_x888_n_8888, NEED_SOLID_MASK }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, mmx_composite_over_x888_n_8888, NEED_SOLID_MASK }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, mmx_composite_over_x888_n_8888, NEED_SOLID_MASK }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, mmx_composite_over_8888_n_8888, NEED_SOLID_MASK }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, mmx_composite_over_8888_n_8888, NEED_SOLID_MASK }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, mmx_composite_over_8888_n_8888, NEED_SOLID_MASK }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, mmx_composite_over_8888_n_8888, NEED_SOLID_MASK }, #if 0 /* FIXME: This code is commented out since it's apparently not actually faster than the generic code. */ - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, mmx_CompositeOver_x888_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, mmx_CompositeOver_x888_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8b8r8g8, PIXMAN_a8, PIXMAN_x8b8g8r8, mmx_CompositeOver_x888_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8b8r8g8, PIXMAN_a8, PIXMAN_a8r8g8b8, mmx_CompositeOver_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, mmx_composite_over_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, mmx_composite_over_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8b8r8g8, PIXMAN_a8, PIXMAN_x8b8g8r8, mmx_composite_over_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8b8r8g8, PIXMAN_a8, PIXMAN_a8r8g8b8, mmx_composite_over_x888_8_8888, 0 }, #endif - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_a8r8g8b8, mmx_CompositeOver_n_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_x8r8g8b8, mmx_CompositeOver_n_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, mmx_CompositeOver_n_0565, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, mmx_CompositeCopyArea, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, mmx_CompositeCopyArea, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_a8r8g8b8, mmx_composite_over_n_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_x8r8g8b8, mmx_composite_over_n_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, mmx_composite_over_n_0565, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, mmx_composite_copy_area, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, mmx_composite_copy_area, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, mmx_composite_over_8888_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, mmx_composite_over_8888_8888, 0 }, @@ -3070,26 +3070,26 @@ static const pixman_fast_path_t mmx_fast_paths[] = { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, mmx_composite_over_8888_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, mmx_composite_over_8888_0565, 0 }, - { PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, mmx_CompositeAdd_8888_8888, 0 }, - { PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, mmx_CompositeAdd_8888_8888, 0 }, - { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, mmx_CompositeAdd_8000_8000, 0 }, - { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, mmx_CompositeAdd_8888_8_8, 0 }, + { PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, mmx_composite_add_8888_8888, 0 }, + { PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, mmx_composite_add_8888_8888, 0 }, + { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, mmx_composite_add_8000_8000, 0 }, + { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, mmx_composite_add_8888_8_8, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, mmx_CompositeSrc_n_8_8888, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, mmx_CompositeSrc_n_8_8888, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, mmx_CompositeSrc_n_8_8888, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, mmx_CompositeSrc_n_8_8888, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, mmx_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, mmx_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, mmx_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, mmx_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, mmx_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, mmx_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_r5g6b5, PIXMAN_null, PIXMAN_r5g6b5, mmx_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_b5g6r5, PIXMAN_null, PIXMAN_b5g6r5, mmx_CompositeCopyArea, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, mmx_composite_src_n_8_8888, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, mmx_composite_src_n_8_8888, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, mmx_composite_src_n_8_8888, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, mmx_composite_src_n_8_8888, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, mmx_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, mmx_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, mmx_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, mmx_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, mmx_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, mmx_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_r5g6b5, PIXMAN_null, PIXMAN_r5g6b5, mmx_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_b5g6r5, PIXMAN_null, PIXMAN_b5g6r5, mmx_composite_copy_area, 0 }, - { PIXMAN_OP_IN, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, mmx_CompositeIn_8_8, 0 }, - { PIXMAN_OP_IN, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, mmx_CompositeIn_n_8_8, 0 }, + { PIXMAN_OP_IN, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, mmx_composite_in_8_8, 0 }, + { PIXMAN_OP_IN, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, mmx_composite_in_n_8_8, 0 }, { PIXMAN_OP_NONE }, }; @@ -3175,29 +3175,29 @@ _pixman_implementation_create_mmx (void) pixman_implementation_t *general = _pixman_implementation_create_fast_path (); pixman_implementation_t *imp = _pixman_implementation_create (general); - imp->combine_32[PIXMAN_OP_OVER] = mmxCombineOverU; - imp->combine_32[PIXMAN_OP_OVER_REVERSE] = mmxCombineOverReverseU; - imp->combine_32[PIXMAN_OP_IN] = mmxCombineInU; - imp->combine_32[PIXMAN_OP_IN_REVERSE] = mmxCombineInReverseU; - imp->combine_32[PIXMAN_OP_OUT] = mmxCombineOutU; - imp->combine_32[PIXMAN_OP_OUT_REVERSE] = mmxCombineOutReverseU; - imp->combine_32[PIXMAN_OP_ATOP] = mmxCombineAtopU; - imp->combine_32[PIXMAN_OP_ATOP_REVERSE] = mmxCombineAtopReverseU; - imp->combine_32[PIXMAN_OP_XOR] = mmxCombineXorU; - imp->combine_32[PIXMAN_OP_ADD] = mmxCombineAddU; - imp->combine_32[PIXMAN_OP_SATURATE] = mmxCombineSaturateU; + imp->combine_32[PIXMAN_OP_OVER] = mmx_combine_over_u; + imp->combine_32[PIXMAN_OP_OVER_REVERSE] = mmx_combine_over_reverse_u; + imp->combine_32[PIXMAN_OP_IN] = mmx_combine_in_u; + imp->combine_32[PIXMAN_OP_IN_REVERSE] = mmx_combine_in_reverse_u; + imp->combine_32[PIXMAN_OP_OUT] = mmx_combine_out_u; + imp->combine_32[PIXMAN_OP_OUT_REVERSE] = mmx_combine_out_reverse_u; + imp->combine_32[PIXMAN_OP_ATOP] = mmx_combine_atop_u; + imp->combine_32[PIXMAN_OP_ATOP_REVERSE] = mmx_combine_atop_reverse_u; + imp->combine_32[PIXMAN_OP_XOR] = mmx_combine_xor_u; + imp->combine_32[PIXMAN_OP_ADD] = mmx_combine_add_u; + imp->combine_32[PIXMAN_OP_SATURATE] = mmx_combine_saturate_u; - imp->combine_32_ca[PIXMAN_OP_SRC] = mmxCombineSrcC; - imp->combine_32_ca[PIXMAN_OP_OVER] = mmxCombineOverC; - imp->combine_32_ca[PIXMAN_OP_OVER_REVERSE] = mmxCombineOverReverseC; - imp->combine_32_ca[PIXMAN_OP_IN] = mmxCombineInC; - imp->combine_32_ca[PIXMAN_OP_IN_REVERSE] = mmxCombineInReverseC; - imp->combine_32_ca[PIXMAN_OP_OUT] = mmxCombineOutC; - imp->combine_32_ca[PIXMAN_OP_OUT_REVERSE] = mmxCombineOutReverseC; - imp->combine_32_ca[PIXMAN_OP_ATOP] = mmxCombineAtopC; - imp->combine_32_ca[PIXMAN_OP_ATOP_REVERSE] = mmxCombineAtopReverseC; - imp->combine_32_ca[PIXMAN_OP_XOR] = mmxCombineXorC; - imp->combine_32_ca[PIXMAN_OP_ADD] = mmxCombineAddC; + imp->combine_32_ca[PIXMAN_OP_SRC] = mmx_combine_src_c; + imp->combine_32_ca[PIXMAN_OP_OVER] = mmx_combine_over_c; + imp->combine_32_ca[PIXMAN_OP_OVER_REVERSE] = mmx_combine_over_reverse_c; + imp->combine_32_ca[PIXMAN_OP_IN] = mmx_combine_in_c; + imp->combine_32_ca[PIXMAN_OP_IN_REVERSE] = mmx_combine_in_reverse_c; + imp->combine_32_ca[PIXMAN_OP_OUT] = mmx_combine_out_c; + imp->combine_32_ca[PIXMAN_OP_OUT_REVERSE] = mmx_combine_out_reverse_c; + imp->combine_32_ca[PIXMAN_OP_ATOP] = mmx_combine_atop_c; + imp->combine_32_ca[PIXMAN_OP_ATOP_REVERSE] = mmx_combine_atop_reverse_c; + imp->combine_32_ca[PIXMAN_OP_XOR] = mmx_combine_xor_c; + imp->combine_32_ca[PIXMAN_OP_ADD] = mmx_combine_add_c; imp->composite = mmx_composite; imp->blt = mmx_blt; diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h index 1dc68da..b0056c4 100644 --- a/pixman/pixman-private.h +++ b/pixman/pixman-private.h @@ -202,7 +202,7 @@ _pixman_image_get_scanline_generic_64 (pixman_image_t *pict, int width, uint32_t *buffer, const uint32_t *mask, - uint32_t maskBits); + uint32_t mask_bits); source_pict_class_t _pixman_image_classify (pixman_image_t *image, @@ -320,7 +320,7 @@ _pixman_gradient_walker_pixel (pixman_gradient_walker_t *walker, #define X_FRAC_FIRST(n) (STEP_X_SMALL(n) / 2) #define X_FRAC_LAST(n) (X_FRAC_FIRST(n) + (N_X_FRAC(n) - 1) * STEP_X_SMALL(n)) -#define RenderSamplesX(x,n) ((n) == 1 ? 0 : (pixman_fixed_frac (x) + X_FRAC_FIRST(n)) / STEP_X_SMALL(n)) +#define RENDER_SAMPLES_X(x,n) ((n) == 1 ? 0 : (pixman_fixed_frac (x) + X_FRAC_FIRST(n)) / STEP_X_SMALL(n)) void pixman_rasterize_edges_accessors (pixman_image_t *image, @@ -573,7 +573,7 @@ _pixman_walk_composite_region (pixman_implementation_t *imp, int16_t dest_y, uint16_t width, uint16_t height, - pixman_composite_func_t compositeRect); + pixman_composite_func_t composite_rect); void pixman_expand (uint64_t *dst, const uint32_t *src, pixman_format_code_t, int width); diff --git a/pixman/pixman-radial-gradient.c b/pixman/pixman-radial-gradient.c index ced8213..870c4ce 100644 --- a/pixman/pixman-radial-gradient.c +++ b/pixman/pixman-radial-gradient.c @@ -33,7 +33,7 @@ static void radial_gradient_get_scanline_32 (pixman_image_t *image, int x, int y, int width, uint32_t *buffer, - const uint32_t *mask, uint32_t maskBits) + const uint32_t *mask, uint32_t mask_bits) { /* * In the radial gradient problem we are given two circles (c₁,r₁) and @@ -185,7 +185,7 @@ radial_gradient_get_scanline_32 (pixman_image_t *image, int x, int y, int width, if (affine) { while (buffer < end) { - if (!mask || *mask++ & maskBits) + if (!mask || *mask++ & mask_bits) { double pdx, pdy; double B, C; @@ -222,7 +222,7 @@ radial_gradient_get_scanline_32 (pixman_image_t *image, int x, int y, int width, } else { /* projective */ while (buffer < end) { - if (!mask || *mask++ & maskBits) + if (!mask || *mask++ & mask_bits) { double pdx, pdy; double B, C; diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c index 10db5fd..c061d17 100644 --- a/pixman/pixman-region.c +++ b/pixman/pixman-region.c @@ -51,27 +51,27 @@ SOFTWARE. #include #include "pixman-private.h" -#define PIXREGION_NIL(reg) ((reg)->data && !(reg)->data->numRects) +#define PIXREGION_NIL(reg) ((reg)->data && !(reg)->data->num_rects) /* not a region */ -#define PIXREGION_NAR(reg) ((reg)->data == pixman_brokendata) -#define PIXREGION_NUM_RECTS(reg) ((reg)->data ? (reg)->data->numRects : 1) +#define PIXREGION_NAR(reg) ((reg)->data == pixman_broken_data) +#define PIXREGION_NUM_RECTS(reg) ((reg)->data ? (reg)->data->num_rects : 1) #define PIXREGION_SIZE(reg) ((reg)->data ? (reg)->data->size : 0) #define PIXREGION_RECTS(reg) ((reg)->data ? (box_type_t *)((reg)->data + 1) \ : &(reg)->extents) #define PIXREGION_BOXPTR(reg) ((box_type_t *)((reg)->data + 1)) #define PIXREGION_BOX(reg,i) (&PIXREGION_BOXPTR(reg)[i]) -#define PIXREGION_TOP(reg) PIXREGION_BOX(reg, (reg)->data->numRects) -#define PIXREGION_END(reg) PIXREGION_BOX(reg, (reg)->data->numRects - 1) +#define PIXREGION_TOP(reg) PIXREGION_BOX(reg, (reg)->data->num_rects) +#define PIXREGION_END(reg) PIXREGION_BOX(reg, (reg)->data->num_rects - 1) #define GOOD(reg) assert(PREFIX(_selfcheck) (reg)) -static const box_type_t PREFIX(_emptyBox_) = {0, 0, 0, 0}; -static const region_data_type_t PREFIX(_emptyData_) = {0, 0}; -static const region_data_type_t PREFIX(_brokendata_) = {0, 0}; +static const box_type_t PREFIX(_empty_box_) = {0, 0, 0, 0}; +static const region_data_type_t PREFIX(_empty_data_) = {0, 0}; +static const region_data_type_t PREFIX(_broken_data_) = {0, 0}; -static box_type_t *pixman_region_emptyBox = (box_type_t *)&PREFIX(_emptyBox_); -static region_data_type_t *pixman_region_emptyData = (region_data_type_t *)&PREFIX(_emptyData_); -static region_data_type_t *pixman_brokendata = (region_data_type_t *)&PREFIX(_brokendata_); +static box_type_t *pixman_region_empty_box = (box_type_t *)&PREFIX(_empty_box_); +static region_data_type_t *pixman_region_empty_data = (region_data_type_t *)&PREFIX(_empty_data_); +static region_data_type_t *pixman_broken_data = (region_data_type_t *)&PREFIX(_broken_data_); static pixman_bool_t pixman_break (region_type_t *region); @@ -118,7 +118,7 @@ pixman_break (region_type_t *region); * Adam de Boor wrote most of the original region code. Joel McCormack * substantially modified or rewrote most of the core arithmetic routines, and * added pixman_region_validate in order to support several speed improvements to - * pixman_region_validateTree. Bob Scheifler changed the representation to be more + * pixman_region_validate_tree. Bob Scheifler changed the representation to be more * compact when empty or a single rectangle, and did a bunch of gratuitous * reformatting. Carl Worth did further gratuitous reformatting while re-merging * the server and client region code into libpixregion. @@ -171,11 +171,11 @@ alloc_data(size_t n) #define FREE_DATA(reg) if ((reg)->data && (reg)->data->size) free((reg)->data) #define RECTALLOC_BAIL(region,n,bail) \ -if (!(region)->data || (((region)->data->numRects + (n)) > (region)->data->size)) \ +if (!(region)->data || (((region)->data->num_rects + (n)) > (region)->data->size)) \ if (!pixman_rect_alloc(region, n)) { goto bail; } #define RECTALLOC(region,n) \ -if (!(region)->data || (((region)->data->numRects + (n)) > (region)->data->size)) \ +if (!(region)->data || (((region)->data->num_rects + (n)) > (region)->data->size)) \ if (!pixman_rect_alloc(region, n)) { return FALSE; } #define ADDRECT(next_rect,nx1,ny1,nx2,ny2) \ @@ -189,30 +189,30 @@ if (!(region)->data || (((region)->data->numRects + (n)) > (region)->data->size) #define NEWRECT(region,next_rect,nx1,ny1,nx2,ny2) \ { \ - if (!(region)->data || ((region)->data->numRects == (region)->data->size))\ + if (!(region)->data || ((region)->data->num_rects == (region)->data->size))\ { \ if (!pixman_rect_alloc(region, 1)) \ return FALSE; \ next_rect = PIXREGION_TOP(region); \ } \ ADDRECT(next_rect,nx1,ny1,nx2,ny2); \ - region->data->numRects++; \ - assert(region->data->numRects<=region->data->size); \ + region->data->num_rects++; \ + assert(region->data->num_rects<=region->data->size); \ } -#define DOWNSIZE(reg,numRects) \ - if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \ +#define DOWNSIZE(reg,num_rects) \ + if (((num_rects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \ { \ - region_data_type_t * NewData; \ - size_t data_size = PIXREGION_SZOF(numRects); \ + region_data_type_t * new_data; \ + size_t data_size = PIXREGION_SZOF(num_rects); \ if (!data_size) \ - NewData = NULL; \ + new_data = NULL; \ else \ - NewData = (region_data_type_t *)realloc((reg)->data, data_size); \ - if (NewData) \ + new_data = (region_data_type_t *)realloc((reg)->data, data_size); \ + if (new_data) \ { \ - NewData->size = (numRects); \ - (reg)->data = NewData; \ + new_data->size = (num_rects); \ + (reg)->data = new_data; \ } \ } @@ -267,8 +267,8 @@ PREFIX(_print) (rgn) PIXMAN_EXPORT void PREFIX(_init) (region_type_t *region) { - region->extents = *pixman_region_emptyBox; - region->data = pixman_region_emptyData; + region->extents = *pixman_region_empty_box; + region->data = pixman_region_empty_data; } PIXMAN_EXPORT void @@ -316,8 +316,8 @@ static pixman_bool_t pixman_break (region_type_t *region) { FREE_DATA (region); - region->extents = *pixman_region_emptyBox; - region->data = pixman_brokendata; + region->extents = *pixman_region_empty_box; + region->data = pixman_broken_data; return FALSE; } @@ -332,7 +332,7 @@ pixman_rect_alloc (region_type_t * region, int n) region->data = alloc_data(n); if (!region->data) return pixman_break (region); - region->data->numRects = 1; + region->data->num_rects = 1; *PIXREGION_BOXPTR(region) = region->extents; } else if (!region->data->size) @@ -340,18 +340,18 @@ pixman_rect_alloc (region_type_t * region, int n) region->data = alloc_data(n); if (!region->data) return pixman_break (region); - region->data->numRects = 0; + region->data->num_rects = 0; } else { size_t data_size; if (n == 1) { - n = region->data->numRects; + n = region->data->num_rects; if (n > 500) /* XXX pick numbers out of a hat */ n = 250; } - n += region->data->numRects; + n += region->data->num_rects; data_size = PIXREGION_SZOF(n); if (!data_size) data = NULL; @@ -379,17 +379,17 @@ PREFIX(_copy) (region_type_t *dst, region_type_t *src) dst->data = src->data; return TRUE; } - if (!dst->data || (dst->data->size < src->data->numRects)) + if (!dst->data || (dst->data->size < src->data->num_rects)) { FREE_DATA(dst); - dst->data = alloc_data(src->data->numRects); + dst->data = alloc_data(src->data->num_rects); if (!dst->data) return pixman_break (dst); - dst->data->size = src->data->numRects; + dst->data->size = src->data->num_rects; } - dst->data->numRects = src->data->numRects; + dst->data->num_rects = src->data->num_rects; memmove((char *)PIXREGION_BOXPTR(dst),(char *)PIXREGION_BOXPTR(src), - dst->data->numRects * sizeof(box_type_t)); + dst->data->num_rects * sizeof(box_type_t)); return TRUE; } @@ -411,35 +411,35 @@ PREFIX(_copy) (region_type_t *dst, region_type_t *src) * If coalescing takes place: * - rectangles in the previous band will have their y2 fields * altered. - * - region->data->numRects will be decreased. + * - region->data->num_rects will be decreased. * *----------------------------------------------------------------------- */ static inline int pixman_coalesce ( region_type_t * region, /* Region to coalesce */ - int prevStart, /* Index of start of previous band */ - int curStart) /* Index of start of current band */ + int prev_start, /* Index of start of previous band */ + int cur_start) /* Index of start of current band */ { - box_type_t * prevBox; /* Current box in previous band */ - box_type_t * curBox; /* Current box in current band */ - int numRects; /* Number rectangles in both bands */ + box_type_t * prev_box; /* Current box in previous band */ + box_type_t * cur_box; /* Current box in current band */ + int num_rects; /* Number rectangles in both bands */ int y2; /* Bottom of current band */ /* * Figure out how many rectangles are in the band. */ - numRects = curStart - prevStart; - assert(numRects == region->data->numRects - curStart); + num_rects = cur_start - prev_start; + assert(num_rects == region->data->num_rects - cur_start); - if (!numRects) return curStart; + if (!num_rects) return cur_start; /* * The bands may only be coalesced if the bottom of the previous * matches the top scanline of the current. */ - prevBox = PIXREGION_BOX(region, prevStart); - curBox = PIXREGION_BOX(region, curStart); - if (prevBox->y2 != curBox->y1) return curStart; + prev_box = PIXREGION_BOX(region, prev_start); + cur_box = PIXREGION_BOX(region, cur_start); + if (prev_box->y2 != cur_box->y1) return cur_start; /* * Make sure the bands have boxes in the same places. This @@ -447,43 +447,43 @@ pixman_coalesce ( * cover the most area possible. I.e. two boxes in a band must * have some horizontal space between them. */ - y2 = curBox->y2; + y2 = cur_box->y2; do { - if ((prevBox->x1 != curBox->x1) || (prevBox->x2 != curBox->x2)) { - return (curStart); + if ((prev_box->x1 != cur_box->x1) || (prev_box->x2 != cur_box->x2)) { + return (cur_start); } - prevBox++; - curBox++; - numRects--; - } while (numRects); + prev_box++; + cur_box++; + num_rects--; + } while (num_rects); /* * The bands may be merged, so set the bottom y of each box * in the previous band to the bottom y of the current band. */ - numRects = curStart - prevStart; - region->data->numRects -= numRects; + num_rects = cur_start - prev_start; + region->data->num_rects -= num_rects; do { - prevBox--; - prevBox->y2 = y2; - numRects--; - } while (numRects); - return prevStart; + prev_box--; + prev_box->y2 = y2; + num_rects--; + } while (num_rects); + return prev_start; } /* Quicky macro to avoid trivial reject procedure calls to pixman_coalesce */ -#define COALESCE(newReg, prevBand, curBand) \ - if (curBand - prevBand == newReg->data->numRects - curBand) { \ - prevBand = pixman_coalesce(newReg, prevBand, curBand); \ +#define COALESCE(new_reg, prev_band, cur_band) \ + if (cur_band - prev_band == new_reg->data->num_rects - cur_band) { \ + prev_band = pixman_coalesce(new_reg, prev_band, cur_band); \ } else { \ - prevBand = curBand; \ + prev_band = cur_band; \ } /*- *----------------------------------------------------------------------- - * pixman_region_appendNonO -- + * pixman_region_append_non_o -- * Handle a non-overlapping band for the union and subtract operations. * Just adds the (top/bottom-clipped) rectangles into the region. * Doesn't have to check for subsumption or anything. @@ -492,58 +492,58 @@ pixman_coalesce ( * None. * * Side Effects: - * region->data->numRects is incremented and the rectangles overwritten + * region->data->num_rects is incremented and the rectangles overwritten * with the rectangles we're passed. * *----------------------------------------------------------------------- */ static inline pixman_bool_t -pixman_region_appendNonO ( +pixman_region_append_non_o ( region_type_t * region, box_type_t * r, - box_type_t * rEnd, + box_type_t * r_end, int y1, int y2) { box_type_t * next_rect; - int newRects; + int new_rects; - newRects = rEnd - r; + new_rects = r_end - r; assert(y1 < y2); - assert(newRects != 0); + assert(new_rects != 0); /* Make sure we have enough space for all rectangles to be added */ - RECTALLOC(region, newRects); + RECTALLOC(region, new_rects); next_rect = PIXREGION_TOP(region); - region->data->numRects += newRects; + region->data->num_rects += new_rects; do { assert(r->x1 < r->x2); ADDRECT(next_rect, r->x1, y1, r->x2, y2); r++; - } while (r != rEnd); + } while (r != r_end); return TRUE; } -#define FIND_BAND(r, rBandEnd, rEnd, ry1) \ +#define FIND_BAND(r, r_band_end, r_end, ry1) \ { \ ry1 = r->y1; \ - rBandEnd = r+1; \ - while ((rBandEnd != rEnd) && (rBandEnd->y1 == ry1)) { \ - rBandEnd++; \ + r_band_end = r+1; \ + while ((r_band_end != r_end) && (r_band_end->y1 == ry1)) { \ + r_band_end++; \ } \ } -#define APPEND_REGIONS(newReg, r, rEnd) \ +#define APPEND_REGIONS(new_reg, r, r_end) \ { \ - int newRects; \ - if ((newRects = rEnd - r)) { \ - RECTALLOC_BAIL(newReg, newRects, bail); \ - memmove((char *)PIXREGION_TOP(newReg),(char *)r, \ - newRects * sizeof(box_type_t)); \ - newReg->data->numRects += newRects; \ + int new_rects; \ + if ((new_rects = r_end - r)) { \ + RECTALLOC_BAIL(new_reg, new_rects, bail); \ + memmove((char *)PIXREGION_TOP(new_reg),(char *)r, \ + new_rects * sizeof(box_type_t)); \ + new_reg->data->num_rects += new_rects; \ } \ } @@ -559,15 +559,15 @@ pixman_region_appendNonO ( * * Side Effects: * The new region is overwritten. - * overlap set to TRUE if overlapFunc ever returns TRUE. + * overlap set to TRUE if overlap_func ever returns TRUE. * * Notes: * The idea behind this function is to view the two regions as sets. * Together they cover a rectangle of area that this function divides * into horizontal bands where points are covered only by one region - * or by both. For the first case, the nonOverlapFunc is called with + * or by both. For the first case, the non_overlap_func is called with * each the band and the band's upper and lower extents. For the - * second, the overlapFunc is called to process the entire band. It + * second, the overlap_func is called to process the entire band. It * is responsible for clipping the rectangles in the band, though * this function provides the boundaries. * At the end of each band, the new region is coalesced, if possible, @@ -576,91 +576,91 @@ pixman_region_appendNonO ( *----------------------------------------------------------------------- */ -typedef pixman_bool_t (*OverlapProcPtr)( +typedef pixman_bool_t (*overlap_proc_ptr)( region_type_t *region, box_type_t *r1, - box_type_t *r1End, + box_type_t *r1_end, box_type_t *r2, - box_type_t *r2End, + box_type_t *r2_end, int y1, int y2, int *overlap); static pixman_bool_t pixman_op( - region_type_t *newReg, /* Place to store result */ + region_type_t *new_reg, /* Place to store result */ region_type_t * reg1, /* First region in operation */ region_type_t * reg2, /* 2d region in operation */ - OverlapProcPtr overlapFunc, /* Function to call for over- + overlap_proc_ptr overlap_func, /* Function to call for over- * lapping bands */ - int appendNon1, /* Append non-overlapping bands */ + int append_non1, /* Append non-overlapping bands */ /* in region 1 ? */ - int appendNon2, /* Append non-overlapping bands */ + int append_non2, /* Append non-overlapping bands */ /* in region 2 ? */ int *overlap) { box_type_t * r1; /* Pointer into first region */ box_type_t * r2; /* Pointer into 2d region */ - box_type_t * r1End; /* End of 1st region */ - box_type_t * r2End; /* End of 2d region */ + box_type_t * r1_end; /* End of 1st region */ + box_type_t * r2_end; /* End of 2d region */ int ybot; /* Bottom of intersection */ int ytop; /* Top of intersection */ - region_data_type_t * oldData; /* Old data for newReg */ - int prevBand; /* Index of start of - * previous band in newReg */ - int curBand; /* Index of start of current - * band in newReg */ - box_type_t * r1BandEnd; /* End of current band in r1 */ - box_type_t * r2BandEnd; /* End of current band in r2 */ + region_data_type_t * old_data; /* Old data for new_reg */ + int prev_band; /* Index of start of + * previous band in new_reg */ + int cur_band; /* Index of start of current + * band in new_reg */ + box_type_t * r1_band_end; /* End of current band in r1 */ + box_type_t * r2_band_end; /* End of current band in r2 */ int top; /* Top of non-overlapping band */ int bot; /* Bottom of non-overlapping band*/ int r1y1; /* Temps for r1->y1 and r2->y1 */ int r2y1; - int newSize; - int numRects; + int new_size; + int num_rects; /* * Break any region computed from a broken region */ if (PIXREGION_NAR (reg1) || PIXREGION_NAR(reg2)) - return pixman_break (newReg); + return pixman_break (new_reg); /* * Initialization: - * set r1, r2, r1End and r2End appropriately, save the rectangles + * set r1, r2, r1_end and r2_end appropriately, save the rectangles * of the destination region until the end in case it's one of * the two source regions, then mark the "new" region empty, allocating * another array of rectangles for it to use. */ r1 = PIXREGION_RECTS(reg1); - newSize = PIXREGION_NUM_RECTS(reg1); - r1End = r1 + newSize; - numRects = PIXREGION_NUM_RECTS(reg2); + new_size = PIXREGION_NUM_RECTS(reg1); + r1_end = r1 + new_size; + num_rects = PIXREGION_NUM_RECTS(reg2); r2 = PIXREGION_RECTS(reg2); - r2End = r2 + numRects; - assert(r1 != r1End); - assert(r2 != r2End); + r2_end = r2 + num_rects; + assert(r1 != r1_end); + assert(r2 != r2_end); - oldData = (region_data_type_t *)NULL; - if (((newReg == reg1) && (newSize > 1)) || - ((newReg == reg2) && (numRects > 1))) + old_data = (region_data_type_t *)NULL; + if (((new_reg == reg1) && (new_size > 1)) || + ((new_reg == reg2) && (num_rects > 1))) { - oldData = newReg->data; - newReg->data = pixman_region_emptyData; + old_data = new_reg->data; + new_reg->data = pixman_region_empty_data; } /* guess at new size */ - if (numRects > newSize) - newSize = numRects; - newSize <<= 1; - if (!newReg->data) - newReg->data = pixman_region_emptyData; - else if (newReg->data->size) - newReg->data->numRects = 0; - if (newSize > newReg->data->size) { - if (!pixman_rect_alloc(newReg, newSize)) { - if (oldData) - free (oldData); + if (num_rects > new_size) + new_size = num_rects; + new_size <<= 1; + if (!new_reg->data) + new_reg->data = pixman_region_empty_data; + else if (new_reg->data->size) + new_reg->data->num_rects = 0; + if (new_size > new_reg->data->size) { + if (!pixman_rect_alloc(new_reg, new_size)) { + if (old_data) + free (old_data); return FALSE; } } @@ -682,29 +682,29 @@ pixman_op( ybot = MIN(r1->y1, r2->y1); /* - * prevBand serves to mark the start of the previous band so rectangles + * prev_band serves to mark the start of the previous band so rectangles * can be coalesced into larger rectangles. qv. pixman_coalesce, above. - * In the beginning, there is no previous band, so prevBand == curBand - * (curBand is set later on, of course, but the first band will always - * start at index 0). prevBand and curBand must be indices because of + * In the beginning, there is no previous band, so prev_band == cur_band + * (cur_band is set later on, of course, but the first band will always + * start at index 0). prev_band and cur_band must be indices because of * the possible expansion, and resultant moving, of the new region's * array of rectangles. */ - prevBand = 0; + prev_band = 0; do { /* * This algorithm proceeds one source-band (as opposed to a * destination band, which is determined by where the two regions - * intersect) at a time. r1BandEnd and r2BandEnd serve to mark the + * intersect) at a time. r1_band_end and r2_band_end serve to mark the * rectangle after the last one in the current band for their * respective regions. */ - assert(r1 != r1End); - assert(r2 != r2End); + assert(r1 != r1_end); + assert(r2 != r2_end); - FIND_BAND(r1, r1BandEnd, r1End, r1y1); - FIND_BAND(r2, r2BandEnd, r2End, r2y1); + FIND_BAND(r1, r1_band_end, r1_end, r1y1); + FIND_BAND(r2, r2_band_end, r2_end, r2y1); /* * First handle the band that doesn't intersect, if any. @@ -715,26 +715,26 @@ pixman_op( * the other, this entire loop will be passed through n times. */ if (r1y1 < r2y1) { - if (appendNon1) { + if (append_non1) { top = MAX(r1y1, ybot); bot = MIN(r1->y2, r2y1); if (top != bot) { - curBand = newReg->data->numRects; - if (!pixman_region_appendNonO(newReg, r1, r1BandEnd, top, bot)) + cur_band = new_reg->data->num_rects; + if (!pixman_region_append_non_o(new_reg, r1, r1_band_end, top, bot)) goto bail; - COALESCE(newReg, prevBand, curBand); + COALESCE(new_reg, prev_band, cur_band); } } ytop = r2y1; } else if (r2y1 < r1y1) { - if (appendNon2) { + if (append_non2) { top = MAX(r2y1, ybot); bot = MIN(r2->y2, r1y1); if (top != bot) { - curBand = newReg->data->numRects; - if (!pixman_region_appendNonO(newReg, r2, r2BandEnd, top, bot)) + cur_band = new_reg->data->num_rects; + if (!pixman_region_append_non_o(new_reg, r2, r2_band_end, top, bot)) goto bail; - COALESCE(newReg, prevBand, curBand); + COALESCE(new_reg, prev_band, cur_band); } } ytop = r1y1; @@ -748,24 +748,24 @@ pixman_op( */ ybot = MIN(r1->y2, r2->y2); if (ybot > ytop) { - curBand = newReg->data->numRects; - if (!(* overlapFunc)(newReg, - r1, r1BandEnd, - r2, r2BandEnd, + cur_band = new_reg->data->num_rects; + if (!(* overlap_func)(new_reg, + r1, r1_band_end, + r2, r2_band_end, ytop, ybot, overlap)) goto bail; - COALESCE(newReg, prevBand, curBand); + COALESCE(new_reg, prev_band, cur_band); } /* * If we've finished with a band (y2 == ybot) we skip forward * in the region to the next band. */ - if (r1->y2 == ybot) r1 = r1BandEnd; - if (r2->y2 == ybot) r2 = r2BandEnd; + if (r1->y2 == ybot) r1 = r1_band_end; + if (r2->y2 == ybot) r2 = r2_band_end; - } while (r1 != r1End && r2 != r2End); + } while (r1 != r1_end && r2 != r2_end); /* * Deal with whichever region (if any) still has rectangles left. @@ -775,56 +775,56 @@ pixman_op( * regardless of how many bands, into one final append to the list. */ - if ((r1 != r1End) && appendNon1) { - /* Do first nonOverlap1Func call, which may be able to coalesce */ - FIND_BAND(r1, r1BandEnd, r1End, r1y1); - curBand = newReg->data->numRects; - if (!pixman_region_appendNonO(newReg, - r1, r1BandEnd, + if ((r1 != r1_end) && append_non1) { + /* Do first non_overlap1Func call, which may be able to coalesce */ + FIND_BAND(r1, r1_band_end, r1_end, r1y1); + cur_band = new_reg->data->num_rects; + if (!pixman_region_append_non_o(new_reg, + r1, r1_band_end, MAX(r1y1, ybot), r1->y2)) goto bail; - COALESCE(newReg, prevBand, curBand); + COALESCE(new_reg, prev_band, cur_band); /* Just append the rest of the boxes */ - APPEND_REGIONS(newReg, r1BandEnd, r1End); + APPEND_REGIONS(new_reg, r1_band_end, r1_end); - } else if ((r2 != r2End) && appendNon2) { - /* Do first nonOverlap2Func call, which may be able to coalesce */ - FIND_BAND(r2, r2BandEnd, r2End, r2y1); - curBand = newReg->data->numRects; - if (!pixman_region_appendNonO(newReg, - r2, r2BandEnd, + } else if ((r2 != r2_end) && append_non2) { + /* Do first non_overlap2Func call, which may be able to coalesce */ + FIND_BAND(r2, r2_band_end, r2_end, r2y1); + cur_band = new_reg->data->num_rects; + if (!pixman_region_append_non_o(new_reg, + r2, r2_band_end, MAX(r2y1, ybot), r2->y2)) goto bail; - COALESCE(newReg, prevBand, curBand); + COALESCE(new_reg, prev_band, cur_band); /* Append rest of boxes */ - APPEND_REGIONS(newReg, r2BandEnd, r2End); + APPEND_REGIONS(new_reg, r2_band_end, r2_end); } - if (oldData) - free(oldData); + if (old_data) + free(old_data); - if (!(numRects = newReg->data->numRects)) + if (!(num_rects = new_reg->data->num_rects)) { - FREE_DATA(newReg); - newReg->data = pixman_region_emptyData; + FREE_DATA(new_reg); + new_reg->data = pixman_region_empty_data; } - else if (numRects == 1) + else if (num_rects == 1) { - newReg->extents = *PIXREGION_BOXPTR(newReg); - FREE_DATA(newReg); - newReg->data = (region_data_type_t *)NULL; + new_reg->extents = *PIXREGION_BOXPTR(new_reg); + FREE_DATA(new_reg); + new_reg->data = (region_data_type_t *)NULL; } else { - DOWNSIZE(newReg, numRects); + DOWNSIZE(new_reg, num_rects); } return TRUE; bail: - if (oldData) - free(oldData); - return pixman_break (newReg); + if (old_data) + free(old_data); + return pixman_break (new_reg); } /*- @@ -845,7 +845,7 @@ bail: static void pixman_set_extents (region_type_t *region) { - box_type_t *box, *boxEnd; + box_type_t *box, *box_end; if (!region->data) return; @@ -857,22 +857,22 @@ pixman_set_extents (region_type_t *region) } box = PIXREGION_BOXPTR(region); - boxEnd = PIXREGION_END(region); + box_end = PIXREGION_END(region); /* * Since box is the first rectangle in the region, it must have the - * smallest y1 and since boxEnd is the last rectangle in the region, + * smallest y1 and since box_end is the last rectangle in the region, * it must have the largest y2, because of banding. Initialize x1 and - * x2 from box and boxEnd, resp., as GOOD things to initialize them + * x2 from box and box_end, resp., as good things to initialize them * to... */ region->extents.x1 = box->x1; region->extents.y1 = box->y1; - region->extents.x2 = boxEnd->x2; - region->extents.y2 = boxEnd->y2; + region->extents.x2 = box_end->x2; + region->extents.y2 = box_end->y2; assert(region->extents.y1 < region->extents.y2); - while (box <= boxEnd) { + while (box <= box_end) { if (box->x1 < region->extents.x1) region->extents.x1 = box->x1; if (box->x2 > region->extents.x2) @@ -888,7 +888,7 @@ pixman_set_extents (region_type_t *region) *====================================================================*/ /*- *----------------------------------------------------------------------- - * pixman_region_intersectO -- + * pixman_region_intersect_o -- * Handle an overlapping band for pixman_region_intersect. * * Results: @@ -901,11 +901,11 @@ pixman_set_extents (region_type_t *region) */ /*ARGSUSED*/ static pixman_bool_t -pixman_region_intersectO (region_type_t *region, +pixman_region_intersect_o (region_type_t *region, box_type_t *r1, - box_type_t *r1End, + box_type_t *r1_end, box_type_t *r2, - box_type_t *r2End, + box_type_t *r2_end, int y1, int y2, int *overlap) @@ -917,7 +917,7 @@ pixman_region_intersectO (region_type_t *region, next_rect = PIXREGION_TOP(region); assert(y1 < y2); - assert(r1 != r1End && r2 != r2End); + assert(r1 != r1_end && r2 != r2_end); do { x1 = MAX(r1->x1, r2->x1); @@ -941,68 +941,68 @@ pixman_region_intersectO (region_type_t *region, if (r2->x2 == x2) { r2++; } - } while ((r1 != r1End) && (r2 != r2End)); + } while ((r1 != r1_end) && (r2 != r2_end)); return TRUE; } PIXMAN_EXPORT pixman_bool_t -PREFIX(_intersect) (region_type_t * newReg, +PREFIX(_intersect) (region_type_t * new_reg, region_type_t * reg1, region_type_t * reg2) { GOOD(reg1); GOOD(reg2); - GOOD(newReg); + GOOD(new_reg); /* check for trivial reject */ if (PIXREGION_NIL(reg1) || PIXREGION_NIL(reg2) || !EXTENTCHECK(®1->extents, ®2->extents)) { /* Covers about 20% of all cases */ - FREE_DATA(newReg); - newReg->extents.x2 = newReg->extents.x1; - newReg->extents.y2 = newReg->extents.y1; + FREE_DATA(new_reg); + new_reg->extents.x2 = new_reg->extents.x1; + new_reg->extents.y2 = new_reg->extents.y1; if (PIXREGION_NAR(reg1) || PIXREGION_NAR(reg2)) { - newReg->data = pixman_brokendata; + new_reg->data = pixman_broken_data; return FALSE; } else - newReg->data = pixman_region_emptyData; + new_reg->data = pixman_region_empty_data; } else if (!reg1->data && !reg2->data) { /* Covers about 80% of cases that aren't trivially rejected */ - newReg->extents.x1 = MAX(reg1->extents.x1, reg2->extents.x1); - newReg->extents.y1 = MAX(reg1->extents.y1, reg2->extents.y1); - newReg->extents.x2 = MIN(reg1->extents.x2, reg2->extents.x2); - newReg->extents.y2 = MIN(reg1->extents.y2, reg2->extents.y2); - FREE_DATA(newReg); - newReg->data = (region_data_type_t *)NULL; + new_reg->extents.x1 = MAX(reg1->extents.x1, reg2->extents.x1); + new_reg->extents.y1 = MAX(reg1->extents.y1, reg2->extents.y1); + new_reg->extents.x2 = MIN(reg1->extents.x2, reg2->extents.x2); + new_reg->extents.y2 = MIN(reg1->extents.y2, reg2->extents.y2); + FREE_DATA(new_reg); + new_reg->data = (region_data_type_t *)NULL; } else if (!reg2->data && SUBSUMES(®2->extents, ®1->extents)) { - return PREFIX(_copy) (newReg, reg1); + return PREFIX(_copy) (new_reg, reg1); } else if (!reg1->data && SUBSUMES(®1->extents, ®2->extents)) { - return PREFIX(_copy) (newReg, reg2); + return PREFIX(_copy) (new_reg, reg2); } else if (reg1 == reg2) { - return PREFIX(_copy) (newReg, reg1); + return PREFIX(_copy) (new_reg, reg1); } else { /* General purpose intersection */ int overlap; /* result ignored */ - if (!pixman_op(newReg, reg1, reg2, pixman_region_intersectO, FALSE, FALSE, + if (!pixman_op(new_reg, reg1, reg2, pixman_region_intersect_o, FALSE, FALSE, &overlap)) return FALSE; - pixman_set_extents(newReg); + pixman_set_extents(new_reg); } - GOOD(newReg); + GOOD(new_reg); return(TRUE); } @@ -1027,7 +1027,7 @@ PREFIX(_intersect) (region_type_t * newReg, /*- *----------------------------------------------------------------------- - * pixman_region_unionO -- + * pixman_region_union_o -- * Handle an overlapping band for the union operation. Picks the * left-most rectangle each time and merges it into the region. * @@ -1041,12 +1041,12 @@ PREFIX(_intersect) (region_type_t * newReg, *----------------------------------------------------------------------- */ static pixman_bool_t -pixman_region_unionO ( +pixman_region_union_o ( region_type_t *region, box_type_t *r1, - box_type_t *r1End, + box_type_t *r1_end, box_type_t *r2, - box_type_t *r2End, + box_type_t *r2_end, int y1, int y2, int *overlap) @@ -1056,7 +1056,7 @@ pixman_region_unionO ( int x2; assert (y1 < y2); - assert(r1 != r1End && r2 != r2End); + assert(r1 != r1_end && r2 != r2_end); next_rect = PIXREGION_TOP(region); @@ -1073,25 +1073,25 @@ pixman_region_unionO ( x2 = r2->x2; r2++; } - while (r1 != r1End && r2 != r2End) + while (r1 != r1_end && r2 != r2_end) { if (r1->x1 < r2->x1) MERGERECT(r1) else MERGERECT(r2); } /* Finish off whoever (if any) is left */ - if (r1 != r1End) + if (r1 != r1_end) { do { MERGERECT(r1); - } while (r1 != r1End); + } while (r1 != r1_end); } - else if (r2 != r2End) + else if (r2 != r2_end) { do { MERGERECT(r2); - } while (r2 != r2End); + } while (r2 != r2_end); } /* Add current rectangle */ @@ -1123,7 +1123,7 @@ PREFIX(_union_rect) (region_type_t *dest, } PIXMAN_EXPORT pixman_bool_t -PREFIX(_union) (region_type_t *newReg, +PREFIX(_union) (region_type_t *new_reg, region_type_t *reg1, region_type_t *reg2) { @@ -1134,7 +1134,7 @@ PREFIX(_union) (region_type_t *newReg, */ GOOD(reg1); GOOD(reg2); - GOOD(newReg); + GOOD(new_reg); /* checks all the simple cases */ /* @@ -1142,7 +1142,7 @@ PREFIX(_union) (region_type_t *newReg, */ if (reg1 == reg2) { - return PREFIX(_copy) (newReg, reg1); + return PREFIX(_copy) (new_reg, reg1); } /* @@ -1151,9 +1151,9 @@ PREFIX(_union) (region_type_t *newReg, if (PIXREGION_NIL(reg1)) { if (PIXREGION_NAR(reg1)) - return pixman_break (newReg); - if (newReg != reg2) - return PREFIX(_copy) (newReg, reg2); + return pixman_break (new_reg); + if (new_reg != reg2) + return PREFIX(_copy) (new_reg, reg2); return TRUE; } @@ -1163,9 +1163,9 @@ PREFIX(_union) (region_type_t *newReg, if (PIXREGION_NIL(reg2)) { if (PIXREGION_NAR(reg2)) - return pixman_break (newReg); - if (newReg != reg1) - return PREFIX(_copy) (newReg, reg1); + return pixman_break (new_reg); + if (new_reg != reg1) + return PREFIX(_copy) (new_reg, reg1); return TRUE; } @@ -1174,8 +1174,8 @@ PREFIX(_union) (region_type_t *newReg, */ if (!reg1->data && SUBSUMES(®1->extents, ®2->extents)) { - if (newReg != reg1) - return PREFIX(_copy) (newReg, reg1); + if (new_reg != reg1) + return PREFIX(_copy) (new_reg, reg1); return TRUE; } @@ -1184,19 +1184,19 @@ PREFIX(_union) (region_type_t *newReg, */ if (!reg2->data && SUBSUMES(®2->extents, ®1->extents)) { - if (newReg != reg2) - return PREFIX(_copy) (newReg, reg2); + if (new_reg != reg2) + return PREFIX(_copy) (new_reg, reg2); return TRUE; } - if (!pixman_op(newReg, reg1, reg2, pixman_region_unionO, TRUE, TRUE, &overlap)) + if (!pixman_op(new_reg, reg1, reg2, pixman_region_union_o, TRUE, TRUE, &overlap)) return FALSE; - newReg->extents.x1 = MIN(reg1->extents.x1, reg2->extents.x1); - newReg->extents.y1 = MIN(reg1->extents.y1, reg2->extents.y1); - newReg->extents.x2 = MAX(reg1->extents.x2, reg2->extents.x2); - newReg->extents.y2 = MAX(reg1->extents.y2, reg2->extents.y2); - GOOD(newReg); + new_reg->extents.x1 = MIN(reg1->extents.x1, reg2->extents.x1); + new_reg->extents.y1 = MIN(reg1->extents.y1, reg2->extents.y1); + new_reg->extents.x2 = MAX(reg1->extents.x2, reg2->extents.x2); + new_reg->extents.y2 = MAX(reg1->extents.y2, reg2->extents.y2); + GOOD(new_reg); return TRUE; } @@ -1213,20 +1213,20 @@ PREFIX(_union) (region_type_t *newReg, } static void -QuickSortRects( +quick_sort_rects( box_type_t rects[], - int numRects) + int num_rects) { int y1; int x1; int i, j; box_type_t *r; - /* Always called with numRects > 1 */ + /* Always called with num_rects > 1 */ do { - if (numRects == 2) + if (num_rects == 2) { if (rects[0].y1 > rects[1].y1 || (rects[0].y1 == rects[1].y1 && rects[0].x1 > rects[1].x1)) @@ -1235,13 +1235,13 @@ QuickSortRects( } /* Choose partition element, stick in location 0 */ - EXCHANGE_RECTS(0, numRects >> 1); + EXCHANGE_RECTS(0, num_rects >> 1); y1 = rects[0].y1; x1 = rects[0].x1; /* Partition array */ i = 0; - j = numRects; + j = num_rects; do { r = &(rects[i]); @@ -1249,7 +1249,7 @@ QuickSortRects( { r++; i++; - } while (i != numRects && + } while (i != num_rects && (r->y1 < y1 || (r->y1 == y1 && r->x1 < x1))); r = &(rects[j]); do @@ -1265,10 +1265,10 @@ QuickSortRects( EXCHANGE_RECTS(0, j); /* Recurse */ - if (numRects-j-1 > 1) - QuickSortRects(&rects[j+1], numRects-j-1); - numRects = j; - } while (numRects > 1); + if (num_rects-j-1 > 1) + quick_sort_rects(&rects[j+1], num_rects-j-1); + num_rects = j; + } while (num_rects > 1); } /*- @@ -1311,22 +1311,22 @@ validate (region_type_t * badreg, /* Descriptor for regions under construction in Step 2. */ typedef struct { region_type_t reg; - int prevBand; - int curBand; - } RegionInfo; + int prev_band; + int cur_band; + } region_info_t; - RegionInfo stack_regions[64]; + region_info_t stack_regions[64]; - int numRects; /* Original numRects for badreg */ - RegionInfo *ri; /* Array of current regions */ - int numRI; /* Number of entries used in ri */ - int sizeRI; /* Number of entries available in ri */ + int num_rects; /* Original num_rects for badreg */ + region_info_t *ri; /* Array of current regions */ + int num_ri; /* Number of entries used in ri */ + int size_ri; /* Number of entries available in ri */ int i; /* Index into rects */ int j; /* Index into ri */ - RegionInfo *rit; /* &ri[j] */ + region_info_t *rit; /* &ri[j] */ region_type_t * reg; /* ri[j].reg */ box_type_t * box; /* Current box in rects */ - box_type_t * riBox; /* Last box in ri[j].reg */ + box_type_t * ri_box; /* Last box in ri[j].reg */ region_type_t * hreg; /* ri[j_half].reg */ pixman_bool_t ret = TRUE; @@ -1336,8 +1336,8 @@ validate (region_type_t * badreg, GOOD(badreg); return TRUE; } - numRects = badreg->data->numRects; - if (!numRects) + num_rects = badreg->data->num_rects; + if (!num_rects) { if (PIXREGION_NAR(badreg)) return FALSE; @@ -1346,37 +1346,37 @@ validate (region_type_t * badreg, } if (badreg->extents.x1 < badreg->extents.x2) { - if ((numRects) == 1) + if ((num_rects) == 1) { FREE_DATA(badreg); badreg->data = (region_data_type_t *) NULL; } else { - DOWNSIZE(badreg, numRects); + DOWNSIZE(badreg, num_rects); } GOOD(badreg); return TRUE; } /* Step 1: Sort the rects array into ascending (y1, x1) order */ - QuickSortRects(PIXREGION_BOXPTR(badreg), numRects); + quick_sort_rects(PIXREGION_BOXPTR(badreg), num_rects); /* Step 2: Scatter the sorted array into the minimum number of regions */ /* Set up the first region to be the first rectangle in badreg */ /* Note that step 2 code will never overflow the ri[0].reg rects array */ ri = stack_regions; - sizeRI = sizeof (stack_regions) / sizeof (stack_regions[0]); - numRI = 1; - ri[0].prevBand = 0; - ri[0].curBand = 0; + size_ri = sizeof (stack_regions) / sizeof (stack_regions[0]); + num_ri = 1; + ri[0].prev_band = 0; + ri[0].cur_band = 0; ri[0].reg = *badreg; box = PIXREGION_BOXPTR(&ri[0].reg); ri[0].reg.extents = *box; - ri[0].reg.data->numRects = 1; - badreg->extents = *pixman_region_emptyBox; - badreg->data = pixman_region_emptyData; + ri[0].reg.data->num_rects = 1; + badreg->extents = *pixman_region_empty_box; + badreg->data = pixman_region_empty_data; /* Now scatter rectangles into the minimum set of valid regions. If the next rectangle to be added to a region would force an existing rectangle @@ -1384,92 +1384,92 @@ validate (region_type_t * badreg, forget it. Try the next region. If it doesn't fit cleanly into any region, make a new one. */ - for (i = numRects; --i > 0;) + for (i = num_rects; --i > 0;) { box++; /* Look for a region to append box to */ - for (j = numRI, rit = ri; --j >= 0; rit++) + for (j = num_ri, rit = ri; --j >= 0; rit++) { reg = &rit->reg; - riBox = PIXREGION_END(reg); + ri_box = PIXREGION_END(reg); - if (box->y1 == riBox->y1 && box->y2 == riBox->y2) + if (box->y1 == ri_box->y1 && box->y2 == ri_box->y2) { - /* box is in same band as riBox. Merge or append it */ - if (box->x1 <= riBox->x2) + /* box is in same band as ri_box. Merge or append it */ + if (box->x1 <= ri_box->x2) { - /* Merge it with riBox */ - if (box->x1 < riBox->x2) *overlap = TRUE; - if (box->x2 > riBox->x2) riBox->x2 = box->x2; + /* Merge it with ri_box */ + if (box->x1 < ri_box->x2) *overlap = TRUE; + if (box->x2 > ri_box->x2) ri_box->x2 = box->x2; } else { RECTALLOC_BAIL(reg, 1, bail); *PIXREGION_TOP(reg) = *box; - reg->data->numRects++; + reg->data->num_rects++; } - goto NextRect; /* So sue me */ + goto next_rect; /* So sue me */ } - else if (box->y1 >= riBox->y2) + else if (box->y1 >= ri_box->y2) { /* Put box into new band */ - if (reg->extents.x2 < riBox->x2) reg->extents.x2 = riBox->x2; + if (reg->extents.x2 < ri_box->x2) reg->extents.x2 = ri_box->x2; if (reg->extents.x1 > box->x1) reg->extents.x1 = box->x1; - COALESCE(reg, rit->prevBand, rit->curBand); - rit->curBand = reg->data->numRects; + COALESCE(reg, rit->prev_band, rit->cur_band); + rit->cur_band = reg->data->num_rects; RECTALLOC_BAIL(reg, 1, bail); *PIXREGION_TOP(reg) = *box; - reg->data->numRects++; - goto NextRect; + reg->data->num_rects++; + goto next_rect; } /* Well, this region was inappropriate. Try the next one. */ } /* for j */ /* Uh-oh. No regions were appropriate. Create a new one. */ - if (sizeRI == numRI) + if (size_ri == num_ri) { size_t data_size; /* Oops, allocate space for new region information */ - sizeRI <<= 1; + size_ri <<= 1; - data_size = sizeRI * sizeof(RegionInfo); - if (data_size / sizeRI != sizeof(RegionInfo)) + data_size = size_ri * sizeof(region_info_t); + if (data_size / size_ri != sizeof(region_info_t)) goto bail; if (ri == stack_regions) { rit = malloc (data_size); if (!rit) goto bail; - memcpy (rit, ri, numRI * sizeof (RegionInfo)); + memcpy (rit, ri, num_ri * sizeof (region_info_t)); } else { - rit = (RegionInfo *) realloc(ri, data_size); + rit = (region_info_t *) realloc(ri, data_size); if (!rit) goto bail; } ri = rit; - rit = &ri[numRI]; + rit = &ri[num_ri]; } - numRI++; - rit->prevBand = 0; - rit->curBand = 0; + num_ri++; + rit->prev_band = 0; + rit->cur_band = 0; rit->reg.extents = *box; rit->reg.data = (region_data_type_t *)NULL; - if (!pixman_rect_alloc(&rit->reg, (i+numRI) / numRI)) /* MUST force allocation */ + if (!pixman_rect_alloc(&rit->reg, (i+num_ri) / num_ri)) /* MUST force allocation */ goto bail; -NextRect: ; +next_rect: ; } /* for i */ /* Make a final pass over each region in order to COALESCE and set extents.x2 and extents.y2 */ - for (j = numRI, rit = ri; --j >= 0; rit++) + for (j = num_ri, rit = ri; --j >= 0; rit++) { reg = &rit->reg; - riBox = PIXREGION_END(reg); - reg->extents.y2 = riBox->y2; - if (reg->extents.x2 < riBox->x2) reg->extents.x2 = riBox->x2; - COALESCE(reg, rit->prevBand, rit->curBand); - if (reg->data->numRects == 1) /* keep unions happy below */ + ri_box = PIXREGION_END(reg); + reg->extents.y2 = ri_box->y2; + if (reg->extents.x2 < ri_box->x2) reg->extents.x2 = ri_box->x2; + COALESCE(reg, rit->prev_band, rit->cur_band); + if (reg->data->num_rects == 1) /* keep unions happy below */ { FREE_DATA(reg); reg->data = (region_data_type_t *)NULL; @@ -1477,14 +1477,14 @@ NextRect: ; } /* Step 3: Union all regions into a single region */ - while (numRI > 1) + while (num_ri > 1) { - int half = numRI/2; - for (j = numRI & 1; j < (half + (numRI & 1)); j++) + int half = num_ri/2; + for (j = num_ri & 1; j < (half + (num_ri & 1)); j++) { reg = &ri[j].reg; hreg = &ri[j+half].reg; - if (!pixman_op(reg, reg, hreg, pixman_region_unionO, TRUE, TRUE, overlap)) + if (!pixman_op(reg, reg, hreg, pixman_region_union_o, TRUE, TRUE, overlap)) ret = FALSE; if (hreg->extents.x1 < reg->extents.x1) reg->extents.x1 = hreg->extents.x1; @@ -1496,7 +1496,7 @@ NextRect: ; reg->extents.y2 = hreg->extents.y2; FREE_DATA(hreg); } - numRI -= half; + num_ri -= half; if (!ret) goto bail; } @@ -1506,7 +1506,7 @@ NextRect: ; GOOD(badreg); return ret; bail: - for (i = 0; i < numRI; i++) + for (i = 0; i < num_ri; i++) FREE_DATA(&ri[i].reg); if (ri != stack_regions) free (ri); @@ -1520,7 +1520,7 @@ bail: /*- *----------------------------------------------------------------------- - * pixman_region_subtractO -- + * pixman_region_subtract_o -- * Overlapping band subtraction. x1 is the left-most point not yet * checked. * @@ -1534,12 +1534,12 @@ bail: */ /*ARGSUSED*/ static pixman_bool_t -pixman_region_subtractO ( +pixman_region_subtract_o ( region_type_t * region, box_type_t * r1, - box_type_t * r1End, + box_type_t * r1_end, box_type_t * r2, - box_type_t * r2End, + box_type_t * r2_end, int y1, int y2, int *overlap) @@ -1550,7 +1550,7 @@ pixman_region_subtractO ( x1 = r1->x1; assert(y1x1; } else @@ -1604,7 +1604,7 @@ pixman_region_subtractO ( * Minuend used up: advance to new... */ r1++; - if (r1 != r1End) + if (r1 != r1_end) x1 = r1->x1; } else @@ -1623,20 +1623,20 @@ pixman_region_subtractO ( if (r1->x2 > x1) NEWRECT(region, next_rect, x1, y1, r1->x2, y2); r1++; - if (r1 != r1End) + if (r1 != r1_end) x1 = r1->x1; } - } while ((r1 != r1End) && (r2 != r2End)); + } while ((r1 != r1_end) && (r2 != r2_end)); /* * Add remaining minuend rectangles to region. */ - while (r1 != r1End) + while (r1 != r1_end) { assert(x1x2); NEWRECT(region, next_rect, x1, y1, r1->x2, y2); r1++; - if (r1 != r1End) + if (r1 != r1_end) x1 = r1->x1; } return TRUE; @@ -1645,59 +1645,59 @@ pixman_region_subtractO ( /*- *----------------------------------------------------------------------- * pixman_region_subtract -- - * Subtract regS from regM and leave the result in regD. + * Subtract reg_s from reg_m and leave the result in reg_d. * S stands for subtrahend, M for minuend and D for difference. * * Results: * TRUE if successful. * * Side Effects: - * regD is overwritten. + * reg_d is overwritten. * *----------------------------------------------------------------------- */ PIXMAN_EXPORT pixman_bool_t -PREFIX(_subtract) (region_type_t * regD, - region_type_t * regM, - region_type_t * regS) +PREFIX(_subtract) (region_type_t * reg_d, + region_type_t * reg_m, + region_type_t * reg_s) { int overlap; /* result ignored */ - GOOD(regM); - GOOD(regS); - GOOD(regD); + GOOD(reg_m); + GOOD(reg_s); + GOOD(reg_d); /* check for trivial rejects */ - if (PIXREGION_NIL(regM) || PIXREGION_NIL(regS) || - !EXTENTCHECK(®M->extents, ®S->extents)) + if (PIXREGION_NIL(reg_m) || PIXREGION_NIL(reg_s) || + !EXTENTCHECK(®_m->extents, ®_s->extents)) { - if (PIXREGION_NAR (regS)) - return pixman_break (regD); - return PREFIX(_copy) (regD, regM); + if (PIXREGION_NAR (reg_s)) + return pixman_break (reg_d); + return PREFIX(_copy) (reg_d, reg_m); } - else if (regM == regS) + else if (reg_m == reg_s) { - FREE_DATA(regD); - regD->extents.x2 = regD->extents.x1; - regD->extents.y2 = regD->extents.y1; - regD->data = pixman_region_emptyData; + FREE_DATA(reg_d); + reg_d->extents.x2 = reg_d->extents.x1; + reg_d->extents.y2 = reg_d->extents.y1; + reg_d->data = pixman_region_empty_data; return TRUE; } /* Add those rectangles in region 1 that aren't in region 2, do yucky substraction for overlaps, and just throw away rectangles in region 2 that aren't in region 1 */ - if (!pixman_op(regD, regM, regS, pixman_region_subtractO, TRUE, FALSE, &overlap)) + if (!pixman_op(reg_d, reg_m, reg_s, pixman_region_subtract_o, TRUE, FALSE, &overlap)) return FALSE; /* - * Can't alter RegD's extents before we call pixman_op because + * Can't alter reg_d's extents before we call pixman_op because * it might be one of the source regions and pixman_op depends * on the extents of those regions being unaltered. Besides, this * way there's no checking against rectangles that will be nuked * due to coalescing, so we have to examine fewer rectangles. */ - pixman_set_extents(regD); - GOOD(regD); + pixman_set_extents(reg_d); + GOOD(reg_d); return TRUE; } @@ -1716,67 +1716,67 @@ PREFIX(_subtract) (region_type_t * regD, * TRUE. * * Side Effects: - * newReg is overwritten. + * new_reg is overwritten. * *----------------------------------------------------------------------- */ pixman_bool_t -PIXMAN_EXPORT PREFIX(_inverse) (region_type_t * newReg, /* Destination region */ +PIXMAN_EXPORT PREFIX(_inverse) (region_type_t * new_reg, /* Destination region */ region_type_t * reg1, /* Region to invert */ - box_type_t * invRect) /* Bounding box for inversion */ + box_type_t * inv_rect) /* Bounding box for inversion */ { - region_type_t invReg; /* Quick and dirty region made from the + region_type_t inv_reg; /* Quick and dirty region made from the * bounding box */ int overlap; /* result ignored */ GOOD(reg1); - GOOD(newReg); + GOOD(new_reg); /* check for trivial rejects */ - if (PIXREGION_NIL(reg1) || !EXTENTCHECK(invRect, ®1->extents)) + if (PIXREGION_NIL(reg1) || !EXTENTCHECK(inv_rect, ®1->extents)) { if (PIXREGION_NAR(reg1)) - return pixman_break (newReg); - newReg->extents = *invRect; - FREE_DATA(newReg); - newReg->data = (region_data_type_t *)NULL; + return pixman_break (new_reg); + new_reg->extents = *inv_rect; + FREE_DATA(new_reg); + new_reg->data = (region_data_type_t *)NULL; return TRUE; } /* Add those rectangles in region 1 that aren't in region 2, do yucky substraction for overlaps, and just throw away rectangles in region 2 that aren't in region 1 */ - invReg.extents = *invRect; - invReg.data = (region_data_type_t *)NULL; - if (!pixman_op(newReg, &invReg, reg1, pixman_region_subtractO, TRUE, FALSE, &overlap)) + inv_reg.extents = *inv_rect; + inv_reg.data = (region_data_type_t *)NULL; + if (!pixman_op(new_reg, &inv_reg, reg1, pixman_region_subtract_o, TRUE, FALSE, &overlap)) return FALSE; /* - * Can't alter newReg's extents before we call pixman_op because + * Can't alter new_reg's extents before we call pixman_op because * it might be one of the source regions and pixman_op depends * on the extents of those regions being unaltered. Besides, this * way there's no checking against rectangles that will be nuked * due to coalescing, so we have to examine fewer rectangles. */ - pixman_set_extents(newReg); - GOOD(newReg); + pixman_set_extents(new_reg); + GOOD(new_reg); return TRUE; } /* - * RectIn(region, rect) + * rect_in(region, rect) * This routine takes a pointer to a region and a pointer to a box * and determines if the box is outside/inside/partly inside the region. * * The idea is to travel through the list of rectangles trying to cover the * passed box with them. Anytime a piece of the rectangle isn't covered - * by a band of rectangles, partOut is set TRUE. Any time a rectangle in - * the region covers part of the box, partIn is set TRUE. The process ends + * by a band of rectangles, part_out is set TRUE. Any time a rectangle in + * the region covers part of the box, part_in is set TRUE. The process ends * when either the box has been completely covered (we reached a band that - * doesn't overlap the box, partIn is TRUE and partOut is false), the - * box has been partially covered (partIn == partOut == TRUE -- because of + * doesn't overlap the box, part_in is TRUE and part_out is false), the + * box has been partially covered (part_in == part_out == TRUE -- because of * the banding, the first time this is true we know the box is only * partially in the region) or is outside the region (we reached a band - * that doesn't overlap the box at all and partIn is false) + * that doesn't overlap the box at all and part_in is false) */ pixman_region_overlap_t @@ -1786,17 +1786,17 @@ PIXMAN_EXPORT PREFIX(_contains_rectangle) (region_type_t * region, int x; int y; box_type_t * pbox; - box_type_t * pboxEnd; - int partIn, partOut; - int numRects; + box_type_t * pbox_end; + int part_in, part_out; + int num_rects; GOOD(region); - numRects = PIXREGION_NUM_RECTS(region); + num_rects = PIXREGION_NUM_RECTS(region); /* useful optimization */ - if (!numRects || !EXTENTCHECK(®ion->extents, prect)) + if (!num_rects || !EXTENTCHECK(®ion->extents, prect)) return(PIXMAN_REGION_OUT); - if (numRects == 1) + if (num_rects == 1) { /* We know that it must be PIXMAN_REGION_IN or PIXMAN_REGION_PART */ if (SUBSUMES(®ion->extents, prect)) @@ -1805,16 +1805,16 @@ PIXMAN_EXPORT PREFIX(_contains_rectangle) (region_type_t * region, return(PIXMAN_REGION_PART); } - partOut = FALSE; - partIn = FALSE; + part_out = FALSE; + part_in = FALSE; /* (x,y) starts at upper left of rect, moving to the right and down */ x = prect->x1; y = prect->y1; - /* can stop when both partOut and partIn are TRUE, or we reach prect->y2 */ - for (pbox = PIXREGION_BOXPTR(region), pboxEnd = pbox + numRects; - pbox != pboxEnd; + /* can stop when both part_out and part_in are TRUE, or we reach prect->y2 */ + for (pbox = PIXREGION_BOXPTR(region), pbox_end = pbox + num_rects; + pbox != pbox_end; pbox++) { @@ -1823,8 +1823,8 @@ PIXMAN_EXPORT PREFIX(_contains_rectangle) (region_type_t * region, if (pbox->y1 > y) { - partOut = TRUE; /* missed part of rectangle above */ - if (partIn || (pbox->y1 >= prect->y2)) + part_out = TRUE; /* missed part of rectangle above */ + if (part_in || (pbox->y1 >= prect->y2)) break; y = pbox->y1; /* x guaranteed to be == prect->x1 */ } @@ -1834,15 +1834,15 @@ PIXMAN_EXPORT PREFIX(_contains_rectangle) (region_type_t * region, if (pbox->x1 > x) { - partOut = TRUE; /* missed part of rectangle to left */ - if (partIn) + part_out = TRUE; /* missed part of rectangle to left */ + if (part_in) break; } if (pbox->x1 < prect->x2) { - partIn = TRUE; /* definitely overlap */ - if (partOut) + part_in = TRUE; /* definitely overlap */ + if (part_out) break; } @@ -1859,15 +1859,15 @@ PIXMAN_EXPORT PREFIX(_contains_rectangle) (region_type_t * region, * Because boxes in a band are maximal width, if the first box * to overlap the rectangle doesn't completely cover it in that * band, the rectangle must be partially out, since some of it - * will be uncovered in that band. partIn will have been set true + * will be uncovered in that band. part_in will have been set true * by now... */ - partOut = TRUE; + part_out = TRUE; break; } } - if (partIn) + if (part_in) { if (y < prect->y2) return PIXMAN_REGION_PART; @@ -1898,7 +1898,7 @@ PREFIX(_translate) (region_type_t * region, int x, int y) region->extents.y2 = y2 = region->extents.y2 + y; if (((x1 - SHRT_MIN)|(y1 - SHRT_MIN)|(SHRT_MAX - x2)|(SHRT_MAX - y2)) >= 0) { - if (region->data && (nbox = region->data->numRects)) + if (region->data && (nbox = region->data->num_rects)) { for (pbox = PIXREGION_BOXPTR(region); nbox--; pbox++) { @@ -1915,7 +1915,7 @@ PREFIX(_translate) (region_type_t * region, int x, int y) region->extents.x2 = region->extents.x1; region->extents.y2 = region->extents.y1; FREE_DATA(region); - region->data = pixman_region_emptyData; + region->data = pixman_region_empty_data; return; } if (x1 < SHRT_MIN) @@ -1926,35 +1926,35 @@ PREFIX(_translate) (region_type_t * region, int x, int y) region->extents.y1 = SHRT_MIN; else if (y2 > SHRT_MAX) region->extents.y2 = SHRT_MAX; - if (region->data && (nbox = region->data->numRects)) + if (region->data && (nbox = region->data->num_rects)) { - box_type_t * pboxout; + box_type_t * pbox_out; - for (pboxout = pbox = PIXREGION_BOXPTR(region); nbox--; pbox++) + for (pbox_out = pbox = PIXREGION_BOXPTR(region); nbox--; pbox++) { - pboxout->x1 = x1 = pbox->x1 + x; - pboxout->y1 = y1 = pbox->y1 + y; - pboxout->x2 = x2 = pbox->x2 + x; - pboxout->y2 = y2 = pbox->y2 + y; + pbox_out->x1 = x1 = pbox->x1 + x; + pbox_out->y1 = y1 = pbox->y1 + y; + pbox_out->x2 = x2 = pbox->x2 + x; + pbox_out->y2 = y2 = pbox->y2 + y; if (((x2 - SHRT_MIN)|(y2 - SHRT_MIN)| (SHRT_MAX - x1)|(SHRT_MAX - y1)) <= 0) { - region->data->numRects--; + region->data->num_rects--; continue; } if (x1 < SHRT_MIN) - pboxout->x1 = SHRT_MIN; + pbox_out->x1 = SHRT_MIN; else if (x2 > SHRT_MAX) - pboxout->x2 = SHRT_MAX; + pbox_out->x2 = SHRT_MAX; if (y1 < SHRT_MIN) - pboxout->y1 = SHRT_MIN; + pbox_out->y1 = SHRT_MIN; else if (y2 > SHRT_MAX) - pboxout->y2 = SHRT_MAX; - pboxout++; + pbox_out->y2 = SHRT_MAX; + pbox_out++; } - if (pboxout != pbox) + if (pbox_out != pbox) { - if (region->data->numRects == 1) + if (region->data->num_rects == 1) { region->extents = *PIXREGION_BOXPTR(region); FREE_DATA(region); @@ -1983,22 +1983,22 @@ PREFIX(_contains_point) (region_type_t * region, int x, int y, box_type_t * box) { - box_type_t *pbox, *pboxEnd; - int numRects; + box_type_t *pbox, *pbox_end; + int num_rects; GOOD(region); - numRects = PIXREGION_NUM_RECTS(region); - if (!numRects || !INBOX(®ion->extents, x, y)) + num_rects = PIXREGION_NUM_RECTS(region); + if (!num_rects || !INBOX(®ion->extents, x, y)) return(FALSE); - if (numRects == 1) + if (num_rects == 1) { if (box) *box = region->extents; return(TRUE); } - for (pbox = PIXREGION_BOXPTR(region), pboxEnd = pbox + numRects; - pbox != pboxEnd; + for (pbox = PIXREGION_BOXPTR(region), pbox_end = pbox + num_rects; + pbox != pbox_end; pbox++) { if (y >= pbox->y2) @@ -2041,39 +2041,39 @@ PIXMAN_EXPORT pixman_bool_t PREFIX(_selfcheck) (reg) region_type_t * reg; { - int i, numRects; + int i, num_rects; if ((reg->extents.x1 > reg->extents.x2) || (reg->extents.y1 > reg->extents.y2)) return FALSE; - numRects = PIXREGION_NUM_RECTS(reg); - if (!numRects) + num_rects = PIXREGION_NUM_RECTS(reg); + if (!num_rects) return ((reg->extents.x1 == reg->extents.x2) && (reg->extents.y1 == reg->extents.y2) && - (reg->data->size || (reg->data == pixman_region_emptyData))); - else if (numRects == 1) + (reg->data->size || (reg->data == pixman_region_empty_data))); + else if (num_rects == 1) return (!reg->data); else { - box_type_t * pboxP, * pboxN; + box_type_t * pbox_p, * pbox_n; box_type_t box; - pboxP = PIXREGION_RECTS(reg); - box = *pboxP; - box.y2 = pboxP[numRects-1].y2; - pboxN = pboxP + 1; - for (i = numRects; --i > 0; pboxP++, pboxN++) + pbox_p = PIXREGION_RECTS(reg); + box = *pbox_p; + box.y2 = pbox_p[num_rects-1].y2; + pbox_n = pbox_p + 1; + for (i = num_rects; --i > 0; pbox_p++, pbox_n++) { - if ((pboxN->x1 >= pboxN->x2) || - (pboxN->y1 >= pboxN->y2)) + if ((pbox_n->x1 >= pbox_n->x2) || + (pbox_n->y1 >= pbox_n->y2)) return FALSE; - if (pboxN->x1 < box.x1) - box.x1 = pboxN->x1; - if (pboxN->x2 > box.x2) - box.x2 = pboxN->x2; - if ((pboxN->y1 < pboxP->y1) || - ((pboxN->y1 == pboxP->y1) && - ((pboxN->x1 < pboxP->x2) || (pboxN->y2 != pboxP->y2)))) + if (pbox_n->x1 < box.x1) + box.x1 = pbox_n->x1; + if (pbox_n->x2 > box.x2) + box.x2 = pbox_n->x2; + if ((pbox_n->y1 < pbox_p->y1) || + ((pbox_n->y1 == pbox_p->y1) && + ((pbox_n->x1 < pbox_p->x2) || (pbox_n->y2 != pbox_p->y2)))) return FALSE; } return ((box.x1 == reg->extents.x1) && @@ -2107,7 +2107,7 @@ PREFIX(_init_rects) (region_type_t *region, /* if it's 0, don't call pixman_rect_alloc -- 0 rectangles is * a special case, and causing pixman_rect_alloc would cause * us to leak memory (because the 0-rect case should be the - * static pixman_region_emptyData data). + * static pixman_region_empty_data data). */ if (count == 0) return TRUE; diff --git a/pixman/pixman-region16.c b/pixman/pixman-region16.c index 13f739a..760a2b4 100644 --- a/pixman/pixman-region16.c +++ b/pixman/pixman-region16.c @@ -57,7 +57,7 @@ pixman_region_set_static_pointers (pixman_box16_t *empty_box, pixman_region16_data_t *empty_data, pixman_region16_data_t *broken_data) { - pixman_region_emptyBox = empty_box; - pixman_region_emptyData = empty_data; - pixman_brokendata = broken_data; + pixman_region_empty_box = empty_box; + pixman_region_empty_data = empty_data; + pixman_broken_data = broken_data; } diff --git a/pixman/pixman-solid-fill.c b/pixman/pixman-solid-fill.c index 1359fcd..7e50970 100644 --- a/pixman/pixman-solid-fill.c +++ b/pixman/pixman-solid-fill.c @@ -26,7 +26,7 @@ static void solid_fill_get_scanline_32 (pixman_image_t *image, int x, int y, int width, uint32_t *buffer, - const uint32_t *mask, uint32_t maskBits) + const uint32_t *mask, uint32_t mask_bits) { uint32_t *end = buffer + width; register uint32_t color = ((solid_fill_t *)image)->color; diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c index 5813649..c739cd8 100644 --- a/pixman/pixman-sse2.c +++ b/pixman/pixman-sse2.c @@ -45,27 +45,27 @@ static __m64 mask_x0080; static __m64 mask_x00ff; static __m64 mask_x0101; -static __m64 mask_xAlpha; +static __m64 mask_x_alpha; -static __m64 mask_x565rgb; -static __m64 mask_x565Unpack; +static __m64 mask_x565_rgb; +static __m64 mask_x565_unpack; -static __m128i Mask0080; -static __m128i Mask00ff; -static __m128i Mask0101; -static __m128i Maskffff; -static __m128i Maskff000000; -static __m128i MaskAlpha; +static __m128i mask_0080; +static __m128i mask_00ff; +static __m128i mask_0101; +static __m128i mask_ffff; +static __m128i mask_ff000000; +static __m128i mask_alpha; -static __m128i Mask565r; -static __m128i Mask565g1, Mask565g2; -static __m128i Mask565b; -static __m128i MaskRed; -static __m128i MaskGreen; -static __m128i MaskBlue; +static __m128i mask_565_r; +static __m128i mask_565_g1, mask_565_g2; +static __m128i mask_565_b; +static __m128i mask_red; +static __m128i mask_green; +static __m128i mask_blue; -static __m128i Mask565FixRB; -static __m128i Mask565FixG; +static __m128i mask_565_fix_rb; +static __m128i mask_565_fix_g; /* ------------------------------------------------------------------------------------------------- * SSE2 Inlines @@ -77,27 +77,27 @@ unpack_32_1x128 (uint32_t data) } static force_inline void -unpack_128_2x128 (__m128i data, __m128i* dataLo, __m128i* dataHi) +unpack_128_2x128 (__m128i data, __m128i* data_lo, __m128i* data_hi) { - *dataLo = _mm_unpacklo_epi8 (data, _mm_setzero_si128 ()); - *dataHi = _mm_unpackhi_epi8 (data, _mm_setzero_si128 ()); + *data_lo = _mm_unpacklo_epi8 (data, _mm_setzero_si128 ()); + *data_hi = _mm_unpackhi_epi8 (data, _mm_setzero_si128 ()); } static force_inline __m128i -unpack565to8888 (__m128i lo) +unpack_565to8888 (__m128i lo) { __m128i r, g, b, rb, t; - r = _mm_and_si128 (_mm_slli_epi32 (lo, 8), MaskRed); - g = _mm_and_si128 (_mm_slli_epi32 (lo, 5), MaskGreen); - b = _mm_and_si128 (_mm_slli_epi32 (lo, 3), MaskBlue); + r = _mm_and_si128 (_mm_slli_epi32 (lo, 8), mask_red); + g = _mm_and_si128 (_mm_slli_epi32 (lo, 5), mask_green); + b = _mm_and_si128 (_mm_slli_epi32 (lo, 3), mask_blue); rb = _mm_or_si128 (r, b); - t = _mm_and_si128 (rb, Mask565FixRB); + t = _mm_and_si128 (rb, mask_565_fix_rb); t = _mm_srli_epi32 (t, 5); rb = _mm_or_si128 (rb, t); - t = _mm_and_si128 (g, Mask565FixG); + t = _mm_and_si128 (g, mask_565_fix_g); t = _mm_srli_epi32 (t, 6); g = _mm_or_si128 (g, t); @@ -105,22 +105,22 @@ unpack565to8888 (__m128i lo) } static force_inline void -unpack565_128_4x128 (__m128i data, __m128i* data0, __m128i* data1, __m128i* data2, __m128i* data3) +unpack_565_128_4x128 (__m128i data, __m128i* data0, __m128i* data1, __m128i* data2, __m128i* data3) { __m128i lo, hi; lo = _mm_unpacklo_epi16 (data, _mm_setzero_si128 ()); hi = _mm_unpackhi_epi16 (data, _mm_setzero_si128 ()); - lo = unpack565to8888 (lo); - hi = unpack565to8888 (hi); + lo = unpack_565to8888 (lo); + hi = unpack_565to8888 (hi); unpack_128_2x128 (lo, data0, data1); unpack_128_2x128 (hi, data2, data3); } static force_inline uint16_t -pack565_32_16 (uint32_t pixel) +pack_565_32_16 (uint32_t pixel) { return (uint16_t) (((pixel>>8) & 0xf800) | ((pixel>>5) & 0x07e0) | ((pixel>>3) & 0x001f)); } @@ -132,218 +132,218 @@ pack_2x128_128 (__m128i lo, __m128i hi) } static force_inline __m128i -pack565_2x128_128 (__m128i lo, __m128i hi) +pack_565_2x128_128 (__m128i lo, __m128i hi) { __m128i data; __m128i r, g1, g2, b; data = pack_2x128_128 ( lo, hi ); - r = _mm_and_si128 (data , Mask565r); - g1 = _mm_and_si128 (_mm_slli_epi32 (data , 3), Mask565g1); - g2 = _mm_and_si128 (_mm_srli_epi32 (data , 5), Mask565g2); - b = _mm_and_si128 (_mm_srli_epi32 (data , 3), Mask565b); + r = _mm_and_si128 (data , mask_565_r); + g1 = _mm_and_si128 (_mm_slli_epi32 (data , 3), mask_565_g1); + g2 = _mm_and_si128 (_mm_srli_epi32 (data , 5), mask_565_g2); + b = _mm_and_si128 (_mm_srli_epi32 (data , 3), mask_565_b); return _mm_or_si128 (_mm_or_si128 (_mm_or_si128 (r, g1), g2), b); } static force_inline __m128i -pack565_4x128_128 (__m128i* xmm0, __m128i* xmm1, __m128i* xmm2, __m128i* xmm3) +pack_565_4x128_128 (__m128i* xmm0, __m128i* xmm1, __m128i* xmm2, __m128i* xmm3) { - return _mm_packus_epi16 (pack565_2x128_128 (*xmm0, *xmm1), pack565_2x128_128 (*xmm2, *xmm3)); + return _mm_packus_epi16 (pack_565_2x128_128 (*xmm0, *xmm1), pack_565_2x128_128 (*xmm2, *xmm3)); } static force_inline int -isOpaque (__m128i x) +is_opaque (__m128i x) { __m128i ffs = _mm_cmpeq_epi8 (x, x); return (_mm_movemask_epi8 (_mm_cmpeq_epi8 (x, ffs)) & 0x8888) == 0x8888; } static force_inline int -isZero (__m128i x) +is_zero (__m128i x) { return _mm_movemask_epi8 (_mm_cmpeq_epi8 (x, _mm_setzero_si128())) == 0xffff; } static force_inline int -isTransparent (__m128i x) +is_transparent (__m128i x) { return (_mm_movemask_epi8 (_mm_cmpeq_epi8 (x, _mm_setzero_si128())) & 0x8888) == 0x8888; } static force_inline __m128i -expandPixel_32_1x128 (uint32_t data) +expand_pixel_32_1x128 (uint32_t data) { return _mm_shuffle_epi32 (unpack_32_1x128 (data), _MM_SHUFFLE(1, 0, 1, 0)); } static force_inline __m128i -expandAlpha_1x128 (__m128i data) +expand_alpha_1x128 (__m128i data) { return _mm_shufflehi_epi16 (_mm_shufflelo_epi16 (data, _MM_SHUFFLE(3, 3, 3, 3)), _MM_SHUFFLE(3, 3, 3, 3)); } static force_inline void -expandAlpha_2x128 (__m128i dataLo, __m128i dataHi, __m128i* alphaLo, __m128i* alphaHi) +expand_alpha_2x128 (__m128i data_lo, __m128i data_hi, __m128i* alpha_lo, __m128i* alpha_hi) { __m128i lo, hi; - lo = _mm_shufflelo_epi16 (dataLo, _MM_SHUFFLE(3, 3, 3, 3)); - hi = _mm_shufflelo_epi16 (dataHi, _MM_SHUFFLE(3, 3, 3, 3)); - *alphaLo = _mm_shufflehi_epi16 (lo, _MM_SHUFFLE(3, 3, 3, 3)); - *alphaHi = _mm_shufflehi_epi16 (hi, _MM_SHUFFLE(3, 3, 3, 3)); + lo = _mm_shufflelo_epi16 (data_lo, _MM_SHUFFLE(3, 3, 3, 3)); + hi = _mm_shufflelo_epi16 (data_hi, _MM_SHUFFLE(3, 3, 3, 3)); + *alpha_lo = _mm_shufflehi_epi16 (lo, _MM_SHUFFLE(3, 3, 3, 3)); + *alpha_hi = _mm_shufflehi_epi16 (hi, _MM_SHUFFLE(3, 3, 3, 3)); } static force_inline void -expandAlphaRev_2x128 (__m128i dataLo, __m128i dataHi, __m128i* alphaLo, __m128i* alphaHi) +expand_alpha_rev_2x128 (__m128i data_lo, __m128i data_hi, __m128i* alpha_lo, __m128i* alpha_hi) { __m128i lo, hi; - lo = _mm_shufflelo_epi16 (dataLo, _MM_SHUFFLE(0, 0, 0, 0)); - hi = _mm_shufflelo_epi16 (dataHi, _MM_SHUFFLE(0, 0, 0, 0)); - *alphaLo = _mm_shufflehi_epi16 (lo, _MM_SHUFFLE(0, 0, 0, 0)); - *alphaHi = _mm_shufflehi_epi16 (hi, _MM_SHUFFLE(0, 0, 0, 0)); + lo = _mm_shufflelo_epi16 (data_lo, _MM_SHUFFLE(0, 0, 0, 0)); + hi = _mm_shufflelo_epi16 (data_hi, _MM_SHUFFLE(0, 0, 0, 0)); + *alpha_lo = _mm_shufflehi_epi16 (lo, _MM_SHUFFLE(0, 0, 0, 0)); + *alpha_hi = _mm_shufflehi_epi16 (hi, _MM_SHUFFLE(0, 0, 0, 0)); } static force_inline void -pixMultiply_2x128 (__m128i* dataLo, __m128i* dataHi, __m128i* alphaLo, __m128i* alphaHi, __m128i* retLo, __m128i* retHi) +pix_multiply_2x128 (__m128i* data_lo, __m128i* data_hi, __m128i* alpha_lo, __m128i* alpha_hi, __m128i* ret_lo, __m128i* ret_hi) { __m128i lo, hi; - lo = _mm_mullo_epi16 (*dataLo, *alphaLo); - hi = _mm_mullo_epi16 (*dataHi, *alphaHi); - lo = _mm_adds_epu16 (lo, Mask0080); - hi = _mm_adds_epu16 (hi, Mask0080); - *retLo = _mm_mulhi_epu16 (lo, Mask0101); - *retHi = _mm_mulhi_epu16 (hi, Mask0101); + lo = _mm_mullo_epi16 (*data_lo, *alpha_lo); + hi = _mm_mullo_epi16 (*data_hi, *alpha_hi); + lo = _mm_adds_epu16 (lo, mask_0080); + hi = _mm_adds_epu16 (hi, mask_0080); + *ret_lo = _mm_mulhi_epu16 (lo, mask_0101); + *ret_hi = _mm_mulhi_epu16 (hi, mask_0101); } static force_inline void -pixAddMultiply_2x128 (__m128i* srcLo, __m128i* srcHi, __m128i* alphaDstLo, __m128i* alphaDstHi, - __m128i* dstLo, __m128i* dstHi, __m128i* alphaSrcLo, __m128i* alphaSrcHi, - __m128i* retLo, __m128i* retHi) +pix_add_multiply_2x128 (__m128i* src_lo, __m128i* src_hi, __m128i* alpha_dst_lo, __m128i* alpha_dst_hi, + __m128i* dst_lo, __m128i* dst_hi, __m128i* alpha_src_lo, __m128i* alpha_src_hi, + __m128i* ret_lo, __m128i* ret_hi) { __m128i lo, hi; - __m128i mulLo, mulHi; + __m128i mul_lo, mul_hi; - lo = _mm_mullo_epi16 (*srcLo, *alphaDstLo); - hi = _mm_mullo_epi16 (*srcHi, *alphaDstHi); - mulLo = _mm_mullo_epi16 (*dstLo, *alphaSrcLo); - mulHi = _mm_mullo_epi16 (*dstHi, *alphaSrcHi); - lo = _mm_adds_epu16 (lo, Mask0080); - hi = _mm_adds_epu16 (hi, Mask0080); - lo = _mm_adds_epu16 (lo, mulLo); - hi = _mm_adds_epu16 (hi, mulHi); - *retLo = _mm_mulhi_epu16 (lo, Mask0101); - *retHi = _mm_mulhi_epu16 (hi, Mask0101); + lo = _mm_mullo_epi16 (*src_lo, *alpha_dst_lo); + hi = _mm_mullo_epi16 (*src_hi, *alpha_dst_hi); + mul_lo = _mm_mullo_epi16 (*dst_lo, *alpha_src_lo); + mul_hi = _mm_mullo_epi16 (*dst_hi, *alpha_src_hi); + lo = _mm_adds_epu16 (lo, mask_0080); + hi = _mm_adds_epu16 (hi, mask_0080); + lo = _mm_adds_epu16 (lo, mul_lo); + hi = _mm_adds_epu16 (hi, mul_hi); + *ret_lo = _mm_mulhi_epu16 (lo, mask_0101); + *ret_hi = _mm_mulhi_epu16 (hi, mask_0101); } static force_inline void -negate_2x128 (__m128i dataLo, __m128i dataHi, __m128i* negLo, __m128i* negHi) +negate_2x128 (__m128i data_lo, __m128i data_hi, __m128i* neg_lo, __m128i* neg_hi) { - *negLo = _mm_xor_si128 (dataLo, Mask00ff); - *negHi = _mm_xor_si128 (dataHi, Mask00ff); + *neg_lo = _mm_xor_si128 (data_lo, mask_00ff); + *neg_hi = _mm_xor_si128 (data_hi, mask_00ff); } static force_inline void -invertColors_2x128 (__m128i dataLo, __m128i dataHi, __m128i* invLo, __m128i* invHi) +invert_colors_2x128 (__m128i data_lo, __m128i data_hi, __m128i* inv_lo, __m128i* inv_hi) { __m128i lo, hi; - lo = _mm_shufflelo_epi16 (dataLo, _MM_SHUFFLE(3, 0, 1, 2)); - hi = _mm_shufflelo_epi16 (dataHi, _MM_SHUFFLE(3, 0, 1, 2)); - *invLo = _mm_shufflehi_epi16 (lo, _MM_SHUFFLE(3, 0, 1, 2)); - *invHi = _mm_shufflehi_epi16 (hi, _MM_SHUFFLE(3, 0, 1, 2)); + lo = _mm_shufflelo_epi16 (data_lo, _MM_SHUFFLE(3, 0, 1, 2)); + hi = _mm_shufflelo_epi16 (data_hi, _MM_SHUFFLE(3, 0, 1, 2)); + *inv_lo = _mm_shufflehi_epi16 (lo, _MM_SHUFFLE(3, 0, 1, 2)); + *inv_hi = _mm_shufflehi_epi16 (hi, _MM_SHUFFLE(3, 0, 1, 2)); } static force_inline void -over_2x128 (__m128i* srcLo, __m128i* srcHi, __m128i* alphaLo, __m128i* alphaHi, __m128i* dstLo, __m128i* dstHi) +over_2x128 (__m128i* src_lo, __m128i* src_hi, __m128i* alpha_lo, __m128i* alpha_hi, __m128i* dst_lo, __m128i* dst_hi) { __m128i t1, t2; - negate_2x128 (*alphaLo, *alphaHi, &t1, &t2); + negate_2x128 (*alpha_lo, *alpha_hi, &t1, &t2); - pixMultiply_2x128 (dstLo, dstHi, &t1, &t2, dstLo, dstHi); + pix_multiply_2x128 (dst_lo, dst_hi, &t1, &t2, dst_lo, dst_hi); - *dstLo = _mm_adds_epu8 (*srcLo, *dstLo); - *dstHi = _mm_adds_epu8 (*srcHi, *dstHi); + *dst_lo = _mm_adds_epu8 (*src_lo, *dst_lo); + *dst_hi = _mm_adds_epu8 (*src_hi, *dst_hi); } static force_inline void -overRevNonPre_2x128 (__m128i srcLo, __m128i srcHi, __m128i* dstLo, __m128i* dstHi) +over_rev_non_pre_2x128 (__m128i src_lo, __m128i src_hi, __m128i* dst_lo, __m128i* dst_hi) { __m128i lo, hi; - __m128i alphaLo, alphaHi; + __m128i alpha_lo, alpha_hi; - expandAlpha_2x128 (srcLo, srcHi, &alphaLo, &alphaHi); + expand_alpha_2x128 (src_lo, src_hi, &alpha_lo, &alpha_hi); - lo = _mm_or_si128 (alphaLo, MaskAlpha); - hi = _mm_or_si128 (alphaHi, MaskAlpha); + lo = _mm_or_si128 (alpha_lo, mask_alpha); + hi = _mm_or_si128 (alpha_hi, mask_alpha); - invertColors_2x128 (srcLo, srcHi, &srcLo, &srcHi); + invert_colors_2x128 (src_lo, src_hi, &src_lo, &src_hi); - pixMultiply_2x128 (&srcLo, &srcHi, &lo, &hi, &lo, &hi); + pix_multiply_2x128 (&src_lo, &src_hi, &lo, &hi, &lo, &hi); - over_2x128 (&lo, &hi, &alphaLo, &alphaHi, dstLo, dstHi); + over_2x128 (&lo, &hi, &alpha_lo, &alpha_hi, dst_lo, dst_hi); } static force_inline void -inOver_2x128 (__m128i* srcLo, __m128i* srcHi, __m128i* alphaLo, __m128i* alphaHi, - __m128i* maskLo, __m128i* maskHi, __m128i* dstLo, __m128i* dstHi) +in_over_2x128 (__m128i* src_lo, __m128i* src_hi, __m128i* alpha_lo, __m128i* alpha_hi, + __m128i* mask_lo, __m128i* mask_hi, __m128i* dst_lo, __m128i* dst_hi) { - __m128i sLo, sHi; - __m128i aLo, aHi; + __m128i s_lo, s_hi; + __m128i a_lo, a_hi; - pixMultiply_2x128 ( srcLo, srcHi, maskLo, maskHi, &sLo, &sHi); - pixMultiply_2x128 (alphaLo, alphaHi, maskLo, maskHi, &aLo, &aHi); + pix_multiply_2x128 ( src_lo, src_hi, mask_lo, mask_hi, &s_lo, &s_hi); + pix_multiply_2x128 (alpha_lo, alpha_hi, mask_lo, mask_hi, &a_lo, &a_hi); - over_2x128 (&sLo, &sHi, &aLo, &aHi, dstLo, dstHi); + over_2x128 (&s_lo, &s_hi, &a_lo, &a_hi, dst_lo, dst_hi); } static force_inline void -cachePrefetch (__m128i* addr) +cache_prefetch (__m128i* addr) { _mm_prefetch (addr, _MM_HINT_T0); } static force_inline void -cachePrefetchNext (__m128i* addr) +cache_prefetch_next (__m128i* addr) { _mm_prefetch (addr + 4, _MM_HINT_T0); // 64 bytes ahead } /* load 4 pixels from a 16-byte boundary aligned address */ static force_inline __m128i -load128Aligned (__m128i* src) +load_128_aligned (__m128i* src) { return _mm_load_si128 (src); } /* load 4 pixels from a unaligned address */ static force_inline __m128i -load128Unaligned (const __m128i* src) +load_128_unaligned (const __m128i* src) { return _mm_loadu_si128 (src); } /* save 4 pixels using Write Combining memory on a 16-byte boundary aligned address */ static force_inline void -save128WriteCombining (__m128i* dst, __m128i data) +save128write_combining (__m128i* dst, __m128i data) { _mm_stream_si128 (dst, data); } /* save 4 pixels on a 16-byte boundary aligned address */ static force_inline void -save128Aligned (__m128i* dst, __m128i data) +save_128_aligned (__m128i* dst, __m128i data) { _mm_store_si128 (dst, data); } /* save 4 pixels on a unaligned address */ static force_inline void -save128Unaligned (__m128i* dst, __m128i data) +save_128_unaligned (__m128i* dst, __m128i data) { _mm_storeu_si128 (dst, data); } @@ -359,25 +359,25 @@ unpack_32_1x64 (uint32_t data) } static force_inline __m64 -expandAlpha_1x64 (__m64 data) +expand_alpha_1x64 (__m64 data) { return _mm_shuffle_pi16 (data, _MM_SHUFFLE(3, 3, 3, 3)); } static force_inline __m64 -expandAlphaRev_1x64 (__m64 data) +expand_alpha_rev_1x64 (__m64 data) { return _mm_shuffle_pi16 (data, _MM_SHUFFLE(0, 0, 0, 0)); } static force_inline __m64 -expandPixel_8_1x64 (uint8_t data) +expand_pixel_8_1x64 (uint8_t data) { return _mm_shuffle_pi16 (unpack_32_1x64 ((uint32_t)data), _MM_SHUFFLE(0, 0, 0, 0)); } static force_inline __m64 -pixMultiply_1x64 (__m64 data, __m64 alpha) +pix_multiply_1x64 (__m64 data, __m64 alpha) { return _mm_mulhi_pu16 (_mm_adds_pu16 (_mm_mullo_pi16 (data, alpha), mask_x0080), @@ -385,11 +385,11 @@ pixMultiply_1x64 (__m64 data, __m64 alpha) } static force_inline __m64 -pixAddMultiply_1x64 (__m64* src, __m64* alphaDst, __m64* dst, __m64* alphaSrc) +pix_add_multiply_1x64 (__m64* src, __m64* alpha_dst, __m64* dst, __m64* alpha_src) { - return _mm_mulhi_pu16 (_mm_adds_pu16 (_mm_adds_pu16 (_mm_mullo_pi16 (*src, *alphaDst), + return _mm_mulhi_pu16 (_mm_adds_pu16 (_mm_adds_pu16 (_mm_mullo_pi16 (*src, *alpha_dst), mask_x0080), - _mm_mullo_pi16 (*dst, *alphaSrc)), + _mm_mullo_pi16 (*dst, *alpha_src)), mask_x0101); } @@ -400,7 +400,7 @@ negate_1x64 (__m64 data) } static force_inline __m64 -invertColors_1x64 (__m64 data) +invert_colors_1x64 (__m64 data) { return _mm_shuffle_pi16 (data, _MM_SHUFFLE(3, 0, 1, 2)); } @@ -408,24 +408,24 @@ invertColors_1x64 (__m64 data) static force_inline __m64 over_1x64 (__m64 src, __m64 alpha, __m64 dst) { - return _mm_adds_pu8 (src, pixMultiply_1x64 (dst, negate_1x64 (alpha))); + return _mm_adds_pu8 (src, pix_multiply_1x64 (dst, negate_1x64 (alpha))); } static force_inline __m64 -inOver_1x64 (__m64* src, __m64* alpha, __m64* mask, __m64* dst) +in_over_1x64 (__m64* src, __m64* alpha, __m64* mask, __m64* dst) { - return over_1x64 (pixMultiply_1x64 (*src, *mask), - pixMultiply_1x64 (*alpha, *mask), + return over_1x64 (pix_multiply_1x64 (*src, *mask), + pix_multiply_1x64 (*alpha, *mask), *dst); } static force_inline __m64 -overRevNonPre_1x64 (__m64 src, __m64 dst) +over_rev_non_pre_1x64 (__m64 src, __m64 dst) { - __m64 alpha = expandAlpha_1x64 (src); + __m64 alpha = expand_alpha_1x64 (src); - return over_1x64 (pixMultiply_1x64 (invertColors_1x64 (src), - _mm_or_si64 (alpha, mask_xAlpha)), + return over_1x64 (pix_multiply_1x64 (invert_colors_1x64 (src), + _mm_or_si64 (alpha, mask_x_alpha)), alpha, dst); } @@ -463,8 +463,8 @@ expand565_16_1x64 (uint16_t pixel) p = _mm_or_si64 (t1, p); p = _mm_or_si64 (t2, p); - p = _mm_and_si64 (p, mask_x565rgb); - p = _mm_mullo_pi16 (p, mask_x565Unpack); + p = _mm_and_si64 (p, mask_x565_rgb); + p = _mm_mullo_pi16 (p, mask_x565_unpack); return _mm_srli_pi16 (p, 8); } @@ -473,7 +473,7 @@ expand565_16_1x64 (uint16_t pixel) * Compose Core transformations */ static force_inline uint32_t -coreCombineOverUPixelsse2 (uint32_t src, uint32_t dst) +core_combine_over_u_pixel_sse2 (uint32_t src, uint32_t dst) { uint8_t a; __m64 ms; @@ -487,7 +487,7 @@ coreCombineOverUPixelsse2 (uint32_t src, uint32_t dst) else if (src) { ms = unpack_32_1x64 (src); - return pack_1x64_32 (over_1x64 (ms, expandAlpha_1x64 (ms), unpack_32_1x64 (dst))); + return pack_1x64_32 (over_1x64 (ms, expand_alpha_1x64 (ms), unpack_32_1x64 (dst))); } return dst; @@ -503,10 +503,10 @@ combine1 (const uint32_t *ps, const uint32_t *pm) __m64 ms, mm; mm = unpack_32_1x64 (*pm); - mm = expandAlpha_1x64 (mm); + mm = expand_alpha_1x64 (mm); ms = unpack_32_1x64 (s); - ms = pixMultiply_1x64 (ms, mm); + ms = pix_multiply_1x64 (ms, mm); s = pack_1x64_32 (ms); } @@ -517,48 +517,48 @@ combine1 (const uint32_t *ps, const uint32_t *pm) static force_inline __m128i combine4 (const __m128i *ps, const __m128i *pm) { - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmMskLo, xmmMskHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_msk_lo, xmm_msk_hi; __m128i s; if (pm) { - xmmMskLo = load128Unaligned (pm); + xmm_msk_lo = load_128_unaligned (pm); - if (isTransparent (xmmMskLo)) + if (is_transparent (xmm_msk_lo)) return _mm_setzero_si128 (); } - s = load128Unaligned (ps); + s = load_128_unaligned (ps); if (pm) { - unpack_128_2x128 (s, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMskLo, &xmmMskLo, &xmmMskHi); + unpack_128_2x128 (s, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_msk_lo, &xmm_msk_lo, &xmm_msk_hi); - expandAlpha_2x128 (xmmMskLo, xmmMskHi, &xmmMskLo, &xmmMskHi); + expand_alpha_2x128 (xmm_msk_lo, xmm_msk_hi, &xmm_msk_lo, &xmm_msk_hi); - pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmMskLo, &xmmMskHi, &xmmSrcLo, &xmmSrcHi); + pix_multiply_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_msk_lo, &xmm_msk_hi, &xmm_src_lo, &xmm_src_hi); - s = pack_2x128_128 (xmmSrcLo, xmmSrcHi); + s = pack_2x128_128 (xmm_src_lo, xmm_src_hi); } return s; } static force_inline void -coreCombineOverUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) +core_combine_over_u_sse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) { uint32_t s, d; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmAlphaLo, xmmAlphaHi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_alpha_lo, xmm_alpha_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); /* Align dst on a 16-byte boundary */ while (w && @@ -567,7 +567,7 @@ coreCombineOverUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int d = *pd; s = combine1 (ps, pm); - *pd++ = coreCombineOverUPixelsse2 (s, d); + *pd++ = core_combine_over_u_pixel_sse2 (s, d); ps++; if (pm) pm++; @@ -575,37 +575,37 @@ coreCombineOverUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); /* I'm loading unaligned because I'm not sure about the address alignment. */ - xmmSrcHi = combine4 ((__m128i*)ps, (__m128i*)pm); + xmm_src_hi = combine4 ((__m128i*)ps, (__m128i*)pm); - if (isOpaque (xmmSrcHi)) + if (is_opaque (xmm_src_hi)) { - save128Aligned ((__m128i*)pd, xmmSrcHi); + save_128_aligned ((__m128i*)pd, xmm_src_hi); } - else if (!isZero (xmmSrcHi)) + else if (!is_zero (xmm_src_hi)) { - xmmDstHi = load128Aligned ((__m128i*) pd); + xmm_dst_hi = load_128_aligned ((__m128i*) pd); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaLo, &xmmAlphaHi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_lo, &xmm_alpha_hi); - over_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmAlphaLo, &xmmAlphaHi, &xmmDstLo, &xmmDstHi); + over_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_alpha_lo, &xmm_alpha_hi, &xmm_dst_lo, &xmm_dst_hi); /* rebuid the 4 pixel data and save*/ - save128Aligned ((__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); } w -= 4; @@ -620,7 +620,7 @@ coreCombineOverUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int d = *pd; s = combine1 (ps, pm); - *pd++ = coreCombineOverUPixelsse2 (s, d); + *pd++ = core_combine_over_u_pixel_sse2 (s, d); ps++; if (pm) pm++; @@ -629,18 +629,18 @@ coreCombineOverUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int } static force_inline void -coreCombineOverReverseUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) +core_combine_over_reverse_u_sse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) { uint32_t s, d; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmAlphaLo, xmmAlphaHi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_alpha_lo, xmm_alpha_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); /* Align dst on a 16-byte boundary */ while (w && @@ -649,7 +649,7 @@ coreCombineOverReverseUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* p d = *pd; s = combine1 (ps, pm); - *pd++ = coreCombineOverUPixelsse2 (d, s); + *pd++ = core_combine_over_u_pixel_sse2 (d, s); w--; ps++; if (pm) @@ -657,30 +657,30 @@ coreCombineOverReverseUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* p } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); /* I'm loading unaligned because I'm not sure about the address alignment. */ - xmmSrcHi = combine4 ((__m128i*)ps, (__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*) pd); + xmm_src_hi = combine4 ((__m128i*)ps, (__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*) pd); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmAlphaLo, &xmmAlphaHi); + expand_alpha_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_alpha_lo, &xmm_alpha_hi); - over_2x128 (&xmmDstLo, &xmmDstHi, &xmmAlphaLo, &xmmAlphaHi, &xmmSrcLo, &xmmSrcHi); + over_2x128 (&xmm_dst_lo, &xmm_dst_hi, &xmm_alpha_lo, &xmm_alpha_hi, &xmm_src_lo, &xmm_src_hi); /* rebuid the 4 pixel data and save*/ - save128Aligned ((__m128i*)pd, pack_2x128_128 (xmmSrcLo, xmmSrcHi)); + save_128_aligned ((__m128i*)pd, pack_2x128_128 (xmm_src_lo, xmm_src_hi)); w -= 4; ps += 4; @@ -694,7 +694,7 @@ coreCombineOverReverseUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* p d = *pd; s = combine1 (ps, pm); - *pd++ = coreCombineOverUPixelsse2 (d, s); + *pd++ = core_combine_over_u_pixel_sse2 (d, s); ps++; w--; if (pm) @@ -703,7 +703,7 @@ coreCombineOverReverseUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* p } static force_inline uint32_t -coreCombineInUPixelsse2 (uint32_t src, uint32_t dst) +core_combine_in_u_pixelsse2 (uint32_t src, uint32_t dst) { uint32_t maska = src >> 24; @@ -713,31 +713,31 @@ coreCombineInUPixelsse2 (uint32_t src, uint32_t dst) } else if (maska != 0xff) { - return pack_1x64_32(pixMultiply_1x64 (unpack_32_1x64 (dst), expandAlpha_1x64 (unpack_32_1x64 (src)))); + return pack_1x64_32(pix_multiply_1x64 (unpack_32_1x64 (dst), expand_alpha_1x64 (unpack_32_1x64 (src)))); } return dst; } static force_inline void -coreCombineInUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) +core_combine_in_u_sse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) { uint32_t s, d; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && ((unsigned long) pd & 15)) { s = combine1 (ps, pm); d = *pd; - *pd++ = coreCombineInUPixelsse2 (d, s); + *pd++ = core_combine_in_u_pixelsse2 (d, s); w--; ps++; if (pm) @@ -745,27 +745,27 @@ coreCombineInUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*) pd); - xmmSrcHi = combine4 ((__m128i*) ps, (__m128i*) pm); + xmm_dst_hi = load_128_aligned ((__m128i*) pd); + xmm_src_hi = combine4 ((__m128i*) ps, (__m128i*) pm); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); - expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); + expand_alpha_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmDstLo, &xmmDstHi, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + pix_multiply_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_dst_lo, &xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned ((__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -779,7 +779,7 @@ coreCombineInUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) s = combine1 (ps, pm); d = *pd; - *pd++ = coreCombineInUPixelsse2 (d, s); + *pd++ = core_combine_in_u_pixelsse2 (d, s); w--; ps++; if (pm) @@ -788,24 +788,24 @@ coreCombineInUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) } static force_inline void -coreCombineReverseInUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w) +core_combine_reverse_in_u_sse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w) { uint32_t s, d; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && ((unsigned long) pd & 15)) { s = combine1 (ps, pm); d = *pd; - *pd++ = coreCombineInUPixelsse2 (s, d); + *pd++ = core_combine_in_u_pixelsse2 (s, d); ps++; w--; if (pm) @@ -813,27 +813,27 @@ coreCombineReverseInUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*) pd); - xmmSrcHi = combine4 ((__m128i*) ps, (__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*) pd); + xmm_src_hi = combine4 ((__m128i*) ps, (__m128i*)pm); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmSrcLo, &xmmSrcHi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_src_lo, &xmm_src_hi); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); - pixMultiply_2x128 (&xmmDstLo, &xmmDstHi, &xmmSrcLo, &xmmSrcHi, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); + pix_multiply_2x128 (&xmm_dst_lo, &xmm_dst_hi, &xmm_src_lo, &xmm_src_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned ((__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -847,7 +847,7 @@ coreCombineReverseInUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, s = combine1 (ps, pm); d = *pd; - *pd++ = coreCombineInUPixelsse2 (s, d); + *pd++ = core_combine_in_u_pixelsse2 (s, d); w--; ps++; if (pm) @@ -856,19 +856,19 @@ coreCombineReverseInUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, } static force_inline void -coreCombineReverseOutUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) +core_combine_reverse_out_u_sse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) { /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && ((unsigned long) pd & 15)) { uint32_t s = combine1 (ps, pm); uint32_t d = *pd; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (d), negate_1x64 (expandAlpha_1x64 (unpack_32_1x64 (s))))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (unpack_32_1x64 (d), negate_1x64 (expand_alpha_1x64 (unpack_32_1x64 (s))))); if (pm) pm++; ps++; @@ -876,32 +876,32 @@ coreCombineReverseOutUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmSrcHi = combine4 ((__m128i*)ps, (__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*) pd); + xmm_src_hi = combine4 ((__m128i*)ps, (__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*) pd); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - negate_2x128 (xmmSrcLo, xmmSrcHi, &xmmSrcLo, &xmmSrcHi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + negate_2x128 (xmm_src_lo, xmm_src_hi, &xmm_src_lo, &xmm_src_hi); - pixMultiply_2x128 (&xmmDstLo, &xmmDstHi, &xmmSrcLo, &xmmSrcHi, &xmmDstLo, &xmmDstHi); + pix_multiply_2x128 (&xmm_dst_lo, &xmm_dst_hi, &xmm_src_lo, &xmm_src_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned ((__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -915,7 +915,7 @@ coreCombineReverseOutUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm uint32_t s = combine1 (ps, pm); uint32_t d = *pd; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (d), negate_1x64 (expandAlpha_1x64 (unpack_32_1x64 (s))))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (unpack_32_1x64 (d), negate_1x64 (expand_alpha_1x64 (unpack_32_1x64 (s))))); ps++; if (pm) pm++; @@ -924,19 +924,19 @@ coreCombineReverseOutUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm } static force_inline void -coreCombineOutUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) +core_combine_out_u_sse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) { /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && ((unsigned long) pd & 15)) { uint32_t s = combine1 (ps, pm); uint32_t d = *pd; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (s), negate_1x64 (expandAlpha_1x64 (unpack_32_1x64 (d))))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (unpack_32_1x64 (s), negate_1x64 (expand_alpha_1x64 (unpack_32_1x64 (d))))); w--; ps++; if (pm) @@ -944,32 +944,32 @@ coreCombineOutUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmSrcHi = combine4 ((__m128i*) ps, (__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*) pd); + xmm_src_hi = combine4 ((__m128i*) ps, (__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*) pd); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmDstLo, &xmmDstHi); - negate_2x128 (xmmDstLo, xmmDstHi, &xmmDstLo, &xmmDstHi); + expand_alpha_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); + negate_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmDstLo, &xmmDstHi, &xmmDstLo, &xmmDstHi); + pix_multiply_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_dst_lo, &xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned ((__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -983,7 +983,7 @@ coreCombineOutUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w uint32_t s = combine1 (ps, pm); uint32_t d = *pd; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (s), negate_1x64 (expandAlpha_1x64 (unpack_32_1x64 (d))))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (unpack_32_1x64 (s), negate_1x64 (expand_alpha_1x64 (unpack_32_1x64 (d))))); w--; ps++; if (pm) @@ -992,38 +992,38 @@ coreCombineOutUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w } static force_inline uint32_t -coreCombineAtopUPixelsse2 (uint32_t src, uint32_t dst) +core_combine_atop_u_pixel_sse2 (uint32_t src, uint32_t dst) { __m64 s = unpack_32_1x64 (src); __m64 d = unpack_32_1x64 (dst); - __m64 sa = negate_1x64 (expandAlpha_1x64 (s)); - __m64 da = expandAlpha_1x64 (d); + __m64 sa = negate_1x64 (expand_alpha_1x64 (s)); + __m64 da = expand_alpha_1x64 (d); - return pack_1x64_32 (pixAddMultiply_1x64 (&s, &da, &d, &sa)); + return pack_1x64_32 (pix_add_multiply_1x64 (&s, &da, &d, &sa)); } static force_inline void -coreCombineAtopUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) +core_combine_atop_u_sse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) { uint32_t s, d; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmAlphaSrcLo, xmmAlphaSrcHi; - __m128i xmmAlphaDstLo, xmmAlphaDstHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_alpha_src_lo, xmm_alpha_src_hi; + __m128i xmm_alpha_dst_lo, xmm_alpha_dst_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && ((unsigned long) pd & 15)) { s = combine1 (ps, pm); d = *pd; - *pd++ = coreCombineAtopUPixelsse2 (s, d); + *pd++ = core_combine_atop_u_pixel_sse2 (s, d); w--; ps++; if (pm) @@ -1031,33 +1031,33 @@ coreCombineAtopUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmSrcHi = combine4 ((__m128i*)ps, (__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*) pd); + xmm_src_hi = combine4 ((__m128i*)ps, (__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*) pd); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi); - expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmAlphaDstLo, &xmmAlphaDstHi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi); + expand_alpha_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi); - negate_2x128 (xmmAlphaSrcLo, xmmAlphaSrcHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi); + negate_2x128 (xmm_alpha_src_lo, xmm_alpha_src_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi); - pixAddMultiply_2x128 ( &xmmSrcLo, &xmmSrcHi, &xmmAlphaDstLo, &xmmAlphaDstHi, - &xmmDstLo, &xmmDstHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi, - &xmmDstLo, &xmmDstHi ); + pix_add_multiply_2x128 ( &xmm_src_lo, &xmm_src_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi, + &xmm_dst_lo, &xmm_dst_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi, + &xmm_dst_lo, &xmm_dst_hi ); - save128Aligned ((__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -1071,7 +1071,7 @@ coreCombineAtopUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int s = combine1 (ps, pm); d = *pd; - *pd++ = coreCombineAtopUPixelsse2 (s, d); + *pd++ = core_combine_atop_u_pixel_sse2 (s, d); w--; ps++; if (pm) @@ -1080,38 +1080,38 @@ coreCombineAtopUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int } static force_inline uint32_t -coreCombineReverseAtopUPixelsse2 (uint32_t src, uint32_t dst) +core_combine_reverse_atop_u_pixel_sse2 (uint32_t src, uint32_t dst) { __m64 s = unpack_32_1x64 (src); __m64 d = unpack_32_1x64 (dst); - __m64 sa = expandAlpha_1x64 (s); - __m64 da = negate_1x64 (expandAlpha_1x64 (d)); + __m64 sa = expand_alpha_1x64 (s); + __m64 da = negate_1x64 (expand_alpha_1x64 (d)); - return pack_1x64_32 (pixAddMultiply_1x64 (&s, &da, &d, &sa)); + return pack_1x64_32 (pix_add_multiply_1x64 (&s, &da, &d, &sa)); } static force_inline void -coreCombineReverseAtopUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) +core_combine_reverse_atop_u_sse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* pm, int w) { uint32_t s, d; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmAlphaSrcLo, xmmAlphaSrcHi; - __m128i xmmAlphaDstLo, xmmAlphaDstHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_alpha_src_lo, xmm_alpha_src_hi; + __m128i xmm_alpha_dst_lo, xmm_alpha_dst_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && ((unsigned long) pd & 15)) { s = combine1 (ps, pm); d = *pd; - *pd++ = coreCombineReverseAtopUPixelsse2 (s, d); + *pd++ = core_combine_reverse_atop_u_pixel_sse2 (s, d); ps++; w--; if (pm) @@ -1119,33 +1119,33 @@ coreCombineReverseAtopUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* p } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmSrcHi = combine4 ((__m128i*)ps, (__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*) pd); + xmm_src_hi = combine4 ((__m128i*)ps, (__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*) pd); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi); - expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmAlphaDstLo, &xmmAlphaDstHi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi); + expand_alpha_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi); - negate_2x128 (xmmAlphaDstLo, xmmAlphaDstHi, &xmmAlphaDstLo, &xmmAlphaDstHi); + negate_2x128 (xmm_alpha_dst_lo, xmm_alpha_dst_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi); - pixAddMultiply_2x128 ( &xmmSrcLo, &xmmSrcHi, &xmmAlphaDstLo, &xmmAlphaDstHi, - &xmmDstLo, &xmmDstHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi, - &xmmDstLo, &xmmDstHi ); + pix_add_multiply_2x128 ( &xmm_src_lo, &xmm_src_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi, + &xmm_dst_lo, &xmm_dst_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi, + &xmm_dst_lo, &xmm_dst_hi ); - save128Aligned ((__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -1159,7 +1159,7 @@ coreCombineReverseAtopUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* p s = combine1 (ps, pm); d = *pd; - *pd++ = coreCombineReverseAtopUPixelsse2 (s, d); + *pd++ = core_combine_reverse_atop_u_pixel_sse2 (s, d); ps++; w--; if (pm) @@ -1168,19 +1168,19 @@ coreCombineReverseAtopUsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t* p } static force_inline uint32_t -coreCombineXorUPixelsse2 (uint32_t src, uint32_t dst) +core_combine_xor_u_pixel_sse2 (uint32_t src, uint32_t dst) { __m64 s = unpack_32_1x64 (src); __m64 d = unpack_32_1x64 (dst); - __m64 negD = negate_1x64 (expandAlpha_1x64 (d)); - __m64 negS = negate_1x64 (expandAlpha_1x64 (s)); + __m64 neg_d = negate_1x64 (expand_alpha_1x64 (d)); + __m64 neg_s = negate_1x64 (expand_alpha_1x64 (s)); - return pack_1x64_32 (pixAddMultiply_1x64 (&s, &negD, &d, &negS)); + return pack_1x64_32 (pix_add_multiply_1x64 (&s, &neg_d, &d, &neg_s)); } static force_inline void -coreCombineXorUsse2 (uint32_t* dst, const uint32_t* src, const uint32_t *mask, int width) +core_combine_xor_u_sse2 (uint32_t* dst, const uint32_t* src, const uint32_t *mask, int width) { int w = width; uint32_t s, d; @@ -1188,22 +1188,22 @@ coreCombineXorUsse2 (uint32_t* dst, const uint32_t* src, const uint32_t *mask, i const uint32_t* ps = src; const uint32_t* pm = mask; - __m128i xmmSrc, xmmSrcLo, xmmSrcHi; - __m128i xmmDst, xmmDstLo, xmmDstHi; - __m128i xmmAlphaSrcLo, xmmAlphaSrcHi; - __m128i xmmAlphaDstLo, xmmAlphaDstHi; + __m128i xmm_src, xmm_src_lo, xmm_src_hi; + __m128i xmm_dst, xmm_dst_lo, xmm_dst_hi; + __m128i xmm_alpha_src_lo, xmm_alpha_src_hi; + __m128i xmm_alpha_dst_lo, xmm_alpha_dst_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && ((unsigned long) pd & 15)) { s = combine1 (ps, pm); d = *pd; - *pd++ = coreCombineXorUPixelsse2 (s, d); + *pd++ = core_combine_xor_u_pixel_sse2 (s, d); w--; ps++; if (pm) @@ -1211,34 +1211,34 @@ coreCombineXorUsse2 (uint32_t* dst, const uint32_t* src, const uint32_t *mask, i } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmSrc = combine4 ((__m128i*) ps, (__m128i*) pm); - xmmDst = load128Aligned ((__m128i*) pd); + xmm_src = combine4 ((__m128i*) ps, (__m128i*) pm); + xmm_dst = load_128_aligned ((__m128i*) pd); - unpack_128_2x128 (xmmSrc, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmDst, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_src, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_dst, &xmm_dst_lo, &xmm_dst_hi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi); - expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmAlphaDstLo, &xmmAlphaDstHi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi); + expand_alpha_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi); - negate_2x128 (xmmAlphaSrcLo, xmmAlphaSrcHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi); - negate_2x128 (xmmAlphaDstLo, xmmAlphaDstHi, &xmmAlphaDstLo, &xmmAlphaDstHi); + negate_2x128 (xmm_alpha_src_lo, xmm_alpha_src_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi); + negate_2x128 (xmm_alpha_dst_lo, xmm_alpha_dst_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi); - pixAddMultiply_2x128 ( &xmmSrcLo, &xmmSrcHi, &xmmAlphaDstLo, &xmmAlphaDstHi, - &xmmDstLo, &xmmDstHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi, - &xmmDstLo, &xmmDstHi ); + pix_add_multiply_2x128 ( &xmm_src_lo, &xmm_src_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi, + &xmm_dst_lo, &xmm_dst_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi, + &xmm_dst_lo, &xmm_dst_hi ); - save128Aligned ((__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -1252,7 +1252,7 @@ coreCombineXorUsse2 (uint32_t* dst, const uint32_t* src, const uint32_t *mask, i s = combine1 (ps, pm); d = *pd; - *pd++ = coreCombineXorUPixelsse2 (s, d); + *pd++ = core_combine_xor_u_pixel_sse2 (s, d); w--; ps++; if (pm) @@ -1261,7 +1261,7 @@ coreCombineXorUsse2 (uint32_t* dst, const uint32_t* src, const uint32_t *mask, i } static force_inline void -coreCombineAddUsse2 (uint32_t* dst, const uint32_t* src, const uint32_t* mask, int width) +core_combine_add_u_sse2 (uint32_t* dst, const uint32_t* src, const uint32_t* mask, int width) { int w = width; uint32_t s,d; @@ -1270,9 +1270,9 @@ coreCombineAddUsse2 (uint32_t* dst, const uint32_t* src, const uint32_t* mask, i const uint32_t* pm = mask; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { @@ -1286,23 +1286,23 @@ coreCombineAddUsse2 (uint32_t* dst, const uint32_t* src, const uint32_t* mask, i } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { __m128i s; /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); s = combine4((__m128i*)ps,(__m128i*)pm); - save128Aligned( (__m128i*)pd, - _mm_adds_epu8( s, load128Aligned ((__m128i*)pd)) ); + save_128_aligned( (__m128i*)pd, + _mm_adds_epu8( s, load_128_aligned ((__m128i*)pd)) ); pd += 4; ps += 4; if (pm) @@ -1322,7 +1322,7 @@ coreCombineAddUsse2 (uint32_t* dst, const uint32_t* src, const uint32_t* mask, i } static force_inline uint32_t -coreCombineSaturateUPixelsse2 (uint32_t src, uint32_t dst) +core_combine_saturate_u_pixel_sse2 (uint32_t src, uint32_t dst) { __m64 ms = unpack_32_1x64 (src); __m64 md = unpack_32_1x64 (dst); @@ -1331,30 +1331,30 @@ coreCombineSaturateUPixelsse2 (uint32_t src, uint32_t dst) if (sa > da) { - ms = pixMultiply_1x64 (ms, expandAlpha_1x64 (unpack_32_1x64 (DIV_UN8(da, sa) << 24))); + ms = pix_multiply_1x64 (ms, expand_alpha_1x64 (unpack_32_1x64 (DIV_UN8(da, sa) << 24))); } return pack_1x64_32 (_mm_adds_pu16 (md, ms)); } static force_inline void -coreCombineSaturateUsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) +core_combine_saturate_u_sse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) { uint32_t s,d; - uint32_t packCmp; - __m128i xmmSrc, xmmDst; + uint32_t pack_cmp; + __m128i xmm_src, xmm_dst; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { s = combine1 (ps, pm); d = *pd; - *pd++ = coreCombineSaturateUPixelsse2 (s, d); + *pd++ = core_combine_saturate_u_pixel_sse2 (s, d); w--; ps++; if (pm) @@ -1362,53 +1362,53 @@ coreCombineSaturateUsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmDst = load128Aligned ((__m128i*)pd); - xmmSrc = combine4 ((__m128i*)ps, (__m128i*)pm); + xmm_dst = load_128_aligned ((__m128i*)pd); + xmm_src = combine4 ((__m128i*)ps, (__m128i*)pm); - packCmp = _mm_movemask_epi8 (_mm_cmpgt_epi32 (_mm_srli_epi32 (xmmSrc, 24), - _mm_srli_epi32 (_mm_xor_si128 (xmmDst, Maskff000000), 24))); + pack_cmp = _mm_movemask_epi8 (_mm_cmpgt_epi32 (_mm_srli_epi32 (xmm_src, 24), + _mm_srli_epi32 (_mm_xor_si128 (xmm_dst, mask_ff000000), 24))); /* if some alpha src is grater than respective ~alpha dst */ - if (packCmp) + if (pack_cmp) { s = combine1 (ps++, pm); d = *pd; - *pd++ = coreCombineSaturateUPixelsse2 (s, d); + *pd++ = core_combine_saturate_u_pixel_sse2 (s, d); if (pm) pm++; s = combine1 (ps++, pm); d = *pd; - *pd++ = coreCombineSaturateUPixelsse2 (s, d); + *pd++ = core_combine_saturate_u_pixel_sse2 (s, d); if (pm) pm++; s = combine1 (ps++, pm); d = *pd; - *pd++ = coreCombineSaturateUPixelsse2 (s, d); + *pd++ = core_combine_saturate_u_pixel_sse2 (s, d); if (pm) pm++; s = combine1 (ps++, pm); d = *pd; - *pd++ = coreCombineSaturateUPixelsse2 (s, d); + *pd++ = core_combine_saturate_u_pixel_sse2 (s, d); if (pm) pm++; } else { - save128Aligned ((__m128i*)pd, _mm_adds_epu8 (xmmDst, xmmSrc)); + save_128_aligned ((__m128i*)pd, _mm_adds_epu8 (xmm_dst, xmm_src)); pd += 4; ps += 4; @@ -1423,7 +1423,7 @@ coreCombineSaturateUsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, { s = combine1 (ps, pm); d = *pd; - *pd++ = coreCombineSaturateUPixelsse2 (s, d); + *pd++ = core_combine_saturate_u_pixel_sse2 (s, d); ps++; if (pm) pm++; @@ -1431,48 +1431,48 @@ coreCombineSaturateUsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, } static force_inline void -coreCombineSrcCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w) +core_combine_src_c_sse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w) { uint32_t s, m; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmMaskLo, xmmMaskHi; - __m128i xmmDstLo, xmmDstHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_mask_lo, xmm_mask_hi; + __m128i xmm_dst_lo, xmm_dst_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { s = *ps++; m = *pm++; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m))); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmSrcHi = load128Unaligned ((__m128i*)ps); - xmmMaskHi = load128Unaligned ((__m128i*)pm); + xmm_src_hi = load_128_unaligned ((__m128i*)ps); + xmm_mask_hi = load_128_unaligned ((__m128i*)pm); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmMaskLo, &xmmMaskHi, &xmmDstLo, &xmmDstHi); + pix_multiply_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_mask_lo, &xmm_mask_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned( (__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned( (__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -1484,36 +1484,36 @@ coreCombineSrcCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w { s = *ps++; m = *pm++; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m))); w--; } } static force_inline uint32_t -coreCombineOverCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst) +core_combine_over_c_pixel_sse2 (uint32_t src, uint32_t mask, uint32_t dst) { __m64 s = unpack_32_1x64 (src); - __m64 expAlpha = expandAlpha_1x64 (s); - __m64 unpkMask = unpack_32_1x64 (mask); - __m64 unpkDst = unpack_32_1x64 (dst); + __m64 expAlpha = expand_alpha_1x64 (s); + __m64 unpk_mask = unpack_32_1x64 (mask); + __m64 unpk_dst = unpack_32_1x64 (dst); - return pack_1x64_32 (inOver_1x64 (&s, &expAlpha, &unpkMask, &unpkDst)); + return pack_1x64_32 (in_over_1x64 (&s, &expAlpha, &unpk_mask, &unpk_dst)); } static force_inline void -coreCombineOverCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w) +core_combine_over_c_sse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w) { uint32_t s, m, d; - __m128i xmmAlphaLo, xmmAlphaHi; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmMaskLo, xmmMaskHi; + __m128i xmm_alpha_lo, xmm_alpha_hi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_mask_lo, xmm_mask_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { @@ -1521,35 +1521,35 @@ coreCombineOverCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int m = *pm++; d = *pd; - *pd++ = coreCombineOverCPixelsse2 (s, m, d); + *pd++ = core_combine_over_c_pixel_sse2 (s, m, d); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*)pd); - xmmSrcHi = load128Unaligned ((__m128i*)ps); - xmmMaskHi = load128Unaligned ((__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*)pd); + xmm_src_hi = load_128_unaligned ((__m128i*)ps); + xmm_mask_hi = load_128_unaligned ((__m128i*)pm); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaLo, &xmmAlphaHi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_lo, &xmm_alpha_hi); - inOver_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmAlphaLo, &xmmAlphaHi, &xmmMaskLo, &xmmMaskHi, &xmmDstLo, &xmmDstHi); + in_over_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_alpha_lo, &xmm_alpha_hi, &xmm_mask_lo, &xmm_mask_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned( (__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned( (__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -1563,33 +1563,33 @@ coreCombineOverCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int m = *pm++; d = *pd; - *pd++ = coreCombineOverCPixelsse2 (s, m, d); + *pd++ = core_combine_over_c_pixel_sse2 (s, m, d); w--; } } static force_inline uint32_t -coreCombineOverReverseCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst) +core_combine_over_reverse_c_pixel_sse2 (uint32_t src, uint32_t mask, uint32_t dst) { __m64 d = unpack_32_1x64 (dst); - return pack_1x64_32(over_1x64 (d, expandAlpha_1x64 (d), pixMultiply_1x64 (unpack_32_1x64 (src), unpack_32_1x64 (mask)))); + return pack_1x64_32(over_1x64 (d, expand_alpha_1x64 (d), pix_multiply_1x64 (unpack_32_1x64 (src), unpack_32_1x64 (mask)))); } static force_inline void -coreCombineOverReverseCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w) +core_combine_over_reverse_c_sse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *pm, int w) { uint32_t s, m, d; - __m128i xmmAlphaLo, xmmAlphaHi; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmMaskLo, xmmMaskHi; + __m128i xmm_alpha_lo, xmm_alpha_hi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_mask_lo, xmm_mask_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { @@ -1597,36 +1597,36 @@ coreCombineOverReverseCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *p m = *pm++; d = *pd; - *pd++ = coreCombineOverReverseCPixelsse2 (s, m, d); + *pd++ = core_combine_over_reverse_c_pixel_sse2 (s, m, d); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*)pd); - xmmSrcHi = load128Unaligned ((__m128i*)ps); - xmmMaskHi = load128Unaligned ((__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*)pd); + xmm_src_hi = load_128_unaligned ((__m128i*)ps); + xmm_mask_hi = load_128_unaligned ((__m128i*)pm); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmAlphaLo, &xmmAlphaHi); - pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmMaskLo, &xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + expand_alpha_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_alpha_lo, &xmm_alpha_hi); + pix_multiply_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_mask_lo, &xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - over_2x128 (&xmmDstLo, &xmmDstHi, &xmmAlphaLo, &xmmAlphaHi, &xmmMaskLo, &xmmMaskHi); + over_2x128 (&xmm_dst_lo, &xmm_dst_hi, &xmm_alpha_lo, &xmm_alpha_hi, &xmm_mask_lo, &xmm_mask_hi); - save128Aligned( (__m128i*)pd, pack_2x128_128 (xmmMaskLo, xmmMaskHi)); + save_128_aligned( (__m128i*)pd, pack_2x128_128 (xmm_mask_lo, xmm_mask_hi)); ps += 4; pd += 4; @@ -1640,25 +1640,25 @@ coreCombineOverReverseCsse2 (uint32_t* pd, const uint32_t* ps, const uint32_t *p m = *pm++; d = *pd; - *pd++ = coreCombineOverReverseCPixelsse2 (s, m, d); + *pd++ = core_combine_over_reverse_c_pixel_sse2 (s, m, d); w--; } } static force_inline void -coreCombineInCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) +core_combine_in_c_sse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) { uint32_t s, m, d; - __m128i xmmAlphaLo, xmmAlphaHi; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmMaskLo, xmmMaskHi; + __m128i xmm_alpha_lo, xmm_alpha_hi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_mask_lo, xmm_mask_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { @@ -1666,37 +1666,37 @@ coreCombineInCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) m = *pm++; d = *pd; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (pixMultiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m)), - expandAlpha_1x64 (unpack_32_1x64 (d)))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (pix_multiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m)), + expand_alpha_1x64 (unpack_32_1x64 (d)))); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*)pd); - xmmSrcHi = load128Unaligned ((__m128i*)ps); - xmmMaskHi = load128Unaligned ((__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*)pd); + xmm_src_hi = load_128_unaligned ((__m128i*)ps); + xmm_mask_hi = load_128_unaligned ((__m128i*)pm); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmAlphaLo, &xmmAlphaHi); - pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmMaskLo, &xmmMaskHi, &xmmDstLo, &xmmDstHi); + expand_alpha_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_alpha_lo, &xmm_alpha_hi); + pix_multiply_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_mask_lo, &xmm_mask_hi, &xmm_dst_lo, &xmm_dst_hi); - pixMultiply_2x128 (&xmmDstLo, &xmmDstHi, &xmmAlphaLo, &xmmAlphaHi, &xmmDstLo, &xmmDstHi); + pix_multiply_2x128 (&xmm_dst_lo, &xmm_dst_hi, &xmm_alpha_lo, &xmm_alpha_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned( (__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned( (__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -1710,26 +1710,26 @@ coreCombineInCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) m = *pm++; d = *pd; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (pixMultiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m)), - expandAlpha_1x64 (unpack_32_1x64 (d)))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (pix_multiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m)), + expand_alpha_1x64 (unpack_32_1x64 (d)))); w--; } } static force_inline void -coreCombineInReverseCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) +core_combine_in_reverse_c_sse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) { uint32_t s, m, d; - __m128i xmmAlphaLo, xmmAlphaHi; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmMaskLo, xmmMaskHi; + __m128i xmm_alpha_lo, xmm_alpha_hi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_mask_lo, xmm_mask_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { @@ -1737,38 +1737,38 @@ coreCombineInReverseCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, m = *pm++; d = *pd; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (d), - pixMultiply_1x64 (unpack_32_1x64 (m), - expandAlpha_1x64 (unpack_32_1x64 (s))))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (unpack_32_1x64 (d), + pix_multiply_1x64 (unpack_32_1x64 (m), + expand_alpha_1x64 (unpack_32_1x64 (s))))); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*)pd); - xmmSrcHi = load128Unaligned ((__m128i*)ps); - xmmMaskHi = load128Unaligned ((__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*)pd); + xmm_src_hi = load_128_unaligned ((__m128i*)ps); + xmm_mask_hi = load_128_unaligned ((__m128i*)pm); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaLo, &xmmAlphaHi); - pixMultiply_2x128 (&xmmMaskLo, &xmmMaskHi, &xmmAlphaLo, &xmmAlphaHi, &xmmAlphaLo, &xmmAlphaHi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_lo, &xmm_alpha_hi); + pix_multiply_2x128 (&xmm_mask_lo, &xmm_mask_hi, &xmm_alpha_lo, &xmm_alpha_hi, &xmm_alpha_lo, &xmm_alpha_hi); - pixMultiply_2x128 (&xmmDstLo, &xmmDstHi, &xmmAlphaLo, &xmmAlphaHi, &xmmDstLo, &xmmDstHi); + pix_multiply_2x128 (&xmm_dst_lo, &xmm_dst_hi, &xmm_alpha_lo, &xmm_alpha_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned( (__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned( (__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -1782,27 +1782,27 @@ coreCombineInReverseCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, m = *pm++; d = *pd; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (d), - pixMultiply_1x64 (unpack_32_1x64 (m), - expandAlpha_1x64 (unpack_32_1x64 (s))))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (unpack_32_1x64 (d), + pix_multiply_1x64 (unpack_32_1x64 (m), + expand_alpha_1x64 (unpack_32_1x64 (s))))); w--; } } static force_inline void -coreCombineOutCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) +core_combine_out_c_sse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) { uint32_t s, m, d; - __m128i xmmAlphaLo, xmmAlphaHi; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmMaskLo, xmmMaskHi; + __m128i xmm_alpha_lo, xmm_alpha_hi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_mask_lo, xmm_mask_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { @@ -1810,38 +1810,38 @@ coreCombineOutCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w m = *pm++; d = *pd; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (pixMultiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m)), - negate_1x64 (expandAlpha_1x64 (unpack_32_1x64 (d))))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (pix_multiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m)), + negate_1x64 (expand_alpha_1x64 (unpack_32_1x64 (d))))); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*)pd); - xmmSrcHi = load128Unaligned ((__m128i*)ps); - xmmMaskHi = load128Unaligned ((__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*)pd); + xmm_src_hi = load_128_unaligned ((__m128i*)ps); + xmm_mask_hi = load_128_unaligned ((__m128i*)pm); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmAlphaLo, &xmmAlphaHi); - negate_2x128 (xmmAlphaLo, xmmAlphaHi, &xmmAlphaLo, &xmmAlphaHi); + expand_alpha_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_alpha_lo, &xmm_alpha_hi); + negate_2x128 (xmm_alpha_lo, xmm_alpha_hi, &xmm_alpha_lo, &xmm_alpha_hi); - pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmMaskLo, &xmmMaskHi, &xmmDstLo, &xmmDstHi); - pixMultiply_2x128 (&xmmDstLo, &xmmDstHi, &xmmAlphaLo, &xmmAlphaHi, &xmmDstLo, &xmmDstHi); + pix_multiply_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_mask_lo, &xmm_mask_hi, &xmm_dst_lo, &xmm_dst_hi); + pix_multiply_2x128 (&xmm_dst_lo, &xmm_dst_hi, &xmm_alpha_lo, &xmm_alpha_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned( (__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned( (__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -1855,26 +1855,26 @@ coreCombineOutCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w m = *pm++; d = *pd; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (pixMultiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m)), - negate_1x64 (expandAlpha_1x64 (unpack_32_1x64 (d))))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (pix_multiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m)), + negate_1x64 (expand_alpha_1x64 (unpack_32_1x64 (d))))); w--; } } static force_inline void -coreCombineOutReverseCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) +core_combine_out_reverse_c_sse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) { uint32_t s, m, d; - __m128i xmmAlphaLo, xmmAlphaHi; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmMaskLo, xmmMaskHi; + __m128i xmm_alpha_lo, xmm_alpha_hi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_mask_lo, xmm_mask_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { @@ -1882,41 +1882,41 @@ coreCombineOutReverseCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm m = *pm++; d = *pd; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (d), - negate_1x64 (pixMultiply_1x64 (unpack_32_1x64 (m), - expandAlpha_1x64 (unpack_32_1x64 (s)))))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (unpack_32_1x64 (d), + negate_1x64 (pix_multiply_1x64 (unpack_32_1x64 (m), + expand_alpha_1x64 (unpack_32_1x64 (s)))))); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*)pd); - xmmSrcHi = load128Unaligned ((__m128i*)ps); - xmmMaskHi = load128Unaligned ((__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*)pd); + xmm_src_hi = load_128_unaligned ((__m128i*)ps); + xmm_mask_hi = load_128_unaligned ((__m128i*)pm); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaLo, &xmmAlphaHi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_lo, &xmm_alpha_hi); - pixMultiply_2x128 (&xmmMaskLo, &xmmMaskHi, &xmmAlphaLo, &xmmAlphaHi, &xmmMaskLo, &xmmMaskHi); + pix_multiply_2x128 (&xmm_mask_lo, &xmm_mask_hi, &xmm_alpha_lo, &xmm_alpha_hi, &xmm_mask_lo, &xmm_mask_hi); - negate_2x128 (xmmMaskLo, xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + negate_2x128 (xmm_mask_lo, xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - pixMultiply_2x128 (&xmmDstLo, &xmmDstHi, &xmmMaskLo, &xmmMaskHi, &xmmDstLo, &xmmDstHi); + pix_multiply_2x128 (&xmm_dst_lo, &xmm_dst_hi, &xmm_mask_lo, &xmm_mask_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned( (__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned( (__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -1930,43 +1930,43 @@ coreCombineOutReverseCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm m = *pm++; d = *pd; - *pd++ = pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (d), - negate_1x64 (pixMultiply_1x64 (unpack_32_1x64 (m), - expandAlpha_1x64 (unpack_32_1x64 (s)))))); + *pd++ = pack_1x64_32 (pix_multiply_1x64 (unpack_32_1x64 (d), + negate_1x64 (pix_multiply_1x64 (unpack_32_1x64 (m), + expand_alpha_1x64 (unpack_32_1x64 (s)))))); w--; } } static force_inline uint32_t -coreCombineAtopCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst) +core_combine_atop_c_pixel_sse2 (uint32_t src, uint32_t mask, uint32_t dst) { __m64 m = unpack_32_1x64 (mask); __m64 s = unpack_32_1x64 (src); __m64 d = unpack_32_1x64 (dst); - __m64 sa = expandAlpha_1x64 (s); - __m64 da = expandAlpha_1x64 (d); + __m64 sa = expand_alpha_1x64 (s); + __m64 da = expand_alpha_1x64 (d); - s = pixMultiply_1x64 (s, m); - m = negate_1x64 (pixMultiply_1x64 (m, sa)); + s = pix_multiply_1x64 (s, m); + m = negate_1x64 (pix_multiply_1x64 (m, sa)); - return pack_1x64_32 (pixAddMultiply_1x64 (&d, &m, &s, &da)); + return pack_1x64_32 (pix_add_multiply_1x64 (&d, &m, &s, &da)); } static force_inline void -coreCombineAtopCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) +core_combine_atop_c_sse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) { uint32_t s, m, d; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmAlphaSrcLo, xmmAlphaSrcHi; - __m128i xmmAlphaDstLo, xmmAlphaDstHi; - __m128i xmmMaskLo, xmmMaskHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_alpha_src_lo, xmm_alpha_src_hi; + __m128i xmm_alpha_dst_lo, xmm_alpha_dst_hi; + __m128i xmm_mask_lo, xmm_mask_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { @@ -1974,43 +1974,43 @@ coreCombineAtopCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int m = *pm++; d = *pd; - *pd++ = coreCombineAtopCPixelsse2 (s, m, d); + *pd++ = core_combine_atop_c_pixel_sse2 (s, m, d); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*)pd); - xmmSrcHi = load128Unaligned ((__m128i*)ps); - xmmMaskHi = load128Unaligned ((__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*)pd); + xmm_src_hi = load_128_unaligned ((__m128i*)ps); + xmm_mask_hi = load_128_unaligned ((__m128i*)pm); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi); - expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmAlphaDstLo, &xmmAlphaDstHi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi); + expand_alpha_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi); - pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmMaskLo, &xmmMaskHi, &xmmSrcLo, &xmmSrcHi); - pixMultiply_2x128 (&xmmMaskLo, &xmmMaskHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi, &xmmMaskLo, &xmmMaskHi); + pix_multiply_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_mask_lo, &xmm_mask_hi, &xmm_src_lo, &xmm_src_hi); + pix_multiply_2x128 (&xmm_mask_lo, &xmm_mask_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi, &xmm_mask_lo, &xmm_mask_hi); - negate_2x128 (xmmMaskLo, xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + negate_2x128 (xmm_mask_lo, xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - pixAddMultiply_2x128 (&xmmDstLo, &xmmDstHi, &xmmMaskLo, &xmmMaskHi, - &xmmSrcLo, &xmmSrcHi, &xmmAlphaDstLo, &xmmAlphaDstHi, - &xmmDstLo, &xmmDstHi); + pix_add_multiply_2x128 (&xmm_dst_lo, &xmm_dst_hi, &xmm_mask_lo, &xmm_mask_hi, + &xmm_src_lo, &xmm_src_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi, + &xmm_dst_lo, &xmm_dst_hi); - save128Aligned( (__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned( (__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -2024,42 +2024,42 @@ coreCombineAtopCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int m = *pm++; d = *pd; - *pd++ = coreCombineAtopCPixelsse2 (s, m, d); + *pd++ = core_combine_atop_c_pixel_sse2 (s, m, d); w--; } } static force_inline uint32_t -coreCombineReverseAtopCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst) +core_combine_reverse_atop_c_pixel_sse2 (uint32_t src, uint32_t mask, uint32_t dst) { __m64 m = unpack_32_1x64 (mask); __m64 s = unpack_32_1x64 (src); __m64 d = unpack_32_1x64 (dst); - __m64 da = negate_1x64 (expandAlpha_1x64 (d)); - __m64 sa = expandAlpha_1x64 (s); + __m64 da = negate_1x64 (expand_alpha_1x64 (d)); + __m64 sa = expand_alpha_1x64 (s); - s = pixMultiply_1x64 (s, m); - m = pixMultiply_1x64 (m, sa); + s = pix_multiply_1x64 (s, m); + m = pix_multiply_1x64 (m, sa); - return pack_1x64_32 (pixAddMultiply_1x64 (&d, &m, &s, &da)); + return pack_1x64_32 (pix_add_multiply_1x64 (&d, &m, &s, &da)); } static force_inline void -coreCombineReverseAtopCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) +core_combine_reverse_atop_c_sse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) { uint32_t s, m, d; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmAlphaSrcLo, xmmAlphaSrcHi; - __m128i xmmAlphaDstLo, xmmAlphaDstHi; - __m128i xmmMaskLo, xmmMaskHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_alpha_src_lo, xmm_alpha_src_hi; + __m128i xmm_alpha_dst_lo, xmm_alpha_dst_hi; + __m128i xmm_mask_lo, xmm_mask_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { @@ -2067,43 +2067,43 @@ coreCombineReverseAtopCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *p m = *pm++; d = *pd; - *pd++ = coreCombineReverseAtopCPixelsse2 (s, m, d); + *pd++ = core_combine_reverse_atop_c_pixel_sse2 (s, m, d); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*)pd); - xmmSrcHi = load128Unaligned ((__m128i*)ps); - xmmMaskHi = load128Unaligned ((__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*)pd); + xmm_src_hi = load_128_unaligned ((__m128i*)ps); + xmm_mask_hi = load_128_unaligned ((__m128i*)pm); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi); - expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmAlphaDstLo, &xmmAlphaDstHi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi); + expand_alpha_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi); - pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmMaskLo, &xmmMaskHi, &xmmSrcLo, &xmmSrcHi); - pixMultiply_2x128 (&xmmMaskLo, &xmmMaskHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi, &xmmMaskLo, &xmmMaskHi); + pix_multiply_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_mask_lo, &xmm_mask_hi, &xmm_src_lo, &xmm_src_hi); + pix_multiply_2x128 (&xmm_mask_lo, &xmm_mask_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi, &xmm_mask_lo, &xmm_mask_hi); - negate_2x128 (xmmAlphaDstLo, xmmAlphaDstHi, &xmmAlphaDstLo, &xmmAlphaDstHi); + negate_2x128 (xmm_alpha_dst_lo, xmm_alpha_dst_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi); - pixAddMultiply_2x128 (&xmmDstLo, &xmmDstHi, &xmmMaskLo, &xmmMaskHi, - &xmmSrcLo, &xmmSrcHi, &xmmAlphaDstLo, &xmmAlphaDstHi, - &xmmDstLo, &xmmDstHi); + pix_add_multiply_2x128 (&xmm_dst_lo, &xmm_dst_hi, &xmm_mask_lo, &xmm_mask_hi, + &xmm_src_lo, &xmm_src_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi, + &xmm_dst_lo, &xmm_dst_hi); - save128Aligned( (__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned( (__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -2117,43 +2117,43 @@ coreCombineReverseAtopCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *p m = *pm++; d = *pd; - *pd++ = coreCombineReverseAtopCPixelsse2 (s, m, d); + *pd++ = core_combine_reverse_atop_c_pixel_sse2 (s, m, d); w--; } } static force_inline uint32_t -coreCombineXorCPixelsse2 (uint32_t src, uint32_t mask, uint32_t dst) +core_combine_xor_c_pixel_sse2 (uint32_t src, uint32_t mask, uint32_t dst) { __m64 a = unpack_32_1x64 (mask); __m64 s = unpack_32_1x64 (src); __m64 d = unpack_32_1x64 (dst); - __m64 alphaDst = negate_1x64 (pixMultiply_1x64 (a, expandAlpha_1x64 (s))); - __m64 dest = pixMultiply_1x64 (s, a); - __m64 alphaSrc = negate_1x64 (expandAlpha_1x64 (d)); + __m64 alpha_dst = negate_1x64 (pix_multiply_1x64 (a, expand_alpha_1x64 (s))); + __m64 dest = pix_multiply_1x64 (s, a); + __m64 alpha_src = negate_1x64 (expand_alpha_1x64 (d)); - return pack_1x64_32 (pixAddMultiply_1x64 (&d, - &alphaDst, + return pack_1x64_32 (pix_add_multiply_1x64 (&d, + &alpha_dst, &dest, - &alphaSrc)); + &alpha_src)); } static force_inline void -coreCombineXorCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) +core_combine_xor_c_sse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) { uint32_t s, m, d; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmAlphaSrcLo, xmmAlphaSrcHi; - __m128i xmmAlphaDstLo, xmmAlphaDstHi; - __m128i xmmMaskLo, xmmMaskHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_alpha_src_lo, xmm_alpha_src_hi; + __m128i xmm_alpha_dst_lo, xmm_alpha_dst_hi; + __m128i xmm_mask_lo, xmm_mask_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { @@ -2161,44 +2161,44 @@ coreCombineXorCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w m = *pm++; d = *pd; - *pd++ = coreCombineXorCPixelsse2 (s, m, d); + *pd++ = core_combine_xor_c_pixel_sse2 (s, m, d); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*)pd); - xmmSrcHi = load128Unaligned ((__m128i*)ps); - xmmMaskHi = load128Unaligned ((__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*)pd); + xmm_src_hi = load_128_unaligned ((__m128i*)ps); + xmm_mask_hi = load_128_unaligned ((__m128i*)pm); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi); - expandAlpha_2x128 (xmmDstLo, xmmDstHi, &xmmAlphaDstLo, &xmmAlphaDstHi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi); + expand_alpha_2x128 (xmm_dst_lo, xmm_dst_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi); - pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmMaskLo, &xmmMaskHi, &xmmSrcLo, &xmmSrcHi); - pixMultiply_2x128 (&xmmMaskLo, &xmmMaskHi, &xmmAlphaSrcLo, &xmmAlphaSrcHi, &xmmMaskLo, &xmmMaskHi); + pix_multiply_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_mask_lo, &xmm_mask_hi, &xmm_src_lo, &xmm_src_hi); + pix_multiply_2x128 (&xmm_mask_lo, &xmm_mask_hi, &xmm_alpha_src_lo, &xmm_alpha_src_hi, &xmm_mask_lo, &xmm_mask_hi); - negate_2x128 (xmmAlphaDstLo, xmmAlphaDstHi, &xmmAlphaDstLo, &xmmAlphaDstHi); - negate_2x128 (xmmMaskLo, xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + negate_2x128 (xmm_alpha_dst_lo, xmm_alpha_dst_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi); + negate_2x128 (xmm_mask_lo, xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - pixAddMultiply_2x128 (&xmmDstLo, &xmmDstHi, &xmmMaskLo, &xmmMaskHi, - &xmmSrcLo, &xmmSrcHi, &xmmAlphaDstLo, &xmmAlphaDstHi, - &xmmDstLo, &xmmDstHi); + pix_add_multiply_2x128 (&xmm_dst_lo, &xmm_dst_hi, &xmm_mask_lo, &xmm_mask_hi, + &xmm_src_lo, &xmm_src_hi, &xmm_alpha_dst_lo, &xmm_alpha_dst_hi, + &xmm_dst_lo, &xmm_dst_hi); - save128Aligned( (__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned( (__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); ps += 4; pd += 4; @@ -2212,24 +2212,24 @@ coreCombineXorCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w m = *pm++; d = *pd; - *pd++ = coreCombineXorCPixelsse2 (s, m, d); + *pd++ = core_combine_xor_c_pixel_sse2 (s, m, d); w--; } } static force_inline void -coreCombineAddCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) +core_combine_add_c_sse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w) { uint32_t s, m, d; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; - __m128i xmmMaskLo, xmmMaskHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; + __m128i xmm_mask_lo, xmm_mask_hi; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { @@ -2237,36 +2237,36 @@ coreCombineAddCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w m = *pm++; d = *pd; - *pd++ = pack_1x64_32 (_mm_adds_pu8 (pixMultiply_1x64 (unpack_32_1x64 (s), + *pd++ = pack_1x64_32 (_mm_adds_pu8 (pix_multiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m)), unpack_32_1x64 (d))); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)ps); - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)ps); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)ps); - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)ps); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmSrcHi = load128Unaligned ((__m128i*)ps); - xmmMaskHi = load128Unaligned ((__m128i*)pm); - xmmDstHi = load128Aligned ((__m128i*)pd); + xmm_src_hi = load_128_unaligned ((__m128i*)ps); + xmm_mask_hi = load_128_unaligned ((__m128i*)pm); + xmm_dst_hi = load_128_aligned ((__m128i*)pd); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMaskHi, &xmmMaskLo, &xmmMaskHi); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmMaskLo, &xmmMaskHi, &xmmSrcLo, &xmmSrcHi); + pix_multiply_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_mask_lo, &xmm_mask_hi, &xmm_src_lo, &xmm_src_hi); - save128Aligned( (__m128i*)pd, pack_2x128_128 (_mm_adds_epu8 (xmmSrcLo, xmmDstLo), - _mm_adds_epu8 (xmmSrcHi, xmmDstHi))); + save_128_aligned( (__m128i*)pd, pack_2x128_128 (_mm_adds_epu8 (xmm_src_lo, xmm_dst_lo), + _mm_adds_epu8 (xmm_src_hi, xmm_dst_hi))); ps += 4; pd += 4; @@ -2280,7 +2280,7 @@ coreCombineAddCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w m = *pm++; d = *pd; - *pd++ = pack_1x64_32 (_mm_adds_pu8 (pixMultiply_1x64 (unpack_32_1x64 (s), + *pd++ = pack_1x64_32 (_mm_adds_pu8 (pix_multiply_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (m)), unpack_32_1x64 (d))); w--; @@ -2288,28 +2288,28 @@ coreCombineAddCsse2 (uint32_t *pd, const uint32_t *ps, const uint32_t *pm, int w } /* ------------------------------------------------------------------------------------------------- - * fbComposeSetupSSE2 + * fb_compose_setup_sSE2 */ static force_inline __m64 -createMask_16_64 (uint16_t mask) +create_mask_16_64 (uint16_t mask) { return _mm_set1_pi16 (mask); } static force_inline __m128i -createMask_16_128 (uint16_t mask) +create_mask_16_128 (uint16_t mask) { return _mm_set1_epi16 (mask); } static force_inline __m64 -createMask_2x32_64 (uint32_t mask0, uint32_t mask1) +create_mask_2x32_64 (uint32_t mask0, uint32_t mask1) { return _mm_set_pi32 (mask0, mask1); } static force_inline __m128i -createMask_2x32_128 (uint32_t mask0, uint32_t mask1) +create_mask_2x32_128 (uint32_t mask0, uint32_t mask1) { return _mm_set_epi32 (mask0, mask1, mask0, mask1); } @@ -2317,187 +2317,187 @@ createMask_2x32_128 (uint32_t mask0, uint32_t mask1) /* SSE2 code patch for fbcompose.c */ static void -sse2CombineOverU (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_over_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineOverUsse2 (dst, src, mask, width); + core_combine_over_u_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineOverReverseU (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_over_reverse_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineOverReverseUsse2 (dst, src, mask, width); + core_combine_over_reverse_u_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineInU (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_in_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineInUsse2 (dst, src, mask, width); + core_combine_in_u_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineInReverseU (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_in_reverse_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineReverseInUsse2 (dst, src, mask, width); + core_combine_reverse_in_u_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineOutU (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_out_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineOutUsse2 (dst, src, mask, width); + core_combine_out_u_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineOutReverseU (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_out_reverse_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineReverseOutUsse2 (dst, src, mask, width); + core_combine_reverse_out_u_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineAtopU (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_atop_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineAtopUsse2 (dst, src, mask, width); + core_combine_atop_u_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineAtopReverseU (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_atop_reverse_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineReverseAtopUsse2 (dst, src, mask, width); + core_combine_reverse_atop_u_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineXorU (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_xor_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineXorUsse2 (dst, src, mask, width); + core_combine_xor_u_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineAddU (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_add_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineAddUsse2 (dst, src, mask, width); + core_combine_add_u_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineSaturateU (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_saturate_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineSaturateUsse2 (dst, src, mask, width); + core_combine_saturate_u_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineSrcC (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_src_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineSrcCsse2 (dst, src, mask, width); + core_combine_src_c_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineOverC (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_over_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineOverCsse2 (dst, src, mask, width); + core_combine_over_c_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineOverReverseC (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_over_reverse_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineOverReverseCsse2 (dst, src, mask, width); + core_combine_over_reverse_c_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineInC (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_in_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineInCsse2 (dst, src, mask, width); + core_combine_in_c_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineInReverseC (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_in_reverse_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineInReverseCsse2 (dst, src, mask, width); + core_combine_in_reverse_c_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineOutC (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_out_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineOutCsse2 (dst, src, mask, width); + core_combine_out_c_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineOutReverseC (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_out_reverse_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineOutReverseCsse2 (dst, src, mask, width); + core_combine_out_reverse_c_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineAtopC (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_atop_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineAtopCsse2 (dst, src, mask, width); + core_combine_atop_c_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineAtopReverseC (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_atop_reverse_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineReverseAtopCsse2 (dst, src, mask, width); + core_combine_reverse_atop_c_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineXorC (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_xor_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineXorCsse2 (dst, src, mask, width); + core_combine_xor_c_sse2 (dst, src, mask, width); _mm_empty(); } static void -sse2CombineAddC (pixman_implementation_t *imp, pixman_op_t op, +sse2combine_add_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dst, const uint32_t *src, const uint32_t *mask, int width) { - coreCombineAddCsse2 (dst, src, mask, width); + core_combine_add_c_sse2 (dst, src, mask, width); _mm_empty(); } /* ------------------------------------------------------------------------------------------------- - * fast_CompositeOver_n_8888 + * fast_composite_over_n_8888 */ static void -sse2_CompositeOver_n_8888 (pixman_implementation_t *imp, +sse2_composite_over_n_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2512,56 +2512,56 @@ sse2_CompositeOver_n_8888 (pixman_implementation_t *imp, int32_t height) { uint32_t src; - uint32_t *dstLine, *dst, d; + uint32_t *dst_line, *dst, d; uint16_t w; - int dstStride; - __m128i xmmSrc, xmmAlpha; - __m128i xmmDst, xmmDstLo, xmmDstHi; + int dst_stride; + __m128i xmm_src, xmm_alpha; + __m128i xmm_dst, xmm_dst_lo, xmm_dst_hi; src = _pixman_image_get_solid(src_image, dst_image->bits.format); if (src == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); - xmmSrc = expandPixel_32_1x128 (src); - xmmAlpha = expandAlpha_1x128 (xmmSrc); + xmm_src = expand_pixel_32_1x128 (src); + xmm_alpha = expand_alpha_1x128 (xmm_src); while (height--) { - dst = dstLine; + dst = dst_line; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)dst); - dstLine += dstStride; + dst_line += dst_stride; w = width; while (w && (unsigned long)dst & 15) { d = *dst; - *dst++ = pack_1x64_32 (over_1x64 (_mm_movepi64_pi64 (xmmSrc), - _mm_movepi64_pi64 (xmmAlpha), + *dst++ = pack_1x64_32 (over_1x64 (_mm_movepi64_pi64 (xmm_src), + _mm_movepi64_pi64 (xmm_alpha), unpack_32_1x64 (d))); w--; } - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)dst); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)dst); + cache_prefetch_next ((__m128i*)dst); - xmmDst = load128Aligned ((__m128i*)dst); + xmm_dst = load_128_aligned ((__m128i*)dst); - unpack_128_2x128 (xmmDst, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_dst, &xmm_dst_lo, &xmm_dst_hi); - over_2x128 (&xmmSrc, &xmmSrc, &xmmAlpha, &xmmAlpha, &xmmDstLo, &xmmDstHi); + over_2x128 (&xmm_src, &xmm_src, &xmm_alpha, &xmm_alpha, &xmm_dst_lo, &xmm_dst_hi); /* rebuid the 4 pixel data and save*/ - save128Aligned ((__m128i*)dst, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)dst, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); w -= 4; dst += 4; @@ -2570,8 +2570,8 @@ sse2_CompositeOver_n_8888 (pixman_implementation_t *imp, while (w) { d = *dst; - *dst++ = pack_1x64_32 (over_1x64 (_mm_movepi64_pi64 (xmmSrc), - _mm_movepi64_pi64 (xmmAlpha), + *dst++ = pack_1x64_32 (over_1x64 (_mm_movepi64_pi64 (xmm_src), + _mm_movepi64_pi64 (xmm_alpha), unpack_32_1x64 (d))); w--; } @@ -2581,10 +2581,10 @@ sse2_CompositeOver_n_8888 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_CompositeOver_n_0565 + * fast_composite_over_n_0565 */ static void -sse2_CompositeOver_n_0565 (pixman_implementation_t *imp, +sse2_composite_over_n_0565 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2599,59 +2599,59 @@ sse2_CompositeOver_n_0565 (pixman_implementation_t *imp, int32_t height) { uint32_t src; - uint16_t *dstLine, *dst, d; + uint16_t *dst_line, *dst, d; uint16_t w; - int dstStride; - __m128i xmmSrc, xmmAlpha; - __m128i xmmDst, xmmDst0, xmmDst1, xmmDst2, xmmDst3; + int dst_stride; + __m128i xmm_src, xmm_alpha; + __m128i xmm_dst, xmm_dst0, xmm_dst1, xmm_dst2, xmm_dst3; src = _pixman_image_get_solid(src_image, dst_image->bits.format); if (src == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); - xmmSrc = expandPixel_32_1x128 (src); - xmmAlpha = expandAlpha_1x128 (xmmSrc); + xmm_src = expand_pixel_32_1x128 (src); + xmm_alpha = expand_alpha_1x128 (xmm_src); while (height--) { - dst = dstLine; + dst = dst_line; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)dst); - dstLine += dstStride; + dst_line += dst_stride; w = width; while (w && (unsigned long)dst & 15) { d = *dst; - *dst++ = pack565_32_16 (pack_1x64_32 (over_1x64 (_mm_movepi64_pi64 (xmmSrc), - _mm_movepi64_pi64 (xmmAlpha), + *dst++ = pack_565_32_16 (pack_1x64_32 (over_1x64 (_mm_movepi64_pi64 (xmm_src), + _mm_movepi64_pi64 (xmm_alpha), expand565_16_1x64 (d)))); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)dst); while (w >= 8) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)dst); + cache_prefetch_next ((__m128i*)dst); - xmmDst = load128Aligned ((__m128i*)dst); + xmm_dst = load_128_aligned ((__m128i*)dst); - unpack565_128_4x128 (xmmDst, &xmmDst0, &xmmDst1, &xmmDst2, &xmmDst3); + unpack_565_128_4x128 (xmm_dst, &xmm_dst0, &xmm_dst1, &xmm_dst2, &xmm_dst3); - over_2x128 (&xmmSrc, &xmmSrc, &xmmAlpha, &xmmAlpha, &xmmDst0, &xmmDst1); - over_2x128 (&xmmSrc, &xmmSrc, &xmmAlpha, &xmmAlpha, &xmmDst2, &xmmDst3); + over_2x128 (&xmm_src, &xmm_src, &xmm_alpha, &xmm_alpha, &xmm_dst0, &xmm_dst1); + over_2x128 (&xmm_src, &xmm_src, &xmm_alpha, &xmm_alpha, &xmm_dst2, &xmm_dst3); - xmmDst = pack565_4x128_128 (&xmmDst0, &xmmDst1, &xmmDst2, &xmmDst3); - save128Aligned ((__m128i*)dst, xmmDst); + xmm_dst = pack_565_4x128_128 (&xmm_dst0, &xmm_dst1, &xmm_dst2, &xmm_dst3); + save_128_aligned ((__m128i*)dst, xmm_dst); dst += 8; w -= 8; @@ -2660,8 +2660,8 @@ sse2_CompositeOver_n_0565 (pixman_implementation_t *imp, while (w--) { d = *dst; - *dst++ = pack565_32_16 (pack_1x64_32 (over_1x64 (_mm_movepi64_pi64 (xmmSrc), - _mm_movepi64_pi64 (xmmAlpha), + *dst++ = pack_565_32_16 (pack_1x64_32 (over_1x64 (_mm_movepi64_pi64 (xmm_src), + _mm_movepi64_pi64 (xmm_alpha), expand565_16_1x64 (d)))); } } @@ -2670,11 +2670,11 @@ sse2_CompositeOver_n_0565 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_CompositeOver_n_8888_8888_ca + * fast_composite_over_n_8888_8888_ca */ static void -sse2_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, +sse2_composite_over_n_8888_8888_ca (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2689,42 +2689,42 @@ sse2_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, int32_t height) { uint32_t src; - uint32_t *dstLine, d; - uint32_t *maskLine, m; - uint32_t packCmp; - int dstStride, maskStride; + uint32_t *dst_line, d; + uint32_t *mask_line, m; + uint32_t pack_cmp; + int dst_stride, mask_stride; - __m128i xmmSrc, xmmAlpha; - __m128i xmmDst, xmmDstLo, xmmDstHi; - __m128i xmmMask, xmmMaskLo, xmmMaskHi; + __m128i xmm_src, xmm_alpha; + __m128i xmm_dst, xmm_dst_lo, xmm_dst_hi; + __m128i xmm_mask, xmm_mask_lo, xmm_mask_hi; - __m64 mmsrc_x, mmxAlpha, mmmask_x, mmdest_x; + __m64 mmsrc_x, mmx_alpha, mmmask_x, mmdest_x; src = _pixman_image_get_solid(src_image, dst_image->bits.format); if (src == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, mask_stride, mask_line, 1); - xmmSrc = _mm_unpacklo_epi8 (createMask_2x32_128 (src, src), _mm_setzero_si128 ()); - xmmAlpha = expandAlpha_1x128 (xmmSrc); - mmsrc_x = _mm_movepi64_pi64 (xmmSrc); - mmxAlpha = _mm_movepi64_pi64 (xmmAlpha); + xmm_src = _mm_unpacklo_epi8 (create_mask_2x32_128 (src, src), _mm_setzero_si128 ()); + xmm_alpha = expand_alpha_1x128 (xmm_src); + mmsrc_x = _mm_movepi64_pi64 (xmm_src); + mmx_alpha = _mm_movepi64_pi64 (xmm_alpha); while (height--) { int w = width; - const uint32_t *pm = (uint32_t *)maskLine; - uint32_t *pd = (uint32_t *)dstLine; + const uint32_t *pm = (uint32_t *)mask_line; + uint32_t *pd = (uint32_t *)dst_line; - dstLine += dstStride; - maskLine += maskStride; + dst_line += dst_stride; + mask_line += mask_stride; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w && (unsigned long)pd & 15) { @@ -2736,8 +2736,8 @@ sse2_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, mmmask_x = unpack_32_1x64 (m); mmdest_x = unpack_32_1x64 (d); - *pd = pack_1x64_32 (inOver_1x64 (&mmsrc_x, - &mmxAlpha, + *pd = pack_1x64_32 (in_over_1x64 (&mmsrc_x, + &mmx_alpha, &mmmask_x, &mmdest_x)); } @@ -2747,30 +2747,30 @@ sse2_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)pd); - cachePrefetch ((__m128i*)pm); + cache_prefetch ((__m128i*)pd); + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)pd); - cachePrefetchNext ((__m128i*)pm); + cache_prefetch_next ((__m128i*)pd); + cache_prefetch_next ((__m128i*)pm); - xmmMask = load128Unaligned ((__m128i*)pm); + xmm_mask = load_128_unaligned ((__m128i*)pm); - packCmp = _mm_movemask_epi8 (_mm_cmpeq_epi32 (xmmMask, _mm_setzero_si128())); + pack_cmp = _mm_movemask_epi8 (_mm_cmpeq_epi32 (xmm_mask, _mm_setzero_si128())); - /* if all bits in mask are zero, packCmp are equal to 0xffff */ - if (packCmp != 0xffff) + /* if all bits in mask are zero, pack_cmp are equal to 0xffff */ + if (pack_cmp != 0xffff) { - xmmDst = load128Aligned ((__m128i*)pd); + xmm_dst = load_128_aligned ((__m128i*)pd); - unpack_128_2x128 (xmmMask, &xmmMaskLo, &xmmMaskHi); - unpack_128_2x128 (xmmDst, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_mask, &xmm_mask_lo, &xmm_mask_hi); + unpack_128_2x128 (xmm_dst, &xmm_dst_lo, &xmm_dst_hi); - inOver_2x128 (&xmmSrc, &xmmSrc, &xmmAlpha, &xmmAlpha, &xmmMaskLo, &xmmMaskHi, &xmmDstLo, &xmmDstHi); + in_over_2x128 (&xmm_src, &xmm_src, &xmm_alpha, &xmm_alpha, &xmm_mask_lo, &xmm_mask_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned ((__m128i*)pd, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)pd, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); } pd += 4; @@ -2788,8 +2788,8 @@ sse2_CompositeOver_n_8888_8888_ca (pixman_implementation_t *imp, mmmask_x = unpack_32_1x64 (m); mmdest_x = unpack_32_1x64 (d); - *pd = pack_1x64_32 (inOver_1x64 (&mmsrc_x, - &mmxAlpha, + *pd = pack_1x64_32 (in_over_1x64 (&mmsrc_x, + &mmx_alpha, &mmmask_x, &mmdest_x)); } @@ -2822,34 +2822,34 @@ sse2_composite_over_8888_n_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; uint32_t mask; uint16_t w; - int dstStride, srcStride; + int dst_stride, src_stride; - __m128i xmmMask; - __m128i xmmSrc, xmmSrcLo, xmmSrcHi; - __m128i xmmDst, xmmDstLo, xmmDstHi; - __m128i xmmAlphaLo, xmmAlphaHi; + __m128i xmm_mask; + __m128i xmm_src, xmm_src_lo, xmm_src_hi; + __m128i xmm_dst, xmm_dst_lo, xmm_dst_hi; + __m128i xmm_alpha_lo, xmm_alpha_hi; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); mask = _pixman_image_get_solid (mask_image, dst_image->bits.format); - xmmMask = createMask_16_128 (mask >> 24); + xmm_mask = create_mask_16_128 (mask >> 24); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)dst); - cachePrefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); while (w && (unsigned long)dst & 15) { @@ -2857,38 +2857,38 @@ sse2_composite_over_8888_n_8888 (pixman_implementation_t *imp, uint32_t d = *dst; __m64 ms = unpack_32_1x64 (s); - __m64 alpha = expandAlpha_1x64 (ms); - __m64 dest = _mm_movepi64_pi64 (xmmMask); - __m64 alphaDst = unpack_32_1x64 (d); + __m64 alpha = expand_alpha_1x64 (ms); + __m64 dest = _mm_movepi64_pi64 (xmm_mask); + __m64 alpha_dst = unpack_32_1x64 (d); - *dst++ = pack_1x64_32 (inOver_1x64 (&ms, + *dst++ = pack_1x64_32 (in_over_1x64 (&ms, &alpha, &dest, - &alphaDst)); + &alpha_dst)); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)dst); - cachePrefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)dst); - cachePrefetchNext ((__m128i*)src); + cache_prefetch_next ((__m128i*)dst); + cache_prefetch_next ((__m128i*)src); - xmmSrc = load128Unaligned ((__m128i*)src); - xmmDst = load128Aligned ((__m128i*)dst); + xmm_src = load_128_unaligned ((__m128i*)src); + xmm_dst = load_128_aligned ((__m128i*)dst); - unpack_128_2x128 (xmmSrc, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmDst, &xmmDstLo, &xmmDstHi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaLo, &xmmAlphaHi); + unpack_128_2x128 (xmm_src, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_dst, &xmm_dst_lo, &xmm_dst_hi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_lo, &xmm_alpha_hi); - inOver_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmAlphaLo, &xmmAlphaHi, &xmmMask, &xmmMask, &xmmDstLo, &xmmDstHi); + in_over_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_alpha_lo, &xmm_alpha_hi, &xmm_mask, &xmm_mask, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned( (__m128i*)dst, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned( (__m128i*)dst, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); dst += 4; src += 4; @@ -2901,11 +2901,11 @@ sse2_composite_over_8888_n_8888 (pixman_implementation_t *imp, uint32_t d = *dst; __m64 ms = unpack_32_1x64 (s); - __m64 alpha = expandAlpha_1x64 (ms); - __m64 mask = _mm_movepi64_pi64 (xmmMask); + __m64 alpha = expand_alpha_1x64 (ms); + __m64 mask = _mm_movepi64_pi64 (xmm_mask); __m64 dest = unpack_32_1x64 (d); - *dst++ = pack_1x64_32 (inOver_1x64 (&ms, + *dst++ = pack_1x64_32 (in_over_1x64 (&ms, &alpha, &mask, &dest)); @@ -2918,10 +2918,10 @@ sse2_composite_over_8888_n_8888 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_Composite_over_x888_n_8888 + * fast_composite_over_x888_n_8888 */ static void -sse2_Composite_over_x888_n_8888 (pixman_implementation_t *imp, +sse2_composite_over_x888_n_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -2935,34 +2935,34 @@ sse2_Composite_over_x888_n_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; uint32_t mask; - int dstStride, srcStride; + int dst_stride, src_stride; uint16_t w; - __m128i xmmMask, xmmAlpha; - __m128i xmmSrc, xmmSrcLo, xmmSrcHi; - __m128i xmmDst, xmmDstLo, xmmDstHi; + __m128i xmm_mask, xmm_alpha; + __m128i xmm_src, xmm_src_lo, xmm_src_hi; + __m128i xmm_dst, xmm_dst_lo, xmm_dst_hi; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); mask = _pixman_image_get_solid (mask_image, dst_image->bits.format); - xmmMask = createMask_16_128 (mask >> 24); - xmmAlpha = Mask00ff; + xmm_mask = create_mask_16_128 (mask >> 24); + xmm_alpha = mask_00ff; while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)dst); - cachePrefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); while (w && (unsigned long)dst & 15) { @@ -2970,11 +2970,11 @@ sse2_Composite_over_x888_n_8888 (pixman_implementation_t *imp, uint32_t d = *dst; __m64 src = unpack_32_1x64 (s); - __m64 alpha = _mm_movepi64_pi64 (xmmAlpha); - __m64 mask = _mm_movepi64_pi64 (xmmMask); + __m64 alpha = _mm_movepi64_pi64 (xmm_alpha); + __m64 mask = _mm_movepi64_pi64 (xmm_mask); __m64 dest = unpack_32_1x64 (d); - *dst++ = pack_1x64_32 (inOver_1x64 (&src, + *dst++ = pack_1x64_32 (in_over_1x64 (&src, &alpha, &mask, &dest)); @@ -2983,24 +2983,24 @@ sse2_Composite_over_x888_n_8888 (pixman_implementation_t *imp, } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)dst); - cachePrefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)dst); - cachePrefetchNext ((__m128i*)src); + cache_prefetch_next ((__m128i*)dst); + cache_prefetch_next ((__m128i*)src); - xmmSrc = _mm_or_si128 (load128Unaligned ((__m128i*)src), Maskff000000); - xmmDst = load128Aligned ((__m128i*)dst); + xmm_src = _mm_or_si128 (load_128_unaligned ((__m128i*)src), mask_ff000000); + xmm_dst = load_128_aligned ((__m128i*)dst); - unpack_128_2x128 (xmmSrc, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmDst, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_src, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_dst, &xmm_dst_lo, &xmm_dst_hi); - inOver_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmAlpha, &xmmAlpha, &xmmMask, &xmmMask, &xmmDstLo, &xmmDstHi); + in_over_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_alpha, &xmm_alpha, &xmm_mask, &xmm_mask, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned( (__m128i*)dst, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned( (__m128i*)dst, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); dst += 4; src += 4; @@ -3014,11 +3014,11 @@ sse2_Composite_over_x888_n_8888 (pixman_implementation_t *imp, uint32_t d = *dst; __m64 src = unpack_32_1x64 (s); - __m64 alpha = _mm_movepi64_pi64 (xmmAlpha); - __m64 mask = _mm_movepi64_pi64 (xmmMask); + __m64 alpha = _mm_movepi64_pi64 (xmm_alpha); + __m64 mask = _mm_movepi64_pi64 (xmm_mask); __m64 dest = unpack_32_1x64 (d); - *dst++ = pack_1x64_32 (inOver_1x64 (&src, + *dst++ = pack_1x64_32 (in_over_1x64 (&src, &alpha, &mask, &dest)); @@ -3048,22 +3048,22 @@ sse2_composite_over_8888_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - int dstStride, srcStride; - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; + int dst_stride, src_stride; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); - dst = dstLine; - src = srcLine; + dst = dst_line; + src = src_line; while (height--) { - coreCombineOverUsse2 (dst, src, NULL, width); + core_combine_over_u_sse2 (dst, src, NULL, width); - dst += dstStride; - src += srcStride; + dst += dst_stride; + src += src_stride; } _mm_empty(); } @@ -3077,8 +3077,8 @@ fast_composite_over_8888_0565pixel (uint32_t src, uint16_t dst) __m64 ms; ms = unpack_32_1x64 (src); - return pack565_32_16( pack_1x64_32 (over_1x64 (ms, - expandAlpha_1x64 (ms), + return pack_565_32_16( pack_1x64_32 (over_1x64 (ms, + expand_alpha_1x64 (ms), expand565_16_1x64 (dst)))); } @@ -3097,17 +3097,17 @@ sse2_composite_over_8888_0565 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint16_t *dstLine, *dst, d; - uint32_t *srcLine, *src, s; - int dstStride, srcStride; + uint16_t *dst_line, *dst, d; + uint32_t *src_line, *src, s; + int dst_stride, src_stride; uint16_t w; - __m128i xmmAlphaLo, xmmAlphaHi; - __m128i xmmSrc, xmmSrcLo, xmmSrcHi; - __m128i xmmDst, xmmDst0, xmmDst1, xmmDst2, xmmDst3; + __m128i xmm_alpha_lo, xmm_alpha_hi; + __m128i xmm_src, xmm_src_lo, xmm_src_hi; + __m128i xmm_dst, xmm_dst0, xmm_dst1, xmm_dst2, xmm_dst3; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); #if 0 /* FIXME @@ -3120,15 +3120,15 @@ sse2_composite_over_8888_0565 (pixman_implementation_t *imp, while (height--) { - dst = dstLine; - src = srcLine; + dst = dst_line; + src = src_line; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)src); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); - dstLine += dstStride; - srcLine += srcStride; + dst_line += dst_stride; + src_line += src_stride; w = width; /* Align dst on a 16-byte boundary */ @@ -3143,37 +3143,37 @@ sse2_composite_over_8888_0565 (pixman_implementation_t *imp, } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)src); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); /* It's a 8 pixel loop */ while (w >= 8) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)src); - cachePrefetchNext ((__m128i*)dst); + cache_prefetch_next ((__m128i*)src); + cache_prefetch_next ((__m128i*)dst); /* I'm loading unaligned because I'm not sure about the address alignment. */ - xmmSrc = load128Unaligned ((__m128i*) src); - xmmDst = load128Aligned ((__m128i*) dst); + xmm_src = load_128_unaligned ((__m128i*) src); + xmm_dst = load_128_aligned ((__m128i*) dst); /* Unpacking */ - unpack_128_2x128 (xmmSrc, &xmmSrcLo, &xmmSrcHi); - unpack565_128_4x128 (xmmDst, &xmmDst0, &xmmDst1, &xmmDst2, &xmmDst3); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaLo, &xmmAlphaHi); + unpack_128_2x128 (xmm_src, &xmm_src_lo, &xmm_src_hi); + unpack_565_128_4x128 (xmm_dst, &xmm_dst0, &xmm_dst1, &xmm_dst2, &xmm_dst3); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_lo, &xmm_alpha_hi); /* I'm loading next 4 pixels from memory before to optimze the memory read. */ - xmmSrc = load128Unaligned ((__m128i*) (src+4)); + xmm_src = load_128_unaligned ((__m128i*) (src+4)); - over_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmAlphaLo, &xmmAlphaHi, &xmmDst0, &xmmDst1); + over_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_alpha_lo, &xmm_alpha_hi, &xmm_dst0, &xmm_dst1); /* Unpacking */ - unpack_128_2x128 (xmmSrc, &xmmSrcLo, &xmmSrcHi); - expandAlpha_2x128 (xmmSrcLo, xmmSrcHi, &xmmAlphaLo, &xmmAlphaHi); + unpack_128_2x128 (xmm_src, &xmm_src_lo, &xmm_src_hi); + expand_alpha_2x128 (xmm_src_lo, xmm_src_hi, &xmm_alpha_lo, &xmm_alpha_hi); - over_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmAlphaLo, &xmmAlphaHi, &xmmDst2, &xmmDst3); + over_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_alpha_lo, &xmm_alpha_hi, &xmm_dst2, &xmm_dst3); - save128Aligned ((__m128i*)dst, pack565_4x128_128 (&xmmDst0, &xmmDst1, &xmmDst2, &xmmDst3)); + save_128_aligned ((__m128i*)dst, pack_565_4x128_128 (&xmm_dst0, &xmm_dst1, &xmm_dst2, &xmm_dst3)); w -= 8; dst += 8; @@ -3193,11 +3193,11 @@ sse2_composite_over_8888_0565 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_CompositeOver_n_8_8888 + * fast_composite_over_n_8_8888 */ static void -sse2_CompositeOver_n_8_8888 (pixman_implementation_t *imp, +sse2_composite_over_n_8_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -3212,17 +3212,17 @@ sse2_CompositeOver_n_8_8888 (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint32_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint32_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint16_t w; uint32_t m, d; - __m128i xmmSrc, xmmAlpha, xmmDef; - __m128i xmmDst, xmmDstLo, xmmDstHi; - __m128i xmmMask, xmmMaskLo, xmmMaskHi; + __m128i xmm_src, xmm_alpha, xmm_def; + __m128i xmm_dst, xmm_dst_lo, xmm_dst_hi; + __m128i xmm_mask, xmm_mask_lo, xmm_mask_hi; - __m64 mmsrc_x, mmxAlpha, mmmask_x, mmxDest; + __m64 mmsrc_x, mmx_alpha, mmmask_x, mmx_dest; src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -3230,26 +3230,26 @@ sse2_CompositeOver_n_8_8888 (pixman_implementation_t *imp, if (src == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); - xmmDef = createMask_2x32_128 (src, src); - xmmSrc = expandPixel_32_1x128 (src); - xmmAlpha = expandAlpha_1x128 (xmmSrc); - mmsrc_x = _mm_movepi64_pi64 (xmmSrc); - mmxAlpha = _mm_movepi64_pi64 (xmmAlpha); + xmm_def = create_mask_2x32_128 (src, src); + xmm_src = expand_pixel_32_1x128 (src); + xmm_alpha = expand_alpha_1x128 (xmm_src); + mmsrc_x = _mm_movepi64_pi64 (xmm_src); + mmx_alpha = _mm_movepi64_pi64 (xmm_alpha); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)mask); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)dst); while (w && (unsigned long)dst & 15) { @@ -3258,13 +3258,13 @@ sse2_CompositeOver_n_8_8888 (pixman_implementation_t *imp, if (m) { d = *dst; - mmmask_x = expandPixel_8_1x64 (m); - mmxDest = unpack_32_1x64 (d); + mmmask_x = expand_pixel_8_1x64 (m); + mmx_dest = unpack_32_1x64 (d); - *dst = pack_1x64_32 (inOver_1x64 (&mmsrc_x, - &mmxAlpha, + *dst = pack_1x64_32 (in_over_1x64 (&mmsrc_x, + &mmx_alpha, &mmmask_x, - &mmxDest)); + &mmx_dest)); } w--; @@ -3272,36 +3272,36 @@ sse2_CompositeOver_n_8_8888 (pixman_implementation_t *imp, } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)mask); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)dst); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)mask); - cachePrefetchNext ((__m128i*)dst); + cache_prefetch_next ((__m128i*)mask); + cache_prefetch_next ((__m128i*)dst); m = *((uint32_t*)mask); if (srca == 0xff && m == 0xffffffff) { - save128Aligned ((__m128i*)dst, xmmDef); + save_128_aligned ((__m128i*)dst, xmm_def); } else if (m) { - xmmDst = load128Aligned ((__m128i*) dst); - xmmMask = unpack_32_1x128 (m); - xmmMask = _mm_unpacklo_epi8 (xmmMask, _mm_setzero_si128()); + xmm_dst = load_128_aligned ((__m128i*) dst); + xmm_mask = unpack_32_1x128 (m); + xmm_mask = _mm_unpacklo_epi8 (xmm_mask, _mm_setzero_si128()); /* Unpacking */ - unpack_128_2x128 (xmmDst, &xmmDstLo, &xmmDstHi); - unpack_128_2x128 (xmmMask, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_dst, &xmm_dst_lo, &xmm_dst_hi); + unpack_128_2x128 (xmm_mask, &xmm_mask_lo, &xmm_mask_hi); - expandAlphaRev_2x128 (xmmMaskLo, xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + expand_alpha_rev_2x128 (xmm_mask_lo, xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - inOver_2x128 (&xmmSrc, &xmmSrc, &xmmAlpha, &xmmAlpha, &xmmMaskLo, &xmmMaskHi, &xmmDstLo, &xmmDstHi); + in_over_2x128 (&xmm_src, &xmm_src, &xmm_alpha, &xmm_alpha, &xmm_mask_lo, &xmm_mask_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned ((__m128i*)dst, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)dst, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); } w -= 4; @@ -3316,13 +3316,13 @@ sse2_CompositeOver_n_8_8888 (pixman_implementation_t *imp, if (m) { d = *dst; - mmmask_x = expandPixel_8_1x64 (m); - mmxDest = unpack_32_1x64 (d); + mmmask_x = expand_pixel_8_1x64 (m); + mmx_dest = unpack_32_1x64 (d); - *dst = pack_1x64_32 (inOver_1x64 (&mmsrc_x, - &mmxAlpha, + *dst = pack_1x64_32 (in_over_1x64 (&mmsrc_x, + &mmx_alpha, &mmmask_x, - &mmxDest)); + &mmx_dest)); } w--; @@ -3334,11 +3334,11 @@ sse2_CompositeOver_n_8_8888 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_CompositeOver_n_8_8888 + * fast_composite_over_n_8_8888 */ pixman_bool_t -pixmanFillsse2 (uint32_t *bits, +pixman_fill_sse2 (uint32_t *bits, int stride, int bpp, int x, @@ -3350,7 +3350,7 @@ pixmanFillsse2 (uint32_t *bits, uint32_t byte_width; uint8_t *byte_line; - __m128i xmmDef; + __m128i xmm_def; if (bpp == 16 && (data >> 16 != (data & 0xffff))) return FALSE; @@ -3373,8 +3373,8 @@ pixmanFillsse2 (uint32_t *bits, stride *= 4; } - cachePrefetch ((__m128i*)byte_line); - xmmDef = createMask_2x32_128 (data, data); + cache_prefetch ((__m128i*)byte_line); + xmm_def = create_mask_2x32_128 (data, data); while (height--) { @@ -3384,7 +3384,7 @@ pixmanFillsse2 (uint32_t *bits, w = byte_width; - cachePrefetchNext ((__m128i*)d); + cache_prefetch_next ((__m128i*)d); while (w >= 2 && ((unsigned long)d & 3)) { @@ -3401,20 +3401,20 @@ pixmanFillsse2 (uint32_t *bits, d += 4; } - cachePrefetchNext ((__m128i*)d); + cache_prefetch_next ((__m128i*)d); while (w >= 128) { - cachePrefetch (((__m128i*)d) + 12); + cache_prefetch (((__m128i*)d) + 12); - save128Aligned ((__m128i*)(d), xmmDef); - save128Aligned ((__m128i*)(d+16), xmmDef); - save128Aligned ((__m128i*)(d+32), xmmDef); - save128Aligned ((__m128i*)(d+48), xmmDef); - save128Aligned ((__m128i*)(d+64), xmmDef); - save128Aligned ((__m128i*)(d+80), xmmDef); - save128Aligned ((__m128i*)(d+96), xmmDef); - save128Aligned ((__m128i*)(d+112), xmmDef); + save_128_aligned ((__m128i*)(d), xmm_def); + save_128_aligned ((__m128i*)(d+16), xmm_def); + save_128_aligned ((__m128i*)(d+32), xmm_def); + save_128_aligned ((__m128i*)(d+48), xmm_def); + save_128_aligned ((__m128i*)(d+64), xmm_def); + save_128_aligned ((__m128i*)(d+80), xmm_def); + save_128_aligned ((__m128i*)(d+96), xmm_def); + save_128_aligned ((__m128i*)(d+112), xmm_def); d += 128; w -= 128; @@ -3422,23 +3422,23 @@ pixmanFillsse2 (uint32_t *bits, if (w >= 64) { - cachePrefetch (((__m128i*)d) + 8); + cache_prefetch (((__m128i*)d) + 8); - save128Aligned ((__m128i*)(d), xmmDef); - save128Aligned ((__m128i*)(d+16), xmmDef); - save128Aligned ((__m128i*)(d+32), xmmDef); - save128Aligned ((__m128i*)(d+48), xmmDef); + save_128_aligned ((__m128i*)(d), xmm_def); + save_128_aligned ((__m128i*)(d+16), xmm_def); + save_128_aligned ((__m128i*)(d+32), xmm_def); + save_128_aligned ((__m128i*)(d+48), xmm_def); d += 64; w -= 64; } - cachePrefetchNext ((__m128i*)d); + cache_prefetch_next ((__m128i*)d); if (w >= 32) { - save128Aligned ((__m128i*)(d), xmmDef); - save128Aligned ((__m128i*)(d+16), xmmDef); + save_128_aligned ((__m128i*)(d), xmm_def); + save_128_aligned ((__m128i*)(d+16), xmm_def); d += 32; w -= 32; @@ -3446,13 +3446,13 @@ pixmanFillsse2 (uint32_t *bits, if (w >= 16) { - save128Aligned ((__m128i*)(d), xmmDef); + save_128_aligned ((__m128i*)(d), xmm_def); d += 16; w -= 16; } - cachePrefetchNext ((__m128i*)d); + cache_prefetch_next ((__m128i*)d); while (w >= 4) { @@ -3475,7 +3475,7 @@ pixmanFillsse2 (uint32_t *bits, } static void -sse2_CompositeSrc_n_8_8888 (pixman_implementation_t *imp, +sse2_composite_src_n_8_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -3490,43 +3490,43 @@ sse2_CompositeSrc_n_8_8888 (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint32_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint32_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint16_t w; uint32_t m; - __m128i xmmSrc, xmmDef; - __m128i xmmMask, xmmMaskLo, xmmMaskHi; + __m128i xmm_src, xmm_def; + __m128i xmm_mask, xmm_mask_lo, xmm_mask_hi; src = _pixman_image_get_solid(src_image, dst_image->bits.format); srca = src >> 24; if (src == 0) { - pixmanFillsse2 (dst_image->bits.bits, dst_image->bits.rowstride, + pixman_fill_sse2 (dst_image->bits.bits, dst_image->bits.rowstride, PIXMAN_FORMAT_BPP (dst_image->bits.format), dest_x, dest_y, width, height, 0); return; } - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); - xmmDef = createMask_2x32_128 (src, src); - xmmSrc = expandPixel_32_1x128 (src); + xmm_def = create_mask_2x32_128 (src, src); + xmm_src = expand_pixel_32_1x128 (src); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)mask); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)dst); while (w && (unsigned long)dst & 15) { @@ -3534,7 +3534,7 @@ sse2_CompositeSrc_n_8_8888 (pixman_implementation_t *imp, if (m) { - *dst = pack_1x64_32 (pixMultiply_1x64 (_mm_movepi64_pi64 (xmmSrc), expandPixel_8_1x64 (m))); + *dst = pack_1x64_32 (pix_multiply_1x64 (_mm_movepi64_pi64 (xmm_src), expand_pixel_8_1x64 (m))); } else { @@ -3546,38 +3546,38 @@ sse2_CompositeSrc_n_8_8888 (pixman_implementation_t *imp, } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)mask); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)dst); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)mask); - cachePrefetchNext ((__m128i*)dst); + cache_prefetch_next ((__m128i*)mask); + cache_prefetch_next ((__m128i*)dst); m = *((uint32_t*)mask); if (srca == 0xff && m == 0xffffffff) { - save128Aligned ((__m128i*)dst, xmmDef); + save_128_aligned ((__m128i*)dst, xmm_def); } else if (m) { - xmmMask = unpack_32_1x128 (m); - xmmMask = _mm_unpacklo_epi8 (xmmMask, _mm_setzero_si128()); + xmm_mask = unpack_32_1x128 (m); + xmm_mask = _mm_unpacklo_epi8 (xmm_mask, _mm_setzero_si128()); /* Unpacking */ - unpack_128_2x128 (xmmMask, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_mask, &xmm_mask_lo, &xmm_mask_hi); - expandAlphaRev_2x128 (xmmMaskLo, xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + expand_alpha_rev_2x128 (xmm_mask_lo, xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - pixMultiply_2x128 (&xmmSrc, &xmmSrc, &xmmMaskLo, &xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + pix_multiply_2x128 (&xmm_src, &xmm_src, &xmm_mask_lo, &xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - save128Aligned ((__m128i*)dst, pack_2x128_128 (xmmMaskLo, xmmMaskHi)); + save_128_aligned ((__m128i*)dst, pack_2x128_128 (xmm_mask_lo, xmm_mask_hi)); } else { - save128Aligned ((__m128i*)dst, _mm_setzero_si128()); + save_128_aligned ((__m128i*)dst, _mm_setzero_si128()); } w -= 4; @@ -3591,7 +3591,7 @@ sse2_CompositeSrc_n_8_8888 (pixman_implementation_t *imp, if (m) { - *dst = pack_1x64_32 (pixMultiply_1x64 (_mm_movepi64_pi64 (xmmSrc), expandPixel_8_1x64 (m))); + *dst = pack_1x64_32 (pix_multiply_1x64 (_mm_movepi64_pi64 (xmm_src), expand_pixel_8_1x64 (m))); } else { @@ -3607,11 +3607,11 @@ sse2_CompositeSrc_n_8_8888 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_CompositeOver_n_8_0565 + * fast_composite_over_n_8_0565 */ static void -sse2_CompositeOver_n_8_0565 (pixman_implementation_t *imp, +sse2_composite_over_n_8_0565 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -3626,16 +3626,16 @@ sse2_CompositeOver_n_8_0565 (pixman_implementation_t *imp, int32_t height) { uint32_t src, srca; - uint16_t *dstLine, *dst, d; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint16_t *dst_line, *dst, d; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint16_t w; uint32_t m; - __m64 mmsrc_x, mmxAlpha, mmmask_x, mmxDest; + __m64 mmsrc_x, mmx_alpha, mmmask_x, mmx_dest; - __m128i xmmSrc, xmmAlpha; - __m128i xmmMask, xmmMaskLo, xmmMaskHi; - __m128i xmmDst, xmmDst0, xmmDst1, xmmDst2, xmmDst3; + __m128i xmm_src, xmm_alpha; + __m128i xmm_mask, xmm_mask_lo, xmm_mask_hi; + __m128i xmm_dst, xmm_dst0, xmm_dst1, xmm_dst2, xmm_dst3; src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -3643,25 +3643,25 @@ sse2_CompositeOver_n_8_0565 (pixman_implementation_t *imp, if (src == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); - xmmSrc = expandPixel_32_1x128 (src); - xmmAlpha = expandAlpha_1x128 (xmmSrc); - mmsrc_x = _mm_movepi64_pi64 (xmmSrc); - mmxAlpha = _mm_movepi64_pi64 (xmmAlpha); + xmm_src = expand_pixel_32_1x128 (src); + xmm_alpha = expand_alpha_1x128 (xmm_src); + mmsrc_x = _mm_movepi64_pi64 (xmm_src); + mmx_alpha = _mm_movepi64_pi64 (xmm_alpha); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)mask); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)dst); while (w && (unsigned long)dst & 15) { @@ -3670,13 +3670,13 @@ sse2_CompositeOver_n_8_0565 (pixman_implementation_t *imp, if (m) { d = *dst; - mmmask_x = expandAlphaRev_1x64 (unpack_32_1x64 (m)); - mmxDest = expand565_16_1x64 (d); + mmmask_x = expand_alpha_rev_1x64 (unpack_32_1x64 (m)); + mmx_dest = expand565_16_1x64 (d); - *dst = pack565_32_16 (pack_1x64_32 (inOver_1x64 (&mmsrc_x, - &mmxAlpha, + *dst = pack_565_32_16 (pack_1x64_32 (in_over_1x64 (&mmsrc_x, + &mmx_alpha, &mmmask_x, - &mmxDest))); + &mmx_dest))); } w--; @@ -3684,31 +3684,31 @@ sse2_CompositeOver_n_8_0565 (pixman_implementation_t *imp, } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)mask); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)dst); while (w >= 8) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)mask); - cachePrefetchNext ((__m128i*)dst); + cache_prefetch_next ((__m128i*)mask); + cache_prefetch_next ((__m128i*)dst); - xmmDst = load128Aligned ((__m128i*) dst); - unpack565_128_4x128 (xmmDst, &xmmDst0, &xmmDst1, &xmmDst2, &xmmDst3); + xmm_dst = load_128_aligned ((__m128i*) dst); + unpack_565_128_4x128 (xmm_dst, &xmm_dst0, &xmm_dst1, &xmm_dst2, &xmm_dst3); m = *((uint32_t*)mask); mask += 4; if (m) { - xmmMask = unpack_32_1x128 (m); - xmmMask = _mm_unpacklo_epi8 (xmmMask, _mm_setzero_si128()); + xmm_mask = unpack_32_1x128 (m); + xmm_mask = _mm_unpacklo_epi8 (xmm_mask, _mm_setzero_si128()); /* Unpacking */ - unpack_128_2x128 (xmmMask, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_mask, &xmm_mask_lo, &xmm_mask_hi); - expandAlphaRev_2x128 (xmmMaskLo, xmmMaskHi, &xmmMaskLo, &xmmMaskHi); - inOver_2x128 (&xmmSrc, &xmmSrc, &xmmAlpha, &xmmAlpha, &xmmMaskLo, &xmmMaskHi, &xmmDst0, &xmmDst1); + expand_alpha_rev_2x128 (xmm_mask_lo, xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); + in_over_2x128 (&xmm_src, &xmm_src, &xmm_alpha, &xmm_alpha, &xmm_mask_lo, &xmm_mask_hi, &xmm_dst0, &xmm_dst1); } m = *((uint32_t*)mask); @@ -3716,17 +3716,17 @@ sse2_CompositeOver_n_8_0565 (pixman_implementation_t *imp, if (m) { - xmmMask = unpack_32_1x128 (m); - xmmMask = _mm_unpacklo_epi8 (xmmMask, _mm_setzero_si128()); + xmm_mask = unpack_32_1x128 (m); + xmm_mask = _mm_unpacklo_epi8 (xmm_mask, _mm_setzero_si128()); /* Unpacking */ - unpack_128_2x128 (xmmMask, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_mask, &xmm_mask_lo, &xmm_mask_hi); - expandAlphaRev_2x128 (xmmMaskLo, xmmMaskHi, &xmmMaskLo, &xmmMaskHi); - inOver_2x128 (&xmmSrc, &xmmSrc, &xmmAlpha, &xmmAlpha, &xmmMaskLo, &xmmMaskHi, &xmmDst2, &xmmDst3); + expand_alpha_rev_2x128 (xmm_mask_lo, xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); + in_over_2x128 (&xmm_src, &xmm_src, &xmm_alpha, &xmm_alpha, &xmm_mask_lo, &xmm_mask_hi, &xmm_dst2, &xmm_dst3); } - save128Aligned ((__m128i*)dst, pack565_4x128_128 (&xmmDst0, &xmmDst1, &xmmDst2, &xmmDst3)); + save_128_aligned ((__m128i*)dst, pack_565_4x128_128 (&xmm_dst0, &xmm_dst1, &xmm_dst2, &xmm_dst3)); w -= 8; dst += 8; @@ -3739,13 +3739,13 @@ sse2_CompositeOver_n_8_0565 (pixman_implementation_t *imp, if (m) { d = *dst; - mmmask_x = expandAlphaRev_1x64 (unpack_32_1x64 (m)); - mmxDest = expand565_16_1x64 (d); + mmmask_x = expand_alpha_rev_1x64 (unpack_32_1x64 (m)); + mmx_dest = expand565_16_1x64 (d); - *dst = pack565_32_16 (pack_1x64_32 (inOver_1x64 (&mmsrc_x, - &mmxAlpha, + *dst = pack_565_32_16 (pack_1x64_32 (in_over_1x64 (&mmsrc_x, + &mmx_alpha, &mmmask_x, - &mmxDest))); + &mmx_dest))); } w--; @@ -3757,11 +3757,11 @@ sse2_CompositeOver_n_8_0565 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_Composite_over_pixbuf_0565 + * fast_composite_over_pixbuf_0565 */ static void -sse2_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, +sse2_composite_over_pixbuf_0565 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -3775,18 +3775,18 @@ sse2_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint16_t *dstLine, *dst, d; - uint32_t *srcLine, *src, s; - int dstStride, srcStride; + uint16_t *dst_line, *dst, d; + uint32_t *src_line, *src, s; + int dst_stride, src_stride; uint16_t w; uint32_t opaque, zero; __m64 ms; - __m128i xmmSrc, xmmSrcLo, xmmSrcHi; - __m128i xmmDst, xmmDst0, xmmDst1, xmmDst2, xmmDst3; + __m128i xmm_src, xmm_src_lo, xmm_src_hi; + __m128i xmm_dst, xmm_dst0, xmm_dst1, xmm_dst2, xmm_dst3; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); #if 0 /* FIXME @@ -3799,15 +3799,15 @@ sse2_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)src); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); while (w && (unsigned long)dst & 15) { @@ -3816,58 +3816,58 @@ sse2_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, ms = unpack_32_1x64 (s); - *dst++ = pack565_32_16 (pack_1x64_32 (overRevNonPre_1x64(ms, expand565_16_1x64 (d)))); + *dst++ = pack_565_32_16 (pack_1x64_32 (over_rev_non_pre_1x64(ms, expand565_16_1x64 (d)))); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)src); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); while (w >= 8) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)src); - cachePrefetchNext ((__m128i*)dst); + cache_prefetch_next ((__m128i*)src); + cache_prefetch_next ((__m128i*)dst); /* First round */ - xmmSrc = load128Unaligned((__m128i*)src); - xmmDst = load128Aligned ((__m128i*)dst); + xmm_src = load_128_unaligned((__m128i*)src); + xmm_dst = load_128_aligned ((__m128i*)dst); - opaque = isOpaque (xmmSrc); - zero = isZero (xmmSrc); + opaque = is_opaque (xmm_src); + zero = is_zero (xmm_src); - unpack565_128_4x128 (xmmDst, &xmmDst0, &xmmDst1, &xmmDst2, &xmmDst3); - unpack_128_2x128 (xmmSrc, &xmmSrcLo, &xmmSrcHi); + unpack_565_128_4x128 (xmm_dst, &xmm_dst0, &xmm_dst1, &xmm_dst2, &xmm_dst3); + unpack_128_2x128 (xmm_src, &xmm_src_lo, &xmm_src_hi); /* preload next round*/ - xmmSrc = load128Unaligned((__m128i*)(src+4)); + xmm_src = load_128_unaligned((__m128i*)(src+4)); if (opaque) { - invertColors_2x128 (xmmSrcLo, xmmSrcHi, &xmmDst0, &xmmDst1); + invert_colors_2x128 (xmm_src_lo, xmm_src_hi, &xmm_dst0, &xmm_dst1); } else if (!zero) { - overRevNonPre_2x128 (xmmSrcLo, xmmSrcHi, &xmmDst0, &xmmDst1); + over_rev_non_pre_2x128 (xmm_src_lo, xmm_src_hi, &xmm_dst0, &xmm_dst1); } /* Second round */ - opaque = isOpaque (xmmSrc); - zero = isZero (xmmSrc); + opaque = is_opaque (xmm_src); + zero = is_zero (xmm_src); - unpack_128_2x128 (xmmSrc, &xmmSrcLo, &xmmSrcHi); + unpack_128_2x128 (xmm_src, &xmm_src_lo, &xmm_src_hi); if (opaque) { - invertColors_2x128 (xmmSrcLo, xmmSrcHi, &xmmDst2, &xmmDst3); + invert_colors_2x128 (xmm_src_lo, xmm_src_hi, &xmm_dst2, &xmm_dst3); } else if (zero) { - overRevNonPre_2x128 (xmmSrcLo, xmmSrcHi, &xmmDst2, &xmmDst3); + over_rev_non_pre_2x128 (xmm_src_lo, xmm_src_hi, &xmm_dst2, &xmm_dst3); } - save128Aligned ((__m128i*)dst, pack565_4x128_128 (&xmmDst0, &xmmDst1, &xmmDst2, &xmmDst3)); + save_128_aligned ((__m128i*)dst, pack_565_4x128_128 (&xmm_dst0, &xmm_dst1, &xmm_dst2, &xmm_dst3)); w -= 8; src += 8; @@ -3881,7 +3881,7 @@ sse2_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, ms = unpack_32_1x64 (s); - *dst++ = pack565_32_16 (pack_1x64_32 (overRevNonPre_1x64(ms, expand565_16_1x64 (d)))); + *dst++ = pack_565_32_16 (pack_1x64_32 (over_rev_non_pre_1x64(ms, expand565_16_1x64 (d)))); w--; } } @@ -3890,11 +3890,11 @@ sse2_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_Composite_over_pixbuf_8888 + * fast_composite_over_pixbuf_8888 */ static void -sse2_Composite_over_pixbuf_8888 (pixman_implementation_t *imp, +sse2_composite_over_pixbuf_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -3908,17 +3908,17 @@ sse2_Composite_over_pixbuf_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *dstLine, *dst, d; - uint32_t *srcLine, *src, s; - int dstStride, srcStride; + uint32_t *dst_line, *dst, d; + uint32_t *src_line, *src, s; + int dst_stride, src_stride; uint16_t w; uint32_t opaque, zero; - __m128i xmmSrcLo, xmmSrcHi; - __m128i xmmDstLo, xmmDstHi; + __m128i xmm_src_lo, xmm_src_hi; + __m128i xmm_dst_lo, xmm_dst_hi; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); #if 0 /* FIXME @@ -3931,58 +3931,58 @@ sse2_Composite_over_pixbuf_8888 (pixman_implementation_t *imp, while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)src); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); while (w && (unsigned long)dst & 15) { s = *src++; d = *dst; - *dst++ = pack_1x64_32 (overRevNonPre_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (d))); + *dst++ = pack_1x64_32 (over_rev_non_pre_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (d))); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)src); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)src); - cachePrefetchNext ((__m128i*)dst); + cache_prefetch_next ((__m128i*)src); + cache_prefetch_next ((__m128i*)dst); - xmmSrcHi = load128Unaligned((__m128i*)src); + xmm_src_hi = load_128_unaligned((__m128i*)src); - opaque = isOpaque (xmmSrcHi); - zero = isZero (xmmSrcHi); + opaque = is_opaque (xmm_src_hi); + zero = is_zero (xmm_src_hi); - unpack_128_2x128 (xmmSrcHi, &xmmSrcLo, &xmmSrcHi); + unpack_128_2x128 (xmm_src_hi, &xmm_src_lo, &xmm_src_hi); if (opaque) { - invertColors_2x128( xmmSrcLo, xmmSrcHi, &xmmDstLo, &xmmDstHi); + invert_colors_2x128( xmm_src_lo, xmm_src_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned ((__m128i*)dst, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)dst, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); } else if (!zero) { - xmmDstHi = load128Aligned ((__m128i*)dst); + xmm_dst_hi = load_128_aligned ((__m128i*)dst); - unpack_128_2x128 (xmmDstHi, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - overRevNonPre_2x128 (xmmSrcLo, xmmSrcHi, &xmmDstLo, &xmmDstHi); + over_rev_non_pre_2x128 (xmm_src_lo, xmm_src_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned ((__m128i*)dst, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)dst, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); } w -= 4; @@ -3995,7 +3995,7 @@ sse2_Composite_over_pixbuf_8888 (pixman_implementation_t *imp, s = *src++; d = *dst; - *dst++ = pack_1x64_32 (overRevNonPre_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (d))); + *dst++ = pack_1x64_32 (over_rev_non_pre_1x64 (unpack_32_1x64 (s), unpack_32_1x64 (d))); w--; } @@ -4005,11 +4005,11 @@ sse2_Composite_over_pixbuf_8888 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_CompositeOver_n_8888_0565_ca + * fast_composite_over_n_8888_0565_ca */ static void -sse2_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, +sse2_composite_over_n_8888_0565_ca (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -4024,42 +4024,42 @@ sse2_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, int32_t height) { uint32_t src; - uint16_t *dstLine, *dst, d; - uint32_t *maskLine, *mask, m; - int dstStride, maskStride; + uint16_t *dst_line, *dst, d; + uint32_t *mask_line, *mask, m; + int dst_stride, mask_stride; int w; - uint32_t packCmp; + uint32_t pack_cmp; - __m128i xmmSrc, xmmAlpha; - __m128i xmmMask, xmmMaskLo, xmmMaskHi; - __m128i xmmDst, xmmDst0, xmmDst1, xmmDst2, xmmDst3; + __m128i xmm_src, xmm_alpha; + __m128i xmm_mask, xmm_mask_lo, xmm_mask_hi; + __m128i xmm_dst, xmm_dst0, xmm_dst1, xmm_dst2, xmm_dst3; - __m64 mmsrc_x, mmxAlpha, mmmask_x, mmxDest; + __m64 mmsrc_x, mmx_alpha, mmmask_x, mmx_dest; src = _pixman_image_get_solid(src_image, dst_image->bits.format); if (src == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, mask_stride, mask_line, 1); - xmmSrc = expandPixel_32_1x128 (src); - xmmAlpha = expandAlpha_1x128 (xmmSrc); - mmsrc_x = _mm_movepi64_pi64 (xmmSrc); - mmxAlpha = _mm_movepi64_pi64 (xmmAlpha); + xmm_src = expand_pixel_32_1x128 (src); + xmm_alpha = expand_alpha_1x128 (xmm_src); + mmsrc_x = _mm_movepi64_pi64 (xmm_src); + mmx_alpha = _mm_movepi64_pi64 (xmm_alpha); while (height--) { w = width; - mask = maskLine; - dst = dstLine; - maskLine += maskStride; - dstLine += dstStride; + mask = mask_line; + dst = dst_line; + mask_line += mask_stride; + dst_line += dst_stride; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)mask); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)dst); while (w && ((unsigned long)dst & 15)) { @@ -4069,12 +4069,12 @@ sse2_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, { d = *dst; mmmask_x = unpack_32_1x64 (m); - mmxDest = expand565_16_1x64 (d); + mmx_dest = expand565_16_1x64 (d); - *dst = pack565_32_16 (pack_1x64_32 (inOver_1x64 (&mmsrc_x, - &mmxAlpha, + *dst = pack_565_32_16 (pack_1x64_32 (in_over_1x64 (&mmsrc_x, + &mmx_alpha, &mmmask_x, - &mmxDest))); + &mmx_dest))); } w--; @@ -4083,44 +4083,44 @@ sse2_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)mask); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)dst); while (w >= 8) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)mask); - cachePrefetchNext ((__m128i*)dst); + cache_prefetch_next ((__m128i*)mask); + cache_prefetch_next ((__m128i*)dst); /* First round */ - xmmMask = load128Unaligned((__m128i*)mask); - xmmDst = load128Aligned((__m128i*)dst); + xmm_mask = load_128_unaligned((__m128i*)mask); + xmm_dst = load_128_aligned((__m128i*)dst); - packCmp = _mm_movemask_epi8 (_mm_cmpeq_epi32 (xmmMask, _mm_setzero_si128())); + pack_cmp = _mm_movemask_epi8 (_mm_cmpeq_epi32 (xmm_mask, _mm_setzero_si128())); - unpack565_128_4x128 (xmmDst, &xmmDst0, &xmmDst1, &xmmDst2, &xmmDst3); - unpack_128_2x128 (xmmMask, &xmmMaskLo, &xmmMaskHi); + unpack_565_128_4x128 (xmm_dst, &xmm_dst0, &xmm_dst1, &xmm_dst2, &xmm_dst3); + unpack_128_2x128 (xmm_mask, &xmm_mask_lo, &xmm_mask_hi); /* preload next round*/ - xmmMask = load128Unaligned((__m128i*)(mask+4)); + xmm_mask = load_128_unaligned((__m128i*)(mask+4)); /* preload next round*/ - if (packCmp != 0xffff) + if (pack_cmp != 0xffff) { - inOver_2x128(&xmmSrc, &xmmSrc, &xmmAlpha, &xmmAlpha, &xmmMaskLo, &xmmMaskHi, &xmmDst0, &xmmDst1); + in_over_2x128(&xmm_src, &xmm_src, &xmm_alpha, &xmm_alpha, &xmm_mask_lo, &xmm_mask_hi, &xmm_dst0, &xmm_dst1); } /* Second round */ - packCmp = _mm_movemask_epi8 (_mm_cmpeq_epi32 (xmmMask, _mm_setzero_si128())); + pack_cmp = _mm_movemask_epi8 (_mm_cmpeq_epi32 (xmm_mask, _mm_setzero_si128())); - unpack_128_2x128 (xmmMask, &xmmMaskLo, &xmmMaskHi); + unpack_128_2x128 (xmm_mask, &xmm_mask_lo, &xmm_mask_hi); - if (packCmp != 0xffff) + if (pack_cmp != 0xffff) { - inOver_2x128(&xmmSrc, &xmmSrc, &xmmAlpha, &xmmAlpha, &xmmMaskLo, &xmmMaskHi, &xmmDst2, &xmmDst3); + in_over_2x128(&xmm_src, &xmm_src, &xmm_alpha, &xmm_alpha, &xmm_mask_lo, &xmm_mask_hi, &xmm_dst2, &xmm_dst3); } - save128Aligned ((__m128i*)dst, pack565_4x128_128 (&xmmDst0, &xmmDst1, &xmmDst2, &xmmDst3)); + save_128_aligned ((__m128i*)dst, pack_565_4x128_128 (&xmm_dst0, &xmm_dst1, &xmm_dst2, &xmm_dst3)); w -= 8; dst += 8; @@ -4135,12 +4135,12 @@ sse2_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, { d = *dst; mmmask_x = unpack_32_1x64 (m); - mmxDest = expand565_16_1x64 (d); + mmx_dest = expand565_16_1x64 (d); - *dst = pack565_32_16 (pack_1x64_32 (inOver_1x64 (&mmsrc_x, - &mmxAlpha, + *dst = pack_565_32_16 (pack_1x64_32 (in_over_1x64 (&mmsrc_x, + &mmx_alpha, &mmmask_x, - &mmxDest))); + &mmx_dest))); } w--; @@ -4153,11 +4153,11 @@ sse2_CompositeOver_n_8888_0565_ca (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_CompositeIn_n_8_8 + * fast_composite_in_n_8_8 */ static void -sse2_CompositeIn_n_8_8 (pixman_implementation_t *imp, +sse2_composite_in_n_8_8 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -4171,19 +4171,19 @@ sse2_CompositeIn_n_8_8 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint8_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint16_t w, d, m; uint32_t src; uint8_t sa; - __m128i xmmAlpha; - __m128i xmmMask, xmmMaskLo, xmmMaskHi; - __m128i xmmDst, xmmDstLo, xmmDstHi; + __m128i xmm_alpha; + __m128i xmm_mask, xmm_mask_lo, xmm_mask_hi; + __m128i xmm_dst, xmm_dst_lo, xmm_dst_hi; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -4191,50 +4191,50 @@ sse2_CompositeIn_n_8_8 (pixman_implementation_t *imp, if (sa == 0) return; - xmmAlpha = expandAlpha_1x128 (expandPixel_32_1x128 (src)); + xmm_alpha = expand_alpha_1x128 (expand_pixel_32_1x128 (src)); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)mask); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)dst); while (w && ((unsigned long)dst & 15)) { m = (uint32_t) *mask++; d = (uint32_t) *dst; - *dst++ = (uint8_t) pack_1x64_32 (pixMultiply_1x64 (pixMultiply_1x64 (_mm_movepi64_pi64 (xmmAlpha), unpack_32_1x64 (m)), + *dst++ = (uint8_t) pack_1x64_32 (pix_multiply_1x64 (pix_multiply_1x64 (_mm_movepi64_pi64 (xmm_alpha), unpack_32_1x64 (m)), unpack_32_1x64 (d))); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)mask); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)dst); while (w >= 16) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)mask); - cachePrefetchNext ((__m128i*)dst); + cache_prefetch_next ((__m128i*)mask); + cache_prefetch_next ((__m128i*)dst); - xmmMask = load128Unaligned((__m128i*)mask); - xmmDst = load128Aligned((__m128i*)dst); + xmm_mask = load_128_unaligned((__m128i*)mask); + xmm_dst = load_128_aligned((__m128i*)dst); - unpack_128_2x128 (xmmMask, &xmmMaskLo, &xmmMaskHi); - unpack_128_2x128 (xmmDst, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_mask, &xmm_mask_lo, &xmm_mask_hi); + unpack_128_2x128 (xmm_dst, &xmm_dst_lo, &xmm_dst_hi); - pixMultiply_2x128 (&xmmAlpha, &xmmAlpha, &xmmMaskLo, &xmmMaskHi, &xmmMaskLo, &xmmMaskHi); - pixMultiply_2x128 (&xmmMaskLo, &xmmMaskHi, &xmmDstLo, &xmmDstHi, &xmmDstLo, &xmmDstHi); + pix_multiply_2x128 (&xmm_alpha, &xmm_alpha, &xmm_mask_lo, &xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); + pix_multiply_2x128 (&xmm_mask_lo, &xmm_mask_hi, &xmm_dst_lo, &xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned ((__m128i*)dst, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)dst, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); mask += 16; dst += 16; @@ -4246,7 +4246,7 @@ sse2_CompositeIn_n_8_8 (pixman_implementation_t *imp, m = (uint32_t) *mask++; d = (uint32_t) *dst; - *dst++ = (uint8_t) pack_1x64_32 (pixMultiply_1x64 (pixMultiply_1x64 (_mm_movepi64_pi64 (xmmAlpha), unpack_32_1x64 (m)), + *dst++ = (uint8_t) pack_1x64_32 (pix_multiply_1x64 (pix_multiply_1x64 (_mm_movepi64_pi64 (xmm_alpha), unpack_32_1x64 (m)), unpack_32_1x64 (d))); w--; } @@ -4256,11 +4256,11 @@ sse2_CompositeIn_n_8_8 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_CompositeIn_8_8 + * fast_composite_in_8_8 */ static void -sse2_CompositeIn_8_8 (pixman_implementation_t *imp, +sse2_composite_in_8_8 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -4274,58 +4274,58 @@ sse2_CompositeIn_8_8 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *srcLine, *src; - int srcStride, dstStride; + uint8_t *dst_line, *dst; + uint8_t *src_line, *src; + int src_stride, dst_stride; uint16_t w; uint32_t s, d; - __m128i xmmSrc, xmmSrcLo, xmmSrcHi; - __m128i xmmDst, xmmDstLo, xmmDstHi; + __m128i xmm_src, xmm_src_lo, xmm_src_hi; + __m128i xmm_dst, xmm_dst_lo, xmm_dst_hi; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, src_stride, src_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; w = width; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)src); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); while (w && ((unsigned long)dst & 15)) { s = (uint32_t) *src++; d = (uint32_t) *dst; - *dst++ = (uint8_t) pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (s),unpack_32_1x64 (d))); + *dst++ = (uint8_t) pack_1x64_32 (pix_multiply_1x64 (unpack_32_1x64 (s),unpack_32_1x64 (d))); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)src); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); while (w >= 16) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)src); - cachePrefetchNext ((__m128i*)dst); + cache_prefetch_next ((__m128i*)src); + cache_prefetch_next ((__m128i*)dst); - xmmSrc = load128Unaligned((__m128i*)src); - xmmDst = load128Aligned((__m128i*)dst); + xmm_src = load_128_unaligned((__m128i*)src); + xmm_dst = load_128_aligned((__m128i*)dst); - unpack_128_2x128 (xmmSrc, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmDst, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_src, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_dst, &xmm_dst_lo, &xmm_dst_hi); - pixMultiply_2x128 (&xmmSrcLo, &xmmSrcHi, &xmmDstLo, &xmmDstHi, &xmmDstLo, &xmmDstHi); + pix_multiply_2x128 (&xmm_src_lo, &xmm_src_hi, &xmm_dst_lo, &xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned ((__m128i*)dst, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)dst, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); src += 16; dst += 16; @@ -4337,7 +4337,7 @@ sse2_CompositeIn_8_8 (pixman_implementation_t *imp, s = (uint32_t) *src++; d = (uint32_t) *dst; - *dst++ = (uint8_t) pack_1x64_32 (pixMultiply_1x64 (unpack_32_1x64 (s),unpack_32_1x64 (d))); + *dst++ = (uint8_t) pack_1x64_32 (pix_multiply_1x64 (unpack_32_1x64 (s),unpack_32_1x64 (d))); w--; } } @@ -4346,11 +4346,11 @@ sse2_CompositeIn_8_8 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_CompositeAdd_8888_8_8 + * fast_composite_add_8888_8_8 */ static void -sse2_CompositeAdd_8888_8_8 (pixman_implementation_t *imp, +sse2_composite_add_8888_8_8 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -4364,20 +4364,20 @@ sse2_CompositeAdd_8888_8_8 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *maskLine, *mask; - int dstStride, maskStride; + uint8_t *dst_line, *dst; + uint8_t *mask_line, *mask; + int dst_stride, mask_stride; uint16_t w; uint32_t src; uint8_t sa; uint32_t m, d; - __m128i xmmAlpha; - __m128i xmmMask, xmmMaskLo, xmmMaskHi; - __m128i xmmDst, xmmDstLo, xmmDstHi; + __m128i xmm_alpha; + __m128i xmm_mask, xmm_mask_lo, xmm_mask_hi; + __m128i xmm_dst, xmm_dst_lo, xmm_dst_hi; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); src = _pixman_image_get_solid(src_image, dst_image->bits.format); @@ -4385,52 +4385,52 @@ sse2_CompositeAdd_8888_8_8 (pixman_implementation_t *imp, if (sa == 0) return; - xmmAlpha = expandAlpha_1x128 (expandPixel_32_1x128 (src)); + xmm_alpha = expand_alpha_1x128 (expand_pixel_32_1x128 (src)); while (height--) { - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)mask); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)dst); while (w && ((unsigned long)dst & 15)) { m = (uint32_t) *mask++; d = (uint32_t) *dst; - *dst++ = (uint8_t) pack_1x64_32 (_mm_adds_pu16 (pixMultiply_1x64 (_mm_movepi64_pi64 (xmmAlpha), unpack_32_1x64 (m)), + *dst++ = (uint8_t) pack_1x64_32 (_mm_adds_pu16 (pix_multiply_1x64 (_mm_movepi64_pi64 (xmm_alpha), unpack_32_1x64 (m)), unpack_32_1x64 (d))); w--; } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)mask); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)dst); while (w >= 16) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)mask); - cachePrefetchNext ((__m128i*)dst); + cache_prefetch_next ((__m128i*)mask); + cache_prefetch_next ((__m128i*)dst); - xmmMask = load128Unaligned((__m128i*)mask); - xmmDst = load128Aligned((__m128i*)dst); + xmm_mask = load_128_unaligned((__m128i*)mask); + xmm_dst = load_128_aligned((__m128i*)dst); - unpack_128_2x128 (xmmMask, &xmmMaskLo, &xmmMaskHi); - unpack_128_2x128 (xmmDst, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_mask, &xmm_mask_lo, &xmm_mask_hi); + unpack_128_2x128 (xmm_dst, &xmm_dst_lo, &xmm_dst_hi); - pixMultiply_2x128 (&xmmAlpha, &xmmAlpha, &xmmMaskLo, &xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + pix_multiply_2x128 (&xmm_alpha, &xmm_alpha, &xmm_mask_lo, &xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - xmmDstLo = _mm_adds_epu16 (xmmMaskLo, xmmDstLo); - xmmDstHi = _mm_adds_epu16 (xmmMaskHi, xmmDstHi); + xmm_dst_lo = _mm_adds_epu16 (xmm_mask_lo, xmm_dst_lo); + xmm_dst_hi = _mm_adds_epu16 (xmm_mask_hi, xmm_dst_hi); - save128Aligned ((__m128i*)dst, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned ((__m128i*)dst, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); mask += 16; dst += 16; @@ -4442,7 +4442,7 @@ sse2_CompositeAdd_8888_8_8 (pixman_implementation_t *imp, m = (uint32_t) *mask++; d = (uint32_t) *dst; - *dst++ = (uint8_t) pack_1x64_32 (_mm_adds_pu16 (pixMultiply_1x64 (_mm_movepi64_pi64 (xmmAlpha), unpack_32_1x64 (m)), + *dst++ = (uint8_t) pack_1x64_32 (_mm_adds_pu16 (pix_multiply_1x64 (_mm_movepi64_pi64 (xmm_alpha), unpack_32_1x64 (m)), unpack_32_1x64 (d))); w--; } @@ -4452,11 +4452,11 @@ sse2_CompositeAdd_8888_8_8 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_CompositeAdd_8000_8000 + * fast_composite_add_8000_8000 */ static void -sse2_CompositeAdd_8000_8000 (pixman_implementation_t *imp, +sse2_composite_add_8000_8000 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -4470,26 +4470,26 @@ sse2_CompositeAdd_8000_8000 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint8_t *dstLine, *dst; - uint8_t *srcLine, *src; - int dstStride, srcStride; + uint8_t *dst_line, *dst; + uint8_t *src_line, *src; + int dst_stride, src_stride; uint16_t w; uint16_t t; - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1); while (height--) { - dst = dstLine; - src = srcLine; + dst = dst_line; + src = src_line; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)src); - cachePrefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); - dstLine += dstStride; - srcLine += srcStride; + dst_line += dst_stride; + src_line += src_stride; w = width; /* Small head */ @@ -4500,7 +4500,7 @@ sse2_CompositeAdd_8000_8000 (pixman_implementation_t *imp, w--; } - coreCombineAddUsse2 ((uint32_t*)dst, (uint32_t*)src, NULL, w >> 2); + core_combine_add_u_sse2 ((uint32_t*)dst, (uint32_t*)src, NULL, w >> 2); /* Small tail */ dst += w & 0xfffc; @@ -4520,10 +4520,10 @@ sse2_CompositeAdd_8000_8000 (pixman_implementation_t *imp, } /* ------------------------------------------------------------------------------------------------- - * fast_CompositeAdd_8888_8888 + * fast_composite_add_8888_8888 */ static void -sse2_CompositeAdd_8888_8888 (pixman_implementation_t *imp, +sse2_composite_add_8888_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -4537,32 +4537,32 @@ sse2_CompositeAdd_8888_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *dstLine, *dst; - uint32_t *srcLine, *src; - int dstStride, srcStride; + uint32_t *dst_line, *dst; + uint32_t *src_line, *src; + int dst_stride, src_stride; - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - src = srcLine; - srcLine += srcStride; + dst = dst_line; + dst_line += dst_stride; + src = src_line; + src_line += src_stride; - coreCombineAddUsse2 (dst, src, NULL, width); + core_combine_add_u_sse2 (dst, src, NULL, width); } _mm_empty(); } /* ------------------------------------------------------------------------------------------------- - * sse2_CompositeCopyArea + * sse2_composite_copy_area */ static pixman_bool_t -pixmanBltsse2 (uint32_t *src_bits, +pixman_blt_sse2 (uint32_t *src_bits, uint32_t *dst_bits, int src_stride, int dst_stride, @@ -4604,8 +4604,8 @@ pixmanBltsse2 (uint32_t *src_bits, return FALSE; } - cachePrefetch ((__m128i*)src_bytes); - cachePrefetch ((__m128i*)dst_bytes); + cache_prefetch ((__m128i*)src_bytes); + cache_prefetch ((__m128i*)dst_bytes); while (height--) { @@ -4616,8 +4616,8 @@ pixmanBltsse2 (uint32_t *src_bits, dst_bytes += dst_stride; w = byte_width; - cachePrefetchNext ((__m128i*)s); - cachePrefetchNext ((__m128i*)d); + cache_prefetch_next ((__m128i*)s); + cache_prefetch_next ((__m128i*)d); while (w >= 2 && ((unsigned long)d & 3)) { @@ -4636,46 +4636,46 @@ pixmanBltsse2 (uint32_t *src_bits, d += 4; } - cachePrefetchNext ((__m128i*)s); - cachePrefetchNext ((__m128i*)d); + cache_prefetch_next ((__m128i*)s); + cache_prefetch_next ((__m128i*)d); while (w >= 64) { __m128i xmm0, xmm1, xmm2, xmm3; /* 128 bytes ahead */ - cachePrefetch (((__m128i*)s) + 8); - cachePrefetch (((__m128i*)d) + 8); + cache_prefetch (((__m128i*)s) + 8); + cache_prefetch (((__m128i*)d) + 8); - xmm0 = load128Unaligned ((__m128i*)(s)); - xmm1 = load128Unaligned ((__m128i*)(s+16)); - xmm2 = load128Unaligned ((__m128i*)(s+32)); - xmm3 = load128Unaligned ((__m128i*)(s+48)); + xmm0 = load_128_unaligned ((__m128i*)(s)); + xmm1 = load_128_unaligned ((__m128i*)(s+16)); + xmm2 = load_128_unaligned ((__m128i*)(s+32)); + xmm3 = load_128_unaligned ((__m128i*)(s+48)); - save128Aligned ((__m128i*)(d), xmm0); - save128Aligned ((__m128i*)(d+16), xmm1); - save128Aligned ((__m128i*)(d+32), xmm2); - save128Aligned ((__m128i*)(d+48), xmm3); + save_128_aligned ((__m128i*)(d), xmm0); + save_128_aligned ((__m128i*)(d+16), xmm1); + save_128_aligned ((__m128i*)(d+32), xmm2); + save_128_aligned ((__m128i*)(d+48), xmm3); s += 64; d += 64; w -= 64; } - cachePrefetchNext ((__m128i*)s); - cachePrefetchNext ((__m128i*)d); + cache_prefetch_next ((__m128i*)s); + cache_prefetch_next ((__m128i*)d); while (w >= 16) { - save128Aligned ((__m128i*)d, load128Unaligned ((__m128i*)s) ); + save_128_aligned ((__m128i*)d, load_128_unaligned ((__m128i*)s) ); w -= 16; d += 16; s += 16; } - cachePrefetchNext ((__m128i*)s); - cachePrefetchNext ((__m128i*)d); + cache_prefetch_next ((__m128i*)s); + cache_prefetch_next ((__m128i*)d); while (w >= 4) { @@ -4701,7 +4701,7 @@ pixmanBltsse2 (uint32_t *src_bits, } static void -sse2_CompositeCopyArea (pixman_implementation_t *imp, +sse2_composite_copy_area (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -4715,7 +4715,7 @@ sse2_CompositeCopyArea (pixman_implementation_t *imp, int32_t width, int32_t height) { - pixmanBltsse2 (src_image->bits.bits, + pixman_blt_sse2 (src_image->bits.bits, dst_image->bits.bits, src_image->bits.rowstride, dst_image->bits.rowstride, @@ -4727,7 +4727,7 @@ sse2_CompositeCopyArea (pixman_implementation_t *imp, #if 0 /* This code are buggy in MMX version, now the bug was translated to SSE2 version */ void -sse2_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, +sse2_composite_over_x888_8_8888 (pixman_implementation_t *imp, pixman_op_t op, pixman_image_t * src_image, pixman_image_t * mask_image, @@ -4741,36 +4741,36 @@ sse2_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, int32_t width, int32_t height) { - uint32_t *src, *srcLine, s; - uint32_t *dst, *dstLine, d; - uint8_t *mask, *maskLine; + uint32_t *src, *src_line, s; + uint32_t *dst, *dst_line, d; + uint8_t *mask, *mask_line; uint32_t m; - int srcStride, maskStride, dstStride; + int src_stride, mask_stride, dst_stride; uint16_t w; - __m128i xmmSrc, xmmSrcLo, xmmSrcHi; - __m128i xmmDst, xmmDstLo, xmmDstHi; - __m128i xmmMask, xmmMaskLo, xmmMaskHi; + __m128i xmm_src, xmm_src_lo, xmm_src_hi; + __m128i xmm_dst, xmm_dst_lo, xmm_dst_hi; + __m128i xmm_mask, xmm_mask_lo, xmm_mask_hi; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); - PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, maskStride, maskLine, 1); - PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, srcStride, srcLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1); + PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1); while (height--) { - src = srcLine; - srcLine += srcStride; - dst = dstLine; - dstLine += dstStride; - mask = maskLine; - maskLine += maskStride; + src = src_line; + src_line += src_stride; + dst = dst_line; + dst_line += dst_stride; + mask = mask_line; + mask_line += mask_stride; w = width; /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)src); - cachePrefetch ((__m128i*)dst); - cachePrefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); while (w && (unsigned long)dst & 15) { @@ -4782,9 +4782,9 @@ sse2_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, if (m != 0xff) { - ms = inOver_1x64 (ms, + ms = in_over_1x64 (ms, mask_x00ff, - expandAlphaRev_1x64 (unpack_32_1x64 (m)), + expand_alpha_rev_1x64 (unpack_32_1x64 (m)), unpack_32_1x64 (d)); } @@ -4793,39 +4793,39 @@ sse2_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, } /* call prefetch hint to optimize cache load*/ - cachePrefetch ((__m128i*)src); - cachePrefetch ((__m128i*)dst); - cachePrefetch ((__m128i*)mask); + cache_prefetch ((__m128i*)src); + cache_prefetch ((__m128i*)dst); + cache_prefetch ((__m128i*)mask); while (w >= 4) { /* fill cache line with next memory */ - cachePrefetchNext ((__m128i*)src); - cachePrefetchNext ((__m128i*)dst); - cachePrefetchNext ((__m128i*)mask); + cache_prefetch_next ((__m128i*)src); + cache_prefetch_next ((__m128i*)dst); + cache_prefetch_next ((__m128i*)mask); m = *(uint32_t*) mask; - xmmSrc = _mm_or_si128 (load128Unaligned ((__m128i*)src), Maskff000000); + xmm_src = _mm_or_si128 (load_128_unaligned ((__m128i*)src), mask_ff000000); if (m == 0xffffffff) { - save128Aligned ((__m128i*)dst, xmmSrc); + save_128_aligned ((__m128i*)dst, xmm_src); } else { - xmmDst = load128Aligned ((__m128i*)dst); + xmm_dst = load_128_aligned ((__m128i*)dst); - xmmMask = _mm_unpacklo_epi16 (unpack_32_1x128 (m), _mm_setzero_si128()); + xmm_mask = _mm_unpacklo_epi16 (unpack_32_1x128 (m), _mm_setzero_si128()); - unpack_128_2x128 (xmmSrc, &xmmSrcLo, &xmmSrcHi); - unpack_128_2x128 (xmmMask, &xmmMaskLo, &xmmMaskHi); - unpack_128_2x128 (xmmDst, &xmmDstLo, &xmmDstHi); + unpack_128_2x128 (xmm_src, &xmm_src_lo, &xmm_src_hi); + unpack_128_2x128 (xmm_mask, &xmm_mask_lo, &xmm_mask_hi); + unpack_128_2x128 (xmm_dst, &xmm_dst_lo, &xmm_dst_hi); - expandAlphaRev_2x128 (xmmMaskLo, xmmMaskHi, &xmmMaskLo, &xmmMaskHi); + expand_alpha_rev_2x128 (xmm_mask_lo, xmm_mask_hi, &xmm_mask_lo, &xmm_mask_hi); - inOver_2x128 (xmmSrcLo, xmmSrcHi, Mask00ff, Mask00ff, xmmMaskLo, xmmMaskHi, &xmmDstLo, &xmmDstHi); + in_over_2x128 (xmm_src_lo, xmm_src_hi, mask_00ff, mask_00ff, xmm_mask_lo, xmm_mask_hi, &xmm_dst_lo, &xmm_dst_hi); - save128Aligned( (__m128i*)dst, pack_2x128_128 (xmmDstLo, xmmDstHi)); + save_128_aligned( (__m128i*)dst, pack_2x128_128 (xmm_dst_lo, xmm_dst_hi)); } src += 4; @@ -4850,9 +4850,9 @@ sse2_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, { d = *dst; - *dst = pack_1x64_32 (inOver_1x64 (unpack_32_1x64 (s), + *dst = pack_1x64_32 (in_over_1x64 (unpack_32_1x64 (s), mask_x00ff, - expandAlphaRev_1x64 (unpack_32_1x64 (m)), + expand_alpha_rev_1x64 (unpack_32_1x64 (m)), unpack_32_1x64 (d))); } @@ -4870,77 +4870,77 @@ sse2_CompositeOver_x888_8_8888 (pixman_implementation_t *imp, static const pixman_fast_path_t sse2_fast_paths[] = { - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, sse2_CompositeOver_n_8_0565, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, sse2_CompositeOver_n_8_0565, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_a8r8g8b8, sse2_CompositeOver_n_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_x8r8g8b8, sse2_CompositeOver_n_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, sse2_CompositeOver_n_0565, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_r5g6b5, sse2_composite_over_n_8_0565, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_b5g6r5, sse2_composite_over_n_8_0565, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_a8r8g8b8, sse2_composite_over_n_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_x8r8g8b8, sse2_composite_over_n_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_null, PIXMAN_r5g6b5, sse2_composite_over_n_0565, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, sse2_composite_over_8888_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, sse2_composite_over_8888_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, sse2_composite_over_8888_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, sse2_composite_over_8888_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_r5g6b5, sse2_composite_over_8888_0565, 0 }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_b5g6r5, sse2_composite_over_8888_0565, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, sse2_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, sse2_CompositeOver_n_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, sse2_CompositeOver_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, sse2_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, sse2_composite_over_n_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, sse2_composite_over_n_8_8888, 0 }, #if 0 /* FIXME: This code are buggy in MMX version, now the bug was translated to SSE2 version */ - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, sse2_CompositeOver_x888_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_CompositeOver_x888_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, sse2_CompositeOver_x888_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_CompositeOver_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, sse2_composite_over_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_composite_over_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, sse2_composite_over_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_composite_over_x888_8_8888, 0 }, #endif - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_Composite_over_x888_n_8888, NEED_SOLID_MASK }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, sse2_Composite_over_x888_n_8888, NEED_SOLID_MASK }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, sse2_Composite_over_x888_n_8888, NEED_SOLID_MASK }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, sse2_Composite_over_x888_n_8888, NEED_SOLID_MASK }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_composite_over_x888_n_8888, NEED_SOLID_MASK }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, sse2_composite_over_x888_n_8888, NEED_SOLID_MASK }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, sse2_composite_over_x888_n_8888, NEED_SOLID_MASK }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, sse2_composite_over_x888_n_8888, NEED_SOLID_MASK }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_composite_over_8888_n_8888, NEED_SOLID_MASK }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, sse2_composite_over_8888_n_8888, NEED_SOLID_MASK }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, sse2_composite_over_8888_n_8888, NEED_SOLID_MASK }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, sse2_composite_over_8888_n_8888, NEED_SOLID_MASK }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, sse2_CompositeOver_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, sse2_CompositeOver_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, sse2_CompositeOver_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, sse2_CompositeOver_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, sse2_CompositeOver_n_8888_0565_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, sse2_CompositeOver_n_8888_0565_ca, NEED_COMPONENT_ALPHA }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, sse2_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_a8r8g8b8, sse2_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, sse2_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_x8r8g8b8, sse2_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_a8b8g8r8, sse2_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, sse2_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_x8b8g8r8, sse2_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, sse2_Composite_over_pixbuf_8888, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, sse2_Composite_over_pixbuf_0565, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_r5g6b5, sse2_Composite_over_pixbuf_0565, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_b5g6r5, sse2_Composite_over_pixbuf_0565, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, sse2_Composite_over_pixbuf_0565, NEED_PIXBUF }, - { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, sse2_CompositeCopyArea, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, sse2_CompositeCopyArea, 0 }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, sse2_composite_over_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, sse2_composite_over_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, sse2_composite_over_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, sse2_composite_over_n_8888_8888_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, sse2_composite_over_n_8888_0565_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_solid, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, sse2_composite_over_n_8888_0565_ca, NEED_COMPONENT_ALPHA }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_a8r8g8b8, sse2_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_a8r8g8b8, sse2_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_x8r8g8b8, sse2_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_x8r8g8b8, sse2_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_a8b8g8r8, sse2_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_a8b8g8r8, sse2_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_x8b8g8r8, sse2_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_x8b8g8r8, sse2_composite_over_pixbuf_8888, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8r8g8b8, PIXMAN_r5g6b5, sse2_composite_over_pixbuf_0565, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8b8g8r8, PIXMAN_r5g6b5, sse2_composite_over_pixbuf_0565, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_b5g6r5, sse2_composite_over_pixbuf_0565, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8b8g8r8, PIXMAN_b5g6r5, sse2_composite_over_pixbuf_0565, NEED_PIXBUF }, + { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, sse2_composite_copy_area, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, sse2_composite_copy_area, 0 }, - { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, sse2_CompositeAdd_8000_8000, 0 }, - { PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, sse2_CompositeAdd_8888_8888, 0 }, - { PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, sse2_CompositeAdd_8888_8888, 0 }, - { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, sse2_CompositeAdd_8888_8_8, 0 }, + { PIXMAN_OP_ADD, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, sse2_composite_add_8000_8000, 0 }, + { PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, sse2_composite_add_8888_8888, 0 }, + { PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, sse2_composite_add_8888_8888, 0 }, + { PIXMAN_OP_ADD, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, sse2_composite_add_8888_8_8, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_CompositeSrc_n_8_8888, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, sse2_CompositeSrc_n_8_8888, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, sse2_CompositeSrc_n_8_8888, 0 }, - { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, sse2_CompositeSrc_n_8_8888, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, sse2_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, sse2_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, sse2_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, sse2_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, sse2_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, sse2_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_r5g6b5, PIXMAN_null, PIXMAN_r5g6b5, sse2_CompositeCopyArea, 0 }, - { PIXMAN_OP_SRC, PIXMAN_b5g6r5, PIXMAN_null, PIXMAN_b5g6r5, sse2_CompositeCopyArea, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_composite_src_n_8_8888, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8r8g8b8, sse2_composite_src_n_8_8888, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8b8g8r8, sse2_composite_src_n_8_8888, 0 }, + { PIXMAN_OP_SRC, PIXMAN_solid, PIXMAN_a8, PIXMAN_x8b8g8r8, sse2_composite_src_n_8_8888, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_a8r8g8b8, sse2_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_a8b8g8r8, sse2_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, sse2_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, sse2_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8, sse2_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, PIXMAN_null, PIXMAN_x8b8g8r8, sse2_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_r5g6b5, PIXMAN_null, PIXMAN_r5g6b5, sse2_composite_copy_area, 0 }, + { PIXMAN_OP_SRC, PIXMAN_b5g6r5, PIXMAN_null, PIXMAN_b5g6r5, sse2_composite_copy_area, 0 }, - { PIXMAN_OP_IN, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, sse2_CompositeIn_8_8, 0 }, - { PIXMAN_OP_IN, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, sse2_CompositeIn_n_8_8, 0 }, + { PIXMAN_OP_IN, PIXMAN_a8, PIXMAN_null, PIXMAN_a8, sse2_composite_in_8_8, 0 }, + { PIXMAN_OP_IN, PIXMAN_solid, PIXMAN_a8, PIXMAN_a8, sse2_composite_in_n_8_8, 0 }, { PIXMAN_OP_NONE }, }; @@ -5012,7 +5012,7 @@ sse2_blt (pixman_implementation_t *imp, int dst_x, int dst_y, int width, int height) { - if (!pixmanBltsse2 ( + if (!pixman_blt_sse2 ( src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp, src_x, src_y, dst_x, dst_y, width, height)) @@ -5040,7 +5040,7 @@ sse2_fill (pixman_implementation_t *imp, int height, uint32_t xor) { - if (!pixmanFillsse2 (bits, stride, bpp, x, y, width, height, xor)) + if (!pixman_fill_sse2 (bits, stride, bpp, x, y, width, height, xor)) { return _pixman_implementation_fill ( imp->delegate, bits, stride, bpp, x, y, width, height, xor); @@ -5056,60 +5056,60 @@ _pixman_implementation_create_sse2 (void) pixman_implementation_t *imp = _pixman_implementation_create (mmx); /* SSE2 constants */ - Mask565r = createMask_2x32_128 (0x00f80000, 0x00f80000); - Mask565g1 = createMask_2x32_128 (0x00070000, 0x00070000); - Mask565g2 = createMask_2x32_128 (0x000000e0, 0x000000e0); - Mask565b = createMask_2x32_128 (0x0000001f, 0x0000001f); - MaskRed = createMask_2x32_128 (0x00f80000, 0x00f80000); - MaskGreen = createMask_2x32_128 (0x0000fc00, 0x0000fc00); - MaskBlue = createMask_2x32_128 (0x000000f8, 0x000000f8); - Mask565FixRB = createMask_2x32_128 (0x00e000e0, 0x00e000e0); - Mask565FixG = createMask_2x32_128 (0x0000c000, 0x0000c000); - Mask0080 = createMask_16_128 (0x0080); - Mask00ff = createMask_16_128 (0x00ff); - Mask0101 = createMask_16_128 (0x0101); - Maskffff = createMask_16_128 (0xffff); - Maskff000000 = createMask_2x32_128 (0xff000000, 0xff000000); - MaskAlpha = createMask_2x32_128 (0x00ff0000, 0x00000000); + mask_565_r = create_mask_2x32_128 (0x00f80000, 0x00f80000); + mask_565_g1 = create_mask_2x32_128 (0x00070000, 0x00070000); + mask_565_g2 = create_mask_2x32_128 (0x000000e0, 0x000000e0); + mask_565_b = create_mask_2x32_128 (0x0000001f, 0x0000001f); + mask_red = create_mask_2x32_128 (0x00f80000, 0x00f80000); + mask_green = create_mask_2x32_128 (0x0000fc00, 0x0000fc00); + mask_blue = create_mask_2x32_128 (0x000000f8, 0x000000f8); + mask_565_fix_rb = create_mask_2x32_128 (0x00e000e0, 0x00e000e0); + mask_565_fix_g = create_mask_2x32_128 (0x0000c000, 0x0000c000); + mask_0080 = create_mask_16_128 (0x0080); + mask_00ff = create_mask_16_128 (0x00ff); + mask_0101 = create_mask_16_128 (0x0101); + mask_ffff = create_mask_16_128 (0xffff); + mask_ff000000 = create_mask_2x32_128 (0xff000000, 0xff000000); + mask_alpha = create_mask_2x32_128 (0x00ff0000, 0x00000000); /* MMX constants */ - mask_x565rgb = createMask_2x32_64 (0x000001f0, 0x003f001f); - mask_x565Unpack = createMask_2x32_64 (0x00000084, 0x04100840); + mask_x565_rgb = create_mask_2x32_64 (0x000001f0, 0x003f001f); + mask_x565_unpack = create_mask_2x32_64 (0x00000084, 0x04100840); - mask_x0080 = createMask_16_64 (0x0080); - mask_x00ff = createMask_16_64 (0x00ff); - mask_x0101 = createMask_16_64 (0x0101); - mask_xAlpha = createMask_2x32_64 (0x00ff0000, 0x00000000); + mask_x0080 = create_mask_16_64 (0x0080); + mask_x00ff = create_mask_16_64 (0x00ff); + mask_x0101 = create_mask_16_64 (0x0101); + mask_x_alpha = create_mask_2x32_64 (0x00ff0000, 0x00000000); _mm_empty(); /* Set up function pointers */ /* SSE code patch for fbcompose.c */ - imp->combine_32[PIXMAN_OP_OVER] = sse2CombineOverU; - imp->combine_32[PIXMAN_OP_OVER_REVERSE] = sse2CombineOverReverseU; - imp->combine_32[PIXMAN_OP_IN] = sse2CombineInU; - imp->combine_32[PIXMAN_OP_IN_REVERSE] = sse2CombineInReverseU; - imp->combine_32[PIXMAN_OP_OUT] = sse2CombineOutU; - imp->combine_32[PIXMAN_OP_OUT_REVERSE] = sse2CombineOutReverseU; - imp->combine_32[PIXMAN_OP_ATOP] = sse2CombineAtopU; - imp->combine_32[PIXMAN_OP_ATOP_REVERSE] = sse2CombineAtopReverseU; - imp->combine_32[PIXMAN_OP_XOR] = sse2CombineXorU; - imp->combine_32[PIXMAN_OP_ADD] = sse2CombineAddU; + imp->combine_32[PIXMAN_OP_OVER] = sse2combine_over_u; + imp->combine_32[PIXMAN_OP_OVER_REVERSE] = sse2combine_over_reverse_u; + imp->combine_32[PIXMAN_OP_IN] = sse2combine_in_u; + imp->combine_32[PIXMAN_OP_IN_REVERSE] = sse2combine_in_reverse_u; + imp->combine_32[PIXMAN_OP_OUT] = sse2combine_out_u; + imp->combine_32[PIXMAN_OP_OUT_REVERSE] = sse2combine_out_reverse_u; + imp->combine_32[PIXMAN_OP_ATOP] = sse2combine_atop_u; + imp->combine_32[PIXMAN_OP_ATOP_REVERSE] = sse2combine_atop_reverse_u; + imp->combine_32[PIXMAN_OP_XOR] = sse2combine_xor_u; + imp->combine_32[PIXMAN_OP_ADD] = sse2combine_add_u; - imp->combine_32[PIXMAN_OP_SATURATE] = sse2CombineSaturateU; + imp->combine_32[PIXMAN_OP_SATURATE] = sse2combine_saturate_u; - imp->combine_32_ca[PIXMAN_OP_SRC] = sse2CombineSrcC; - imp->combine_32_ca[PIXMAN_OP_OVER] = sse2CombineOverC; - imp->combine_32_ca[PIXMAN_OP_OVER_REVERSE] = sse2CombineOverReverseC; - imp->combine_32_ca[PIXMAN_OP_IN] = sse2CombineInC; - imp->combine_32_ca[PIXMAN_OP_IN_REVERSE] = sse2CombineInReverseC; - imp->combine_32_ca[PIXMAN_OP_OUT] = sse2CombineOutC; - imp->combine_32_ca[PIXMAN_OP_OUT_REVERSE] = sse2CombineOutReverseC; - imp->combine_32_ca[PIXMAN_OP_ATOP] = sse2CombineAtopC; - imp->combine_32_ca[PIXMAN_OP_ATOP_REVERSE] = sse2CombineAtopReverseC; - imp->combine_32_ca[PIXMAN_OP_XOR] = sse2CombineXorC; - imp->combine_32_ca[PIXMAN_OP_ADD] = sse2CombineAddC; + imp->combine_32_ca[PIXMAN_OP_SRC] = sse2combine_src_c; + imp->combine_32_ca[PIXMAN_OP_OVER] = sse2combine_over_c; + imp->combine_32_ca[PIXMAN_OP_OVER_REVERSE] = sse2combine_over_reverse_c; + imp->combine_32_ca[PIXMAN_OP_IN] = sse2combine_in_c; + imp->combine_32_ca[PIXMAN_OP_IN_REVERSE] = sse2combine_in_reverse_c; + imp->combine_32_ca[PIXMAN_OP_OUT] = sse2combine_out_c; + imp->combine_32_ca[PIXMAN_OP_OUT_REVERSE] = sse2combine_out_reverse_c; + imp->combine_32_ca[PIXMAN_OP_ATOP] = sse2combine_atop_c; + imp->combine_32_ca[PIXMAN_OP_ATOP_REVERSE] = sse2combine_atop_reverse_c; + imp->combine_32_ca[PIXMAN_OP_XOR] = sse2combine_xor_c; + imp->combine_32_ca[PIXMAN_OP_ADD] = sse2combine_add_c; imp->composite = sse2_composite; imp->blt = sse2_blt; diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c index 354ae15..e4563d0 100644 --- a/pixman/pixman-utils.c +++ b/pixman/pixman-utils.c @@ -386,10 +386,10 @@ walk_region_internal (pixman_implementation_t *imp, int16_t dest_y, uint16_t width, uint16_t height, - pixman_bool_t srcRepeat, - pixman_bool_t maskRepeat, + pixman_bool_t src_repeat, + pixman_bool_t mask_repeat, pixman_region32_t *region, - pixman_composite_func_t compositeRect) + pixman_composite_func_t composite_rect) { int n; const pixman_box32_t *pbox; @@ -411,13 +411,13 @@ walk_region_internal (pixman_implementation_t *imp, x_msk = pbox->x1 - dest_x + mask_x; x_dst = pbox->x1; - if (maskRepeat) + if (mask_repeat) { y_msk = MOD (y_msk, mask_image->bits.height); if (h_this > mask_image->bits.height - y_msk) h_this = mask_image->bits.height - y_msk; } - if (srcRepeat) + if (src_repeat) { y_src = MOD (y_src, src_image->bits.height); if (h_this > src_image->bits.height - y_src) @@ -426,19 +426,19 @@ walk_region_internal (pixman_implementation_t *imp, while (w) { w_this = w; - if (maskRepeat) + if (mask_repeat) { x_msk = MOD (x_msk, mask_image->bits.width); if (w_this > mask_image->bits.width - x_msk) w_this = mask_image->bits.width - x_msk; } - if (srcRepeat) + if (src_repeat) { x_src = MOD (x_src, src_image->bits.width); if (w_this > src_image->bits.width - x_src) w_this = src_image->bits.width - x_src; } - (*compositeRect) (imp, + (*composite_rect) (imp, op, src_image, mask_image, dst_image, x_src, y_src, x_msk, y_msk, x_dst, y_dst, w_this, h_this); @@ -470,7 +470,7 @@ _pixman_walk_composite_region (pixman_implementation_t *imp, int16_t dest_y, uint16_t width, uint16_t height, - pixman_composite_func_t compositeRect) + pixman_composite_func_t composite_rect) { pixman_region32_t region; @@ -484,7 +484,7 @@ _pixman_walk_composite_region (pixman_implementation_t *imp, src_x, src_y, mask_x, mask_y, dest_x, dest_y, width, height, FALSE, FALSE, ®ion, - compositeRect); + composite_rect); } pixman_region32_fini (®ion); diff --git a/pixman/pixman-vmx.c b/pixman/pixman-vmx.c index 67fbbe9..bc0c0b8 100644 --- a/pixman/pixman-vmx.c +++ b/pixman/pixman-vmx.c @@ -217,7 +217,7 @@ over (vector unsigned int src, vector unsigned int srca, vec_st ((vector unsigned int) tmp1, 0, dest ); static void -vmxCombineOverU_no_mask (uint32_t *dest, const uint32_t *src, int width) +vmx_combine_over_u_no_mask (uint32_t *dest, const uint32_t *src, int width) { int i; vector unsigned int vdest, vsrc; @@ -250,7 +250,7 @@ vmxCombineOverU_no_mask (uint32_t *dest, const uint32_t *src, int width) } static void -vmxCombineOverU_mask (uint32_t *dest, +vmx_combine_over_u_mask (uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) @@ -292,18 +292,18 @@ vmxCombineOverU_mask (uint32_t *dest, } static void -vmxCombineOverU(pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_over_u(pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { if (mask) - vmxCombineOverU_mask(dest, src, mask, width); + vmx_combine_over_u_mask(dest, src, mask, width); else - vmxCombineOverU_no_mask(dest, src, width); + vmx_combine_over_u_no_mask(dest, src, width); } static void -vmxCombineOverReverseU_no_mask (uint32_t *dest, const uint32_t *src, int width) +vmx_combine_over_reverse_u_no_mask (uint32_t *dest, const uint32_t *src, int width) { int i; vector unsigned int vdest, vsrc; @@ -336,7 +336,7 @@ vmxCombineOverReverseU_no_mask (uint32_t *dest, const uint32_t *src, int width) } static void -vmxCombineOverReverseU_mask (uint32_t *dest, +vmx_combine_over_reverse_u_mask (uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) @@ -376,18 +376,18 @@ vmxCombineOverReverseU_mask (uint32_t *dest, } static void -vmxCombineOverReverseU (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_over_reverse_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { if (mask) - vmxCombineOverReverseU_mask(dest, src, mask, width); + vmx_combine_over_reverse_u_mask(dest, src, mask, width); else - vmxCombineOverReverseU_no_mask(dest, src, width); + vmx_combine_over_reverse_u_no_mask(dest, src, width); } static void -vmxCombineInU_no_mask (uint32_t *dest, const uint32_t *src, int width) +vmx_combine_in_u_no_mask (uint32_t *dest, const uint32_t *src, int width) { int i; vector unsigned int vdest, vsrc; @@ -419,7 +419,7 @@ vmxCombineInU_no_mask (uint32_t *dest, const uint32_t *src, int width) } static void -vmxCombineInU_mask (uint32_t *dest, +vmx_combine_in_u_mask (uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) @@ -458,18 +458,18 @@ vmxCombineInU_mask (uint32_t *dest, } static void -vmxCombineInU (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_in_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { if (mask) - vmxCombineInU_mask(dest, src, mask, width); + vmx_combine_in_u_mask(dest, src, mask, width); else - vmxCombineInU_no_mask(dest, src, width); + vmx_combine_in_u_no_mask(dest, src, width); } static void -vmxCombineInReverseU_no_mask (uint32_t *dest, const uint32_t *src, int width) +vmx_combine_in_reverse_u_no_mask (uint32_t *dest, const uint32_t *src, int width) { int i; vector unsigned int vdest, vsrc; @@ -500,7 +500,7 @@ vmxCombineInReverseU_no_mask (uint32_t *dest, const uint32_t *src, int width) } static void -vmxCombineInReverseU_mask (uint32_t *dest, +vmx_combine_in_reverse_u_mask (uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) @@ -540,18 +540,18 @@ vmxCombineInReverseU_mask (uint32_t *dest, } static void -vmxCombineInReverseU (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_in_reverse_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { if (mask) - vmxCombineInReverseU_mask(dest, src, mask, width); + vmx_combine_in_reverse_u_mask(dest, src, mask, width); else - vmxCombineInReverseU_no_mask(dest, src, width); + vmx_combine_in_reverse_u_no_mask(dest, src, width); } static void -vmxCombineOutU_no_mask (uint32_t *dest, const uint32_t *src, int width) +vmx_combine_out_u_no_mask (uint32_t *dest, const uint32_t *src, int width) { int i; vector unsigned int vdest, vsrc; @@ -582,7 +582,7 @@ vmxCombineOutU_no_mask (uint32_t *dest, const uint32_t *src, int width) } static void -vmxCombineOutU_mask (uint32_t *dest, +vmx_combine_out_u_mask (uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) @@ -621,18 +621,18 @@ vmxCombineOutU_mask (uint32_t *dest, } static void -vmxCombineOutU (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_out_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { if (mask) - vmxCombineOutU_mask(dest, src, mask, width); + vmx_combine_out_u_mask(dest, src, mask, width); else - vmxCombineOutU_no_mask(dest, src, width); + vmx_combine_out_u_no_mask(dest, src, width); } static void -vmxCombineOutReverseU_no_mask (uint32_t *dest, const uint32_t *src, int width) +vmx_combine_out_reverse_u_no_mask (uint32_t *dest, const uint32_t *src, int width) { int i; vector unsigned int vdest, vsrc; @@ -663,7 +663,7 @@ vmxCombineOutReverseU_no_mask (uint32_t *dest, const uint32_t *src, int width) } static void -vmxCombineOutReverseU_mask (uint32_t *dest, +vmx_combine_out_reverse_u_mask (uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) @@ -703,20 +703,20 @@ vmxCombineOutReverseU_mask (uint32_t *dest, } static void -vmxCombineOutReverseU (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_out_reverse_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { if (mask) - vmxCombineOutReverseU_mask(dest, src, mask, width); + vmx_combine_out_reverse_u_mask(dest, src, mask, width); else - vmxCombineOutReverseU_no_mask(dest, src, width); + vmx_combine_out_reverse_u_no_mask(dest, src, width); } static void -vmxCombineAtopU_no_mask (uint32_t *dest, const uint32_t *src, int width) +vmx_combine_atop_u_no_mask (uint32_t *dest, const uint32_t *src, int width) { int i; vector unsigned int vdest, vsrc; @@ -751,7 +751,7 @@ vmxCombineAtopU_no_mask (uint32_t *dest, const uint32_t *src, int width) } static void -vmxCombineAtopU_mask (uint32_t *dest, +vmx_combine_atop_u_mask (uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) @@ -795,20 +795,20 @@ vmxCombineAtopU_mask (uint32_t *dest, } static void -vmxCombineAtopU (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_atop_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { if (mask) - vmxCombineAtopU_mask(dest, src, mask, width); + vmx_combine_atop_u_mask(dest, src, mask, width); else - vmxCombineAtopU_no_mask(dest, src, width); + vmx_combine_atop_u_no_mask(dest, src, width); } static void -vmxCombineAtopReverseU_no_mask (uint32_t *dest, const uint32_t *src, int width) +vmx_combine_atop_reverse_u_no_mask (uint32_t *dest, const uint32_t *src, int width) { int i; vector unsigned int vdest, vsrc; @@ -843,7 +843,7 @@ vmxCombineAtopReverseU_no_mask (uint32_t *dest, const uint32_t *src, int width) } static void -vmxCombineAtopReverseU_mask (uint32_t *dest, +vmx_combine_atop_reverse_u_mask (uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) @@ -887,20 +887,20 @@ vmxCombineAtopReverseU_mask (uint32_t *dest, } static void -vmxCombineAtopReverseU (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_atop_reverse_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { if (mask) - vmxCombineAtopReverseU_mask(dest, src, mask, width); + vmx_combine_atop_reverse_u_mask(dest, src, mask, width); else - vmxCombineAtopReverseU_no_mask(dest, src, width); + vmx_combine_atop_reverse_u_no_mask(dest, src, width); } static void -vmxCombineXorU_no_mask (uint32_t *dest, const uint32_t *src, int width) +vmx_combine_xor_u_no_mask (uint32_t *dest, const uint32_t *src, int width) { int i; vector unsigned int vdest, vsrc; @@ -935,7 +935,7 @@ vmxCombineXorU_no_mask (uint32_t *dest, const uint32_t *src, int width) } static void -vmxCombineXorU_mask (uint32_t *dest, +vmx_combine_xor_u_mask (uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) @@ -979,20 +979,20 @@ vmxCombineXorU_mask (uint32_t *dest, } static void -vmxCombineXorU (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_xor_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { if (mask) - vmxCombineXorU_mask(dest, src, mask, width); + vmx_combine_xor_u_mask(dest, src, mask, width); else - vmxCombineXorU_no_mask(dest, src, width); + vmx_combine_xor_u_no_mask(dest, src, width); } static void -vmxCombineAddU_no_mask (uint32_t *dest, const uint32_t *src, int width) +vmx_combine_add_u_no_mask (uint32_t *dest, const uint32_t *src, int width) { int i; vector unsigned int vdest, vsrc; @@ -1022,7 +1022,7 @@ vmxCombineAddU_no_mask (uint32_t *dest, const uint32_t *src, int width) } static void -vmxCombineAddU_mask (uint32_t *dest, +vmx_combine_add_u_mask (uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) @@ -1061,20 +1061,20 @@ vmxCombineAddU_mask (uint32_t *dest, } static void -vmxCombineAddU (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_add_u (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { if (mask) - vmxCombineAddU_mask(dest, src, mask, width); + vmx_combine_add_u_mask(dest, src, mask, width); else - vmxCombineAddU_no_mask(dest, src, width); + vmx_combine_add_u_no_mask(dest, src, width); } static void -vmxCombineSrcC (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_src_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { int i; @@ -1106,7 +1106,7 @@ vmxCombineSrcC (pixman_implementation_t *imp, pixman_op_t op, } static void -vmxCombineOverC (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_over_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { int i; @@ -1140,7 +1140,7 @@ vmxCombineOverC (pixman_implementation_t *imp, pixman_op_t op, } static void -vmxCombineOverReverseC (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_over_reverse_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { int i; @@ -1175,7 +1175,7 @@ vmxCombineOverReverseC (pixman_implementation_t *imp, pixman_op_t op, } static void -vmxCombineInC (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_in_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { int i; @@ -1210,7 +1210,7 @@ vmxCombineInC (pixman_implementation_t *imp, pixman_op_t op, } static void -vmxCombineInReverseC (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_in_reverse_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { int i; @@ -1245,7 +1245,7 @@ vmxCombineInReverseC (pixman_implementation_t *imp, pixman_op_t op, } static void -vmxCombineOutC (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_out_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { int i; @@ -1281,7 +1281,7 @@ vmxCombineOutC (pixman_implementation_t *imp, pixman_op_t op, } static void -vmxCombineOutReverseC (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_out_reverse_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { int i; @@ -1318,7 +1318,7 @@ vmxCombineOutReverseC (pixman_implementation_t *imp, pixman_op_t op, } static void -vmxCombineAtopC (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_atop_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { int i; @@ -1360,7 +1360,7 @@ vmxCombineAtopC (pixman_implementation_t *imp, pixman_op_t op, } static void -vmxCombineAtopReverseC (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_atop_reverse_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { int i; @@ -1402,7 +1402,7 @@ vmxCombineAtopReverseC (pixman_implementation_t *imp, pixman_op_t op, } static void -vmxCombineXorC (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_xor_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { int i; @@ -1444,7 +1444,7 @@ vmxCombineXorC (pixman_implementation_t *imp, pixman_op_t op, } static void -vmxCombineAddC (pixman_implementation_t *imp, pixman_op_t op, +vmx_combine_add_c (pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width) { int i; @@ -1482,7 +1482,7 @@ vmxCombineAddC (pixman_implementation_t *imp, pixman_op_t op, #if 0 void -vmx_CompositeOver_n_8888 (pixman_operator_t op, +vmx_composite_over_n_8888 (pixman_operator_t op, pixman_image_t * src_image, pixman_image_t * mask_image, pixman_image_t * dst_image, @@ -1496,26 +1496,26 @@ vmx_CompositeOver_n_8888 (pixman_operator_t op, uint16_t height) { uint32_t src; - uint32_t *dstLine, *dst; - int dstStride; + uint32_t *dst_line, *dst; + int dst_stride; _pixman_image_get_solid (src_image, dst_image, src); if (src >> 24 == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - /* XXX vmxCombineOverU (dst, src, width); */ + dst = dst_line; + dst_line += dst_stride; + /* XXX vmx_combine_over_u (dst, src, width); */ } } void -vmx_CompositeOver_n_0565 (pixman_operator_t op, +vmx_composite_over_n_0565 (pixman_operator_t op, pixman_image_t * src_image, pixman_image_t * mask_image, pixman_image_t * dst_image, @@ -1529,22 +1529,22 @@ vmx_CompositeOver_n_0565 (pixman_operator_t op, uint16_t height) { uint32_t src; - uint16_t *dstLine, *dst; + uint16_t *dst_line, *dst; uint16_t w; - int dstStride; + int dst_stride; _pixman_image_get_solid (src_image, dst_image, src); if (src >> 24 == 0) return; - PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dstStride, dstLine, 1); + PIXMAN_IMAGE_GET_LINE (dst_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1); while (height--) { - dst = dstLine; - dstLine += dstStride; - vmxCombineOverU565(dst, src, width); + dst = dst_line; + dst_line += dst_stride; + vmx_combine_over_u565(dst, src, width); } } @@ -1566,29 +1566,29 @@ _pixman_implementation_create_vmx (void) /* Set up function pointers */ /* SSE code patch for fbcompose.c */ - imp->combine_32[PIXMAN_OP_OVER] = vmxCombineOverU; - imp->combine_32[PIXMAN_OP_OVER_REVERSE] = vmxCombineOverReverseU; - imp->combine_32[PIXMAN_OP_IN] = vmxCombineInU; - imp->combine_32[PIXMAN_OP_IN_REVERSE] = vmxCombineInReverseU; - imp->combine_32[PIXMAN_OP_OUT] = vmxCombineOutU; - imp->combine_32[PIXMAN_OP_OUT_REVERSE] = vmxCombineOutReverseU; - imp->combine_32[PIXMAN_OP_ATOP] = vmxCombineAtopU; - imp->combine_32[PIXMAN_OP_ATOP_REVERSE] = vmxCombineAtopReverseU; - imp->combine_32[PIXMAN_OP_XOR] = vmxCombineXorU; + imp->combine_32[PIXMAN_OP_OVER] = vmx_combine_over_u; + imp->combine_32[PIXMAN_OP_OVER_REVERSE] = vmx_combine_over_reverse_u; + imp->combine_32[PIXMAN_OP_IN] = vmx_combine_in_u; + imp->combine_32[PIXMAN_OP_IN_REVERSE] = vmx_combine_in_reverse_u; + imp->combine_32[PIXMAN_OP_OUT] = vmx_combine_out_u; + imp->combine_32[PIXMAN_OP_OUT_REVERSE] = vmx_combine_out_reverse_u; + imp->combine_32[PIXMAN_OP_ATOP] = vmx_combine_atop_u; + imp->combine_32[PIXMAN_OP_ATOP_REVERSE] = vmx_combine_atop_reverse_u; + imp->combine_32[PIXMAN_OP_XOR] = vmx_combine_xor_u; - imp->combine_32[PIXMAN_OP_ADD] = vmxCombineAddU; + imp->combine_32[PIXMAN_OP_ADD] = vmx_combine_add_u; - imp->combine_32_ca[PIXMAN_OP_SRC] = vmxCombineSrcC; - imp->combine_32_ca[PIXMAN_OP_OVER] = vmxCombineOverC; - imp->combine_32_ca[PIXMAN_OP_OVER_REVERSE] = vmxCombineOverReverseC; - imp->combine_32_ca[PIXMAN_OP_IN] = vmxCombineInC; - imp->combine_32_ca[PIXMAN_OP_IN_REVERSE] = vmxCombineInReverseC; - imp->combine_32_ca[PIXMAN_OP_OUT] = vmxCombineOutC; - imp->combine_32_ca[PIXMAN_OP_OUT_REVERSE] = vmxCombineOutReverseC; - imp->combine_32_ca[PIXMAN_OP_ATOP] = vmxCombineAtopC; - imp->combine_32_ca[PIXMAN_OP_ATOP_REVERSE] = vmxCombineAtopReverseC; - imp->combine_32_ca[PIXMAN_OP_XOR] = vmxCombineXorC; - imp->combine_32_ca[PIXMAN_OP_ADD] = vmxCombineAddC; + imp->combine_32_ca[PIXMAN_OP_SRC] = vmx_combine_src_c; + imp->combine_32_ca[PIXMAN_OP_OVER] = vmx_combine_over_c; + imp->combine_32_ca[PIXMAN_OP_OVER_REVERSE] = vmx_combine_over_reverse_c; + imp->combine_32_ca[PIXMAN_OP_IN] = vmx_combine_in_c; + imp->combine_32_ca[PIXMAN_OP_IN_REVERSE] = vmx_combine_in_reverse_c; + imp->combine_32_ca[PIXMAN_OP_OUT] = vmx_combine_out_c; + imp->combine_32_ca[PIXMAN_OP_OUT_REVERSE] = vmx_combine_out_reverse_c; + imp->combine_32_ca[PIXMAN_OP_ATOP] = vmx_combine_atop_c; + imp->combine_32_ca[PIXMAN_OP_ATOP_REVERSE] = vmx_combine_atop_reverse_c; + imp->combine_32_ca[PIXMAN_OP_XOR] = vmx_combine_xor_c; + imp->combine_32_ca[PIXMAN_OP_ADD] = vmx_combine_add_c; return imp; } diff --git a/pixman/pixman.c b/pixman/pixman.c index 0bd5e0b..4c393c5 100644 --- a/pixman/pixman.c +++ b/pixman/pixman.c @@ -34,9 +34,9 @@ typedef struct { pixman_op_t op; - pixman_op_t opSrcDstOpaque; - pixman_op_t opSrcOpaque; - pixman_op_t opDstOpaque; + pixman_op_t op_src_dst_opaque; + pixman_op_t op_src_opaque; + pixman_op_t op_dst_opaque; } optimized_operator_info_t; static const optimized_operator_info_t optimized_operators[] = @@ -92,11 +92,11 @@ pixman_optimize_operator(pixman_op_t op, pixman_image_t *src_image, pixman_image return op; if(is_source_opaque && is_dest_opaque) - return info->opSrcDstOpaque; + return info->op_src_dst_opaque; else if(is_source_opaque) - return info->opSrcOpaque; + return info->op_src_opaque; else if(is_dest_opaque) - return info->opDstOpaque; + return info->op_dst_opaque; return op; diff --git a/pixman/pixman.h b/pixman/pixman.h index 58dfd42..92ed696 100644 --- a/pixman/pixman.h +++ b/pixman/pixman.h @@ -398,7 +398,7 @@ typedef struct pixman_region16 pixman_region16_t; struct pixman_region16_data { long size; - long numRects; + long num_rects; /* pixman_box16_t rects[size]; in memory but not explicitly declared */ }; @@ -455,10 +455,10 @@ void pixman_region_translate (pixman_region16_t int y); pixman_bool_t pixman_region_copy (pixman_region16_t *dest, pixman_region16_t *source); -pixman_bool_t pixman_region_intersect (pixman_region16_t *newReg, +pixman_bool_t pixman_region_intersect (pixman_region16_t *new_reg, pixman_region16_t *reg1, pixman_region16_t *reg2); -pixman_bool_t pixman_region_union (pixman_region16_t *newReg, +pixman_bool_t pixman_region_union (pixman_region16_t *new_reg, pixman_region16_t *reg1, pixman_region16_t *reg2); pixman_bool_t pixman_region_union_rect (pixman_region16_t *dest, @@ -467,12 +467,12 @@ pixman_bool_t pixman_region_union_rect (pixman_region16_t int y, unsigned int width, unsigned int height); -pixman_bool_t pixman_region_subtract (pixman_region16_t *regD, - pixman_region16_t *regM, - pixman_region16_t *regS); -pixman_bool_t pixman_region_inverse (pixman_region16_t *newReg, +pixman_bool_t pixman_region_subtract (pixman_region16_t *reg_d, + pixman_region16_t *reg_m, + pixman_region16_t *reg_s); +pixman_bool_t pixman_region_inverse (pixman_region16_t *new_reg, pixman_region16_t *reg1, - pixman_box16_t *invRect); + pixman_box16_t *inv_rect); pixman_bool_t pixman_region_contains_point (pixman_region16_t *region, int x, int y, @@ -500,7 +500,7 @@ typedef struct pixman_region32 pixman_region32_t; struct pixman_region32_data { long size; - long numRects; + long num_rects; /* pixman_box32_t rects[size]; in memory but not explicitly declared */ }; @@ -542,10 +542,10 @@ void pixman_region32_translate (pixman_region32_t *r int y); pixman_bool_t pixman_region32_copy (pixman_region32_t *dest, pixman_region32_t *source); -pixman_bool_t pixman_region32_intersect (pixman_region32_t *newReg, +pixman_bool_t pixman_region32_intersect (pixman_region32_t *new_reg, pixman_region32_t *reg1, pixman_region32_t *reg2); -pixman_bool_t pixman_region32_union (pixman_region32_t *newReg, +pixman_bool_t pixman_region32_union (pixman_region32_t *new_reg, pixman_region32_t *reg1, pixman_region32_t *reg2); pixman_bool_t pixman_region32_union_rect (pixman_region32_t *dest, @@ -554,12 +554,12 @@ pixman_bool_t pixman_region32_union_rect (pixman_region32_t *d int y, unsigned int width, unsigned int height); -pixman_bool_t pixman_region32_subtract (pixman_region32_t *regD, - pixman_region32_t *regM, - pixman_region32_t *regS); -pixman_bool_t pixman_region32_inverse (pixman_region32_t *newReg, +pixman_bool_t pixman_region32_subtract (pixman_region32_t *reg_d, + pixman_region32_t *reg_m, + pixman_region32_t *reg_s); +pixman_bool_t pixman_region32_inverse (pixman_region32_t *new_reg, pixman_region32_t *reg1, - pixman_box32_t *invRect); + pixman_box32_t *inv_rect); pixman_bool_t pixman_region32_contains_point (pixman_region32_t *region, int x, int y,