Kaydet (Commit) be1750d8 authored tarafından Khaled Hosny's avatar Khaled Hosny

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/30389Reviewed-by: 's avatarKhaled Hosny <khaledhosny@eglug.org>
Tested-by: 's avatarKhaled Hosny <khaledhosny@eglug.org>
üst 0a4e0dff
......@@ -3,6 +3,4 @@
#define ENABLE_GRAPHITE 0
#define ENABLE_GRAPHITE_DWRITE 1
#endif
......@@ -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: */
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment