Call SourceValidate even if src == dst
The extra SourceValidate calls from damageCopyArea and damageCopyPlane can be removed. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
e41e907b3c
commit
0998574699
|
@ -2958,8 +2958,7 @@ The sample server implementation is in Xserver/fb/fbscreen.c.</para>
|
||||||
|
|
||||||
</programlisting></blockquote>
|
</programlisting></blockquote>
|
||||||
SourceValidate should be called by CopyArea/CopyPlane primitives when
|
SourceValidate should be called by CopyArea/CopyPlane primitives when
|
||||||
the source drawable is not the same as the destination, and the
|
the SourceValidate function pointer in the screen is non-null. If you know that
|
||||||
SourceValidate function pointer in the screen is non-null. If you know that
|
|
||||||
you will never need SourceValidate, you can avoid this check. Currently,
|
you will never need SourceValidate, you can avoid this check. Currently,
|
||||||
SourceValidate is used by the mi software cursor code to remove the cursor
|
SourceValidate is used by the mi software cursor code to remove the cursor
|
||||||
from the screen when the source rectangle overlaps the cursor position.
|
from the screen when the source rectangle overlaps the cursor position.
|
||||||
|
|
|
@ -54,8 +54,7 @@ XAABitBlt(
|
||||||
origDest.x = dstx;
|
origDest.x = dstx;
|
||||||
origDest.y = dsty;
|
origDest.y = dsty;
|
||||||
|
|
||||||
if((pSrcDrawable != pDstDrawable) &&
|
if (pSrcDrawable->pScreen->SourceValidate) {
|
||||||
pSrcDrawable->pScreen->SourceValidate) {
|
|
||||||
(*pSrcDrawable->pScreen->SourceValidate) (
|
(*pSrcDrawable->pScreen->SourceValidate) (
|
||||||
pSrcDrawable, srcx, srcy, width, height,
|
pSrcDrawable, srcx, srcy, width, height,
|
||||||
pGC->subWindowMode);
|
pGC->subWindowMode);
|
||||||
|
|
|
@ -183,8 +183,7 @@ miDoCopy (DrawablePtr pSrcDrawable,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pSrcDrawable != pDstDrawable) &&
|
if (pSrcDrawable->pScreen->SourceValidate)
|
||||||
pSrcDrawable->pScreen->SourceValidate)
|
|
||||||
{
|
{
|
||||||
(*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn, widthSrc, heightSrc,
|
(*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn, widthSrc, heightSrc,
|
||||||
pGC->subWindowMode);
|
pGC->subWindowMode);
|
||||||
|
|
|
@ -891,17 +891,6 @@ damageCopyArea(DrawablePtr pSrc,
|
||||||
RegionPtr ret;
|
RegionPtr ret;
|
||||||
DAMAGE_GC_OP_PROLOGUE(pGC, pDst);
|
DAMAGE_GC_OP_PROLOGUE(pGC, pDst);
|
||||||
|
|
||||||
/* The driver will only call SourceValidate() when pSrc != pDst,
|
|
||||||
* but the software sprite (misprite.c) always need to know when a
|
|
||||||
* drawable is copied so it can remove the sprite. See #1030. */
|
|
||||||
if ((pSrc == pDst) && pSrc->pScreen->SourceValidate &&
|
|
||||||
pSrc->type == DRAWABLE_WINDOW &&
|
|
||||||
((WindowPtr)pSrc)->viewable)
|
|
||||||
{
|
|
||||||
(*pSrc->pScreen->SourceValidate) (pSrc, srcx, srcy, width, height,
|
|
||||||
pGC->subWindowMode);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (checkGCDamage (pDst, pGC))
|
if (checkGCDamage (pDst, pGC))
|
||||||
{
|
{
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
@ -938,17 +927,6 @@ damageCopyPlane(DrawablePtr pSrc,
|
||||||
RegionPtr ret;
|
RegionPtr ret;
|
||||||
DAMAGE_GC_OP_PROLOGUE(pGC, pDst);
|
DAMAGE_GC_OP_PROLOGUE(pGC, pDst);
|
||||||
|
|
||||||
/* The driver will only call SourceValidate() when pSrc != pDst,
|
|
||||||
* but the software sprite (misprite.c) always need to know when a
|
|
||||||
* drawable is copied so it can remove the sprite. See #1030. */
|
|
||||||
if ((pSrc == pDst) && pSrc->pScreen->SourceValidate &&
|
|
||||||
pSrc->type == DRAWABLE_WINDOW &&
|
|
||||||
((WindowPtr)pSrc)->viewable)
|
|
||||||
{
|
|
||||||
(*pSrc->pScreen->SourceValidate) (pSrc, srcx, srcy, width, height,
|
|
||||||
pGC->subWindowMode);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (checkGCDamage (pDst, pGC))
|
if (checkGCDamage (pDst, pGC))
|
||||||
{
|
{
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
Loading…
Reference in New Issue