VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.0.1/cfbrrop24.h@ 67129

最後變更 在這個檔案從67129是 51223,由 vboxsync 提交於 11 年 前

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.9 KB
 
1/* $XFree86: xc/programs/Xserver/cfb24/cfbrrop24.h,v 3.1tsi Exp $ */
2
3#define RROP_DECLARE \
4 unsigned long piQxelAnd[3], piQxelXor[3], spiQxelXor[8];
5
6#define RROP_COPY_SETUP(ptn) \
7 spiQxelXor[0] = ptn & 0xFFFFFF; \
8 spiQxelXor[2] = ptn << 24; \
9 spiQxelXor[3] = (ptn & 0xFFFF00)>> 8; \
10 spiQxelXor[4] = ptn << 16; \
11 spiQxelXor[5] = (ptn & 0xFF0000)>> 16; \
12 spiQxelXor[6] = ptn << 8; \
13 spiQxelXor[1] = spiQxelXor[7] = 0;
14
15#define RROP_SOLID24_COPY(dst,index) {\
16 register int idx = ((index) & 3)<< 1; \
17 *(dst) = (*(dst) & cfbrmask[idx])|spiQxelXor[idx]; \
18 idx++; \
19 *((dst)+1) = (*((dst)+1) & cfbrmask[idx])|spiQxelXor[idx]; \
20 }
21
22#define RROP_SET_SETUP(xor, and) \
23 spiQxelXor[0] = xor & 0xFFFFFF; \
24 spiQxelXor[1] = xor << 24; \
25 spiQxelXor[2] = xor << 16; \
26 spiQxelXor[3] = xor << 8; \
27 spiQxelXor[4] = (xor >> 8) & 0xFFFF; \
28 spiQxelXor[5] = (xor >> 16) & 0xFF; \
29 piQxelAnd[0] = (and & 0xFFFFFF)|(and << 24); \
30 piQxelAnd[1] = (and << 16)|((and >> 8) & 0xFFFF); \
31 piQxelAnd[2] = (and << 8)|((and >> 16) & 0xFF); \
32 piQxelXor[0] = (xor & 0xFFFFFF)|(xor << 24); \
33 piQxelXor[1] = (xor << 16)|((xor >> 8) & 0xFFFF); \
34 piQxelXor[2] = (xor << 8)|((xor >> 16) & 0xFF);
35
36
37#define RROP_SOLID24_SET(dst,index) {\
38 switch((index) & 3){ \
39 case 0: \
40 *(dst) = ((*(dst) & (piQxelAnd[0] |0xFF000000))^(piQxelXor[0] & 0xFFFFFF)); \
41 break; \
42 case 3: \
43 *(dst) = ((*(dst) & (piQxelAnd[2]|0xFF))^(piQxelXor[2] & 0xFFFFFF00)); \
44 break; \
45 case 1: \
46 *(dst) = ((*(dst) & (piQxelAnd[0]|0xFFFFFF))^(piQxelXor[0] & 0xFF000000)); \
47 *((dst)+1) = ((*((dst)+1) & (piQxelAnd[1]|0xFFFF0000))^(piQxelXor[1] & 0xFFFF)); \
48 break; \
49 case 2: \
50 *(dst) = ((*(dst) & (piQxelAnd[1]|0xFFFF))^(piQxelXor[1] & 0xFFFF0000)); \
51 *((dst)+1) = ((*((dst)+1) & (piQxelAnd[2]|0xFFFFFF00))^(piQxelXor[2] & 0xFF)); \
52 break; \
53 } \
54 }
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette