diff options
author | Y.C. Chen <yc_chen@aspeedtech.com> | 2009-01-08 17:03:19 +0800 |
---|---|---|
committer | Y.C. Chen <yc_chen@aspeedtech.com> | 2009-01-08 17:03:19 +0800 |
commit | 1ca09bad07528d32db406998e8b6176989f29216 (patch) | |
tree | 6f2a480605a977fd5d705ad1f2e65658e20cf2f9 /src/ast_cursor.c | |
parent | 241d411e770c36b725cc72c1cd5e52932a8cf460 (diff) |
Support AST2200/2150
Diffstat (limited to 'src/ast_cursor.c')
-rw-r--r-- | src/ast_cursor.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ast_cursor.c b/src/ast_cursor.c index aaa9cb3..6b6cb94 100644 --- a/src/ast_cursor.c +++ b/src/ast_cursor.c @@ -242,6 +242,12 @@ ASTLoadCursorImage(ScrnInfoPtr pScrn, UCHAR *src) ulTempDstAnd32[1] = ((jTempSrcAnd32 >> (k-1)) & 0x01) ? 0x80000000L:0x00L; ulTempDstXor32[1] = ((jTempSrcXor32 >> (k-1)) & 0x01) ? 0x40000000L:0x00L; ulTempDstData32[1] = ((jTempSrcXor32 >> (k-1)) & 0x01) ? (pAST->HWCInfo.fg << 16):(pAST->HWCInfo.bg << 16); + ulTempDstData32[1] = ((jTempSrcXor32 >> (k-1)) & 0x01) ? (pAST->HWCInfo.fg << 16):(pAST->HWCInfo.bg << 16); + /* No inverse for X Window cursor, ycchen@111808 */ + if (ulTempDstAnd32[0]) + ulTempDstXor32[0] = 0; + if (ulTempDstAnd32[1]) + ulTempDstXor32[1] = 0; *((ULONG *) pjDstData) = ulTempDstAnd32[0] | ulTempDstXor32[0] | ulTempDstData32[0] | ulTempDstAnd32[1] | ulTempDstXor32[1] | ulTempDstData32[1]; ulCheckSum += *((ULONG *) pjDstData); pjDstData += 4; @@ -276,6 +282,9 @@ ASTLoadCursorImage(ScrnInfoPtr pScrn, UCHAR *src) static Bool ASTUseHWCursor(ScreenPtr pScreen, CursorPtr pCurs) { + if ( (pCurs->bits->width > MAX_HWC_WIDTH) || (pCurs->bits->height > MAX_HWC_HEIGHT) ) + return FALSE; + return TRUE; } @@ -377,6 +386,9 @@ ASTLoadCursorARGB(ScrnInfoPtr pScrn, CursorPtr pCurs) static Bool ASTUseHWCursorARGB(ScreenPtr pScreen, CursorPtr pCurs) { + if ( (pCurs->bits->width > MAX_HWC_WIDTH) || (pCurs->bits->height > MAX_HWC_HEIGHT) ) + return FALSE; + return TRUE; } |