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


C++ TRIDENTPTR函数代码示例

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


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

示例1: XPSetupForMono8x8PatternFill

static void 
XPSetupForMono8x8PatternFill(ScrnInfoPtr pScrn, 
					   int patternx, int patterny, 
					   int fg, int bg, int rop,
					   unsigned int planemask)
{
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
    int drawflag = 0;

    REPLICATE(fg);
    MMIO_OUT32(pTrident->IOBase, 0x2158, fg);

    if (bg == -1) {
	drawflag |= 1<<12;
   	MMIO_OUT32(pTrident->IOBase, 0x215C, ~fg);
    } else {
    	REPLICATE(bg);
   	MMIO_OUT32(pTrident->IOBase, 0x215C, bg);
    }

    drawflag |= 7<<18;
    TGUI_DRAWFLAG(PATMONO | drawflag);
    MMIO_OUT32(pTrident->IOBase, 0x2180, patternx);
    MMIO_OUT32(pTrident->IOBase, 0x2184, patterny);
    TGUI_FMIX(XAAPatternROP[rop]);
}
开发者ID:marioaugustorama,项目名称:tropix-xwindow,代码行数:26,代码来源:xp_accel.c

示例2: TridentClearSync

static void
TridentClearSync(ScrnInfoPtr pScrn)
{
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
    int count = 0, timeout = 0;
    int busy;

    for (;;) {
	BLTBUSY(busy);
	if (busy != GE_BUSY) {
	    return;
	}
	count++;
	if (count == 10000000) {
	    ErrorF("Trident: BitBLT engine time-out.\n");
	    count = 9990000;
	    timeout++;
	    if (timeout == 8) {
		/* Reset BitBLT Engine */
		TGUI_STATUS(0x00);
		return;
	    }
	}
    }
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:25,代码来源:trident_accel.c

示例3: TridentSetupForScreenToScreenCopy

static void
TridentSetupForScreenToScreenCopy(ScrnInfoPtr pScrn, 
				int xdir, int ydir, int rop,
				unsigned int planemask, int transparency_color)
{
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
    int dst = 0;

    pTrident->BltScanDirection = 0;
    if (xdir < 0) pTrident->BltScanDirection |= XNEG;
    if (ydir < 0) pTrident->BltScanDirection |= YNEG;

    REPLICATE(transparency_color);
    if (transparency_color != -1) {
	if (pTrident->Chipset == PROVIDIA9685 ||
	    pTrident->Chipset == CYBER9388) {
	    dst |= 1<<16;
	} else {
    	    TGUI_OPERMODE(pTrident->EngineOperation | DST_ENABLE);
	}
	TGUI_CKEY(transparency_color);
    }

    TGUI_DRAWFLAG(pTrident->DrawFlag | pTrident->BltScanDirection | SCR2SCR | dst);
    TGUI_FMIX(XAAGetCopyROP(rop));
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:26,代码来源:trident_accel.c

示例4: XPInitializeAccelerator

static void
XPInitializeAccelerator(ScrnInfoPtr pScrn)
{
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
    int shift;

    /* This forces updating the clipper */
    pTrident->Clipping = TRUE;

    CHECKCLIPPING;

    BLADE_XP_OPERMODE(pTrident->EngineOperation);
    pTrident->EngineOperation |= 0x40;
    switch (pScrn->bitsPerPixel) {
	case 8:
	default:		/* Muffle compiler */
		shift = 18;
		break;
	case 16:
		shift = 19;
		break;
	case 32:
		shift = 20;
		break;
    }
    MMIO_OUT32(pTrident->IOBase, 0x2154, (pScrn->displayWidth) << shift);
    MMIO_OUT32(pTrident->IOBase, 0x2150, (pScrn->displayWidth) << shift);
    MMIO_OUT8(pTrident->IOBase, 0x2126, 3);
}
开发者ID:marioaugustorama,项目名称:tropix-xwindow,代码行数:29,代码来源:xp_accel.c

示例5: XPSync

static void
XPSync(ScrnInfoPtr pScrn)
{
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
    int count = 0, timeout = 0;
    int busy;

    BLADE_XP_OPERMODE(pTrident->EngineOperation);

    for (;;) {
	BLTBUSY(busy);
	if (busy != GE_BUSY) {
	    return;
	}
	count++;
	if (count == 10000000) {
	    ErrorF("XP: BitBLT engine time-out.\n");
	    count = 9990000;
	    timeout++;
	    if (timeout == 8) {
		/* Reset BitBLT Engine */
		TGUI_STATUS(0x00);
		return;
	    }
	}
    }
}
开发者ID:marioaugustorama,项目名称:tropix-xwindow,代码行数:27,代码来源:xp_accel.c

示例6: XP4SetupForCPUToScreenColorExpandFill

static void
XP4SetupForCPUToScreenColorExpandFill(
	ScrnInfoPtr pScrn,
	int fg, int bg, 
	int rop, 
	unsigned int planemask
){
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);

    ropcode = XAAGetCopyROP(rop);
#if 0
    TGUI_FMIX(XAACopyROP[rop]);
#endif
    if (bg == -1) {
    TGUI_DRAWFLAG(SRCMONO | 1<<12);
    	REPLICATE(fg);
	TGUI_FCOLOUR(fg);
    } else { 
    TGUI_DRAWFLAG(SRCMONO);
    	REPLICATE(fg);
    	REPLICATE(bg);
	TGUI_FCOLOUR(fg);
	TGUI_BCOLOUR(bg);
    }
}
开发者ID:freedesktop-unofficial-mirror,项目名称:xorg__driver__xf86-video-trident,代码行数:25,代码来源:xp4_accel.c

示例7: TridentSetupForColor8x8PatternFill

static void 
TridentSetupForColor8x8PatternFill(ScrnInfoPtr pScrn, 
					   int patternx, int patterny, 
					   int rop,
					   unsigned int planemask,
					   int transparency_color)
{
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
    int drawflag = 0;

    REPLICATE(transparency_color);
    if (transparency_color != -1) {
    	if (pTrident->Chipset == PROVIDIA9685 ||
            pTrident->Chipset == CYBER9388) {
	    drawflag |= 1<<16;
	} else {
    	    TGUI_OPERMODE(pTrident->EngineOperation | DST_ENABLE);
	}
	TGUI_CKEY(transparency_color);
    }

    TGUI_DRAWFLAG(pTrident->DrawFlag | PAT2SCR | drawflag);
    TGUI_PATLOC(((patterny * pTrident->PatternLocation) +
		 (patternx * pScrn->bitsPerPixel / 8)) >> 6);
    TGUI_FMIX(XAAGetPatternROP(rop));
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:26,代码来源:trident_accel.c

示例8: smbus_write

static void smbus_write(ScrnInfoPtr pScrn, unsigned char bData, unsigned char bIndex, unsigned char devAdr)
{
    TRIDENTPtr pTrident=TRIDENTPTR(pScrn);
    unsigned short i;

    /* clear host status */
    OUTB(SMBUS_BASE, 0xFF);

    /* check SMBUS ready */
    for ( i = 0; i < 0xFFFF; i++ )
        if ( (INB(SMBUS_BASE) & 0x01) == 0 )
           break;

    OUTB(SMBUS_BASE+2, 0x08);

    /* set host command */
    OUTB(SMBUS_BASE+3, bIndex);

    /* set slave address */
    OUTB(SMBUS_BASE+4, devAdr & 0xFE);

    OUTB(SMBUS_BASE+5, bData);

    /* start */
    OUTB(SMBUS_BASE+2, 0x48);

    /* SMBUS Wait Ready */
    for ( i = 0; i < 0xFFFF; i++ )
    if ( (INB(SMBUS_BASE) & 0x01) == 0 )
       break;
}
开发者ID:freedesktop-unofficial-mirror,项目名称:xorg__driver__xf86-video-trident,代码行数:31,代码来源:trident_tv.c

示例9: smbus_read

static unsigned char smbus_read(ScrnInfoPtr pScrn, unsigned char bIndex, unsigned char devAdr)
{
    TRIDENTPtr pTrident=TRIDENTPTR(pScrn);
    unsigned short i;
    unsigned char  bData;

    /* clear host status */
    OUTB(SMBUS_BASE, 0xFF);

    /* check SMBUS ready */
    for ( i = 0; i < 0xFFFF; i++ )
        if ( (INB(SMBUS_BASE) & 0x01) == 0 )
            break;

    /* set host command */
    OUTB(SMBUS_BASE+3, bIndex);

    /* set slave address */
    OUTB(SMBUS_BASE+4, devAdr | 0x01);

    /* start */
    OUTB(SMBUS_BASE+2, 0x48);

    /* SMBUS Wait Ready */
    for ( i = 0; i < 0xFFFF; i++ )
        if ( (INB(SMBUS_BASE) & 0x01) == 0 )
            break;
    bData=INB(SMBUS_BASE+5);

    return bData;

}
开发者ID:freedesktop-unofficial-mirror,项目名称:xorg__driver__xf86-video-trident,代码行数:32,代码来源:trident_tv.c

示例10: TridentSubsequentFillRectSolid

static void
TridentSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x, int y, int w, int h)
{
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);

    TGUI_DIM_XY(w,h);
    TGUI_DEST_XY(x,y);
    TGUI_COMMAND(GE_BLT);
    TridentSync(pScrn);
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:10,代码来源:trident_accel.c

示例11: XP4SubsequentFillRectSolid

static void
XP4SubsequentFillRectSolid(ScrnInfoPtr pScrn, int x, int y, int w, int h)
{
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
    
    MMIO_OUT32(pTrident->IOBase, 0x2138, x<<16 | y);
    MMIO_OUT32(pTrident->IOBase, 0x2140, w<<16 | h);
    XP4Sync(pScrn);
    MMIO_OUT32(pTrident->IOBase, 0x2124, XAAGetPatternROP(ropcode) << 24 | bpp << 8 | 2);
}
开发者ID:freedesktop-unofficial-mirror,项目名称:xorg__driver__xf86-video-trident,代码行数:10,代码来源:xp4_accel.c

示例12: XPSetupForFillRectSolid

static void
XPSetupForFillRectSolid(ScrnInfoPtr pScrn, int color, 
				    int rop, unsigned int planemask)
{
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);

    REPLICATE(color);
    TGUI_FMIX(XAAPatternROP[rop]);
    MMIO_OUT32(pTrident->IOBase, 0x2158, color);
    TGUI_DRAWFLAG(SOLIDFILL);
}
开发者ID:marioaugustorama,项目名称:tropix-xwindow,代码行数:11,代码来源:xp_accel.c

