office-gobmx/basegfx/Library_basegfx.mk
Armin Le Grand b9fa01a8d1 Support buffering SystemDependent GraphicData
This is a first step to allow buffering of system
dependent data, especially (but not only) for the
system-dependent implementations of graphic output.
For example, for B2DPolygon and Win output, it allows
buffering the Gdiplus::GraphicsPath instead of re-
creating it all the time.
To support that, the change includes forwarding the
current transformation to the renderers in SalGraphics.
The current state in VCL is to transform all and
everything to device coordinates at every single
paint.
I have currently started to do this for ::drawPolyLine
implementations. The fallbacks for all systems will
at the start of that method just transform the data
to device coordinates, so all works as before.
This may also be done for FilledPolygon paint in a later
step, but most urgent is FatLine painting.
An arrangement of shared_ptr/weak_ptr is used so that
either the instance buffering (in the example B2DPolygon)
or the instance managing it can delete it. The instance
managing it currently uses a 1s Timer and a cycle-lifetime
management, but that can be extended in the future
to e.g. include size hints, too.
The mechanism it designed to support multiple Data per
buffering element, e.g. for B2DPolygon at the same time
system-dependent instances of Gdiplus and Cairo can be
buffered, but also PDF-data.
This is achieved semi-automatic by using
typeid(class).hash_code() as key for organization.
The mechanism will be used for now at B2DPolygon, but
is not limited to. There is already a similar but less
general buffer (see GdiPlusBuffer) that can and will
be converted to use this new mechanism.

Added vcl/headless Cairo renderer to support given
ObjectToDevice transformation (not to transform given
B2DPolygon)
Added support for CairoPath buffered at B2DPolygon,
seems to work well. Need to do more tests

Moved usage to templates suggested by Noel Grandin
(Noel Grandin <noelgrandin@gmail.com>), thanks for
these suggestions. Adapted Win usage to that, too.

Converted Win-specific GdiPlus BitmapBuffer to new
mechanism, works well. Checked, the manager holds
now a mix of bitmap and path data under Win

Added a cleanup mechanism to flush all buffered data
at DeInitVCL() using flushAll() at
SystemDependentDataBuffer

Adapted Linux-versions of ::drawPolyLine to support
PixelSnapHairline, for now in a simplified version
that still allows buffering. This will also be used
(and use buffering) for the Cairo-fallback in
X11SalGraphics

Change-Id: I88d7e438a20b96ddab7707050893bdd590c098c7
Reviewed-on: https://gerrit.libreoffice.org/59555
Tested-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-08-30 19:48:46 +02:00

90 lines
3.1 KiB
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Library_Library,basegfx))
$(eval $(call gb_Library_use_external,basegfx,boost_headers))
$(eval $(call gb_Library_set_precompiled_header,basegfx,$(SRCDIR)/basegfx/inc/pch/precompiled_basegfx))
$(eval $(call gb_Library_use_sdk_api,basegfx))
$(eval $(call gb_Library_use_libraries,basegfx,\
cppu \
cppuhelper \
sal \
))
$(eval $(call gb_Library_set_include,basegfx,\
-I$(SRCDIR)/basegfx/source/inc \
$$(INCLUDE) \
))
$(eval $(call gb_Library_add_defs,basegfx,\
-DBASEGFX_DLLIMPLEMENTATION \
))
$(eval $(call gb_Library_add_exception_objects,basegfx,\
basegfx/source/color/bcolormodifier \
basegfx/source/color/bcolortools \
basegfx/source/curve/b2dbeziertools \
basegfx/source/curve/b2dcubicbezier \
basegfx/source/matrix/b2dhommatrix \
basegfx/source/matrix/b2dhommatrixtools \
basegfx/source/matrix/b3dhommatrix \
basegfx/source/matrix/b3dhommatrixtools \
basegfx/source/numeric/ftools \
basegfx/source/pixel/bpixel \
basegfx/source/point/b2dpoint \
basegfx/source/point/b2ipoint \
basegfx/source/point/b3dpoint \
basegfx/source/polygon/b2dlinegeometry \
basegfx/source/polygon/b2dpolygon \
basegfx/source/polygon/b2dpolygonclipper \
basegfx/source/polygon/b2dpolygoncutandtouch \
basegfx/source/polygon/b2dpolygontools \
basegfx/source/polygon/b2dpolygontriangulator \
basegfx/source/polygon/b2dpolypolygon \
basegfx/source/polygon/b2dpolypolygoncutter \
basegfx/source/polygon/b2dpolypolygontools \
basegfx/source/polygon/b2dsvgpolypolygon \
basegfx/source/polygon/b2dtrapezoid \
basegfx/source/polygon/b3dpolygon \
basegfx/source/polygon/b3dpolygontools \
basegfx/source/polygon/b3dpolypolygon \
basegfx/source/polygon/b3dpolypolygontools \
basegfx/source/range/b1drange \
basegfx/source/range/b2dpolyrange \
basegfx/source/range/b2drange \
basegfx/source/range/b2drangeclipper \
basegfx/source/range/b2xrange \
basegfx/source/range/b3drange \
basegfx/source/raster/rasterconvert3d \
basegfx/source/tools/b2dclipstate \
basegfx/source/tools/canvastools \
basegfx/source/tools/gradienttools \
basegfx/source/tools/keystoplerp \
basegfx/source/tools/numbertools \
basegfx/source/tools/stringconversiontools \
basegfx/source/tools/systemdependentdata \
basegfx/source/tools/tools \
basegfx/source/tools/unopolypolygon \
basegfx/source/tools/zoomtools \
basegfx/source/tuple/b2dtuple \
basegfx/source/tuple/b2i64tuple \
basegfx/source/tuple/b2ituple \
basegfx/source/tuple/b3dtuple \
basegfx/source/tuple/b3ituple \
basegfx/source/vector/b2dvector \
basegfx/source/vector/b2ivector \
basegfx/source/vector/b3dvector \
))
# vim: set noet sw=4 ts=4: