当前位置: 首页>>代码示例>>C++>>正文


C++ KdScreenPriv函数代码示例

本文整理汇总了C++中KdScreenPriv函数的典型用法代码示例。如果您正苦于以下问题:C++ KdScreenPriv函数的具体用法?C++ KdScreenPriv怎么用?C++ KdScreenPriv使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了KdScreenPriv函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: KdSaveScreen

Bool
KdSaveScreen(ScreenPtr pScreen, int on)
{
    KdScreenPriv(pScreen);
    int dpmsState;

    if (!pScreenPriv->card->cfuncs->dpms)
        return FALSE;

    dpmsState = pScreenPriv->dpmsState;
    switch (on) {
    case SCREEN_SAVER_OFF:
        dpmsState = KD_DPMS_NORMAL;
        break;
    case SCREEN_SAVER_ON:
        if (dpmsState == KD_DPMS_NORMAL)
            dpmsState = KD_DPMS_NORMAL + 1;
        break;
    case SCREEN_SAVER_CYCLE:
        if (dpmsState < KD_DPMS_MAX)
            dpmsState++;
        break;
    case SCREEN_SAVER_FORCER:
        break;
    }
    if (dpmsState != pScreenPriv->dpmsState) {
        if (pScreenPriv->enabled)
            (*pScreenPriv->card->cfuncs->dpms) (pScreen, dpmsState);
        pScreenPriv->dpmsState = dpmsState;
    }
    return TRUE;
}
开发者ID:AmesianX,项目名称:xorg-server,代码行数:32,代码来源:kdrive.c

示例2: KdOffscreenInit

Bool
KdOffscreenInit (ScreenPtr pScreen)
{
    KdScreenPriv (pScreen);
    KdOffscreenArea *area;

    /* Allocate a big free area */
    area = xalloc (sizeof (KdOffscreenArea));

    if (!area)
	return FALSE;

    area->state = KdOffscreenAvail;
    area->offset = pScreenPriv->screen->off_screen_base;
    area->size = pScreenPriv->screen->memory_size - area->offset;
    area->save = 0;
    area->next = NULL;
    area->score = 0;
    
    /* Add it to the free areas */
    pScreenPriv->off_screen_areas = area;
    
    KdOffscreenValidate (pScreen);

    return TRUE;
}
开发者ID:Magister,项目名称:x11rdp_xorg71,代码行数:26,代码来源:koffscreen.c

示例3: s3MatchCommon

static GCOps *
s3MatchCommon (DrawablePtr pDraw, GCPtr pGC, FbGCPrivPtr fbPriv)
{
    KdScreenPriv (pDraw->pScreen);

    if (!REGION_NOTEMPTY(pDraw->pScreen,fbGetCompositeClip(pGC)))
    {
	DRAW_DEBUG ((DEBUG_CLIP, "Empty composite clip, clipping all ops"));
	return &kdNoopOps;
    }

    if (pDraw->type != DRAWABLE_WINDOW)
	return (GCOps *) &kdAsyncPixmapGCOps;
    
    if (pGC->lineWidth != 0)
	return 0;
    if (pGC->lineStyle != LineSolid)
	return 0;
    if (pGC->fillStyle != FillSolid)
	return 0;
    if (fbPriv->and != 0)
	return 0;
    if (pGC->font)
    {
	if (TERMINALFONT(pGC->font))
	    return (GCOps *) &s3TEOps;
	else
	    return (GCOps *) &s3NonTEOps;
    }
    return 0;
}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:31,代码来源:s3gc.c

示例4: r128DrawEnable

void
r128DrawEnable (ScreenPtr pScreen)
{
    KdScreenPriv (pScreen);
    r128ScreenInfo (pScreenPriv);

    r128s->pitch = pScreenPriv->screen->width >> 3;

    switch (pScreenPriv->screen->fb[0].depth) {
    case 8:
	r128s->datatype = 2;
	break;
    case 15:
	r128s->datatype = 3;
	break;	
    case 16:
	r128s->datatype = 4;
	break;
    case 24:
	r128s->datatype = 5;
	break;
    case 32:
	r128s->datatype = 6;
	break;
    default:
	FatalError ("unsupported pixel format");
    }

    r128s->dp_gui_master_cntl = ((r128s->datatype << R128_GMC_DST_DATATYPE_SHIFT)
				 | R128_GMC_CLR_CMP_CNTL_DIS
				 | R128_GMC_AUX_CLIP_DIS);
    
    kaaMarkSync (pScreen);
}
开发者ID:mcr,项目名称:xorg-xvnc4,代码行数:34,代码来源:r128draw.c

