summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-09-10 16:12:44 -0700
committerLei Zhang <thestig@chromium.org>2015-09-10 16:12:44 -0700
commit70f4404e9a9e69afdfdd07715aa946f6561ce0cb (patch)
tree0c681df1e7bb78e9834555834ad464eb7bf2a929 /core/src/fxcodec/codec
parent6df59849472958e7de96da6d9fc7b223b7c1f1c3 (diff)
downloadpdfium-70f4404e9a9e69afdfdd07715aa946f6561ce0cb.tar.xz
Remove CJBig2_Object, CJBig2_Module, and friends.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1326953006 .
Diffstat (limited to 'core/src/fxcodec/codec')
-rw-r--r--core/src/fxcodec/codec/codec_int.h28
-rw-r--r--core/src/fxcodec/codec/fx_codec_fax.cpp3
-rw-r--r--core/src/fxcodec/codec/fx_codec_jbig.cpp4
3 files changed, 3 insertions, 32 deletions
diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h
index 7dafd27c15..125f36c9eb 100644
--- a/core/src/fxcodec/codec/codec_int.h
+++ b/core/src/fxcodec/codec/codec_int.h
@@ -264,33 +264,6 @@ class CCodec_JpxModule : public ICodec_JpxModule {
void DestroyDecoder(CJPX_Decoder* pDecoder) override;
};
-class CPDF_Jbig2Interface : public CJBig2_Module {
- public:
- virtual void* JBig2_Malloc(FX_DWORD dwSize) {
- return FX_Alloc(uint8_t, dwSize);
- }
- virtual void* JBig2_Malloc2(FX_DWORD num, FX_DWORD dwSize) {
- if (dwSize && num >= UINT_MAX / dwSize) {
- return NULL;
- }
- return FX_Alloc(uint8_t, num * dwSize);
- }
- virtual void* JBig2_Malloc3(FX_DWORD num, FX_DWORD dwSize, FX_DWORD dwSize2) {
- if (dwSize2 && dwSize >= UINT_MAX / dwSize2) {
- return NULL;
- }
- FX_DWORD size = dwSize2 * dwSize;
- if (size && num >= UINT_MAX / size) {
- return NULL;
- }
- return FX_Alloc(uint8_t, num * size);
- }
- virtual void* JBig2_Realloc(void* pMem, FX_DWORD dwSize) {
- return FX_Realloc(uint8_t, pMem, dwSize);
- }
- virtual void JBig2_Free(void* pMem) { FX_Free(pMem); }
-};
-
class CCodec_Jbig2Context {
public:
CCodec_Jbig2Context();
@@ -331,7 +304,6 @@ class CCodec_Jbig2Module : public ICodec_Jbig2Module {
void DestroyJbig2Context(void* pJbig2Context) override;
private:
- CPDF_Jbig2Interface m_Module;
std::list<CJBig2_CachePair> m_SymbolDictCache;
};
diff --git a/core/src/fxcodec/codec/fx_codec_fax.cpp b/core/src/fxcodec/codec/fx_codec_fax.cpp
index 63a45c7aea..394e22b013 100644
--- a/core/src/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/src/fxcodec/codec/fx_codec_fax.cpp
@@ -590,8 +590,7 @@ FX_DWORD CCodec_FaxDecoder::GetSrcOffset() {
return ret;
}
extern "C" {
-void _FaxG4Decode(void*,
- const uint8_t* src_buf,
+void _FaxG4Decode(const uint8_t* src_buf,
FX_DWORD src_size,
int* pbitpos,
uint8_t* dest_buf,
diff --git a/core/src/fxcodec/codec/fx_codec_jbig.cpp b/core/src/fxcodec/codec/fx_codec_jbig.cpp
index b95461b3e5..9361604b9d 100644
--- a/core/src/fxcodec/codec/fx_codec_jbig.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jbig.cpp
@@ -48,8 +48,8 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(void* pJbig2Context,
m_pJbig2Context->m_bFileReader = FALSE;
FXSYS_memset(dest_buf, 0, height * dest_pitch);
m_pJbig2Context->m_pContext = CJBig2_Context::CreateContext(
- &m_Module, (uint8_t*)global_data, global_size, (uint8_t*)src_buf,
- src_size, JBIG2_EMBED_STREAM, &m_SymbolDictCache, pPause);
+ global_data, global_size, src_buf, src_size, JBIG2_EMBED_STREAM,
+ &m_SymbolDictCache, pPause);
if (!m_pJbig2Context->m_pContext) {
return FXCODEC_STATUS_ERROR;
}