TiledRendering: outline of basic gtk tiled rendering app using liblibreoffice.

Change-Id: I46760c0a1329b9823fd999c470b57fef66d28914
Add tiled rendering via liblibreoffice.

We still need to add functions for getting dimensions of documents
etc. for this to be truly useful, this is also only usable for writer
documents for now.

Change-Id: I07812c9b72caca71dfd509705af48c1d355cb2f8
Add some rendering to our gtktiledviewer.

Just a hardcoded single tile for now.

Change-Id: I9bfae4243e0083aa8fca38ae98dc369fe6de36fb
Return a bitmap buffer for tiled rendering from LibLO.

We still need some way of managing the buffers properly rather
than just keeping a static reference to the last buffer
that was rendered.

Change-Id: I17940c758948aa9418f4e0216ecd253d128cd04f
Use bitmap buffers in the gtktiledviewer.

Looks pretty decent now -- however the vertical flipping isn't ideal.

Change-Id: I6ffa9d2b8fced142308781e06e8f161228f1db26
Add rowstride to tiled rendering via LibLO.

The buffer width could be larger than the desired rendering
width, hence we need to give the client access to the rowstride.

Change-Id: Ic63c1f455c89960164e076ed2528d43e64e81a40
Implement document size retrieval for LibLO.

Change-Id: Ibd69f8e766fd421b05d2305f967179a969bc5b56
Draw the whole image for our gtk tiled viewer.

We just draw one huge tile, it doesn't seem to work too well
for larger documents though where the latter portions can appear
empty.

Change-Id: Ic527aec377bf2f82a528a04392186d3d8b752762
svp: deduplicate bitcount->colourspace mapping and allow overriding.

Although svp defaults to BGR, we might want to use alternative
formats (e.g. for tiled rendering to bitmap buffers which are
to be used in e.g. gtk), it is probably safest to keep the current
defaults but allow the user to change to whatever format they may
require. (This currently only makes sense for the 32-bit
RGBA/ARGB/etc. formats. However the 23 bit formats could potentially
be expanded to allow a similar RGB/BGR choice.)

Change-Id: I70bd3d6e7d297faef163b910f576655efee4cb3f
Upgrade LibLO tiled rendering to RGBA.

This is the expected format for gtk+ pixbufs which is currently
the primary target. We could potentially allow the user to choose
the format via LibLO -- but we want to eventually allow passing
in a buffer (rather than passing out an LO owned buffer) anyway, so
should add that then.

Change-Id: I8427925a94366917fa82fb8ea28e7dbb3fa1840d
Upgrade gtktiledviewer to RGBA.

The Alpha channel seems to be set incorrectly by LO, hence
we need to manually set it here for now.

Change-Id: I1f9091b8b6f88c1dba6653dfb7bf51f9fe14b3fc
Allow passing in external buffers to svp's VirtualDevice.

We also want to be able to set whether or not the buffers
should be painted to top down, so add that parameter
as necessary (default seems to be false, however e.g. gtk
requires this to be true, i.e. needed for tiled rendering).

Change-Id: Id98882e4c7f62508ae5a976c0d8df743460a4ab2
Use external buffer for LibLO tiled rendering.

Means we can get rid of hackily storing a reference to the last
buffer we created.

Change-Id: I8092a7d87bc391301f75651a59b37fbd73ac64fd
Upgrade gtktiledviewer to use its own buffer.

Change-Id: I3f567ff19ee0d5b0d54aeef9b163b78567d72946
Get rid of outdated comments.

We can now set the colourspace as desired, and we return the rowstride too.

Change-Id: Idf1e55a67b9e9ab58e82d7ed0be2813b682ec2ff
Add base value to set alpha channel for 32 bit colourspaces.

Currently the alpha channel is completely ignored by basebmp.
However this results in completely "transparent" output, meaning
the client has to manually overwrite the alpha channel -- instead
we now set it automatically when writing colourdata.

Unfortunately this doesn't quite work -- it seems that drawing
a non-opaque bitmap/image on top of the existing bitmap can
erase the alpha channel information (i.e. these areas will
once again be transparent -- for example document borders seem
to have a transition effect overlayed onto them): presumably
there is some method that bypasses our RGBMaskSetter (probably
some form of direct manipulation of raw values?).
manipulation in basebmp

Change-Id: Ia4be6a748cc30191a4422121f9ec347d9198b225
Fill the alpha channel by default for vcl 32-bit bitmaps too.

Otherwise the alpha channel for bitmaps created directly is empty,
indicating a transparent bitmap (although we don't actually handle
transparency). This complements hardcoding of the alpha channel
in basebmp. VCL bitmaps can be copied bit-for-bit directly into
a basebmp bitmap, hence it's important to make sure we fill the
alpha channel in vcl too.

Conflicts:
	include/vcl/salbtype.hxx

Change-Id: Icb2fa417db6625a6ffa6bd82eb5773ff75be5a3c
Kill gtktiledviewer's alpha channel hack.

basebmp and vcl now set the alpha channel appropriately, so no need
to do so in the viewer now.

However it would perhaps make more sense to just use RGB instead
of RGBA, seeing as the alpha channel is permanently set to be opaque.

Change-Id: I86ad758c6a8bee21b265730727a76605e5850c0c
Remove outdated includes.

These were needed for the X11 "context" rendering which is no longer used.

Change-Id: Ib60c8fff9dad06b1f8f489eed66c3b3c3597e1ee
Implement LibreOfficeKit gtk+ viewer widget.

Very basic, but works.

Change-Id: I0c521e833b53e13065e0be48e6fa767e44b29787