示例5: ephyrInternalDamageRedisplay

static void
ephyrInternalDamageRedisplay(ScreenPtr pScreen)
{
    KdScreenPriv(pScreen);
    KdScreenInfo *screen = pScreenPriv->screen;
    EphyrScrPriv *scrpriv = screen->driver;
    RegionPtr pRegion;

    if (!scrpriv || !scrpriv->pDamage)
        return;

    pRegion = DamageRegion(scrpriv->pDamage);

    if (RegionNotEmpty(pRegion)) {
        int nbox;
        BoxPtr pbox;

        if (ephyr_glamor) {
            ephyr_glamor_damage_redisplay(scrpriv->glamor, pRegion);
        } else {
            nbox = RegionNumRects(pRegion);
            pbox = RegionRects(pRegion);

            while (nbox--) {
                hostx_paint_rect(screen,
                                 pbox->x1, pbox->y1,
                                 pbox->x1, pbox->y1,
                                 pbox->x2 - pbox->x1, pbox->y2 - pbox->y1);
                pbox++;
            }
        }
        DamageEmpty(scrpriv->pDamage);
    }
}
开发者ID:AmesianX,项目名称:xorg-server,代码行数:34,代码来源:ephyr.c

示例6: r128Setup

static Bool
r128Setup (ScreenPtr pScreen, int wait)
{
  KdScreenPriv (pScreen);
  r128ScreenInfo (pScreenPriv);
  r128CardInfo (pScreenPriv);

  fifo_size = 0;

  mmio = r128c->reg_base;
    
  if (!mmio)
      return FALSE;

  r128WaitAvail (2);
  R128_OUT32 (mmio, R128_REG_DEFAULT_OFFSET, 0);
  R128_OUT32 (mmio, R128_REG_DEFAULT_PITCH, r128s->pitch);

  r128WaitAvail (4);
  R128_OUT32 (mmio, R128_AUX_SC_CNTL, 0);
  R128_OUT32 (mmio, R128_DEFAULT_SC_BOTTOM_RIGHT, (R128_DEFAULT_SC_RIGHT_MAX
						| R128_DEFAULT_SC_BOTTOM_MAX));
  R128_OUT32 (mmio, R128_SC_TOP_LEFT, 0);
  R128_OUT32 (mmio, R128_SC_BOTTOM_RIGHT, (R128_DEFAULT_SC_RIGHT_MAX
						| R128_DEFAULT_SC_BOTTOM_MAX));
  r128WaitAvail (wait);
  return TRUE;
}
开发者ID:mcr,项目名称:xorg-xvnc4,代码行数:28,代码来源:r128draw.c

示例7: tridentPrepareCopy

Bool
tridentPrepareCopy (DrawablePtr	pSrcDrawable,
		    DrawablePtr	pDstDrawable,
		    int		dx,
		    int		dy,
		    int		alu,
		    Pixel	pm)
{
    FbBits  depthMask = FbFullMask(pDstDrawable->depth);
    
    if ((pm & depthMask) == depthMask)
    {
	KdScreenPriv(pDstDrawable->pScreen);
	tridentCardInfo(pScreenPriv);
	cop = tridentc->cop;
	_tridentInit(cop,tridentc);
	cop->multi = COP_MULTI_PATTERN;
	cop->multi = COP_MULTI_ROP | tridentRop[alu];
	cmd = COP_OP_BLT | COP_SCL_OPAQUE | COP_OP_ROP | COP_OP_FB;
	if (dx < 0 || dy < 0)
	    cmd |= COP_X_REVERSE;
	return TRUE;
    }
    else
	return FALSE;
}
开发者ID:dikerex,项目名称:theqvd,代码行数:26,代码来源:tridentdraw.c

示例8: ephyrInitScreen

Bool
ephyrInitScreen(ScreenPtr pScreen)
{
    KdScreenPriv(pScreen);
    KdScreenInfo *screen = pScreenPriv->screen;

    EPHYR_LOG("pScreen->myNum:%d\n", pScreen->myNum);
    hostx_set_screen_number(screen, pScreen->myNum);
    if (EphyrWantNoHostGrab) {
        hostx_set_win_title(screen, "xephyr");
    } else {
        hostx_set_win_title(screen, "(ctrl+shift grabs mouse and keyboard)");
    }
    pScreen->CreateColormap = ephyrCreateColormap;

#ifdef XV
    if (!ephyrNoXV) {
        if (ephyr_glamor)
            ephyr_glamor_xv_init(pScreen);
        else if (!ephyrInitVideo(pScreen)) {
            EPHYR_LOG_ERROR("failed to initialize xvideo\n");
        }
        else {
            EPHYR_LOG("initialized xvideo okay\n");
        }
    }
#endif /*XV*/

    return TRUE;
}
开发者ID:XQuartz,项目名称:xorg-server,代码行数:30,代码来源:ephyr.c

