diff options
author | Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de> | 2024-10-29 15:57:06 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2024-10-31 12:25:26 +0100 |
commit | 9ea9cd14ffc69e6597996da09943e1ce11a50d6f (patch) | |
tree | c928fcc5abf9914e8a14c19a6f8479f93c804a81 /vcl/inc/salgdi.hxx | |
parent | 298feac9c4d4204bdb6680f3bdd4ab97b2a6dad8 (diff) |
tdf#163457 CairoSDPR: Need to apply 'damage' to gtk
If a CairoSDPR does directly render to a Window the changes
do not get reliably visualized due to the Cairo backend
and gtk/QT usage being dependent of being told what
'damage' is done to refresh the window accordingly.
The VCLCairoBackend is doing that, but without reach
from the outside.
Note that this is a rare case, in fact the 1st one discovered
where a CairoSDPR is painting to a Window directly, see
comments in the task. Even this occasion should not do
that - showing the Comments in Calc on the Overlay would
be major to just painting to the Window roughly.
There are other possible workarounds (also see comments in
the task), but just adding to be able to set the needed
'damage' in case target is a Window is simplest and
potentially the fastest way to do this.
Since usage of CairoSDPR is bound to use GetSystemGfxData
anyways it is okay to react there and call a method
ApplyFullDamage that exists on Graphics when the flag
USE_HEADLESS_CODE is active. That forwards to the
CairoCommon being responsible for that Window and does
the minimal necessary to apply 'damage' to the full
Window.
This is done when constructing the CairoSDPR, thus
from the timing that incarnation can then paint anything
and it seems that at the next occasion something can
handle the callback from gtk all is painted. If that
should change it may get necessary to separate
the usage of ApplyFullDamage from GetSystemGfxData,
but works as intended for now.
Change-Id: I5442f3413e43418954da29a18d66dea27e25e655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175794
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'vcl/inc/salgdi.hxx')
-rw-r--r-- | vcl/inc/salgdi.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index 5a8a932ca559..5c4356e5bf62 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -22,6 +22,7 @@ #include <sal/config.h> #include <vcl/outdev.hxx> +#include <config_vclplug.h> #include "font/FontMetricData.hxx" #include "salgdiimpl.hxx" @@ -393,6 +394,9 @@ public: SAL_DLLPRIVATE virtual OUString getRenderBackendName() const; virtual SystemGraphicsData GetGraphicsData() const = 0; +#if USE_HEADLESS_CODE + virtual void ApplyFullDamage() const {} +#endif // Backends like the svp/gtk ones use cairo and hidpi scale at the surface // but bitmaps aren't hidpi, so if this returns true for the case that the |