~ubuntu-branches/ubuntu/precise/xorg-server/precise-updates

« back to all changes in this revision

Viewing changes to miext/damage/damage.c

Tags: 2:1.10.1-2
* Build xserver-xorg-core-udeb on hurd-i386.  Thanks, Samuel Thibault!
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
450
450
    damageGCPriv(pGC);
451
451
    Bool ret;
452
452
 
453
 
    pGC->pCompositeClip = 0;
454
453
    unwrap (pScrPriv, pScreen, CreateGC);
455
454
    if((ret = (*pScreen->CreateGC) (pGC))) {
456
455
        pGCPriv->ops = NULL;
462
461
    return ret;
463
462
}
464
463
 
465
 
#ifdef NOTUSED
466
 
static void
467
 
damageWrapGC (GCPtr pGC)
468
 
{
469
 
    damageGCPriv(pGC);
470
 
 
471
 
    pGCPriv->ops = NULL;
472
 
    pGCPriv->funcs = pGC->funcs;
473
 
    pGC->funcs = &damageGCFuncs;
474
 
}
475
 
 
476
 
static void
477
 
damageUnwrapGC (GCPtr pGC)
478
 
{
479
 
    damageGCPriv(pGC);
480
 
 
481
 
    pGC->funcs = pGCPriv->funcs;
482
 
    if (pGCPriv->ops)
483
 
        pGC->ops = pGCPriv->ops;
484
 
}
485
 
#endif
486
 
 
487
464
#define DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable) \
488
465
    damageGCPriv(pGC);  \
489
466
    GCFuncs *oldFuncs = pGC->funcs; \
918
895
    RegionPtr ret;
919
896
    DAMAGE_GC_OP_PROLOGUE(pGC, pDst);
920
897
    
921
 
    /* The driver will only call SourceValidate() when pSrc != pDst,
922
 
     * but the software sprite (misprite.c) always need to know when a
923
 
     * drawable is copied so it can remove the sprite. See #1030. */
924
 
    if ((pSrc == pDst) && pSrc->pScreen->SourceValidate &&
925
 
        pSrc->type == DRAWABLE_WINDOW &&
926
 
        ((WindowPtr)pSrc)->viewable)
927
 
    {
928
 
        (*pSrc->pScreen->SourceValidate) (pSrc, srcx, srcy, width, height);
929
 
    }
930
 
    
931
898
    if (checkGCDamage (pDst, pGC))
932
899
    {
933
900
        BoxRec box;
964
931
    RegionPtr ret;
965
932
    DAMAGE_GC_OP_PROLOGUE(pGC, pDst);
966
933
 
967
 
    /* The driver will only call SourceValidate() when pSrc != pDst,
968
 
     * but the software sprite (misprite.c) always need to know when a
969
 
     * drawable is copied so it can remove the sprite. See #1030. */
970
 
    if ((pSrc == pDst) && pSrc->pScreen->SourceValidate &&
971
 
        pSrc->type == DRAWABLE_WINDOW &&
972
 
        ((WindowPtr)pSrc)->viewable)
973
 
    {
974
 
        (*pSrc->pScreen->SourceValidate) (pSrc, srcx, srcy, width, height);
975
 
    }
976
 
 
977
934
    if (checkGCDamage (pDst, pGC))
978
935
    {
979
936
        BoxRec box;
1783
1740
    damagePolyText16, damageImageText8,
1784
1741
    damageImageText16, damageImageGlyphBlt,
1785
1742
    damagePolyGlyphBlt, damagePushPixels,
1786
 
    {NULL}              /* devPrivate */
1787
1743
};
1788
1744
 
1789
1745
static void