VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/pixman-0.16.0/pixman-accessor.h@ 66940

最後變更 在這個檔案從66940是 22660,由 vboxsync 提交於 15 年 前

export more X11 stuff to OSE

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.0 KB
 
1#ifdef PIXMAN_FB_ACCESSORS
2
3#define ACCESS(sym) sym##_accessors
4
5#define READ(img, ptr) \
6 (((bits_image_t *)(img))->read_func ((ptr), sizeof(*(ptr))))
7#define WRITE(img, ptr,val) \
8 (((bits_image_t *)(img))->write_func ((ptr), (val), sizeof (*(ptr))))
9
10#define MEMCPY_WRAPPED(img, dst, src, size) \
11 do { \
12 size_t _i; \
13 uint8_t *_dst = (uint8_t*)(dst), *_src = (uint8_t*)(src); \
14 for(_i = 0; _i < size; _i++) { \
15 WRITE((img), _dst +_i, READ((img), _src + _i)); \
16 } \
17 } while (0)
18
19#define MEMSET_WRAPPED(img, dst, val, size) \
20 do { \
21 size_t _i; \
22 uint8_t *_dst = (uint8_t*)(dst); \
23 for(_i = 0; _i < (size_t) size; _i++) { \
24 WRITE((img), _dst +_i, (val)); \
25 } \
26 } while (0)
27
28#else
29
30#define ACCESS(sym) sym
31
32#define READ(img, ptr) (*(ptr))
33#define WRITE(img, ptr, val) (*(ptr) = (val))
34#define MEMCPY_WRAPPED(img, dst, src, size) \
35 memcpy(dst, src, size)
36#define MEMSET_WRAPPED(img, dst, val, size) \
37 memset(dst, val, size)
38
39#endif
40
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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