Age | Commit message (Collapse) | Author |
|
We don't need the '#define SvpSalGraphics AquaSalGraphics' in
vcl/inc/headless/svpgdi.hxx. The actual AquaSalGraphics we use for iOS
is in vcl/inc/quartz/salgdi.h. I don't remember the details of the
convoluted history behind this.
Change-Id: Ie56c3c93acf7ad89e10a05e75aa4ca7fd596ba98
Reviewed-on: https://gerrit.libreoffice.org/63098
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Change-Id: I38abc73116720b99364c3de9fa4378c730385dc2
Reviewed-on: https://gerrit.libreoffice.org/63104
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
|
|
It was used to initialise a virtual device pixel buffer to an
"interesting" pattern, in case actual rendering to it failed. But it
hasn't been needed in a while. And similar code can always be added
temporarily if needed, no need to keep permanently, even in #ifdef
DBG_UTIL.
Change-Id: I650afcb811b903ce3d6d50b9f1eb38c83be68df5
Reviewed-on: https://gerrit.libreoffice.org/62962
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
...macOS 10.9 reportedly doesn't yet support the 'CGContext' replacement, see
the comments to <https://gerrit.libreoffice.org/#/c/61353/>
"loplugin:redundantcast".
This reverts c3c88d6bbe4109fcf1a6d53e947faec775c96e42 "loplugin:redundantcast"
(whose commit message was rather misleading; the redundantcast warnings were
merely a follow-up to the commit's actual meat, of replacing deprecated uses of
'graphicsPort' with 'CGContext'; I had failed to realize that when I chunked the
various changes necessary for 10.14 into several individual commits) and adds
SAL_WNODEPRECATED_DECLARATIONS_PUSH/POP instead.
Change-Id: I778d7c3a29c780beff561fbbcc38df9e1494114c
Reviewed-on: https://gerrit.libreoffice.org/62815
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
As we already rely on the GlyphItem's font instance, consequently
this removes the SalGraphics GlyphItem based functions. Also
unifies the glyph bound rect cache handling.
An interesting aspect is the rotated glyph bounding box handling
moved from CairoTextRender to FreetypeFont. It doesn't look like
an implementation detail for Cairo, so it may have been a bug.
Change-Id: I81bbb5d8ee98fb77a1eee05568c456f9e4553023
Reviewed-on: https://gerrit.libreoffice.org/62503
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Change-Id: I1d00e975eaf85b5233755abefb952ca1eeacbb4e
Reviewed-on: https://gerrit.libreoffice.org/62630
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I3b89cb6c24c263a1a8ea4e249ab24256a7d6f3f7
|
|
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>
|
|
Change-Id: I416523b701f6468bcbbc47e9e4e507c319b6beaa
|
|
A LogicalFontInstance has a pointer to its parent font face.
And don't pretend we can actually nest MultiSalLayout, so
store the GenericSalLayout internally.
Change-Id: I801acbc34497fc57e8e185eee34c1a1162dbea93
Reviewed-on: https://gerrit.libreoffice.org/62314
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Change-Id: I5fb1c6ba516e2853b1826e20c6c21cccc1fe98fa
Reviewed-on: https://gerrit.libreoffice.org/62074
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Use range-based loop or replace with STL functions.
Change-Id: Ide2f89194238ae6a1f21e8132e2297710d9e6dcd
Reviewed-on: https://gerrit.libreoffice.org/61756
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I98f17311822ba50b0c8eaa50fbdef088c76168d4
Reviewed-on: https://gerrit.libreoffice.org/61730
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
These are all the cases where the warning suggests a direct replacement.
This is a companion to 2f2c9df8e270ede0fd71b146380c3883b75d8f0d
"-Werror,-Wdeprecated-declarations (--with-macosx-version-min-required=10.14)"
which covered all the other cases (via SAL_WNODEPRECATED_PUSH/POP) that offered
no direct replacement.
Change-Id: If22a3f8cec1ff22fd1ac4b9d2f2bffde50e11e86
Reviewed-on: https://gerrit.libreoffice.org/61633
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
It was used to initialize a virtual device pixel buffer to an
"interesting" pattern, in case actual rendering to it failed.
Change-Id: Iacdd86382dfa8c9ed1ea9d213fa489515b2b217d
|
|
Not really that useful any longer.
Change-Id: Idf29b9c3eeafd1b1cc7a2baa87205f7064681a23
|
|
When running on macOS 10.14, both master and libreoffice-6-1 (at least) started
to fail CppunitTest_vcl_bitmap_render_test with
> /Users/stephan/Software/lo2/core/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx:90: Assertion
> Test name: BitmapRenderTest::testTdf113918
> equality assertion failed
> - Expected: mcBlueOrIndex: 255, mcGreen: 255, mcRed: 255, mcAlpha: 0
> - Actual : mcBlueOrIndex: 1, mcGreen: 112, mcRed: 15, mcAlpha: 0
in --enable-debug/--enable-dbgutil builds.
I tracked that down to the OSL_DEBUG_LEVEL>0--only call to
Scheduler::ProcessEventsToIdle in test::BootstrapFixture::setUp
(test/source/bootstrapfixture.cxx). If that call is also included in non-debug
(i.e., OSL_DEBUG_LEVEL=0) builds, or if it is removed from all builds and
instead an unsuspecting
[NSApp nextEventMatchingMask: 0 untilDate: nil inMode: NSDefaultRunLoopMode dequeue: NO];
is added directly before the call to
pVDev->SetOutputSizePixel(Size(2480, 3508));
at the start of BitmapRenderTest::testTdf113918
(vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx:76), the test always fails.
What happens is that, after such a nextEventMatchingMask call done, the call to
NSGraphicsContext graphicsContextWithWindow in AquaSalVirtualDevice::SetSize (as
called from the SetOutputSizePixel call in the test) returns nil, for unclear
reasons.
Until those underlying reasons are understood, change the code of SetSize to
"fall back to a bitmap context" also in case the graphicsContextWithWindow call
returned nil.
Change-Id: I604ebd2c444b58610e4ed73ec70af87b0a08e864
Reviewed-on: https://gerrit.libreoffice.org/61519
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ia9bf718f1158c68971511688fe5af3e335d841ba
Reviewed-on: https://gerrit.libreoffice.org/61386
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Change-Id: I3928c6e9240ad28a65aeb4fecb07268f789faf67
|
|
Also add an assertion and some verbose debug output (in #if 0).
Change-Id: If4907a682ee7359d71078f72ca2f483c80fc4a58
|
|
"static_cast from 'CGContextRef' (aka 'CGContext *') prvalue to 'CGContextRef'
(aka 'CGContext *') prvalue is redundant" with
--with-macosx-version-min-required=10.14 at least. (Not exactly sure why this
warning only starts to appear now. Presumably something changed in the system
headers. Lets see whether older baseline builds are happy with the dropped
casts, too.)
Change-Id: Id52d1891e5e33f7c37d095440339980b4000ca4e
Reviewed-on: https://gerrit.libreoffice.org/61353
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I9670407cd9e848d208f844f6d0879a5a19b86f4c
|
|
Change-Id: I3e72909ca1aa9f97721d982f16624f496152ae2d
|
|
To get that with CoreGraphics on iOS we need to use also
kCGImageByteOrder32Little in the CGBitmapContextCreate() call,
otherwise the bytes will be in ARGB order in memory.
(Not touching the macOS code here.)
Change-Id: I3c2dd94feb1c6bf46c5b335f5901b29e5fe1e7fb
|
|
Change-Id: If116578f68438550bddab5d2257b9af4ec8a69b0
Reviewed-on: https://gerrit.libreoffice.org/60705
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7fbebf3730aa79209a3ad954522ad8695e5d8c24
Reviewed-on: https://gerrit.libreoffice.org/60704
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and only return the advance, we don't use the other field
Change-Id: I956033dac97763caea2b27404fe9f099da809899
Reviewed-on: https://gerrit.libreoffice.org/60703
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: If229508c3d6cb57b0a52a1f0d9ecd3b82d9f1760
Reviewed-on: https://gerrit.libreoffice.org/60699
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ib06572a844d2999e9ecd91e26abd98ecec06a0ae
Reviewed-on: https://gerrit.libreoffice.org/60665
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
In this step I have changed all calls that use a
B2DPolyPolygon and do filled graphics, added support for
providing needed transformation which will -if supported-
be used. Added buffering of SystemDependentData at
B2DPolyPolygon for that purpose, see comments describing
the current possibilities in the Gdiplus implementation.
Moved lifetime creation/cleanup of SystemDependentDataManager
to ImplSVData due to cleanup problems in the clang build
Tried to use a std::unique_ptr to hold the instance
of a SystemDependentDataBuffer at ImplSVData and cleanup
inside DeInitVCL() right before ::ImplDeInitScheduler. This
works in principle, but scheduler shutdown triggers
ProcessEventsToIdle which leads to repaints and re-creates
the buffer. Will now do exactly as was done with GdiPlusBuffer
before, a simple local static incarnation and a call to
SetStatic() in constructor
Splitted SystemDependentDataBuffer and Timer due to
different LifeTimes. Timer needs to be destructed
earlier than SystemDependentDataBuffer, before
Scheduler::ImplDeInitScheduler() is called from
DeInitVCL()
Change-Id: I2134e4346a183a4cee1be3428c51541cc8867c11
Reviewed-on: https://gerrit.libreoffice.org/60102
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
|
|
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>
|
|
where used directly, since rtl_allocateMemory now just calls into std::malloc
Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad
Reviewed-on: https://gerrit.libreoffice.org/59685
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I2c018e2e61707c0d89178b0cb38a0918906e23cb
Reviewed-on: https://gerrit.libreoffice.org/59390
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
instead of a FontSelectPattern with an associated LogicalFontInstance
use a LogicalFontInstance with owned FontSelectPatternAttributes
Change-Id: I939f84731fcb8db5ff6484dcfbd2f9199bb50d23
Reviewed-on: https://gerrit.libreoffice.org/59388
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
it remains to be seen if we need the the returned mpFontInstance
of the coretext impl
Change-Id: I48f73188250c3eb014f16ffe0a735191da5cb25b
Reviewed-on: https://gerrit.libreoffice.org/59322
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I66fb1ff4b2fdcc211e0a9d5831f6dcc5e564e789
Reviewed-on: https://gerrit.libreoffice.org/59372
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I5112b1e6db223a3df83b6769af140b3f698fdebd
Reviewed-on: https://gerrit.libreoffice.org/59384
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ife2d609403c753b917f29fa00bc5f5f1a520503d
Reviewed-on: https://gerrit.libreoffice.org/59238
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I36ffe5952e4ca930ed51fa547611ce4c7a51e1d7
Reviewed-on: https://gerrit.libreoffice.org/59237
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes.
This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directory vcl
Change-Id: I205fe0f4e80a66cd9c3b19f7e9716411da1d1cf5
Reviewed-on: https://gerrit.libreoffice.org/58221
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I93a135afc1402d9095828c4d41d669471a37f565
Reviewed-on: https://gerrit.libreoffice.org/56661
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
|
|
To fix regression the sal_uInt16 was used instead of sal_uInt8.
Verified on macOS High Sierra 10.13.5.
I also checked if with this fix, there is no issue with displaying EMF (tdf#113197)
Sample document from tdf#113197 is displaying correctly.
Change-Id: I6504717d831a193b0a878ced2f335d34a993aed6
Reviewed-on: https://gerrit.libreoffice.org/56578
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
Change-Id: I017c100f83faac64ad3a8430010c226b438e6a07
Reviewed-on: https://gerrit.libreoffice.org/56529
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
since we hold it like that in Bitmap anyway
Change-Id: I6264dfaaae6210cb008df5db8a421fc80c508f5b
Reviewed-on: https://gerrit.libreoffice.org/55458
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
since we are now holding these via reference counting, no need to clone
them
Change-Id: I7b0bd86f4a5bca428f7dcd989f838a9aa0c7e179
Reviewed-on: https://gerrit.libreoffice.org/55427
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
instead of manual reference counting.
Also the releasing of not-currently-in-use LogicalFontInstance objects
from the cache is made less aggressive - we now only flush entries until
we have less than CACHE_SIZE instances, instead of flushing the whole
cache.
Change-Id: Ib235b132776b5f09ae8ae93a933c2eebe5fa9610
Reviewed-on: https://gerrit.libreoffice.org/55384
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8f66b5afb066fe83abb83c56ebde6f21197f894b
Reviewed-on: https://gerrit.libreoffice.org/55333
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|