Lines Matching refs:tile
58 sna_tiling_composite_add_rect(struct sna_tile_state *tile,
61 if (tile->rect_count == tile->rect_size) {
63 int newsize = tile->rect_size * 2;
65 if (tile->rects == tile->rects_embedded) {
71 tile->rects_embedded,
72 sizeof(struct sna_composite_rectangles) * tile->rect_count);
74 a = realloc(tile->rects,
80 tile->rects = a;
81 tile->rect_size = newsize;
84 tile->rects[tile->rect_count++] = *r;
139 struct sna_tile_state *tile = op->priv;
143 /* Use a small step to accommodate enlargement through tile alignment */
145 if (tile->dst_x & (8*512 / tile->dst->pDrawable->bitsPerPixel - 1) ||
146 tile->dst_y & 63)
157 tile->width, tile->height, tile->rect_count, step));
159 if (tile->rect_count == 0)
162 for (y = 0; y < tile->height; y += step) {
164 if (y + height > tile->height)
165 height = tile->height - y;
166 for (x = 0; x < tile->width; x += step) {
168 if (x + width > tile->width)
169 width = tile->width - x;
170 if (sna->render.composite(sna, tile->op,
171 tile->src, tile->mask, tile->dst,
172 tile->src_x + x, tile->src_y + y,
173 tile->mask_x + x, tile->mask_y + y,
174 tile->dst_x + x, tile->dst_y + y,
177 for (n = 0; n < tile->rect_count; n++) {
178 const struct sna_composite_rectangles *r = &tile->rects[n];
181 x1 = r->dst.x - tile->dst_x, dx = 0;
184 y1 = r->dst.y - tile->dst_y, dy = 0;
188 x2 = r->dst.x + r->width - tile->dst_x;
191 y2 = r->dst.y + r->height - tile->dst_y;
195 DBG(("%s: rect[%d] = (%d, %d)x(%d,%d), tile=(%d,%d)x(%d, %d), blt=(%d,%d),(%d,%d), delta=(%d,%d)\n",
225 if (tile->op <= PictOpSrc)
229 if (!sna_drawable_move_to_cpu(tile->dst->pDrawable,
232 if (tile->dst->alphaMap &&
233 !sna_drawable_move_to_cpu(tile->dst->alphaMap->pDrawable,
237 if (tile->src->pDrawable &&
238 !sna_drawable_move_to_cpu(tile->src->pDrawable,
241 if (tile->src->alphaMap &&
242 !sna_drawable_move_to_cpu(tile->src->alphaMap->pDrawable,
246 if (tile->mask && tile->mask->pDrawable &&
247 !sna_drawable_move_to_cpu(tile->mask->pDrawable,
251 if (tile->mask && tile->mask->alphaMap &&
252 !sna_drawable_move_to_cpu(tile->mask->alphaMap->pDrawable,
257 fbComposite(tile->op,
258 tile->src, tile->mask, tile->dst,
259 tile->src_x + x, tile->src_y + y,
260 tile->mask_x + x, tile->mask_y + y,
261 tile->dst_x + x, tile->dst_y + y,
270 if (tile->rects != tile->rects_embedded)
271 free(tile->rects);
272 free(tile);
286 struct sna_tile_state *tile;
289 DBG(("%s size=(%d, %d), tile=%d\n",
297 tile = malloc(sizeof(*tile));
298 if (!tile)
301 tile->op = op;
303 tile->src = src;
304 tile->mask = mask;
305 tile->dst = dst;
307 tile->src_x = src_x;
308 tile->src_y = src_y;
309 tile->mask_x = mask_x;
310 tile->mask_y = mask_y;
311 tile->dst_x = dst_x;
312 tile->dst_y = dst_y;
313 tile->width = width;
314 tile->height = height;
315 tile->rects = tile->rects_embedded;
316 tile->rect_count = 0;
317 tile->rect_size = ARRAY_SIZE(tile->rects_embedded);
324 tmp->priv = tile;
334 struct sna_tile_state *tile = op->base.priv;
337 if (tile->rect_count == tile->rect_size) {
338 int newsize = tile->rect_size * 2;
340 if (tile->rects == tile->rects_embedded) {
346 tile->rects_embedded,
347 sizeof(struct sna_tile_span) * tile->rect_count);
349 a = realloc(tile->rects,
355 tile->rects = (void *)a;
356 tile->rect_size = newsize;
358 a = (void *)tile->rects;
360 a[tile->rect_count].box = *box;
361 a[tile->rect_count].opacity = opacity;
362 tile->rect_count++;
379 struct sna_tile_state *tile = op->base.priv;
384 /* Use a small step to accommodate enlargement through tile alignment */
386 if (tile->dst_x & (8*512 / tile->dst->pDrawable->bitsPerPixel - 1) ||
387 tile->dst_y & 63)
398 tile->width, tile->height, tile->rect_count, step));
400 if (tile->rect_count == 0)
403 for (y = 0; y < tile->height; y += step) {
405 if (y + height > tile->height)
406 height = tile->height - y;
407 for (x = 0; x < tile->width; x += step) {
408 const struct sna_tile_span *r = (void *)tile->rects;
410 if (x + width > tile->width)
411 width = tile->width - x;
413 sna->render.composite_spans(sna, tile->op,
414 tile->src, tile->dst,
415 tile->src_x + x, tile->src_y + y,
416 tile->dst_x + x, tile->dst_y + y,
417 width, height, tile->flags,
419 for (n = 0; n < tile->rect_count; n++) {
422 b.x1 = r->box.x1 - tile->dst_x;
426 b.y1 = r->box.y1 - tile->dst_y;
430 b.x2 = r->box.x2 - tile->dst_x;
434 b.y2 = r->box.y2 - tile->dst_y;
438 DBG(("%s: rect[%d] = (%d, %d)x(%d,%d), tile=(%d,%d)x(%d, %d), blt=(%d,%d),(%d,%d)\n",
455 if (tile->op <= PictOpSrc)
459 if (!sna_drawable_move_to_cpu(tile->dst->pDrawable,
462 if (tile->dst->alphaMap &&
463 !sna_drawable_move_to_cpu(tile->dst->alphaMap->pDrawable,
467 if (tile->src->pDrawable &&
468 !sna_drawable_move_to_cpu(tile->src->pDrawable,
471 if (tile->src->alphaMap &&
472 !sna_drawable_move_to_cpu(tile->src->alphaMap->pDrawable,
476 for (n = 0; n < tile->rect_count; n++) {
479 b.x1 = r->box.x1 - tile->dst_x;
483 b.y1 = r->box.y1 - tile->dst_y;
487 b.x2 = r->box.x2 - tile->dst_x;
491 b.y2 = r->box.y2 - tile->dst_y;
495 DBG(("%s: rect[%d] = (%d, %d)x(%d,%d), tile=(%d,%d)x(%d, %d), blt=(%d,%d),(%d,%d)\n",
515 fbComposite(tile->op,
516 tile->src, mask, tile->dst,
517 tile->src_x + x, tile->src_y + y,
519 tile->dst_x + x, tile->dst_y + y,
535 if (tile->rects != tile->rects_embedded)
536 free(tile->rects);
537 free(tile);
550 struct sna_tile_state *tile;
553 DBG(("%s size=(%d, %d), tile=%d\n",
561 tile = malloc(sizeof(*tile));
562 if (!tile)
565 tile->op = op;
566 tile->flags = flags;
568 tile->src = src;
569 tile->mask = NULL;
570 tile->dst = dst;
572 tile->src_x = src_x;
573 tile->src_y = src_y;
574 tile->mask_x = 0;
575 tile->mask_y = 0;
576 tile->dst_x = dst_x;
577 tile->dst_y = dst_y;
578 tile->width = width;
579 tile->height = height;
580 tile->rects = tile->rects_embedded;
581 tile->rect_count = 0;
582 tile->rect_size = ARRAY_SIZE(tile->rects_embedded);
583 COMPILE_TIME_ASSERT(sizeof(tile->rects_embedded[0]) >= sizeof(struct sna_tile_span));
589 tmp->base.priv = tile;
602 RegionRec region, tile, this;
609 /* Use a small step to accommodate enlargement through tile alignment */
622 DBG(("%s (op=%d, format=%x, color=(%04x,%04x,%04x, %04x), tile.size=%d, box=%dx[(%d, %d), (%d, %d)])\n",
629 for (tile.extents.y1 = tile.extents.y2 = region.extents.y1;
630 tile.extents.y2 < region.extents.y2;
631 tile.extents.y1 = tile.extents.y2) {
632 int y2 = tile.extents.y1 + step;
635 tile.extents.y2 = y2;
637 for (tile.extents.x1 = tile.extents.x2 = region.extents.x1;
638 tile.extents.x2 < region.extents.x2;
639 tile.extents.x1 = tile.extents.x2) {
641 int x2 = tile.extents.x1 + step;
644 tile.extents.x2 = x2;
646 tile.data = NULL;
649 RegionIntersect(&this, ®ion, &tile);
793 RegionRec region, tile, this;
815 /* Use a small step to accommodate enlargement through tile alignment */
828 DBG(("%s (alu=%d), tile.size=%d, box=%dx[(%d, %d), (%d, %d)])\n",
833 for (tile.extents.y1 = tile.extents.y2 = region.extents.y1;
834 tile.extents.y2 < region.extents.y2;
835 tile.extents.y1 = tile.extents.y2) {
836 int y2 = tile.extents.y1 + step;
839 tile.extents.y2 = y2;
841 for (tile.extents.x1 = tile.extents.x2 = region.extents.x1;
842 tile.extents.x2 < region.extents.x2;
843 tile.extents.x1 = tile.extents.x2) {
845 int x2 = tile.extents.x1 + step;
848 tile.extents.x2 = x2;
850 tile.data = NULL;
853 RegionIntersect(&this, ®ion, &tile);
1017 RegionRec region, tile, this;
1042 /* Use a small step to accommodate enlargement through tile alignment */
1055 DBG(("%s (alu=%d), tile.size=%d, box=%dx[(%d, %d), (%d, %d)])\n",
1060 for (tile.extents.y1 = tile.extents.y2 = region.extents.y1;
1061 tile.extents.y2 < region.extents.y2;
1062 tile.extents.y1 = tile.extents.y2) {
1063 int y2 = tile.extents.y1 + step;
1066 tile.extents.y2 = y2;
1068 for (tile.extents.x1 = tile.extents.x2 = region.extents.x1;
1069 tile.extents.x2 < region.extents.x2;
1070 tile.extents.x1 = tile.extents.x2) {
1072 int x2 = tile.extents.x1 + step;
1075 tile.extents.x2 = x2;
1077 tile.data = NULL;
1080 RegionIntersect(&this, ®ion, &tile);
1131 BoxRec extents, tile, stack[64], *clipped, *c;
1179 for (tile.y1 = extents.y1; tile.y1 < extents.y2; tile.y1 = tile.y2) {
1180 int y2 = tile.y1 + step;
1183 tile.y2 = y2;
1185 for (tile.x1 = extents.x1; tile.x1 < extents.x2; tile.x1 = tile.x2) {
1187 int x2 = tile.x1 + step;
1190 tile.x2 = x2;
1195 if (!box_intersect(c, &tile))
1203 c->x1 - tile.x1,
1204 c->y1 - tile.y1));
1210 p.width = tile.x2 - tile.x1;
1211 p.height = tile.y2 - tile.y1;
1213 DBG(("%s: tile (%d, %d), (%d, %d)\n",
1214 __FUNCTION__, tile.x1, tile.y1, tile.x2, tile.y2));
1227 &p, tmp_bo, -tile.x1, -tile.y1,
1230 &p, tmp_bo, -tile.x1, -tile.y1,