diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-12-29 12:51:28 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-12-29 11:04:40 -0800 |
commit | 08bf26c28fc8147b64f2fe8345b9581e0101571c (patch) | |
tree | ee3044c1a4a447d85eab6392a714a49c13d62199 /exa/exa_mixed.c | |
parent | 0bd8f0cd7f3823ee17ae8c88fd3e004bfff9982d (diff) |
EXA: Fix migration avoidance for 1x1 pixmaps.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Acked-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'exa/exa_mixed.c')
-rw-r--r-- | exa/exa_mixed.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c index 155ed47c5..b262fc707 100644 --- a/exa/exa_mixed.c +++ b/exa/exa_mixed.c @@ -94,9 +94,25 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth, if (!w || !h) { exaCreateDriverPixmap_mixed(pPixmap); pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap); - } else + } else { pExaPixmap->use_gpu_copy = FALSE; + if (w == 1 && h == 1) { + pExaPixmap->sys_ptr = malloc((pPixmap->drawable.bitsPerPixel + 7) / 8); + + /* Set up damage tracking */ + pExaPixmap->pDamage = DamageCreate(NULL, NULL, + DamageReportNonEmpty, TRUE, + pPixmap->drawable.pScreen, + pPixmap); + + DamageRegister(&pPixmap->drawable, pExaPixmap->pDamage); + /* This ensures that pending damage reflects the current operation. */ + /* This is used by exa to optimize migration. */ + DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE); + } + } + /* During a fallback we must prepare access. */ if (pExaScr->fallback_counter) exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST); |