virtual device depths

Caolán McNamara caolanm at redhat.com
Thu Nov 19 03:02:32 PST 2015


Part of exploring rendering text (and possibly more) via cairo
to the svp backend is the depth of virtual devices. We have places
where we have a simple 1 bit mask, and we have cases where we are
actually just saying "give me a virtual device that matches the depth
of another device" and we have some places that explicitly set a
specific depth.

In the "match a device" for the svp (and X) cases we know we can render
with cairo to those surfaces.

Digging all the way back to the start. I see that initially virdev.hxx
was documented to take either 0 or 1 as the Bitdepth. Either "match
device" for 0 or 1 for a bitmask. But then other numbers began
appearing over time there.

Outside of vcl there are only two places where we are using anything
other than match-device or 1 bit masks for VirtualDevices. And that's
the two uses under ifdef IOS in sc/source/core/data/documen8.cxx and
sw/source/core/doc/DocumentDeviceManager.cxx So, do we really need 8
bit virtual devices there ? This doesn't matter too much. IOS can be a
special case without a problem. 

There is one other use of an explicit 8 bit virtual device in
desktop/source/lib/init.cxx for the libreofficekit stuff. But only on
the non-android code path. In what circumstances does the transparency
get set to something other than non-solid in that paintTile ? I'd sort
of imagine that the document background color is always going to be
solidly filled into the tile ?

C.


More information about the LibreOffice mailing list