From 921cc2403a9e643dfb29d70564fa435a1d79f972 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 8 Oct 2015 15:14:24 -0700 Subject: Merge to XFA: Various changes to JBig2 cache: - Makes the cache be per-document - Keys the cache on ObjNum and stream offset instead of keying on a pointer to the data (which can result in false cache hits). - Makes it so the cache is only used for the globals stream. - Reenable the cache. R=dml@google.com TBR=dml@google.com BUG=pdfium:207 Review URL: https://codereview.chromium.org/1380243004 . (cherry picked from commit f1b88e76134808f36f16b9e53a2e9dd89b12c8fd) Review URL: https://codereview.chromium.org/1394373002 . --- core/include/fxcodec/fx_codec.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core/include/fxcodec') diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h index 0cacbde24d..3ac9434861 100644 --- a/core/include/fxcodec/fx_codec.h +++ b/core/include/fxcodec/fx_codec.h @@ -17,6 +17,8 @@ class CFX_DIBSource; class CJPX_Decoder; +class CPDF_PrivateData; +class CPDF_StreamAcc; class ICodec_ScanlineDecoder; class ICodec_ProgressiveDecoder; class ICodec_BasicModule; @@ -362,12 +364,11 @@ class ICodec_Jbig2Module { virtual void* CreateJbig2Context() = 0; virtual FXCODEC_STATUS StartDecode(void* pJbig2Context, + CFX_PrivateData* pPrivateData, FX_DWORD width, FX_DWORD height, - const uint8_t* src_buf, - FX_DWORD src_size, - const uint8_t* global_data, - FX_DWORD global_size, + CPDF_StreamAcc* src_stream, + CPDF_StreamAcc* global_stream, uint8_t* dest_buf, FX_DWORD dest_pitch, IFX_Pause* pPause) = 0; -- cgit v1.2.3