summaryrefslogtreecommitdiff
path: root/core/fxge/win32
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/win32')
-rw-r--r--core/fxge/win32/cfx_psrenderer.cpp17
-rw-r--r--core/fxge/win32/fx_win32_device.cpp1
2 files changed, 10 insertions, 8 deletions
diff --git a/core/fxge/win32/cfx_psrenderer.cpp b/core/fxge/win32/cfx_psrenderer.cpp
index ba027ba6dc..400babd16b 100644
--- a/core/fxge/win32/cfx_psrenderer.cpp
+++ b/core/fxge/win32/cfx_psrenderer.cpp
@@ -8,10 +8,12 @@
#include <memory>
+#include "core/fpdfapi/cpdf_modulemgr.h"
#include "core/fxcodec/fx_codec.h"
#include "core/fxcrt/cfx_maybe_owned.h"
#include "core/fxge/cfx_facecache.h"
#include "core/fxge/cfx_fontcache.h"
+#include "core/fxge/cfx_gemodule.h"
#include "core/fxge/cfx_pathdata.h"
#include "core/fxge/cfx_renderdevice.h"
#include "core/fxge/dib/cfx_dibextractor.h"
@@ -48,17 +50,17 @@ void PSCompressData(int PSLevel,
if (src_size < 1024)
return;
- CCodec_ModuleMgr* pEncoders = CFX_GEModule::Get()->GetCodecModule();
+ CCodec_ModuleMgr* pEncoders = CPDF_ModuleMgr::Get()->GetCodecModule();
uint8_t* dest_buf = nullptr;
uint32_t dest_size = src_size;
if (PSLevel >= 3) {
- if (pEncoders && pEncoders->GetFlateModule()->Encode(
- src_buf, src_size, &dest_buf, &dest_size)) {
+ if (pEncoders->GetFlateModule()->Encode(src_buf, src_size, &dest_buf,
+ &dest_size)) {
*filter = "/FlateDecode filter ";
}
} else {
- if (pEncoders && pEncoders->GetBasicModule()->RunLengthEncode(
- src_buf, src_size, &dest_buf, &dest_size)) {
+ if (pEncoders->GetBasicModule()->RunLengthEncode(src_buf, src_size,
+ &dest_buf, &dest_size)) {
*filter = "/RunLengthDecode filter ";
}
}
@@ -681,9 +683,8 @@ bool CFX_PSRenderer::DrawText(int nChars,
void CFX_PSRenderer::WritePSBinary(const uint8_t* data, int len) {
uint8_t* dest_buf;
uint32_t dest_size;
- CCodec_ModuleMgr* pEncoders = CFX_GEModule::Get()->GetCodecModule();
- if (pEncoders &&
- pEncoders->GetBasicModule()->A85Encode(data, len, &dest_buf,
+ CCodec_ModuleMgr* pEncoders = CPDF_ModuleMgr::Get()->GetCodecModule();
+ if (pEncoders->GetBasicModule()->A85Encode(data, len, &dest_buf,
&dest_size)) {
m_pStream->WriteBlock(dest_buf, dest_size);
FX_Free(dest_buf);
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index 2747339b1d..b495251dee 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -15,6 +15,7 @@
#include "core/fxcrt/fx_codepage.h"
#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/fx_system.h"
+#include "core/fxge/cfx_gemodule.h"
#include "core/fxge/cfx_windowsrenderdevice.h"
#include "core/fxge/dib/cfx_dibextractor.h"
#include "core/fxge/dib/cfx_imagerenderer.h"