diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-03 14:14:09 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-03 14:16:45 +0100 |
commit | 8a88c01c3737a3570628600b1ab51938f82e226d (patch) | |
tree | 8769f4f3a65bb52fd5798f85ae8f6d58743985a3 /src/sna/sna_glyphs.c | |
parent | 66ad4d6f3c990bd40d816b4a22122bbf64786e4c (diff) |
sna: Make copying the glyph size more compact
The assembly was ugly with an unwarranted AGU stall.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_glyphs.c')
-rw-r--r-- | src/sna/sna_glyphs.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index 3e2d79bc..62415c87 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -85,6 +85,7 @@ #define N_STACK_GLYPHS 512 #define glyph_valid(g) *((uint32_t *)&(g)->info.width) +#define glyph_copy_size(r, g) *(uint32_t *)&(r)->width = *(uint32_t *)&g->info.width #if HAS_DEBUG_FULL static void _assert_pixmap_contains_box(PixmapPtr pixmap, BoxPtr box, const char *function) @@ -632,10 +633,8 @@ glyphs_to_dst(struct sna *sna, r.dst.y = y - glyph->info.y; r.src.x = r.dst.x + src_x; r.src.y = r.dst.y + src_y; - r.mask.x = priv.coordinate.x; - r.mask.y = priv.coordinate.y; - r.width = glyph->info.width; - r.height = glyph->info.height; + r.mask = priv.coordinate; + glyph_copy_size(&r, glyph); DBG(("%s: glyph=(%d, %d)x(%d, %d), unclipped\n", __FUNCTION__, @@ -1164,8 +1163,7 @@ next_image: r.mask = r.src; r.dst.x = x - glyph->info.x; r.dst.y = y - glyph->info.y; - r.width = glyph->info.width; - r.height = glyph->info.height; + glyph_copy_size(&r, glyph); tmp.blt(sna, &tmp, &r); next_glyph: |