Commit Graph
5 Commits
Author SHA1 Message Date
Noel Grandin 8a17b7f0a6 tdf#131595 Improve drawinglayer flushing mechanism.
Which dramatically speeds up switching between sheets in
the referenced document.

The problem here is that we have a timer for each buffered primitive.
And we have a lot of primitives here.
And the TimerManager does not scale well to lots and lots of timer,
because it uses a linked list.

So this change modifies the flushing mechanism, trading off some
precision for some speed.

Change-Id: I66a744f06af9b08d4e9b797d11db8d22f4060789
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182876
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-03-17 07:15:15 +01:00
Gabor Kelemen d5afeecbff Use less libxml2 external headers dependency
Change-Id: I1749628e0104dff856161bc0bdfd343ef0db208e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156784
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-09-29 00:20:57 +02:00
Caolán McNamara d1e02f58a2 ofz#53151 Abrt
Change-Id: I2ccc6cbee28da9f91698b470449fb76b7729f634
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142475
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-09 11:20:04 +01:00
Armin Le Grand (allotropia) 444bf8710d Update handling of AntiAliasing settings and processor2d
Currently SvtOptionsDrawinglayer::IsAntiAliasing() is used
in the constructor of the VCL based processor2Ds to decide
if AA is to be used or not. Using this inside the
constructors makes it currently impossible to use a
primitive renderer independent from these settings,
except when changing these settings temporarily what
may influence other renderings and is a hack.

The setting SvtOptionsDrawinglayer::IsAntiAliasing() is
intended to decide if LO shall use AA mode from user's
perspective, this means for the EditViews of the Apps
and some other occasions (previews, exports, conversions
to bitmap, ...).

This works currently since all visualizations for these
purposes use newly constructed primitive renderers. But
there is no way to use primitive renderers independent
from that setting. For future renderers which might be
used for other purposes this is not sufficient, there
has to be a method to create a renderer using e.g. AA
independent of the global setting.

To allow that, move the deciding flag to the already
used geometry::ViewInformation2D. To not change anything
initially, use the global flag for now to init that
default value at ViewInformation2D.

I took the opportunity to adapt ViewInformation2D to
no longer being read-only and not changeable, it uses
internally an impl class based on cow_wrapper already
anyways. Extending this would lead to the constructors
getting even bigger, when usually only 1-3 values
need to be changed and many usages want to copy an
existing instance and modify it. Adapted that usages
to a much smaller footprint.

Up to this point this does not change anything, but
move the usage of the SvtOptionsDrawinglayer to the
defaults (constructors) of the involved class
ViewInformation2D. Using this then in the primitive
rederers should be safe and will allow to use a
primitive renderer with or without AntiAliasing
independent of the user setting, so also for non-
EditView usages.

Also already added the PixelSnapHairline setting, this
will also be needed independent of user settings to
have full freedom of usage.

Unfortunately I cannot use SvtOptionsDrawinglayer
methods
    ::IsAntiAliasing() or
    ::IsSnapHorVerLinesToDiscrete
inside ViewInformation2D where I would need it. It's
now in drawinglayercore and thus not linked against
svtools (svt) anymore.
Thus I have to do some forwarding mechanisms to get
the correct values available in ViewInformation2D.
Not nice, caused by creating drawinglayercore...

Change-Id: I9f572ce67e5d86a242188bdc6d4ba7c9a12f6a9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142393
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-11-08 11:16:30 +01:00
Tomaž Vajngerl 7bd62c00c5 Separate core drawinglayer func. into drawinglayercore library
This separates the drawinglayer core functionallity into a
separate library, to keep a strict separation what is backend
dependent and what is not. More strict separation can be done
at a later date.

This will make it possible to push part of drawinglayer
(part of processor2d) directly into VCL.

Change-Id: Ibc26580067e50bf20d7cdd37fa0e44eb10200878
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127286
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-22 12:10:10 +01:00