[Libreoffice-commits] core.git: vcl/win

Noel Grandin noelgrandin at gmail.com
Mon May 8 06:32:55 UTC 2017


 vcl/win/gdi/winlayout.cxx |    6 ------
 1 file changed, 6 deletions(-)

New commits:
commit 43e997d2d9f5ca98bf765e1c956bf56f66935eb5
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sun May 7 19:37:28 2017 +0200

    hNonAliasedFont is unused
    
    ever since commit e45d80f20ff6a05888f92ae942abed67609d5b20
      Author: Tim Eves <tim_eves at sil.org>
      Date:   Tue Feb 23 16:45:21 2016 +0000
      "tdf#97171: Use DirectWrite for OpenGL glyph caching"
    
    Change-Id: Ib6675e89caa68a5ee725a36a0d5ded973cc98723
    Reviewed-on: https://gerrit.libreoffice.org/37348
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index feb5565be153..a510eba4d61a 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -141,8 +141,6 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, S
 
     OpenGLCompatibleDC aDC(rGraphics, 0, 0, nBitmapWidth, nBitmapHeight);
 
-    HFONT hNonAntialiasedFont = nullptr;
-
     SetTextColor(aDC.getCompatibleHDC(), RGB(0, 0, 0));
     SetBkColor(aDC.getCompatibleHDC(), RGB(255, 255, 255));
 
@@ -190,8 +188,6 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, S
     default:
         SAL_WARN("vcl.gdi", "DrawGlyphRun-EndDraw failed: " << WindowsErrorString(GetLastError()));
         SelectFont(aDC.getCompatibleHDC(), hOrigFont);
-        if (hNonAntialiasedFont != nullptr)
-            DeleteObject(hNonAntialiasedFont);
         return false;
     }
 
@@ -205,8 +201,6 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, S
     maGlyphCache.PutDrawElementInCache(aElement, nGlyphIndex);
 
     SelectFont(aDC.getCompatibleHDC(), hOrigFont);
-    if (hNonAntialiasedFont != nullptr)
-        DeleteObject(hNonAntialiasedFont);
 
     return true;
 }


More information about the Libreoffice-commits mailing list