--- src/qxl_driver.c | 4 +- src/qxl_surface.c | 62 +++++++++++++------------- src/uxa/uxa-accel.c | 70 ++++++++++++++--------------- src/uxa/uxa-damage.c | 50 ++++++++++----------- src/uxa/uxa-glyphs.c | 120 +++++++++++++++++++++++++------------------------- 5 files changed, 153 insertions(+), 153 deletions(-) diff --git a/src/qxl_driver.c b/src/qxl_driver.c index e4c477a..bef03df 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -834,9 +834,9 @@ qxl_prepare_solid (PixmapPtr pixmap, int alu, Pixel planemask, Pixel fg) } static void -qxl_solid (PixmapPtr pixmap, int x1, int y1, int x2, int y2) +qxl_solid (PixmapPtr pixmap, int x_1, int y_1, int x_2, int y_2) { - qxl_surface_solid (get_surface (pixmap), x1, y1, x2, y2); + qxl_surface_solid (get_surface (pixmap), x_1, y_1, x_2, y_2); } static void diff --git a/src/qxl_surface.c b/src/qxl_surface.c index 113f09b..e066578 100644 --- a/src/qxl_surface.c +++ b/src/qxl_surface.c @@ -890,14 +890,14 @@ qxl_surface_flush (qxl_surface_t *surface) /* access */ static void -download_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2) +download_box (qxl_surface_t *surface, int x_1, int y_1, int x_2, int y_2) { struct QXLRam *ram_header = get_ram_header (surface->cache->qxl); - ram_header->update_area.top = y1; - ram_header->update_area.bottom = y2; - ram_header->update_area.left = x1; - ram_header->update_area.right = x2; + ram_header->update_area.top = y_1; + ram_header->update_area.bottom = y_2; + ram_header->update_area.left = x_1; + ram_header->update_area.right = x_2; ram_header->update_surface = surface->id; @@ -907,7 +907,7 @@ download_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2) surface->dev_image, NULL, surface->host_image, - x1, y1, 0, 0, x1, y1, x2 - x1, y2 - y1); + x_1, y_1, 0, 0, x_1, y_1, x_2 - x_1, y_2 - y_1); } Bool @@ -980,7 +980,7 @@ translate_rect (struct QXLRect *rect) } static void -real_upload_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2) +real_upload_box (qxl_surface_t *surface, int x_1, int y_1, int x_2, int y_2) { struct QXLRect rect; struct QXLDrawable *drawable; @@ -989,10 +989,10 @@ real_upload_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2) uint32_t *data; int stride; - rect.left = x1; - rect.right = x2; - rect.top = y1; - rect.bottom = y2; + rect.left = x_1; + rect.right = x_2; + rect.top = y_1; + rect.bottom = y_2; drawable = make_drawable (qxl, surface->id, QXL_DRAW_COPY, &rect); drawable->u.copy.src_area = rect; @@ -1008,7 +1008,7 @@ real_upload_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2) stride = pixman_image_get_stride (surface->host_image); image = qxl_image_create ( - qxl, (const uint8_t *)data, x1, y1, x2 - x1, y2 - y1, stride, + qxl, (const uint8_t *)data, x_1, y_1, x_2 - x_1, y_2 - y_1, stride, surface->bpp == 24 ? 4 : surface->bpp / 8, TRUE); drawable->u.copy.src_bitmap = physical_address (qxl, image, qxl->main_mem_slot); @@ -1020,23 +1020,23 @@ real_upload_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2) #define TILE_HEIGHT 512 static void -upload_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2) +upload_box (qxl_surface_t *surface, int x_1, int y_1, int x_2, int y_2) { - int tile_x1, tile_y1; + int tile_x_1, tile_y_1; - for (tile_y1 = y1; tile_y1 < y2; tile_y1 += TILE_HEIGHT) + for (tile_y_1 = y_1; tile_y_1 < y_2; tile_y_1 += TILE_HEIGHT) { - for (tile_x1 = x1; tile_x1 < x2; tile_x1 += TILE_WIDTH) + for (tile_x_1 = x_1; tile_x_1 < x_2; tile_x_1 += TILE_WIDTH) { - int tile_x2 = tile_x1 + TILE_WIDTH; - int tile_y2 = tile_y1 + TILE_HEIGHT; + int tile_x_2 = tile_x_1 + TILE_WIDTH; + int tile_y_2 = tile_y_1 + TILE_HEIGHT; - if (tile_x2 > x2) - tile_x2 = x2; - if (tile_y2 > y2) - tile_y2 = y2; + if (tile_x_2 > x_2) + tile_x_2 = x_2; + if (tile_y_2 > y_2) + tile_y_2 = y_2; - real_upload_box (surface, tile_x1, tile_y1, tile_x2, tile_y2); + real_upload_box (surface, tile_x_1, tile_y_1, tile_x_2, tile_y_2); } } } @@ -1222,19 +1222,19 @@ qxl_surface_prepare_solid (qxl_surface_t *destination, void qxl_surface_solid (qxl_surface_t *destination, - int x1, - int y1, - int x2, - int y2) + int x_1, + int y_1, + int x_2, + int y_2) { qxl_screen_t *qxl = destination->cache->qxl; struct QXLRect qrect; uint32_t p; - qrect.top = y1; - qrect.bottom = y2; - qrect.left = x1; - qrect.right = x2; + qrect.top = y_1; + qrect.bottom = y_2; + qrect.left = x_1; + qrect.right = x_2; p = destination->u.solid_pixel; diff --git a/src/uxa/uxa-accel.c b/src/uxa/uxa-accel.c index e456e6c..557ca75 100644 --- a/src/uxa/uxa-accel.c +++ b/src/uxa/uxa-accel.c @@ -305,27 +305,27 @@ uxa_do_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, pClip = fbGetCompositeClip(pGC); for (nbox = REGION_NUM_RECTS(pClip), pbox = REGION_RECTS(pClip); nbox--; pbox++) { - int x1 = x; - int y1 = y; + int x_1 = x; + int y_1 = y; int x2 = x + w; int y2 = y + h; char *src; Bool ok; - if (x1 < pbox->x1) - x1 = pbox->x1; - if (y1 < pbox->y1) - y1 = pbox->y1; + if (x_1 < pbox->x1) + x_1 = pbox->x1; + if (y_1 < pbox->y1) + y_1 = pbox->y1; if (x2 > pbox->x2) x2 = pbox->x2; if (y2 > pbox->y2) y2 = pbox->y2; - if (x1 >= x2 || y1 >= y2) + if (x_1 >= x2 || y_1 >= y2) continue; - src = bits + (y1 - y) * src_stride + (x1 - x) * (bpp / 8); - ok = uxa_screen->info->put_image(pPix, x1 + xoff, y1 + yoff, - x2 - x1, y2 - y1, src, + src = bits + (y_1 - y) * src_stride + (x_1 - x) * (bpp / 8); + ok = uxa_screen->info->put_image(pPix, x_1 + xoff, y_1 + yoff, + x2 - x_1, y2 - y_1, src, src_stride); /* If we fail to accelerate the upload, fall back to using * unaccelerated fb calls. @@ -343,12 +343,12 @@ uxa_do_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, dstXoff, dstYoff); fbBltStip((FbStip *) bits + - (y1 - y) * (src_stride / sizeof(FbStip)), + (y_1 - y) * (src_stride / sizeof(FbStip)), src_stride / sizeof(FbStip), - (x1 - x) * dstBpp, - dst + (y1 + dstYoff) * dst_stride, dst_stride, - (x1 + dstXoff) * dstBpp, (x2 - x1) * dstBpp, - y2 - y1, GXcopy, FB_ALLONES, dstBpp); + (x_1 - x) * dstBpp, + dst + (y_1 + dstYoff) * dst_stride, dst_stride, + (x_1 + dstXoff) * dstBpp, (x2 - x_1) * dstBpp, + y2 - y_1, GXcopy, FB_ALLONES, dstBpp); uxa_finish_access(pDrawable); } @@ -686,7 +686,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt) { xRectangle *prect; - int x1, x2, y1, y2; + int x_1, x_2, y_1, y_2; int i; /* Don't try to do wide lines or non-solid fill style. */ @@ -699,41 +699,41 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, prect = malloc(sizeof(xRectangle) * (npt - 1)); if (!prect) return; - x1 = ppt[0].x; - y1 = ppt[0].y; + x_1 = ppt[0].x; + y_1 = ppt[0].y; /* If we have any non-horizontal/vertical, fall back. */ for (i = 0; i < npt - 1; i++) { if (mode == CoordModePrevious) { - x2 = x1 + ppt[i + 1].x; - y2 = y1 + ppt[i + 1].y; + x_2 = x_1 + ppt[i + 1].x; + y_2 = y_1 + ppt[i + 1].y; } else { - x2 = ppt[i + 1].x; - y2 = ppt[i + 1].y; + x_2 = ppt[i + 1].x; + y_2 = ppt[i + 1].y; } - if (x1 != x2 && y1 != y2) { + if (x_1 != x_2 && y_1 != y_2) { free(prect); uxa_check_poly_lines(pDrawable, pGC, mode, npt, ppt); return; } - if (x1 < x2) { - prect[i].x = x1; - prect[i].width = x2 - x1 + 1; + if (x_1 < x_2) { + prect[i].x = x_1; + prect[i].width = x_2 - x_1 + 1; } else { - prect[i].x = x2; - prect[i].width = x1 - x2 + 1; + prect[i].x = x_2; + prect[i].width = x_1 - x_2 + 1; } - if (y1 < y2) { - prect[i].y = y1; - prect[i].height = y2 - y1 + 1; + if (y_1 < y_2) { + prect[i].y = y_1; + prect[i].height = y_2 - y_1 + 1; } else { - prect[i].y = y2; - prect[i].height = y1 - y2 + 1; + prect[i].y = y_2; + prect[i].height = y_1 - y_2 + 1; } - x1 = x2; - y1 = y2; + x_1 = x_2; + y_1 = y_2; } pGC->ops->PolyFillRect(pDrawable, pGC, npt - 1, prect); free(prect); diff --git a/src/uxa/uxa-damage.c b/src/uxa/uxa-damage.c index 3e4c075..504491f 100644 --- a/src/uxa/uxa-damage.c +++ b/src/uxa/uxa-damage.c @@ -258,7 +258,7 @@ uxa_damage_glyphs (RegionPtr region, int n; GlyphPtr glyph; BoxRec box; - int x1, y1, x2, y2; + int x_1, y_1, x_2, y_2; box.x1 = 32767; box.y1 = 32767; @@ -274,18 +274,18 @@ uxa_damage_glyphs (RegionPtr region, while (n--) { glyph = *glyphsTmp++; - x1 = x - glyph->info.x; - y1 = y - glyph->info.y; - x2 = x1 + glyph->info.width; - y2 = y1 + glyph->info.height; - if (x1 < box.x1) - box.x1 = x1; - if (y1 < box.y1) - box.y1 = y1; - if (x2 > box.x2) - box.x2 = x2; - if (y2 > box.y2) - box.y2 = y2; + x_1 = x - glyph->info.x; + y_1 = y - glyph->info.y; + x_2 = x_1 + glyph->info.width; + y_2 = y_1 + glyph->info.height; + if (x_1 < box.x1) + box.x1 = x_1; + if (y_1 < box.y1) + box.y1 = y_1; + if (x_2 > box.x2) + box.x2 = x_2; + if (y_2 > box.y2) + box.y2 = y_2; x += glyph->info.xOff; y += glyph->info.yOff; } @@ -322,19 +322,19 @@ uxa_damage_add_traps (RegionPtr region, { pixman_fixed_t l = min (t->top.l, t->bot.l); pixman_fixed_t r = max (t->top.r, t->bot.r); - int x1 = x + pixman_fixed_to_int (l); - int x2 = x + pixman_fixed_to_int (pixman_fixed_ceil (r)); - int y1 = y + pixman_fixed_to_int (t->top.y); - int y2 = y + pixman_fixed_to_int (pixman_fixed_ceil (t->bot.y)); + int x_1 = x + pixman_fixed_to_int (l); + int x_2 = x + pixman_fixed_to_int (pixman_fixed_ceil (r)); + int y_1 = y + pixman_fixed_to_int (t->top.y); + int y_2 = y + pixman_fixed_to_int (pixman_fixed_ceil (t->bot.y)); - if (x1 < box.x1) - box.x1 = x1; - if (x2 > box.x2) - box.x2 = x2; - if (y1 < box.y1) - box.y1 = y1; - if (y2 > box.y2) - box.y2 = y2; + if (x_1 < box.x1) + box.x1 = x_1; + if (x_2 > box.x2) + box.x2 = x_2; + if (y_1 < box.y1) + box.y1 = y_1; + if (y_2 > box.y2) + box.y2 = y_2; } TRIM_PICTURE_BOX (box, pPicture); if (BOX_NOT_EMPTY(box)) diff --git a/src/uxa/uxa-glyphs.c b/src/uxa/uxa-glyphs.c index dd50dfc..d6ea188 100644 --- a/src/uxa/uxa-glyphs.c +++ b/src/uxa/uxa-glyphs.c @@ -307,11 +307,11 @@ static void uxa_glyph_extents(int nlist, GlyphListPtr list, GlyphPtr * glyphs, BoxPtr extents) { - int x1, x2, y1, y2; + int x_1, x_2, y_1, y_2; int x, y, n; - x1 = y1 = MAXSHORT; - x2 = y2 = MINSHORT; + x_1 = y_1 = MAXSHORT; + x_2 = y_2 = MINSHORT; x = y = 0; while (nlist--) { x += list->xOff; @@ -323,28 +323,28 @@ uxa_glyph_extents(int nlist, int v; v = x - glyph->info.x; - if (v < x1) - x1 = v; + if (v < x_1) + x_1 = v; v += glyph->info.width; - if (v > x2) - x2 = v; + if (v > x_2) + x_2 = v; v = y - glyph->info.y; - if (v < y1) - y1 = v; + if (v < y_1) + y_1 = v; v += glyph->info.height; - if (v > y2) - y2 = v; + if (v > y_2) + y_2 = v; x += glyph->info.xOff; y += glyph->info.yOff; } } - extents->x1 = x1 < MINSHORT ? MINSHORT : x1; - extents->x2 = x2 > MAXSHORT ? MAXSHORT : x2; - extents->y1 = y1 < MINSHORT ? MINSHORT : y1; - extents->y2 = y2 > MAXSHORT ? MAXSHORT : y2; + extents->x1 = x_1 < MINSHORT ? MINSHORT : x_1; + extents->x2 = x_2 > MAXSHORT ? MAXSHORT : x_2; + extents->y1 = y_1 < MINSHORT ? MINSHORT : y_1; + extents->y2 = y_2 > MAXSHORT ? MAXSHORT : y_2; } /** @@ -354,7 +354,7 @@ uxa_glyph_extents(int nlist, static Bool uxa_glyphs_intersect(int nlist, GlyphListPtr list, GlyphPtr * glyphs) { - int x1, x2, y1, y2; + int x_1, x_2, y_1, y_2; int n; int x, y; BoxRec extents; @@ -380,39 +380,39 @@ uxa_glyphs_intersect(int nlist, GlyphListPtr list, GlyphPtr * glyphs) continue; } - x1 = x - glyph->info.x; - if (x1 < MINSHORT) - x1 = MINSHORT; - y1 = y - glyph->info.y; - if (y1 < MINSHORT) - y1 = MINSHORT; - x2 = x1 + glyph->info.width; - if (x2 > MAXSHORT) - x2 = MAXSHORT; - y2 = y1 + glyph->info.height; - if (y2 > MAXSHORT) - y2 = MAXSHORT; + x_1 = x - glyph->info.x; + if (x_1 < MINSHORT) + x_1 = MINSHORT; + y_1 = y - glyph->info.y; + if (y_1 < MINSHORT) + y_1 = MINSHORT; + x_2 = x_1 + glyph->info.width; + if (x_2 > MAXSHORT) + x_2 = MAXSHORT; + y_2 = y_1 + glyph->info.height; + if (y_2 > MAXSHORT) + y_2 = MAXSHORT; if (first) { - extents.x1 = x1; - extents.y1 = y1; - extents.x2 = x2; - extents.y2 = y2; + extents.x1 = x_1; + extents.y1 = y_1; + extents.x2 = x_2; + extents.y2 = y_2; first = FALSE; } else { - if (x1 < extents.x2 && x2 > extents.x1 && - y1 < extents.y2 && y2 > extents.y1) { + if (x_1 < extents.x2 && x_2 > extents.x1 && + y_1 < extents.y2 && y_2 > extents.y1) { return TRUE; } - if (x1 < extents.x1) - extents.x1 = x1; - if (x2 > extents.x2) - extents.x2 = x2; - if (y1 < extents.y1) - extents.y1 = y1; - if (y2 > extents.y2) - extents.y2 = y2; + if (x_1 < extents.x1) + extents.x1 = x_1; + if (x_2 > extents.x2) + extents.x2 = x_2; + if (y_1 < extents.y1) + extents.y1 = y_1; + if (y_2 > extents.y2) + extents.y2 = y_2; } x += glyph->info.xOff; y += glyph->info.yOff; @@ -795,26 +795,26 @@ uxa_glyphs_to_dst(CARD8 op, } else { BoxPtr rects = REGION_RECTS(pDst->pCompositeClip); do { - int x1 = x - glyph->info.x, dx = 0; - int y1 = y - glyph->info.y, dy = 0; - int x2 = x1 + glyph->info.width; - int y2 = y1 + glyph->info.height; - - if (x1 < rects->x1) - dx = rects->x1 - x1, x1 = rects->x1; - if (x2 > rects->x2) - x2 = rects->x2; - if (y1 < rects->y1) - dy = rects->y1 - y1, y1 = rects->y1; - if (y2 > rects->y2) - y2 = rects->y2; - - if (x1 < x2 && y1 < y2) { + int x_1 = x - glyph->info.x, dx = 0; + int y_1 = y - glyph->info.y, dy = 0; + int x_2 = x_1 + glyph->info.width; + int y_2 = y_1 + glyph->info.height; + + if (x_1 < rects->x1) + dx = rects->x1 - x_1, x_1 = rects->x1; + if (x_2 > rects->x2) + x_2 = rects->x2; + if (y_1 < rects->y1) + dy = rects->y1 - y_1, y_1 = rects->y1; + if (y_2 > rects->y2) + y_2 = rects->y2; + + if (x_1 < x_2 && y_1 < y_2) { uxa_screen->info->composite(dst_pixmap, - x1 + src_x, y1 + src_y, + x_1 + src_x, y_1 + src_y, dx + mask_x, dy + mask_y, - x1, y1, - x2 - x1, y2 - y1); + x_1, y_1, + x_2 - x_1, y_2 - y_1); } rects++; } while (--nrect); -- 1.7.10.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel