Cairo and Pixmap formats
BlitzMax Forums/Brucey's Modules/Cairo and Pixmap formats
| ||
Hello Brucey! As discussed in http://www.blitzmax.com/Community/posts.php?topic=89973, Cairo does not seem to like all possible Pixmap formats, when creating a surface from a Pixmap. Unfortunately, those Pixmaps, which can be drawn fastest (namely PF_RGBA8888), cannot be used for Cairo, as it then produces not output, while the format Cairo likes (namely PF_BGRA8888) needs to be converted into PF_RGBA8888 first before being drawn onto the screen - and that step consumes an awful lot of processing power! PF_RGBA8888 also seems to be the standard format for (dynamic) images, thus, there is no enhancement when switching to Images as basis for a Cairo surface Do you have any idea how I may use Cairo with PF_RGBA8888? |
| ||
There's not very much I can do, I think. These are Pixman's rgb formats : #define PIXMAN_TYPE_ARGB 2 #define PIXMAN_TYPE_ABGR 3 #define PIXMAN_TYPE_BGRA 8 |
| ||
Sigh, you're right - not many choices EDIT: I just downloaded pixman-0.18.0 from http://cgit.freedesktop.org/pixman/ - let's see what it supports now EDIT: it still supports the types shown above only EDIT: no more needs for optimization from my side: I just recompiled my code without debugging support and it became MUCH faster |