Changeset 65305 in vbox for trunk/src/VBox/Devices/Graphics
- Timestamp:
- Jan 16, 2017 8:12:05 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
r65303 r65305 2446 2446 } 2447 2447 break; 2448 /* Should take the XOR mask into account for the multi-bit AND mask. */ 2448 2449 case 8: 2449 2450 for (uint32_t y = 0; y < cy; y++) … … 2455 2456 do 2456 2457 { 2457 if (pbSrc[x]) 2458 uintptr_t const idxPal = pbSrc[x] * 3; 2459 if (( pThis->last_palette[idxPal + 2] 2460 | pThis->last_palette[idxPal + 1] 2461 | pThis->last_palette[idxPal + 0]) > 0xfc) 2458 2462 bDst |= fBit; 2459 2463 fBit <<= 1; … … 2475 2479 do 2476 2480 { 2477 if ( pbSrc[x * 2] || (pbSrc[x * 2 + 1] & 0x7f))2481 if ((pbSrc[x * 2] | (pbSrc[x * 2 + 1] & 0x7f)) >= 0xfc) 2478 2482 bDst |= fBit; 2479 2483 fBit <<= 1; … … 2495 2499 do 2496 2500 { 2497 if ( pbSrc[x * 2] || pbSrc[x * 2 + 1])2501 if ((pbSrc[x * 2] | pbSrc[x * 2 + 1]) >= 0xfc) 2498 2502 bDst |= fBit; 2499 2503 fBit <<= 1; … … 2515 2519 do 2516 2520 { 2517 if ( pbSrc[x * 3] || pbSrc[x * 3 + 1] || pbSrc[x * 3 + 2])2521 if ((pbSrc[x * 3] | pbSrc[x * 3 + 1] | pbSrc[x * 3 + 2]) >= 0xfc) 2518 2522 bDst |= fBit; 2519 2523 fBit <<= 1; … … 2534 2538 do 2535 2539 { 2536 if ( pbSrc[x * 4] || pbSrc[x * 4 + 1] || pbSrc[x * 4 + 2] || pbSrc[x * 4 + 3])2540 if ((pbSrc[x * 4] | pbSrc[x * 4 + 1] | pbSrc[x * 4 + 2] | pbSrc[x * 4 + 3]) >= 0xfc) 2537 2541 bDst |= fBit; 2538 2542 fBit <<= 1; … … 2558 2562 for (uint32_t y = 0; y < cy; y++) 2559 2563 { 2560 for (uint32_t x = 0; x < cx; x++) 2561 *pu32Dst++ = ASMBitTest(pbSrc, x) ? UINT32_C(0x00ffffff) : 0; 2564 for (uint32_t x = 0; x < cx; ) 2565 { 2566 /* most significant bit is the left most one. */ 2567 uint8_t bSrc = pbSrc[x / 8]; 2568 do 2569 { 2570 *pu32Dst++ = bSrc & 0x80 ? UINT32_C(0x00ffffff) : 0; 2571 bSrc <<= 1; 2572 x++; 2573 } while ((x & 7) && x < cx); 2574 } 2562 2575 pbSrc += cbSrcXorLine; 2563 2576 }
Note:
See TracChangeset
for help on using the changeset viewer.