示例9: smiSetup

static Bool
smiSetup (ScreenPtr pScreen, int wait)
{
    KdScreenPriv(pScreen);

    smis = getSmiScreenInfo (pScreenPriv);
    smic = getSmiCardInfo(pScreenPriv);
    dpr = smic->dpr;
    
    if (!dpr)
	return FALSE;
    
    /* enable DPR/VPR registers */
    smiSetIndex (smic, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x21, 
		 smis->dpr_vpr_enable);
    
    smiWaitAvail (smic, wait + 9);
    dpr->src_stride = (smis->stride << 16) | smis->stride;
    dpr->data_format = smis->data_format;
    dpr->mask1 = 0xffffffff;
    dpr->mask2 = 0xffffffff;
    dpr->dst_stride = (smis->stride << 16) | smis->stride;
    dpr->unknown_40 = 0x0;
    dpr->unknown_44 = 0x0;
    dpr->scissors_ul = 0x0;
    dpr->scissors_lr = SMI_XY(4095,4095);

    return TRUE;
}
开发者ID:Magister,项目名称:x11rdp_xorg71,代码行数:29,代码来源:smidraw.c

示例10: ephyrPrepareCopy

/**
 * Sets up a scratch GC for fbCopyArea, and saves other parameters for the
 * ephyrCopy implementation.
 */
static Bool
ephyrPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu,
		 Pixel pm)
{
    ScreenPtr pScreen = pDst->drawable.pScreen;
    KdScreenPriv(pScreen);
    KdScreenInfo *screen = pScreenPriv->screen;
    EphyrScrPriv *scrpriv = screen->driver;
    EphyrFakexaPriv *fakexa = scrpriv->fakexa;
    CARD32 tmpval[2];

    ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST);
    ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);

    fakexa->pSrc = pSrc;
    fakexa->pDst = pDst;
    fakexa->pGC = GetScratchGC(pDst->drawable.depth, pScreen);

    tmpval[0] = alu;
    tmpval[1] = pm;
    ChangeGC (fakexa->pGC, GCFunction | GCPlaneMask, tmpval);

    ValidateGC(&pDst->drawable, fakexa->pGC);

    TRACE_DRAW();

    return TRUE;
}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:32,代码来源:ephyr_draw.c

示例11: ephyrPrepareComposite

/**
 * Saves off the parameters for ephyrComposite.
 */
static Bool
ephyrPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
		      PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask,
		      PixmapPtr pDst)
{
    KdScreenPriv(pDst->drawable.pScreen);
    KdScreenInfo *screen = pScreenPriv->screen;
    EphyrScrPriv *scrpriv = screen->driver;
    EphyrFakexaPriv *fakexa = scrpriv->fakexa;

    ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST);
    ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
    if (pMask != NULL)
	ephyrPreparePipelinedAccess(pMask, EXA_PREPARE_MASK);

    fakexa->op = op;
    fakexa->pSrcPicture = pSrcPicture;
    fakexa->pMaskPicture = pMaskPicture;
    fakexa->pDstPicture = pDstPicture;
    fakexa->pSrc = pSrc;
    fakexa->pMask = pMask;
    fakexa->pDst = pDst;

    TRACE_DRAW();

    return TRUE;
}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:30,代码来源:ephyr_draw.c

示例12: fakeRandRGetInfo

Bool
fakeRandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
{
	KdScreenPriv(pScreen);
	KdScreenInfo			*screen = pScreenPriv->screen;
	FakeScrPriv		*scrpriv = screen->driver;
	RRScreenSizePtr			pSize;
	Rotation				randr;
	int						n;
	
	*rotations = RR_Rotate_All|RR_Reflect_All;
	
	for (n = 0; n < pScreen->numDepths; n++)
		if (pScreen->allowedDepths[n].numVids)
			break;
	if (n == pScreen->numDepths)
		return FALSE;
	
	pSize = RRRegisterSize (pScreen,
							screen->width,
							screen->height,
							screen->width_mm,
							screen->height_mm);
	
	randr = KdSubRotation (scrpriv->randr, screen->randr);
	
	RRSetCurrentConfig (pScreen, randr, 0, pSize);
	
	return TRUE;
}
开发者ID:eriytt,项目名称:xserver-xsdl,代码行数:30,代码来源:vrx.c

