Age | Commit message (Collapse) | Author |
|
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
|
|
Change-Id: I7dd21f30daa27e5de2848eb16aee9a610dd629d5
Reviewed-on: https://gerrit.libreoffice.org/19271
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
the mpStr and mnLength arguments are always created from an OUString
and the OUString aRun(rArgs.mpStr); creates a duplicate of the original
string. Its way faster to pass the original OUString around instead.
Change-Id: I3de0cc31654eb215362548b6aee435f9c0c3c9db
Reviewed-on: https://gerrit.libreoffice.org/19221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I0cb515a8b394c5e4b43fe84282383872c0680f15
Reviewed-on: https://gerrit.libreoffice.org/19216
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Ic3f7fddcea36c18ffe43c4c633d415f596a58cbc
Reviewed-on: https://gerrit.libreoffice.org/19094
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: Ib404310761fd555b033ab6594ba8636d37f23463
Reviewed-on: https://gerrit.libreoffice.org/19074
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I212bb442bdffa38d77e7e7357199c39420fa7951
|
|
Support for enabling and disabling hide-whitespace
by clicking between page frames.
Disabled header and footer decorators when
hide-whitepsace is enabled, and page size
is trimmed to the contents of each page.
Experimental/suggestive mouse pointers added
but only tested on Windows.
Change-Id: Ia2faeeda9e3e783ffaf5340aa69303a4218892a7
Reviewed-on: https://gerrit.libreoffice.org/18156
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I4525b43fa823d743b86bf4136c56af35274085e6
Reviewed-on: https://gerrit.libreoffice.org/18995
Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
|
|
Change-Id: I73135440321c7c9898f758cb7a921d62f2265bcb
|
|
... claims https://en.wikipedia.org/wiki/Uniscribe - #ifdef this so it
can be removed when dropping XP support.
Change-Id: I9a51635cf9bb4876faf6dca011e6da9e1c2dc35d
|
|
Change-Id: I0caab3b69b10aba6a5d45a11f8e9724b4d3c6d83
|
|
Change-Id: I4017e5404c99d37b36988f1d7a8ce17e42010070
Reviewed-on: https://gerrit.libreoffice.org/18913
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
and check it on untrusted data
Change-Id: I7c97a27d70f91b9686adf9dcb8b68c5aa25c2b4c
Reviewed-on: https://gerrit.libreoffice.org/18637
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Unfortunately, since we can have 2x SalGraphics' on a OutputDevice,
and one of these can be a printer - things got very confused around
which context to glFlush. This de-tangles the various reference-counts.
Change-Id: I1062be0b02a91fc9009deaa3ec29c5dbb227df20
Reviewed-on: https://gerrit.libreoffice.org/18604
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I6b9fb899777d8e460999ac3ff038a1302e434bb5
Reviewed-on: https://gerrit.libreoffice.org/18605
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
|
|
We need to ensure that we use an initialized context, and that
(when we re-parent) we DeInit and so reset the previous OpenGLContext.
Make UseContext more paranoid as well for good measure.
Change-Id: Ia45334222045e5d2f48da47560fab8511223a9a5
Reviewed-on: https://gerrit.libreoffice.org/18601
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I09db7262c2a6180a078620ba086dd7a4c132bd82
Reviewed-on: https://gerrit.libreoffice.org/18459
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Reviewed-by: Martin Hosken <martin_hosken@sil.org>
|
|
There were two problems here:
1) The OpenGLContext ctor registered the instance on the list of
contexts, but platform-specific call (e.g. wglMakeCurrent()) was only
made later. Add a registerAsCurrent() member function that helps
ensuring that the last item in the context list is indeed the current
context.
2) OpenGLContext::prepareForYield() is called without the solar mutex
being locked, but it still assumes that the last context in the context
list is the thread's current context, which may not be true. The result
is that during JunitTest_sd_unoapi, we end up in a situation like:
debug:4640:5240: OpenGLContext::registerAsCurrent: wglGetCurrentContext() is 00010001, pSVData->maGDIData.mpLastContext is 00FA65F8
debug:4640:7944: OpenGLContext::registerAsCurrent: wglGetCurrentContext() is 000D0003, pSVData->maGDIData.mpLastContext is 00FA6C70
debug:4640:5240: OpenGLContext::prepareForYield: start, wglGetCurrentContext() is 00010001, pSVData->maGDIData.mpLastContext is 00FA6C70
I.e. one thread registers as current, an other registers as current, too (while
the other thread has the solar mutex), then once the original thread wants to
release the solar mutex, the real current context and the last item in the
context list won't match, so the assert at the end of prepareForYield() will
fail.
Fix this by releasing the GL context in WinSalInstance::DestroyFrame().
With this, JunitTest_sd_unoapi passes on Windows with GL enabled.
Change-Id: Icfb9c65c871586b5df69b5a2ab3aa91843dfc799
Reviewed-on: https://gerrit.libreoffice.org/18473
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I4a7199633d0d940ae009ac144989da7d6c9262ec
Reviewed-on: https://gerrit.libreoffice.org/18378
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Cached glyphs used to have a 2px border in all font sizes, that's too
small for larger fonts. Make the border size depend on the font size for
larger fonts to make sure that the rendered glyphs are indeed
independent. The introduced GLYPH_SPACE_RATIO = 8 constant is the
smallest value where I don't see overflows anymore for large fonts.
With this, not even the bugdoc renders correctly when presenting, but
also the text is OK when the font size is set to the max allowed by the
UI (96pt).
Change-Id: I52aa5c4444583fc0467291463697a63f2b8fc86c
|
|
These source files relied on pch to include
these missing headers (at least on Windows).
Also included the script used to find the
missing includes. The script is self-contained
and includes unittests. It detects superfluous
includes and required includes (which was used
to restore the includes in this patch).
Change-Id: I7ee09e5c712f42d5f6c3524898bc62dda78f5cc0
Reviewed-on: https://gerrit.libreoffice.org/18208
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Fixes regression from otherwise a nice cleanup in:
d20092259c7ea63885a539f911788715f8147ee9
Also get polarity of debug logging only with a context right.
Change-Id: Id322471f01e5656e758aefc57b0d4d5ad073ec54
|
|
The problem was UniscribeLayout::DrawCachedGlyphs() counted the total
advance value unconditionally from mpGlyphAdvances, while
UniscribeLayout::FillDXArray() (which provides advance values to e.g.
Writer) only used mpGlyphAdvances in case of NULL mpJustifications. Fix
this by first checking mpJustifications in
UniscribeLayout::DrawCachedGlyphs(), too.
With this, e.g. typing "x" in Writer 10 times will not result in a
"misplaced" cursor caret.
Change-Id: I16c7a258ff77b25c5121b9b974e72ad6efe5e9fc
|
|
For one, aPos.Y() is meant to be the baseline position of the text.
Based on the MSDN documentation and
<https://www-user.tu-chemnitz.de/~ygu/petzold/ch05c.htm>, that means if
we want to get top position, we have to only extract tmAscent and not
tmInternalLeading.
For another, ImplWinFontEntry::AddChunkOfGlyphs() adds a border of 2
pixels both horizontally and vertically, which means that then we need
to undo that when counting the vertical position, too.
Change-Id: I4ac8e881ea5910662674c2a1b53ece943487ccd9
|
|
Change-Id: I21726d0dd052fdc87e8dd36ff7122518325f6313
|
|
Should do similarly for vertical text, too.
Change-Id: I51f5ee3ba1686f151b04f98c43388e0bdfac97fb
|
|
Follow-up to 34700400247e378e074ce4164ab2809edb092201; this fixes sw_ww8export
unit test on Windows.
Change-Id: Ic0c3228efb59a182e1562b73117418cd8b5e6017
|
|
SAL_DETAIL_ENABLE_LOG_INFO is always defined, as "true" or "false". It
is SAL_LOG_INFO that is defined or not, and can be used to avoid
unnecessary non-trivial code that the compiler might not be able to
optimise away.
Change-Id: I9903faab64b39fee86bff3b085cdce3614b0d921
|
|
Change-Id: I1491ea35af3b8237a9b8f6357e6452b323139e99
|
|
Can't call a function that as a side effect prints to std::cerr in
SAL_INFO. It will be called even if the log area doesn't match
$SAL_LOG. Just use only SAL_INFO and no plain std::cerr output. It's
fine to output a string with embedded newlines in SAL_INFO.
Also drop the debug output line with the glyph start positions, it was
less than useful.
Change-Id: I9fb5ed068aae1b835e20cf1ec1097bcd55deb05d
|
|
Since commit 65a66d41fd0e13d0aad9df935091b731b4af650a the
sd_exports_test crashes on Windows in UniscribeLayout because
it uses a ImplFontEntry that has been removed from the font cache.
Tweak the refcount in WinLayout so it will be valid.
Change-Id: Ic4bf984ea9fd70de9fa95ca964ae12d95d47d5bf
|
|
Change-Id: I67d2430aec782efa7916856584028f469d39355c
|
|
Change-Id: I918a47da16a539f981baa9a8c1e5a7a5cf642cf4
|
|
It says there's access to uninitialized variable on that line,
so propbably the loop is running over.
Change-Id: I0226f82b20a6fbbc79af5bbb46af09830c3bc25a
|
|
This reverts commit e16e64dd862c8f386f80de43ad68e831e169d49d.
I somehow forgot that glFlush is context specific, (gl always gets
me that way).
|
|
Change-Id: I45cb0e62278d8c3154ae8ad54ca4c93b3e177969
Reviewed-on: https://gerrit.libreoffice.org/18030
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Can now be turned off with a SAL_DISABLE_GLYPH_CACHING environment variable.
Change-Id: I7ac14d72dc0f85c0682d92492eb96bec1d207609
|
|
That is a too complex and rare case to bother with, I think.
Change-Id: Ica6ef7fa05314d2367dcff32627c1aec6ba8f8df
|
|
Change-Id: I7b06d0ffe53c6ebf2b479951321dcb37cb22c355
|
|
Change-Id: I46e5463aaa5cab41cd69c13314ee98a0c73e7ba2
|
|
Change-Id: I6b19873eef48b625dc3d4f7b3a9afdb348189b38
|
|
The text alignment of DCs is set to TA_BASELINE in
WinSalGraphics::InitGraphics(). In the ScriptTextOut-using old code
path this affects where glyphs are put, so we need to take it into
consideration also in the new code path that uses cached glyph
textures. Adjusting the position up by the ascent plus internal
leading of the font seems to work at least for horizontal scripts.
(We used to bluntly adjust the position up by the height of the glyph
cache texture, which was too much. The glyphs got positioned too high
and the top of tall ones was clipped.)
Change-Id: I86aecd6f3016e14b2f0328555ddfd3129e394c4c
|
|
Change-Id: Id023b43e901b0e41ebf3b208c6e80fd023bf7f9a
|
|
Show the whole height of the cache bitmap after all (when SAL_LOG
contains vcl.gdi.opengl). The interesting pieces are often at the
bottom, like the tip of the hook of the "j" glyphs that used to bleed
over into the preceding glyphs, usually "i", when they were rendered
into the same chunk.
Add more space between glyphs and at top and bottom of the bitmap, for
anti-aliasing. The glyph ABC widths don't take expansions caused by
anti-aliasing into consideration and are misleading. Hopefully
anti-aliasing can expand the (partially) painted pixels of a glyph
just one column/row in each direction, but for safety use a two-pixel
border. (Defensive programming, eek?)
Some getWidth() instead of GetWidth() etc craziness. Using
<tools/gen.hxx> types truly is programming-by-coincidence as Thorsten
says.
In a dbgutil build, setting the environment variable
VCL_GLYPH_CACHING_HACK_NO_ANTIALIAS causes the code to turn off
anti-aliasing for the fonts used. I used this to verify that it indeed
was anti-aliasing that made the ABC widths inconsistent with
reality. Not sure if it makes sense to keep this code in?
Anyway, now I don't see any leaked pixels in "i" glyphs any more,
touch wood.
Change-Id: If527343ff1dcdb1fa208cd5e7fa4d08f812d0d7b
|
|
Change-Id: I29cb771eb059f560b7cbd449257ffda581b40f11
|
|
Change-Id: I934ad7453f35909f4c3ad999e33453b5b6032480
|
|
Now text looks better, for instance the lower-case "t" glyphs on the
Start Centre aren't totally weird any more. But for instance the tip
of the hook of "j" leaks into the "i" texture. I guess I really would
need to render glyphs one by one.
Change-Id: I69ae2d2f7c559530bcfdfc1a4915503fcb3ab4af
|
|
Change-Id: I0bbea4ef62c8e94d8b8f1bfb440712da5839e532
|
|
Shows text roughly correctly, but many problems. Conditional at
run-time on the SAL_ENABLE_GLYPH_CACHING environment variable in
addition to SAL_FORCEGL.
One obvious thing that needs fixing is making sure that the glyphs are
rendered into the texture without overlap. Compensating negative
values in the ABC::abcA and ABC::abdC width is not enough.
Also, the cache should be changed to actually have "cache"
functionality, i.e. entries should expire based on some criterion.
Change-Id: I66a37d3354a09011a654f15a7d2bd8efaa14ad1e
|