[Libreoffice-commits] core.git: Branch 'feature/fixes7' - vcl/win

Tor Lillqvist tml at collabora.com
Tue Aug 18 23:22:27 PDT 2015


 vcl/win/source/gdi/winlayout.cxx |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit e7542ae6b233a95999ad1b313054639819a3af66
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Aug 19 09:18:37 2015 +0300

    More hacking on cached glyph rendering for OpenGL on Windows
    
    Change-Id: I934ad7453f35909f4c3ad999e33453b5b6032480

diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 0ab9cd9..7f4c4a4 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -160,7 +160,10 @@ inline std::basic_ostream<charT, traits> & operator <<(
     stream << "{";
     for (auto i = rCache.cbegin(); i != rCache.cend(); ++i)
     {
-        stream << "[" << i->mnFirstGlyph << ".." << (i->mnFirstGlyph + i->mnGlyphCount - 1) << "]";
+        stream << "[" << i->mnFirstGlyph;
+        if (i->mnGlyphCount > 1)
+            stream << ".." << (i->mnFirstGlyph + i->mnGlyphCount - 1);
+        stream << "]";
         if (i+1 != rCache.cend())
         {
             stream << ",";
@@ -278,10 +281,16 @@ bool ImplWinFontEntry::AddChunkOfGlyphs(int nGlyphIndex, const WinLayout& rLayou
     int totWidth = 0;
     for (int i = 0; i < nCount; i++)
     {
-        aDX[i] = std::abs(aABC[i].abcA) + aABC[i].abcB + std::abs(aABC[i].abcC);
+        aDX[i] = aABC[i].abcB + std::abs(aABC[i].abcC);
+        if (i == 0)
+            aDX[0] += std::abs(aABC[0].abcA);
+        if (i < nCount-1)
+            aDX[i] += std::abs(aABC[i+1].abcA);
         totWidth += aDX[i];
     }
 
+    SAL_INFO("vcl.gdi.opengl", "aSize=(" << aSize.cx << "," << aSize.cy << ") totWidth=" << totWidth);
+
     if (SelectObject(hDC, hOrigFont) == NULL)
         SAL_WARN("vcl.gdi", "SelectObject failed: " << WindowsErrorString(GetLastError()));
     if (!DeleteDC(hDC))


More information about the Libreoffice-commits mailing list