[Libreoffice-commits] core.git: config_host/config_graphite.h.in vcl/inc vcl/win

Khaled Hosny khaledhosny at eglug.org
Sun Oct 30 01:53:57 UTC 2016


 config_host/config_graphite.h.in |    2 --
 vcl/inc/win/winlayout.hxx        |   10 ++--------
 vcl/win/gdi/winlayout.cxx        |   11 -----------
 3 files changed, 2 insertions(+), 21 deletions(-)

New commits:
commit be1750d866dab7712ede4cbbba771b088d862d05
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Sun Oct 30 02:09:49 2016 +0100

    ENABLE_GRAPHITE_DWRITE is always set to 1
    
    We don’t have a configure option to turn it off and I don’t think anyone
    tries building without it. Furthermore, we use the code guarded by this
    even without Graphite.
    
    Change-Id: I0fb434af58a51370a66b5ad7eb89b145e4c015de
    Reviewed-on: https://gerrit.libreoffice.org/30389
    Reviewed-by: Khaled Hosny <khaledhosny at eglug.org>
    Tested-by: Khaled Hosny <khaledhosny at eglug.org>

diff --git a/config_host/config_graphite.h.in b/config_host/config_graphite.h.in
index 953c006..46e624d 100644
--- a/config_host/config_graphite.h.in
+++ b/config_host/config_graphite.h.in
@@ -3,6 +3,4 @@
 
 #define ENABLE_GRAPHITE 0
 
-#define ENABLE_GRAPHITE_DWRITE 1
-
 #endif
diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx
index b137a4b..04fc135 100755
--- a/vcl/inc/win/winlayout.hxx
+++ b/vcl/inc/win/winlayout.hxx
@@ -27,6 +27,8 @@
 #include <win/salgdi.h>
 
 #include <usp10.h>
+#include <d2d1.h>
+#include <dwrite.h>
 
 #include "opengl/PackedTextureAtlas.hxx"
 
@@ -38,10 +40,6 @@ typedef std::unordered_map<int,int> IntMap;
 #include <graphite_layout.hxx>
 #include <i18nlangtag/languagetag.hxx>
 #include <graphite_features.hxx>
-#if ENABLE_GRAPHITE_DWRITE
-#include <d2d1.h>
-#include <dwrite.h>
-#endif
 #endif
 
 // This needs to come after any includes for d2d1.h, otherwise we get lots of errors
@@ -448,8 +446,6 @@ public:
         Point* pPos, int* pGetNextGlypInfo) override;
 };
 
-#if ENABLE_GRAPHITE_DWRITE
-
 class D2DWriteTextOutRenderer : public TextOutRenderer
 {
     typedef HRESULT(WINAPI *pD2D1CreateFactory_t)(D2D1_FACTORY_TYPE,
@@ -518,6 +514,4 @@ private:
     HDC               mhDC;
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 83db103..658641e 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -54,8 +54,6 @@
 std::unique_ptr<GlobalGlyphCache> GlyphCache::gGlobalGlyphCache(new GlobalGlyphCache);
 GLuint WinFontInstance::mnGLyphyProgram = 0;
 
-#if ENABLE_GRAPHITE_DWRITE
-
 inline void WinFontInstance::CacheGlyphWidth( int nCharCode, int nCharWidth )
 {
     maWidthMap[ nCharCode ] = nCharWidth;
@@ -3375,17 +3373,12 @@ void D2DWriteTextOutRenderer::CleanupModules()
     D2D1MakeRotateMatrix = nullptr;
     DWriteCreateFactory = nullptr;
 }
-#endif // ENABLE_GRAPHITE_DWRITE
 
 TextOutRenderer & TextOutRenderer::get()
 {
-#if ENABLE_GRAPHITE_DWRITE
     static std::unique_ptr<TextOutRenderer> _impl(D2DWriteTextOutRenderer::InitModules()
         ? static_cast<TextOutRenderer*>(new D2DWriteTextOutRenderer())
         : static_cast<TextOutRenderer*>(new ExTextOutRenderer()));
-#else // ENABLE_GRAPHITE_DWRITE
-    static std::unique_ptr<TextOutRenderer> _impl(static_cast<TextOutRenderer*>(new ExTextOutRenderer()));
-#endif // ENABLE_GRAPHITE_DWRITE
 
     return *_impl;
 }
@@ -3412,8 +3405,6 @@ bool ExTextOutRenderer::operator ()(SalLayout const &rLayout, HDC hDC,
     return (pRectToErase && nGlyphs >= 1);
 }
 
-#if ENABLE_GRAPHITE_DWRITE
-
 D2DWriteTextOutRenderer::D2DWriteTextOutRenderer()
     : mpD2DFactory(nullptr),
     mpDWriteFactory(nullptr),
@@ -3717,8 +3708,6 @@ bool D2DWriteTextOutRenderer::GetDWriteInkBox(IDWriteFontFace & rFontFace, SalLa
     return true;
 }
 
-#endif // ENABLE_GRAPHITE_DWRITE
-
 float gr_fontAdvance(const void* appFontHandle, gr_uint16 glyphId)
 {
     HDC hDC = static_cast<HDC>(const_cast<void*>(appFontHandle));


More information about the Libreoffice-commits mailing list