Age | Commit message (Collapse) | Author |
|
after
commit adfd91d24678053b9a1475ad6985eb1fc548706a
Date: Mon May 10 20:17:11 2021 +0200
fix leak in SalLayoutGlyphs
Change-Id: I495106d9930ce6f2dad8e62fd89bc2970f747088
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115392
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
we forgot to delete the extra impls vector
Also make more use of std::unique_ptr
Change-Id: I2c745c0ad2b7ad62d368e9702bd2c32c734442fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115375
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This should reduce memory usage (libstdc++ vector is 3 int's and
allocates dynamically). The usual case should be no font fallback.
Change-Id: I2e7981c0962f4f417fd024e3c27f01bc2a71127e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112591
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Code that needs to lay out texts repeatedly can cache the result
of SalLayout::GetGlyphs() can reuse it. But GetGlyphs() returns
nullptr for MultiSalLayout, so caching for it doesn't work. Worse
still, it actually increases the number of layout calls, because
there's the initial layout for caching and then each call
will need to do the layout again because of the nullptr that's
not cached.
This commit changes SalLayoutGlyphs to possibly include multiple
SalLayoutGlyphsImpl objects, one for each SalLayout handled
by MultiSalLayout. Changes include making GenericSalLayout
work directly with the Impl class, which avoids an indirection
and simplifies code.
Change-Id: Ic4b19934a8a06d4955b51527fe3777c5e91107b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112590
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Ice2eb8c5994bf2ccb88972332ca4a1d3ed41752a
Reviewed-on: https://gerrit.libreoffice.org/63826
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
This sets the FreetypeFont pointer of the FreetypeFontInstances
to nullptr when clearing the cache.
And it changes the interface functions of SalLayoutGlyphs to some
variant different from std::vector.
I don't know if we should prefer the mutable or the const font
instance. With mutable at least one can invalidate the font
instance when checking the IsValid(), so we can get rid of our
referenced font instance.
Change-Id: I6070cfcb3c549dbad3383bd4ec2b05b30645b753
Reviewed-on: https://gerrit.libreoffice.org/62688
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Nobody outside of VCL should deal with GlyphItems.
Change-Id: Id84b0f320bc49f790658f23efe129b92262c2aea
Reviewed-on: https://gerrit.libreoffice.org/62446
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
The FreetypeFont might already have released the font instance of
the glyph, but the glyphs font instance must still be valid, so
use this instead to cache glyph bound rect.
For whatever reason the Windows compiler doesn't accept inline
functions in the GlyphItem struct and wants to export them in
the DLL, even when declared VCL_DLLPRIVATE, so this just uses
static inlines as a workaround.
Change-Id: I4539d91a846a54a05f9648638494e1e99f704b0a
Reviewed-on: https://gerrit.libreoffice.org/62425
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
No need for a real reference, as GlyphItems are bound to their
GenericSalLayout, which holds the valid reference and doesn't
allow font change.
Change-Id: I8e1129ef99f576e43d55f39aee040ceeb635d51d
Reviewed-on: https://gerrit.libreoffice.org/62359
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Actually GlyphItem should be VCL internal, but this requires a
transparent SalLayoutGlyphs (i.e. via pImpl), which I'm too lazy
to implement currently.
This seperation makes the affected source files more obvious and
later migration of vcl/glyphitem.hxx easier.
While at it apply the coding style and add '_' to member prefix.
Change-Id: I61497af5c628c40f51597ce0ef286c47321acbc2
Reviewed-on: https://gerrit.libreoffice.org/62358
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|