示例13: XP4SetupForFillRectSolid

static void
XP4SetupForFillRectSolid(ScrnInfoPtr pScrn, int color, 
				    int rop, unsigned int planemask)
{
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
 
    ropcode = rop;

    REPLICATE(color);
    MMIO_OUT32(pTrident->IOBase, 0x2158, color);
    MMIO_OUT32(pTrident->IOBase, 0x2128, 1<<14);
}
开发者ID:freedesktop-unofficial-mirror,项目名称:xorg__driver__xf86-video-trident,代码行数:12,代码来源:xp4_accel.c

示例14: TridentSubsequentColor8x8PatternFillRect

static void 
TridentSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn, 	
				   int patternx, int patterny,
				   int x, int y,
				   int w, int h)
{
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
  
    TGUI_DEST_XY(x,y);
    TGUI_DIM_XY(w,h);
    TGUI_COMMAND(GE_BLT);
    TridentClearSync(pScrn);
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:13,代码来源:trident_accel.c

示例15: XP4SubsequentCPUToScreenColorExpandFill

static void
XP4SubsequentCPUToScreenColorExpandFill(
	ScrnInfoPtr pScrn,
	int x, int y, int w, int h,
	int skipleft
){
    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);

    MMIO_OUT32(pTrident->IOBase, 0x2138, x<<16 | y);
    MMIO_OUT32(pTrident->IOBase, 0x2140, w<<16 | h);
    XP4Sync(pScrn);
    MMIO_OUT32(pTrident->IOBase, 0x2124, ropcode << 24 | bpp << 8 | 2);
}
开发者ID:freedesktop-unofficial-mirror,项目名称:xorg__driver__xf86-video-trident,代码行数:13,代码来源:xp4_accel.c


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