summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_GrrdProc.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-07-13 10:06:15 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-13 14:29:34 +0000
commit17453d03c3bdd18a893ae86058a6184939aee026 (patch)
tree2a87278c98e851744f20cd9aaa1460f849ef097e /core/fxcodec/jbig2/JBig2_GrrdProc.h
parent360d1fce569b57aa2c487f6e171ba19b9dc8885e (diff)
downloadpdfium-17453d03c3bdd18a893ae86058a6184939aee026.tar.xz
More unique_ptrs in JBig2 code
This CL makes CJBig2_Segment own the results: symbol, pattern, huffman, and huffman. This causes a lot more unique_ptr usage in JBig2 code. Change-Id: I1f0a5bfaaf85053658b467bef5325c72d1f496c7 Reviewed-on: https://pdfium-review.googlesource.com/7690 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_GrrdProc.h')
-rw-r--r--core/fxcodec/jbig2/JBig2_GrrdProc.h33
1 files changed, 20 insertions, 13 deletions
diff --git a/core/fxcodec/jbig2/JBig2_GrrdProc.h b/core/fxcodec/jbig2/JBig2_GrrdProc.h
index bdb49d7e91..43f535335d 100644
--- a/core/fxcodec/jbig2/JBig2_GrrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_GrrdProc.h
@@ -7,6 +7,8 @@
#ifndef CORE_FXCODEC_JBIG2_JBIG2_GRRDPROC_H_
#define CORE_FXCODEC_JBIG2_JBIG2_GRRDPROC_H_
+#include <memory>
+
#include "core/fxcrt/fx_system.h"
class CJBig2_ArithDecoder;
@@ -15,21 +17,9 @@ struct JBig2ArithCtx;
class CJBig2_GRRDProc {
public:
- CJBig2_Image* decode(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* grContext);
-
- CJBig2_Image* decode_Template0_unopt(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* grContext);
-
- CJBig2_Image* decode_Template0_opt(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* grContext);
-
- CJBig2_Image* decode_Template1_unopt(CJBig2_ArithDecoder* pArithDecoder,
+ std::unique_ptr<CJBig2_Image> decode(CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* grContext);
- CJBig2_Image* decode_Template1_opt(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* grContext);
-
uint32_t GRW;
uint32_t GRH;
bool GRTEMPLATE;
@@ -38,6 +28,23 @@ class CJBig2_GRRDProc {
int32_t GRREFERENCEDY;
bool TPGRON;
int8_t GRAT[4];
+
+ private:
+ std::unique_ptr<CJBig2_Image> decode_Template0_unopt(
+ CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* grContext);
+
+ std::unique_ptr<CJBig2_Image> decode_Template0_opt(
+ CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* grContext);
+
+ std::unique_ptr<CJBig2_Image> decode_Template1_unopt(
+ CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* grContext);
+
+ std::unique_ptr<CJBig2_Image> decode_Template1_opt(
+ CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* grContext);
};
#endif // CORE_FXCODEC_JBIG2_JBIG2_GRRDPROC_H_