1 // Copyright 2016 The PDFium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #include "core/fpdfapi/page/cpdf_pagemodule.h" 8 9 #include "core/fpdfapi/font/cpdf_fontglobals.h" 10 #include "core/fpdfapi/page/cpdf_colorspace.h" 11 #include "core/fpdfapi/page/cpdf_streamcontentparser.h" 12 13 // static Create()14void CPDF_PageModule::Create() { 15 CPDF_ColorSpace::InitializeGlobals(); 16 CPDF_FontGlobals::Create(); 17 CPDF_FontGlobals::GetInstance()->LoadEmbeddedMaps(); 18 CPDF_StreamContentParser::InitializeGlobals(); 19 } 20 21 // static Destroy()22void CPDF_PageModule::Destroy() { 23 CPDF_StreamContentParser::DestroyGlobals(); 24 CPDF_FontGlobals::Destroy(); 25 CPDF_ColorSpace::DestroyGlobals(); 26 } 27