summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-08-04 17:22:14 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-04 17:22:14 -0700
commit26b86e625a2c9e0f4e6a01047fef051ffa81e40a (patch)
tree7960c029a579a3f40572cd6685b2d2851c9cf668 /core/fxge
parentff74356915d4c7f7c6eb16de1e9f403da4ecb6d5 (diff)
downloadpdfium-26b86e625a2c9e0f4e6a01047fef051ffa81e40a.tar.xz
Move CFX_GEModule into its own file
This is the first CL in an attempt to split up the classes in fxge/include/fx_ge.h into their own files. Review-Url: https://codereview.chromium.org/2217663002
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/agg/fx_agg_driver.cpp1
-rw-r--r--core/fxge/android/fx_android_imp.cpp1
-rw-r--r--core/fxge/apple/fx_apple_platform.cpp1
-rw-r--r--core/fxge/apple/fx_mac_imp.cpp1
-rw-r--r--core/fxge/apple/fx_quartz_device.cpp1
-rw-r--r--core/fxge/dib/fx_dib_composite.cpp1
-rw-r--r--core/fxge/dib/fx_dib_main.cpp1
-rw-r--r--core/fxge/ge/cfx_gemodule.cpp (renamed from core/fxge/ge/fx_ge.cpp)2
-rw-r--r--core/fxge/ge/fx_ge_font.cpp2
-rw-r--r--core/fxge/ge/fx_ge_linux.cpp2
-rw-r--r--core/fxge/ge/fx_ge_text.cpp1
-rw-r--r--core/fxge/include/cfx_gemodule.h50
-rw-r--r--core/fxge/include/fx_ge.h31
-rw-r--r--core/fxge/skia/fx_skia_device.cpp1
-rw-r--r--core/fxge/win32/fx_win32_device.cpp1
-rw-r--r--core/fxge/win32/fx_win32_dib.cpp1
-rw-r--r--core/fxge/win32/fx_win32_gdipext.cpp1
17 files changed, 65 insertions, 34 deletions
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp
index 038637926c..f5bf76a80c 100644
--- a/core/fxge/agg/fx_agg_driver.cpp
+++ b/core/fxge/agg/fx_agg_driver.cpp
@@ -12,6 +12,7 @@
#include "core/fxcrt/include/fx_memory.h"
#include "core/fxge/dib/dib_int.h"
#include "core/fxge/ge/fx_text_int.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/include/fx_ge.h"
#include "core/fxge/include/ifx_renderdevicedriver.h"
#include "third_party/agg23/agg_conv_dash.h"
diff --git a/core/fxge/android/fx_android_imp.cpp b/core/fxge/android/fx_android_imp.cpp
index e4a830ff65..a6bddc7117 100644
--- a/core/fxge/android/fx_android_imp.cpp
+++ b/core/fxge/android/fx_android_imp.cpp
@@ -13,6 +13,7 @@
#include "core/fxge/android/fpf_skiamodule.h"
#include "core/fxge/android/fx_android_font.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/include/fx_ge.h"
void CFX_GEModule::InitPlatform() {
diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp
index a3665efe70..f8aba28e86 100644
--- a/core/fxge/apple/fx_apple_platform.cpp
+++ b/core/fxge/apple/fx_apple_platform.cpp
@@ -17,6 +17,7 @@
#include "core/fxge/apple/cfx_quartzdevice.h"
#include "core/fxge/dib/dib_int.h"
#include "core/fxge/ge/fx_text_int.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/include/fx_freetype.h"
#ifndef _SKIA_SUPPORT_
diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp
index de808d80f6..a14bd022ab 100644
--- a/core/fxge/apple/fx_mac_imp.cpp
+++ b/core/fxge/apple/fx_mac_imp.cpp
@@ -6,6 +6,7 @@
#include "core/fxge/apple/apple_int.h"
#include "core/fxge/ge/cfx_folderfontinfo.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/include/fx_ge.h"
#include "core/fxge/include/ifx_systemfontinfo.h"
diff --git a/core/fxge/apple/fx_quartz_device.cpp b/core/fxge/apple/fx_quartz_device.cpp
index 966f0bd26d..e3cca4cafa 100644
--- a/core/fxge/apple/fx_quartz_device.cpp
+++ b/core/fxge/apple/fx_quartz_device.cpp
@@ -13,6 +13,7 @@
#include "core/fxcrt/include/fx_memory.h"
#include "core/fxge/dib/dib_int.h"
#include "core/fxge/ge/fx_text_int.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/include/fx_freetype.h"
#include "core/fxge/include/fx_ge.h"
diff --git a/core/fxge/dib/fx_dib_composite.cpp b/core/fxge/dib/fx_dib_composite.cpp
index 04387db6b4..e255053d59 100644
--- a/core/fxge/dib/fx_dib_composite.cpp
+++ b/core/fxge/dib/fx_dib_composite.cpp
@@ -6,6 +6,7 @@
#include "core/fxcodec/include/fx_codec.h"
#include "core/fxge/dib/dib_int.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/include/fx_ge.h"
namespace {
diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp
index 4c294adf5f..a9a1056a3d 100644
--- a/core/fxge/dib/fx_dib_main.cpp
+++ b/core/fxge/dib/fx_dib_main.cpp
@@ -11,6 +11,7 @@
#include "core/fxcodec/include/fx_codec.h"
#include "core/fxge/dib/dib_int.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/include/fx_ge.h"
void CmykDecode(uint32_t cmyk, int& c, int& m, int& y, int& k) {
diff --git a/core/fxge/ge/fx_ge.cpp b/core/fxge/ge/cfx_gemodule.cpp
index 0a1b1ab041..98649a1c6e 100644
--- a/core/fxge/ge/fx_ge.cpp
+++ b/core/fxge/ge/cfx_gemodule.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/fxge/include/fx_ge.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/ge/cfx_folderfontinfo.h"
#include "core/fxge/ge/fx_text_int.h"
diff --git a/core/fxge/ge/fx_ge_font.cpp b/core/fxge/ge/fx_ge_font.cpp
index bbbe10adb8..4d3328551f 100644
--- a/core/fxge/ge/fx_ge_font.cpp
+++ b/core/fxge/ge/fx_ge_font.cpp
@@ -9,8 +9,8 @@
#include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
#include "core/fxge/include/cfx_fontmgr.h"
#include "core/fxge/ge/fx_text_int.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/include/fx_freetype.h"
-#include "core/fxge/include/fx_ge.h"
#define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em)
diff --git a/core/fxge/ge/fx_ge_linux.cpp b/core/fxge/ge/fx_ge_linux.cpp
index d5a1d956cd..642bbc4561 100644
--- a/core/fxge/ge/fx_ge_linux.cpp
+++ b/core/fxge/ge/fx_ge_linux.cpp
@@ -12,7 +12,7 @@
#include "core/fxge/ge/cfx_folderfontinfo.h"
#include "core/fxge/ge/fx_text_int.h"
-#include "core/fxge/include/fx_ge.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/include/ifx_systemfontinfo.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp
index eb6aafd5c6..b3c234f45a 100644
--- a/core/fxge/ge/fx_ge_text.cpp
+++ b/core/fxge/ge/fx_ge_text.cpp
@@ -10,6 +10,7 @@
#include "core/fxcodec/include/fx_codec.h"
#include "core/fxge/ge/fx_text_int.h"
#include "core/fxge/include/cfx_fontmgr.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/include/fx_freetype.h"
#include "core/fxge/include/fx_ge.h"
#include "core/fxge/include/ifx_renderdevicedriver.h"
diff --git a/core/fxge/include/cfx_gemodule.h b/core/fxge/include/cfx_gemodule.h
new file mode 100644
index 0000000000..e6b46de8bc
--- /dev/null
+++ b/core/fxge/include/cfx_gemodule.h
@@ -0,0 +1,50 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef CORE_FXGE_INCLUDE_CFX_GEMODULE_H_
+#define CORE_FXGE_INCLUDE_CFX_GEMODULE_H_
+
+#include <memory>
+
+#include "core/fxge/include/cfx_fontmgr.h"
+#include "core/fxge/include/fx_font.h"
+
+class CCodec_ModuleMgr;
+class CFX_FontCache;
+class CFX_FontMgr;
+
+class CFX_GEModule {
+ public:
+ static CFX_GEModule* Get();
+ static void Destroy();
+
+ void Init(const char** pUserFontPaths, CCodec_ModuleMgr* pCodecModule);
+ CFX_FontCache* GetFontCache();
+ CFX_FontMgr* GetFontMgr() { return m_pFontMgr.get(); }
+ void SetTextGamma(FX_FLOAT gammaValue);
+ const uint8_t* GetTextGammaTable() const;
+
+ CCodec_ModuleMgr* GetCodecModule() { return m_pCodecModule; }
+ void* GetPlatformData() { return m_pPlatformData; }
+
+ FXFT_Library m_FTLibrary;
+
+ private:
+ CFX_GEModule();
+ ~CFX_GEModule();
+
+ void InitPlatform();
+ void DestroyPlatform();
+
+ uint8_t m_GammaValue[256];
+ CFX_FontCache* m_pFontCache;
+ std::unique_ptr<CFX_FontMgr> m_pFontMgr;
+ CCodec_ModuleMgr* m_pCodecModule;
+ void* m_pPlatformData;
+ const char** m_pUserFontPaths;
+};
+
+#endif // CORE_FXGE_INCLUDE_CFX_GEMODULE_H_
diff --git a/core/fxge/include/fx_ge.h b/core/fxge/include/fx_ge.h
index 1550ee960e..53c6ccb744 100644
--- a/core/fxge/include/fx_ge.h
+++ b/core/fxge/include/fx_ge.h
@@ -22,37 +22,6 @@ class CPDF_ShadingPattern;
class IFX_RenderDeviceDriver;
class SkPictureRecorder;
-class CFX_GEModule {
- public:
- static CFX_GEModule* Get();
- static void Destroy();
-
- void Init(const char** pUserFontPaths, CCodec_ModuleMgr* pCodecModule);
- CFX_FontCache* GetFontCache();
- CFX_FontMgr* GetFontMgr() { return m_pFontMgr.get(); }
- void SetTextGamma(FX_FLOAT gammaValue);
- const uint8_t* GetTextGammaTable() const;
-
- CCodec_ModuleMgr* GetCodecModule() { return m_pCodecModule; }
- void* GetPlatformData() { return m_pPlatformData; }
-
- FXFT_Library m_FTLibrary;
-
- private:
- CFX_GEModule();
- ~CFX_GEModule();
-
- void InitPlatform();
- void DestroyPlatform();
-
- uint8_t m_GammaValue[256];
- CFX_FontCache* m_pFontCache;
- std::unique_ptr<CFX_FontMgr> m_pFontMgr;
- CCodec_ModuleMgr* m_pCodecModule;
- void* m_pPlatformData;
- const char** m_pUserFontPaths;
-};
-
struct FX_PATHPOINT {
FX_FLOAT m_PointX;
FX_FLOAT m_PointY;
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index df20203820..3ccfd14d73 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -14,6 +14,7 @@
#include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
#include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h"
#include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/skia/fx_skia_device.h"
#include "third_party/skia/include/core/SkCanvas.h"
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index 20b277e3f7..cb1243fbd2 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -24,6 +24,7 @@
#include "core/fxge/ge/cfx_folderfontinfo.h"
#include "core/fxge/ge/fx_text_int.h"
#include "core/fxge/include/cfx_fontmapper.h"
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/include/cfx_windowsdevice.h"
#include "core/fxge/include/ifx_systemfontinfo.h"
#include "core/fxge/include/fx_font.h"
diff --git a/core/fxge/win32/fx_win32_dib.cpp b/core/fxge/win32/fx_win32_dib.cpp
index 8f223a3f06..20a84a2eb7 100644
--- a/core/fxge/win32/fx_win32_dib.cpp
+++ b/core/fxge/win32/fx_win32_dib.cpp
@@ -9,6 +9,7 @@
#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
#include <windows.h>
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/win32/cfx_windowsdib.h"
#include "core/fxge/win32/win32_int.h"
diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp
index 6a70425df7..d21043cdf1 100644
--- a/core/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/fxge/win32/fx_win32_gdipext.cpp
@@ -17,6 +17,7 @@ using std::max;
#include <gdiplus.h>
+#include "core/fxge/include/cfx_gemodule.h"
#include "core/fxge/win32/cfx_windowsdib.h"
#include "core/fxge/win32/win32_int.h"