示例13: ephyrInitScreen

Bool
ephyrInitScreen(ScreenPtr pScreen)
{
    KdScreenPriv(pScreen);
    KdScreenInfo *screen = pScreenPriv->screen;

    EPHYR_LOG("pScreen->myNum:%d\n", pScreen->myNum);
    hostx_set_screen_number(screen, pScreen->myNum);
    hostx_set_win_title(screen, "(ctrl+shift grabs mouse and keyboard)");
    pScreen->CreateColormap = ephyrCreateColormap;

#ifdef XV
    if (!ephyrNoXV) {
        if (!ephyrInitVideo(pScreen)) {
            EPHYR_LOG_ERROR("failed to initialize xvideo\n");
        }
        else {
            EPHYR_LOG("initialized xvideo okay\n");
        }
    }
#endif /*XV*/
#ifdef XF86DRI
    if (!ephyrNoDRI && !host_has_extension(&xcb_xf86dri_id)) {
        EPHYR_LOG("host x does not support DRI. Disabling DRI forwarding\n");
        ephyrNoDRI = TRUE;
    }
    if (!ephyrNoDRI) {
        ephyrDRIExtensionInit(pScreen);
        ephyrHijackGLXExtension();
    }
#endif

    return TRUE;
}
开发者ID:dlespiau,项目名称:xserver,代码行数:34,代码来源:ephyr.c

示例14: KdCloseScreen

Bool
KdCloseScreen (int index, ScreenPtr pScreen)
{
    KdScreenPriv(pScreen);
    KdScreenInfo    *screen = pScreenPriv->screen;
    KdCardInfo	    *card = pScreenPriv->card;
    Bool	    ret;
    
    pScreenPriv->closed = TRUE;
    pScreen->CloseScreen = pScreenPriv->CloseScreen;
    ret = (*pScreen->CloseScreen) (index, pScreen);
    
    if (pScreenPriv->dpmsState != KD_DPMS_NORMAL)
	(*card->cfuncs->dpms) (pScreen, KD_DPMS_NORMAL);
    
    if (screen->mynum == card->selected)
	KdDisableScreen (pScreen);
    
    /*
     * Restore video hardware when last screen is closed
     */
    if (screen == card->screenList)
    {
	if (kdEnabled)
	    (*card->cfuncs->restore) (card);
    }
	
    if (!pScreenPriv->screen->dumb)
	(*card->cfuncs->finiAccel) (pScreen);

    if (!pScreenPriv->screen->softCursor)
	(*card->cfuncs->finiCursor) (pScreen);

    (*card->cfuncs->scrfini) (screen);

    /*
     * Clean up card when last screen is closed, DIX closes them in
     * reverse order, thus we check for when the first in the list is closed
     */
    if (screen == card->screenList)
    {
	(*card->cfuncs->cardfini) (card);
	/*
	 * Clean up OS when last card is closed
	 */
	if (card == kdCardInfo)
	{
	    if (kdEnabled)
	    {
		kdEnabled = FALSE;
		(*kdOsFuncs->Disable) ();
	    }
	}
    }
    
    pScreenPriv->screen->pScreen = 0;
    
    xfree ((pointer) pScreenPriv);
    return ret;
}
开发者ID:dimkr,项目名称:tinyxserver,代码行数:60,代码来源:kdrive.c

示例15: ephyrPrepareSolid

/**
 * Sets up a scratch GC for fbFill, and saves other parameters for the
 * ephyrSolid implementation.
 */
static Bool
ephyrPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg)
{
    ScreenPtr pScreen = pPix->drawable.pScreen;
    KdScreenPriv(pScreen);
    KdScreenInfo *screen = pScreenPriv->screen;
    EphyrScrPriv *scrpriv = screen->driver;
    EphyrFakexaPriv *fakexa = scrpriv->fakexa;
    CARD32 tmpval[3];

    ephyrPreparePipelinedAccess(pPix, EXA_PREPARE_DEST);

    fakexa->pDst = pPix;
    fakexa->pGC = GetScratchGC(pPix->drawable.depth, pScreen);

    tmpval[0] = alu;
    tmpval[1] = pm;
    tmpval[2] = fg;
    ChangeGC(fakexa->pGC, GCFunction | GCPlaneMask | GCForeground, 
	     tmpval);

    ValidateGC(&pPix->drawable, fakexa->pGC);

    TRACE_DRAW();

    return TRUE;
}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:31,代码来源:ephyr_draw.c


注:本文中的KdScreenPriv函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。