svp pixel fomats and cairo
caolanm at redhat.com
Fri Nov 20 08:18:49 PST 2015
At the moment under Linux etc the svp surface format is already
basebmp::BGR[X|A] by default which matches cairo's RGB24/ARGB32 formats
and OpenGL's GL_BGRA format.
libreofficekit however is currently using basebmp:RGBA on all
platforms, which matches OpenGL's GL_RGBA and GdkPixbuf's layout, but
not cairo's layout.
Our android infrastructure splats these buffers into GL_RGBA opengl
textures and lacks support for GL_BGRA.
Here's some screen shots of the goodness that using cairo on the svp
What my patch sequence currently proposes is to require cairo on all
svp-using platform and to use cairo-compatible surface formats
universally for svp internally and do as little conversion to other
formats as possible.
To get around the android issue that we have to use GL_RGBA eventually,
the changes patch our bundled-cairo on that platform to have GL_RGBA
compatible RGB24/ARGB32 instead of the default GL_BGRA compatible ones.
In other words use cairo everywhere svp is used but change cairo itself
to suit our android implementation.
For online which takes the svp surface data and turns it into pngs to
send to the client then https://gerrit.libreoffice.org/#/c/20092/1 shou
ld convert that cairo-format data into png format correctly. This is
untested, I know it builds though :-)
Alternatively of course we could
use basebmp::BGR[X|A] internally and convert the results of paintTile
to basebmp:RGBA and leave what libreofficekit exposes unchanged.
or continue to allow different internal formats for svp and just not
use cairo on them and retain the suckiness for those for android and
More information about the LibreOffice