From 3699fb8deda2ee6fdaf3887f5bf0edaa10415ddb Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Wed, 8 Nov 2017 16:40:20 -0500 Subject: [PATCH] Bug 1415609 - ensure the GPU process initializes the FreeType library. r=jrmuizel MozReview-Commit-ID: 50a6TBdKnVg --- gfx/ipc/GPUParent.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gfx/ipc/GPUParent.cpp b/gfx/ipc/GPUParent.cpp index 0eea2147effe..ba12e7933560 100644 --- a/gfx/ipc/GPUParent.cpp +++ b/gfx/ipc/GPUParent.cpp @@ -213,6 +213,15 @@ GPUParent::RecvInit(nsTArray&& prefs, } else { gtk_init(nullptr, nullptr); } + + // Ensure we have an FT library for font instantiation. + // This would normally be set by gfxPlatform::Init(). + // Since we bypass that, we must do it here instead. + if (gfxVars::UseWebRender()) { + FT_Library library = Factory::NewFTLibrary(); + MOZ_ASSERT(library); + Factory::SetFTLibrary(library); + } #endif // Make sure to do this *after* we update gfxVars above.