Exemple #1
0
/** Create a graphics context on the back-end server associated /a pGC's
 *  screen. */
Bool
dmxCreateGC(GCPtr pGC)
{
    ScreenPtr pScreen = pGC->pScreen;
    DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
    dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC);
    Bool ret;

    DMX_UNWRAP(CreateGC, dmxScreen, pScreen);
    if ((ret = pScreen->CreateGC(pGC))) {
        /* Save the old funcs */
        pGCPriv->funcs = pGC->funcs;
        pGCPriv->ops = NULL;

        pGC->funcs = &dmxGCFuncs;

        if (dmxScreen->beDisplay) {
            dmxBECreateGC(pScreen, pGC);
        }
        else {
            pGCPriv->gc = NULL;
        }

        /* Check for "magic special case"
         * 1. see CreateGC in dix/gc.c for more info
         * 2. see dmxChangeGC for more info
         */
        pGCPriv->msc = (!pGC->tileIsPixel && !pGC->tile.pixmap);
    }
    DMX_WRAP(CreateGC, dmxCreateGC, dmxScreen, pScreen);

    return ret;
}
Exemple #2
0
Bool
rdpCreateGC(GCPtr pGC)
{
    rdpGCRec *priv;
    Bool rv;

    LLOGLN(10, ("in rdpCreateGC\n"));
    priv = GETGCPRIV(pGC);
    g_pScreen->CreateGC = g_rdpScreen.CreateGC;
    rv = g_pScreen->CreateGC(pGC);

    if (rv)
    {
        priv->funcs = pGC->funcs;
        priv->ops = 0;
        pGC->funcs = &g_rdpGCFuncs;
    }
    else
    {
        rdpLog("error in rdpCreateGC, CreateGC failed\n");
    }

    g_pScreen->CreateGC = rdpCreateGC;
    return rv;
}
/**
 * saa_create_gc makes a new GC and hooks up its funcs handler, so that
 * saa_validate_gc() will get called.
 */
int
saa_create_gc(GCPtr pGC)
{
    ScreenPtr pScreen = pGC->pScreen;
    struct saa_screen_priv *sscreen = saa_screen(pScreen);
    struct saa_gc_priv *sgc = saa_gc(pGC);
    Bool ret;

    saa_swap(sscreen, pScreen, CreateGC);
    ret = pScreen->CreateGC(pGC);
    if (ret) {
	saa_wrap(sgc, pGC, funcs, &saa_gc_funcs);
	saa_wrap(sgc, pGC, ops, &saa_gc_ops);
    }
    saa_swap(sscreen, pScreen, CreateGC);

    return ret;
}
Exemple #4
0
Bool
rdpCreateGC(GCPtr pGC)
{
    Bool rv;
    rdpPtr dev;
    ScreenPtr pScreen;
    rdpGCPtr priv;

    LLOGLN(10, ("rdpCreateGC:"));
    pScreen = pGC->pScreen;
    dev = rdpGetDevFromScreen(pScreen);
    priv = (rdpGCPtr)rdpGetGCPrivate(pGC, dev->privateKeyRecGC);
    pScreen->CreateGC = dev->CreateGC;
    rv = pScreen->CreateGC(pGC);
    if (rv)
    {
        priv->funcs = pGC->funcs;
        priv->ops = 0;
        pGC->funcs = &g_rdpGCFuncs;
    }
    pScreen->CreateGC = rdpCreateGC;
    return rv;
}