diff options
author | Armin Le Grand (Collabora) <Armin.Le.Grand@me.com> | 2024-11-19 20:34:05 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2024-11-20 16:53:11 +0100 |
commit | c635271eb17e3b9d50223356dbc09b771fcd643f (patch) | |
tree | 1c54340158126447ff3bf9850393c050a26ae1d9 /sw/uiconfig/sweb/menubar | |
parent | 278a05e0b627cc7d8abb47facb9d1289b006bdf4 (diff) |
tdf#163428 CairoSDPR: Fix regression in freeing unified buffers
I had added BufferedData_ModifiedBitmapEx for CairoSDPR (but
not only) to allow Bitmaps modualted by BColorModifierStack
to be buffered in the standard way and at the original
Bitmap. This nicely can still hold the system-dependent form
of the Bitmap to be used at the Bitmap of that buffered
modified Bitmap.
This uses something I was not aware of: One Buffer implementation
may - as in this case - use another buffer. That may lead to the
second buffer being deleted/freed when the first one gets freed
- by timer or directly - what is wanted. This *needs* the methods
inside SystemDependentDataBuffer to do the actual potential
destruction of the Object outside the Mutex-Locked parts of
the code, else this might lead to a deadlock.
It is good to have found this, there may be other such
combinations in the future: That the implementation of a buffer
using that standard mechanism uses another class that may also be
buffered.
I have now made sure that buffered objects get deleted *outside*
the Mutex-Locked areas. This is better anyways, the destruction
does not need that lock - it is just needed so secure the
manipulation of the local unordered_map that organizes the
buffered elements globally.
Change-Id: Ie2f346a3f1a24105b89310ace3ff7a41472143c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176795
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Reviewed-by: Moritz Duge <moritz.duge@allotropia.de>
Diffstat (limited to 'sw/uiconfig/sweb/menubar')
0 files changed, 0 insertions, 0 deletions