xaa: use xf86ReturnOptValBool instead of xf86IsOptionSet
The latter doesn't return the option's value, just whether it's present in the configuration.
This commit is contained in:
parent
6b9d2bb1f7
commit
4217ba0cf0
|
@ -181,7 +181,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForScreenToScreenCopy &&
|
||||
infoRec->SubsequentScreenToScreenCopy &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SCREEN_TO_SCREEN_COPY)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_SCREEN_TO_SCREEN_COPY, FALSE)) {
|
||||
HaveScreenToScreenCopy = TRUE;
|
||||
} else {
|
||||
infoRec->ScreenToScreenCopyFlags = 0;
|
||||
|
@ -192,10 +192,10 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
/**** Solid Filled Rects ****/
|
||||
|
||||
if(infoRec->SetupForSolidFill && infoRec->SubsequentSolidFillRect &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SOLID_FILL_RECT)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_SOLID_FILL_RECT, FALSE)) {
|
||||
HaveSolidFillRect = TRUE;
|
||||
if(infoRec->SubsequentSolidFillTrap &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SOLID_FILL_TRAP))
|
||||
!xf86ReturnOptValBool(options, XAAOPT_SOLID_FILL_TRAP, FALSE))
|
||||
HaveSolidFillTrap = TRUE;
|
||||
else
|
||||
infoRec->SubsequentSolidFillTrap = NULL;
|
||||
|
@ -210,10 +210,11 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForSolidLine) {
|
||||
if(infoRec->SubsequentSolidTwoPointLine &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SOLID_TWO_POINT_LINE))
|
||||
!xf86ReturnOptValBool(options,
|
||||
XAAOPT_SOLID_TWO_POINT_LINE, FALSE))
|
||||
HaveSolidTwoPointLine = TRUE;
|
||||
if(infoRec->SubsequentSolidBresenhamLine &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SOLID_BRESENHAM_LINE)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_SOLID_BRESENHAM_LINE, FALSE)) {
|
||||
HaveSolidBresenhamLine = TRUE;
|
||||
|
||||
if(infoRec->SolidBresenhamLineErrorTermBits)
|
||||
|
@ -222,7 +223,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
}
|
||||
|
||||
if(infoRec->SubsequentSolidHorVertLine &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SOLID_HORVERT_LINE))
|
||||
!xf86ReturnOptValBool(options,
|
||||
XAAOPT_SOLID_HORVERT_LINE, FALSE))
|
||||
HaveSolidHorVertLine = TRUE;
|
||||
else if(HaveSolidTwoPointLine) {
|
||||
infoRec->SubsequentSolidHorVertLine =
|
||||
|
@ -265,10 +267,14 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForMono8x8PatternFill &&
|
||||
infoRec->SubsequentMono8x8PatternFillRect &&
|
||||
!xf86IsOptionSet(options, XAAOPT_MONO_8x8_PATTERN_FILL_RECT)) {
|
||||
!xf86ReturnOptValBool(options,
|
||||
XAAOPT_MONO_8x8_PATTERN_FILL_RECT,
|
||||
FALSE)) {
|
||||
HaveMono8x8PatternFillRect = TRUE;
|
||||
if(infoRec->SubsequentMono8x8PatternFillTrap &&
|
||||
!xf86IsOptionSet(options, XAAOPT_MONO_8x8_PATTERN_FILL_TRAP))
|
||||
!xf86ReturnOptValBool(options,
|
||||
XAAOPT_MONO_8x8_PATTERN_FILL_TRAP,
|
||||
FALSE))
|
||||
HaveMono8x8PatternFillTrap = TRUE;
|
||||
|
||||
if(infoRec->Mono8x8PatternFillFlags &
|
||||
|
@ -318,10 +324,12 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForDashedLine && infoRec->DashPatternMaxLength) {
|
||||
if(infoRec->SubsequentDashedTwoPointLine &&
|
||||
!xf86IsOptionSet(options, XAAOPT_DASHED_TWO_POINT_LINE))
|
||||
!xf86ReturnOptValBool(options, XAAOPT_DASHED_TWO_POINT_LINE,
|
||||
FALSE))
|
||||
HaveDashedTwoPointLine = TRUE;
|
||||
if(infoRec->SubsequentDashedBresenhamLine &&
|
||||
!xf86IsOptionSet(options, XAAOPT_DASHED_BRESENHAM_LINE)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_DASHED_BRESENHAM_LINE,
|
||||
FALSE)) {
|
||||
HaveDashedBresenhamLine = TRUE;
|
||||
|
||||
if(infoRec->DashedBresenhamLineErrorTermBits)
|
||||
|
@ -345,10 +353,11 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForColor8x8PatternFill &&
|
||||
infoRec->SubsequentColor8x8PatternFillRect &&
|
||||
!xf86IsOptionSet(options, XAAOPT_COL_8x8_PATTERN_FILL_RECT)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_COL_8x8_PATTERN_FILL_RECT, FALSE)) {
|
||||
HaveColor8x8PatternFillRect = TRUE;
|
||||
if(infoRec->SubsequentColor8x8PatternFillTrap &&
|
||||
!xf86IsOptionSet(options, XAAOPT_COL_8x8_PATTERN_FILL_TRAP))
|
||||
!xf86ReturnOptValBool(options, XAAOPT_COL_8x8_PATTERN_FILL_TRAP,
|
||||
FALSE))
|
||||
HaveColor8x8PatternFillTrap = TRUE;
|
||||
else
|
||||
infoRec->SubsequentColor8x8PatternFillTrap = NULL;
|
||||
|
@ -381,7 +390,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
if(infoRec->SetupForCPUToScreenColorExpandFill &&
|
||||
infoRec->ColorExpandBase &&
|
||||
infoRec->SubsequentCPUToScreenColorExpandFill &&
|
||||
!xf86IsOptionSet(options, XAAOPT_CPU_TO_SCREEN_COL_EXP_FILL)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_CPU_TO_SCREEN_COL_EXP_FILL,
|
||||
FALSE)) {
|
||||
int dwordsNeeded = pScrn->virtualX;
|
||||
|
||||
infoRec->ColorExpandRange >>= 2; /* convert to DWORDS */
|
||||
|
@ -406,7 +416,9 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
infoRec->SubsequentColorExpandScanline &&
|
||||
infoRec->ScanlineColorExpandBuffers &&
|
||||
(infoRec->NumScanlineColorExpandBuffers > 0) &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SCANLINE_CPU_TO_SCREEN_COL_EXP_FILL)) {
|
||||
!xf86ReturnOptValBool(options,
|
||||
XAAOPT_SCANLINE_CPU_TO_SCREEN_COL_EXP_FILL,
|
||||
FALSE)) {
|
||||
HaveScanlineColorExpansion = TRUE;
|
||||
} else {
|
||||
infoRec->ScanlineCPUToScreenColorExpandFillFlags = 0;
|
||||
|
@ -419,7 +431,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForScreenToScreenColorExpandFill &&
|
||||
infoRec->SubsequentScreenToScreenColorExpandFill &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SCREEN_TO_SCREEN_COL_EXP_FILL)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_SCREEN_TO_SCREEN_COL_EXP_FILL,
|
||||
FALSE)) {
|
||||
HaveScreenToScreenColorExpandFill = TRUE;
|
||||
if (!infoRec->CacheColorExpandDensity)
|
||||
infoRec->CacheColorExpandDensity = 1;
|
||||
|
@ -433,7 +446,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
|
||||
if(infoRec->SetupForImageWrite && infoRec->ImageWriteBase &&
|
||||
infoRec->SubsequentImageWriteRect &&
|
||||
!xf86IsOptionSet(options, XAAOPT_IMAGE_WRITE_RECT)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_IMAGE_WRITE_RECT, FALSE)) {
|
||||
|
||||
infoRec->ImageWriteRange >>= 2; /* convert to DWORDS */
|
||||
if(infoRec->ImageWriteFlags & CPU_TRANSFER_BASE_FIXED)
|
||||
|
@ -452,7 +465,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
infoRec->SubsequentImageWriteScanline &&
|
||||
infoRec->ScanlineImageWriteBuffers &&
|
||||
(infoRec->NumScanlineImageWriteBuffers > 0) &&
|
||||
!xf86IsOptionSet(options, XAAOPT_SCANLINE_IMAGE_WRITE_RECT)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_SCANLINE_IMAGE_WRITE_RECT,
|
||||
FALSE)) {
|
||||
HaveScanlineImageWriteRect = TRUE;
|
||||
} else {
|
||||
infoRec->ScanlineImageWriteFlags = 0;
|
||||
|
@ -518,7 +532,8 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
#define XAAMSG(s) do { if (serverGeneration == 1) xf86ErrorF(s); } while (0)
|
||||
|
||||
if((infoRec->Flags & OFFSCREEN_PIXMAPS) && HaveScreenToScreenCopy &&
|
||||
!xf86IsOptionSet(options, XAAOPT_OFFSCREEN_PIXMAPS)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_OFFSCREEN_PIXMAPS,
|
||||
FALSE)) {
|
||||
XAAMSG("\tOffscreen Pixmaps\n");
|
||||
} else {
|
||||
infoRec->Flags &= ~OFFSCREEN_PIXMAPS;
|
||||
|
@ -800,7 +815,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
/**** WriteBitmap ****/
|
||||
|
||||
if(infoRec->WriteBitmap &&
|
||||
!xf86IsOptionSet(options, XAAOPT_WRITE_BITMAP)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_WRITE_BITMAP, FALSE)) {
|
||||
XAAMSG("\tDriver provided WriteBitmap replacement\n");
|
||||
} else if(HaveColorExpansion) {
|
||||
if (infoRec->CPUToScreenColorExpandFillFlags & TRIPLE_BITS_24BPP) {
|
||||
|
@ -959,7 +974,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
/**** WritePixmap ****/
|
||||
|
||||
if(infoRec->WritePixmap &&
|
||||
!xf86IsOptionSet(options, XAAOPT_WRITE_PIXMAP)) {
|
||||
!xf86ReturnOptValBool(options, XAAOPT_WRITE_PIXMAP, FALSE)) {
|
||||
XAAMSG("\tDriver provided WritePixmap replacement\n");
|
||||
} else if(HaveImageWriteRect) {
|
||||
infoRec->WritePixmap = XAAWritePixmap;
|
||||
|
@ -1433,7 +1448,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
|||
else
|
||||
infoRec->Flags &= ~PIXMAP_CACHE;
|
||||
|
||||
if (xf86IsOptionSet(options, XAAOPT_PIXMAP_CACHE))
|
||||
if (xf86ReturnOptValBool(options, XAAOPT_PIXMAP_CACHE, FALSE))
|
||||
infoRec->Flags &= ~PIXMAP_CACHE;
|
||||
|
||||
if(infoRec->WriteMono8x8PatternToCache) {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user