From e27b2a1fcc890d3abf272cc27fa2c0a2e8d7ab09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Mon, 29 Jun 2009 07:59:10 -0400 Subject: [PATCH] Fix some more pFoo names s/([^a-z])pReg/$1region/g; s/([^a-z])pY/$1y_line/g; s/([^a-z])pU/$1u_line/g; s/([^a-z])pV/$1v_line/g; s/([^a-z])p([A-Z])/$1\l$2/g; --- pixman/pixman-access.c | 12 ++++---- pixman/pixman-mmx.c | 6 ++-- pixman/pixman-region.c | 76 +++++++++++++++++++++++++------------------------- pixman/pixman-sse2.c | 6 ++-- pixman/pixman-utils.c | 38 ++++++++++++------------- 5 files changed, 69 insertions(+), 69 deletions(-) diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c index 217a02d..47f4c52 100644 --- a/pixman/pixman-access.c +++ b/pixman/pixman-access.c @@ -804,18 +804,18 @@ fetch_scanline_yv12 (pixman_image_t *image, int x, int line, int width, uint32_t const uint32_t *mask, uint32_t mask_bits) { YV12_SETUP(image); - uint8_t *pY = YV12_Y (line); - uint8_t *pU = YV12_U (line); - uint8_t *pV = YV12_V (line); + uint8_t *y_line = YV12_Y (line); + uint8_t *u_line = YV12_U (line); + uint8_t *v_line = YV12_V (line); int16_t y, u, v; int32_t r, g, b; int i; for (i = 0; i < width; i++) { - y = pY[x + i] - 16; - u = pU[(x + i) >> 1] - 128; - v = pV[(x + i) >> 1] - 128; + y = y_line[x + i] - 16; + u = u_line[(x + i) >> 1] - 128; + v = v_line[(x + i) >> 1] - 128; /* R = 1.164(Y - 16) + 1.596(V - 128) */ r = 0x012b27 * y + 0x019a2e * v; diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c index 2cf1713..e9e5071 100644 --- a/pixman/pixman-mmx.c +++ b/pixman/pixman-mmx.c @@ -1487,7 +1487,7 @@ mmx_composite_over_8888_0565 (pixman_implementation_t *imp, #if 0 /* FIXME */ - assert (src_image->pDrawable == mask_image->pDrawable); + assert (src_image->drawable == mask_image->drawable); #endif while (height--) @@ -2126,7 +2126,7 @@ mmx_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, #if 0 /* FIXME */ - assert (src_image->pDrawable == mask_image->pDrawable); + assert (src_image->drawable == mask_image->drawable); #endif while (height--) @@ -2248,7 +2248,7 @@ mmx_Composite_over_pixbuf_8888 (pixman_implementation_t *imp, #if 0 /* FIXME */ - assert (src_image->pDrawable == mask_image->pDrawable); + assert (src_image->drawable == mask_image->drawable); #endif while (height--) diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c index 30db82a..52ce83e 100644 --- a/pixman/pixman-region.c +++ b/pixman/pixman-region.c @@ -75,7 +75,7 @@ static region_data_type_t *pixman_region_emptyData = (region_data_type_t *)&PREF static region_data_type_t *pixman_brokendata = (region_data_type_t *)&PREFIX(_brokendata_); static pixman_bool_t -pixman_break (region_type_t *pReg); +pixman_break (region_type_t *region); /* * The functions in this file implement the Region abstraction used extensively @@ -171,13 +171,13 @@ allocData(size_t n) #define freeData(reg) if ((reg)->data && (reg)->data->size) free((reg)->data) -#define RECTALLOC_BAIL(pReg,n,bail) \ -if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \ - if (!pixman_rect_alloc(pReg, n)) { goto bail; } +#define RECTALLOC_BAIL(region,n,bail) \ +if (!(region)->data || (((region)->data->numRects + (n)) > (region)->data->size)) \ + if (!pixman_rect_alloc(region, n)) { goto bail; } -#define RECTALLOC(pReg,n) \ -if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \ - if (!pixman_rect_alloc(pReg, n)) { return FALSE; } +#define RECTALLOC(region,n) \ +if (!(region)->data || (((region)->data->numRects + (n)) > (region)->data->size)) \ + if (!pixman_rect_alloc(region, n)) { return FALSE; } #define ADDRECT(next_rect,nx1,ny1,nx2,ny2) \ { \ @@ -188,17 +188,17 @@ if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \ next_rect++; \ } -#define NEWRECT(pReg,next_rect,nx1,ny1,nx2,ny2) \ +#define NEWRECT(region,next_rect,nx1,ny1,nx2,ny2) \ { \ - if (!(pReg)->data || ((pReg)->data->numRects == (pReg)->data->size))\ + if (!(region)->data || ((region)->data->numRects == (region)->data->size))\ { \ - if (!pixman_rect_alloc(pReg, 1)) \ + if (!pixman_rect_alloc(region, 1)) \ return FALSE; \ - next_rect = PIXREGION_TOP(pReg); \ + next_rect = PIXREGION_TOP(region); \ } \ ADDRECT(next_rect,nx1,ny1,nx2,ny2); \ - pReg->data->numRects++; \ - assert(pReg->data->numRects<=pReg->data->size); \ + region->data->numRects++; \ + assert(region->data->numRects<=region->data->size); \ } #define DOWNSIZE(reg,numRects) \ @@ -422,8 +422,8 @@ pixman_coalesce ( int prevStart, /* Index of start of previous band */ int curStart) /* Index of start of current band */ { - box_type_t * pPrevBox; /* Current box in previous band */ - box_type_t * pCurBox; /* Current box in 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 */ int y2; /* Bottom of current band */ /* @@ -438,9 +438,9 @@ pixman_coalesce ( * The bands may only be coalesced if the bottom of the previous * matches the top scanline of the current. */ - pPrevBox = PIXREGION_BOX(region, prevStart); - pCurBox = PIXREGION_BOX(region, curStart); - if (pPrevBox->y2 != pCurBox->y1) return curStart; + prevBox = PIXREGION_BOX(region, prevStart); + curBox = PIXREGION_BOX(region, curStart); + if (prevBox->y2 != curBox->y1) return curStart; /* * Make sure the bands have boxes in the same places. This @@ -448,14 +448,14 @@ pixman_coalesce ( * cover the most area possible. I.e. two boxes in a band must * have some horizontal space between them. */ - y2 = pCurBox->y2; + y2 = curBox->y2; do { - if ((pPrevBox->x1 != pCurBox->x1) || (pPrevBox->x2 != pCurBox->x2)) { + if ((prevBox->x1 != curBox->x1) || (prevBox->x2 != curBox->x2)) { return (curStart); } - pPrevBox++; - pCurBox++; + prevBox++; + curBox++; numRects--; } while (numRects); @@ -466,8 +466,8 @@ pixman_coalesce ( numRects = curStart - prevStart; region->data->numRects -= numRects; do { - pPrevBox--; - pPrevBox->y2 = y2; + prevBox--; + prevBox->y2 = y2; numRects--; } while (numRects); return prevStart; @@ -560,7 +560,7 @@ pixman_region_appendNonO ( * * Side Effects: * The new region is overwritten. - * pOverlap set to TRUE if overlapFunc ever returns TRUE. + * overlap set to TRUE if overlapFunc ever returns TRUE. * * Notes: * The idea behind this function is to view the two regions as sets. @@ -585,7 +585,7 @@ typedef pixman_bool_t (*OverlapProcPtr)( box_type_t *r2End, int y1, int y2, - int *pOverlap); + int *overlap); static pixman_bool_t pixman_op( @@ -598,7 +598,7 @@ pixman_op( /* in region 1 ? */ int appendNon2, /* Append non-overlapping bands */ /* in region 2 ? */ - int *pOverlap) + int *overlap) { box_type_t * r1; /* Pointer into first region */ box_type_t * r2; /* Pointer into 2d region */ @@ -754,7 +754,7 @@ pixman_op( r1, r1BandEnd, r2, r2BandEnd, ytop, ybot, - pOverlap)) + overlap)) goto bail; Coalesce(newReg, prevBand, curBand); } @@ -909,7 +909,7 @@ pixman_region_intersectO (region_type_t *region, box_type_t *r2End, int y1, int y2, - int *pOverlap) + int *overlap) { int x1; int x2; @@ -1011,7 +1011,7 @@ PREFIX(_intersect) (region_type_t * newReg, { \ if (r->x1 <= x2) { \ /* Merge with current rectangle */ \ - if (r->x1 < x2) *pOverlap = TRUE; \ + if (r->x1 < x2) *overlap = TRUE; \ if (x2 < r->x2) x2 = r->x2; \ } else { \ /* Add current rectangle, start new one */ \ @@ -1037,7 +1037,7 @@ PREFIX(_intersect) (region_type_t * newReg, * * Side Effects: * region is overwritten. - * pOverlap is set to TRUE if any boxes overlap. + * overlap is set to TRUE if any boxes overlap. * *----------------------------------------------------------------------- */ @@ -1050,7 +1050,7 @@ pixman_region_unionO ( box_type_t *r2End, int y1, int y2, - int *pOverlap) + int *overlap) { box_type_t * next_rect; int x1; /* left and right side of current union */ @@ -1285,7 +1285,7 @@ QuickSortRects( * * Side Effects: * The passed-in ``region'' may be modified. - * pOverlap set to TRUE if any retangles overlapped, + * overlap set to TRUE if any retangles overlapped, * else FALSE; * * Strategy: @@ -1307,7 +1307,7 @@ QuickSortRects( static pixman_bool_t validate (region_type_t * badreg, - int *pOverlap) + int *overlap) { /* Descriptor for regions under construction in Step 2. */ typedef struct { @@ -1331,7 +1331,7 @@ validate (region_type_t * badreg, region_type_t * hreg; /* ri[j_half].reg */ pixman_bool_t ret = TRUE; - *pOverlap = FALSE; + *overlap = FALSE; if (!badreg->data) { good(badreg); @@ -1400,7 +1400,7 @@ validate (region_type_t * badreg, if (box->x1 <= riBox->x2) { /* Merge it with riBox */ - if (box->x1 < riBox->x2) *pOverlap = TRUE; + if (box->x1 < riBox->x2) *overlap = TRUE; if (box->x2 > riBox->x2) riBox->x2 = box->x2; } else @@ -1485,7 +1485,7 @@ NextRect: ; { reg = &ri[j].reg; hreg = &ri[j+half].reg; - if (!pixman_op(reg, reg, hreg, pixman_region_unionO, TRUE, TRUE, pOverlap)) + if (!pixman_op(reg, reg, hreg, pixman_region_unionO, TRUE, TRUE, overlap)) ret = FALSE; if (hreg->extents.x1 < reg->extents.x1) reg->extents.x1 = hreg->extents.x1; @@ -1543,7 +1543,7 @@ pixman_region_subtractO ( box_type_t * r2End, int y1, int y2, - int *pOverlap) + int *overlap) { box_type_t * next_rect; int x1; diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c index 4508471..02d4511 100644 --- a/pixman/pixman-sse2.c +++ b/pixman/pixman-sse2.c @@ -3115,7 +3115,7 @@ sse2_composite_over_8888_0565 (pixman_implementation_t *imp, * I copy the code from MMX one and keep the fixme. * If it's a problem there, probably is a problem here. */ - assert (src_image->pDrawable == mask_image->pDrawable); + assert (src_image->drawable == mask_image->drawable); #endif while (height--) @@ -3794,7 +3794,7 @@ sse2_Composite_over_pixbuf_0565 (pixman_implementation_t *imp, * I copy the code from MMX one and keep the fixme. * If it's a problem there, probably is a problem here. */ - assert (src_image->pDrawable == mask_image->pDrawable); + assert (src_image->drawable == mask_image->drawable); #endif while (height--) @@ -3928,7 +3928,7 @@ sse2_Composite_over_pixbuf_8888 (pixman_implementation_t *imp, * I copy the code from MMX one and keep the fixme. * If it's a problem there, probably is a problem here. */ - assert (src_image->pDrawable == mask_image->pDrawable); + assert (src_image->drawable == mask_image->drawable); #endif while (height--) diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c index 8949284..42ce5ef 100644 --- a/pixman/pixman-utils.c +++ b/pixman/pixman-utils.c @@ -37,32 +37,32 @@ static inline pixman_bool_t miClipPictureReg (pixman_region32_t * region, - pixman_region32_t * pClip, + pixman_region32_t * clip, int dx, int dy) { if (pixman_region32_n_rects(region) == 1 && - pixman_region32_n_rects(pClip) == 1) + pixman_region32_n_rects(clip) == 1) { - pixman_box32_t * pRbox = pixman_region32_rectangles(region, NULL); - pixman_box32_t * pCbox = pixman_region32_rectangles(pClip, NULL); + pixman_box32_t * rbox = pixman_region32_rectangles(region, NULL); + pixman_box32_t * cbox = pixman_region32_rectangles(clip, NULL); int v; - if (pRbox->x1 < (v = pCbox->x1 + dx)) - pRbox->x1 = BOUND(v); - if (pRbox->x2 > (v = pCbox->x2 + dx)) - pRbox->x2 = BOUND(v); - if (pRbox->y1 < (v = pCbox->y1 + dy)) - pRbox->y1 = BOUND(v); - if (pRbox->y2 > (v = pCbox->y2 + dy)) - pRbox->y2 = BOUND(v); - if (pRbox->x1 >= pRbox->x2 || - pRbox->y1 >= pRbox->y2) + if (rbox->x1 < (v = cbox->x1 + dx)) + rbox->x1 = BOUND(v); + if (rbox->x2 > (v = cbox->x2 + dx)) + rbox->x2 = BOUND(v); + if (rbox->y1 < (v = cbox->y1 + dy)) + rbox->y1 = BOUND(v); + if (rbox->y2 > (v = cbox->y2 + dy)) + rbox->y2 = BOUND(v); + if (rbox->x1 >= rbox->x2 || + rbox->y1 >= rbox->y2) { pixman_region32_init (region); } } - else if (!pixman_region32_not_empty (pClip)) + else if (!pixman_region32_not_empty (clip)) { return FALSE; } @@ -70,7 +70,7 @@ miClipPictureReg (pixman_region32_t * region, { if (dx || dy) pixman_region32_translate (region, -dx, -dy); - if (!pixman_region32_intersect (region, region, pClip)) + if (!pixman_region32_intersect (region, region, clip)) return FALSE; if (dx || dy) pixman_region32_translate(region, dx, dy); @@ -81,7 +81,7 @@ miClipPictureReg (pixman_region32_t * region, static inline pixman_bool_t miClipPictureSrc (pixman_region32_t * region, - pixman_image_t * pPicture, + pixman_image_t * picture, int dx, int dy) { @@ -90,11 +90,11 @@ miClipPictureSrc (pixman_region32_t * region, * the clip was not set by a client, then it is a hierarchy * clip and those should always be ignored for sources). */ - if (!pPicture->common.clip_sources || !pPicture->common.client_clip) + if (!picture->common.clip_sources || !picture->common.client_clip) return TRUE; return miClipPictureReg (region, - &pPicture->common.clip_region, + &picture->common.clip_region, dx, dy); } -- 2.7.4