[PATCH 2/2] exa/mixed: pixmaps that succeed prepare access have no need for a cpu copy
Maarten Maathuis
madman2003 at gmail.com
Thu Dec 3 10:55:37 PST 2009
2009/12/3 Michel Dänzer <michel at daenzer.net>:
> On Thu, 2009-12-03 at 19:28 +0100, Maarten Maathuis wrote:
>>
>> @@ -203,6 +204,22 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
>> pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
>> pPixmap->devKind = pExaPixmap->sys_pitch;
>> pExaPixmap->use_gpu_copy = FALSE;
>> + /* We have a gpu pixmap that can be accessed, we don't need the cpu copy
>> + * anymore. Drivers that prefer DFS, should fail prepare access. */
>> + } else if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) {
>> + ExaScreenPriv(pPixmap->drawable.pScreen);
>> +
>> + /* Copy back any deferred content if needed. */
>> + if (pExaScr->deferred_mixed_pixmap &&
>> + pExaScr->deferred_mixed_pixmap == pPixmap)
>> + exaMoveInPixmap_mixed(pPixmap);
>> +
>> + DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
>> + DamageDestroy(pExaPixmap->pDamage);
>> + pExaPixmap->pDamage = NULL;
>> +
>> + free(pExaPixmap->sys_ptr);
>> + pExaPixmap->sys_ptr = NULL;
>> }
>> }
>>
>
> Unfortunately, the indentation is still wrong in this hunk (which editor
> are you using?) - compare the block you add to the one above it: the
> basic indentation should be one tab, with four additional spaces in the
> if statement.
I see it now, i copied some of the code from elsewhere, that's why the
indentation was wrong to begin with. I'm using scite
(http://www.scintilla.org/SciTE.html) as editor, i configured it to do
4 space indent for the xserver, so in general i have no problems with
it.
I forgot to add the ack to the corrected version, will send again.
>
> With that fixed,
>
> Acked-by: Michel Dänzer <michel at daenzer.net>
>
>
> --
> Earthling Michel Dänzer | http://www.vmware.com
> Libre software enthusiast | Debian, X and DRI developer
>
More information about the xorg-devel
mailing list