More unused IFX_Pause parameters removed

Remove IFX_Pause parameters which are passed but not used.

Change-Id: I51a491c7f9a429676d114a387390fac3ae65e187
Reviewed-on: https://pdfium-review.googlesource.com/4950
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp
index 116abb7..c957002 100644
--- a/core/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/fxcodec/jbig2/JBig2_Context.cpp
@@ -336,7 +336,7 @@
                                                    IFX_Pause* pPause) {
   switch (pSegment->m_cFlags.s.type) {
     case 0:
-      return parseSymbolDict(pSegment, pPause);
+      return parseSymbolDict(pSegment);
     case 4:
     case 6:
     case 7:
@@ -419,8 +419,7 @@
   return JBIG2_SUCCESS;
 }
 
-int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment* pSegment,
-                                        IFX_Pause* pPause) {
+int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment* pSegment) {
   uint16_t wFlags;
   if (m_pStream->readShortInteger(&wFlags) != 0)
     return JBIG2_ERROR_TOO_SHORT;
@@ -612,7 +611,7 @@
       m_pStream->offset(2);
     } else {
       pSegment->m_Result.sd = pSymbolDictDecoder->decode_Huffman(
-          m_pStream.get(), &gbContext, &grContext, pPause);
+          m_pStream.get(), &gbContext, &grContext);
       if (!pSegment->m_Result.sd)
         return JBIG2_ERROR_FATAL;
       m_pStream->alignByte();
@@ -967,7 +966,7 @@
     m_pStream->alignByte();
     m_pStream->offset(2);
   } else {
-    pSegment->m_Result.pd = pPDD->decode_MMR(m_pStream.get(), pPause);
+    pSegment->m_Result.pd = pPDD->decode_MMR(m_pStream.get());
     if (!pSegment->m_Result.pd)
       return JBIG2_ERROR_FATAL;
     m_pStream->alignByte();
@@ -1033,7 +1032,7 @@
     m_pStream->alignByte();
     m_pStream->offset(2);
   } else {
-    pSegment->m_Result.im = pHRD->decode_MMR(m_pStream.get(), pPause);
+    pSegment->m_Result.im = pHRD->decode_MMR(m_pStream.get());
     if (!pSegment->m_Result.im)
       return JBIG2_ERROR_FATAL;
     m_pStream->alignByte();
@@ -1132,7 +1131,7 @@
       m_pStream->offset(2);
     }
   } else {
-    m_pGRD->Start_decode_MMR(&pSegment->m_Result.im, m_pStream.get(), pPause);
+    m_pGRD->Start_decode_MMR(&pSegment->m_Result.im, m_pStream.get());
     if (!pSegment->m_Result.im) {
       m_pGRD.reset();
       return JBIG2_ERROR_FATAL;
diff --git a/core/fxcodec/jbig2/JBig2_Context.h b/core/fxcodec/jbig2/JBig2_Context.h
index a9fb1e2..8568aab 100644
--- a/core/fxcodec/jbig2/JBig2_Context.h
+++ b/core/fxcodec/jbig2/JBig2_Context.h
@@ -71,7 +71,7 @@
   int32_t parseSegmentData(CJBig2_Segment* pSegment, IFX_Pause* pPause);
   int32_t ProcessingParseSegmentData(CJBig2_Segment* pSegment,
                                      IFX_Pause* pPause);
-  int32_t parseSymbolDict(CJBig2_Segment* pSegment, IFX_Pause* pPause);
+  int32_t parseSymbolDict(CJBig2_Segment* pSegment);
   int32_t parseTextRegion(CJBig2_Segment* pSegment);
   int32_t parsePatternDict(CJBig2_Segment* pSegment, IFX_Pause* pPause);
   int32_t parseHalftoneRegion(CJBig2_Segment* pSegment, IFX_Pause* pPause);
diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.cpp b/core/fxcodec/jbig2/JBig2_GrdProc.cpp
index 21d6d80..0d9f991 100644
--- a/core/fxcodec/jbig2/JBig2_GrdProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_GrdProc.cpp
@@ -705,8 +705,7 @@
 }
 
 FXCODEC_STATUS CJBig2_GRDProc::Start_decode_MMR(CJBig2_Image** pImage,
-                                                CJBig2_BitStream* pStream,
-                                                IFX_Pause* pPause) {
+                                                CJBig2_BitStream* pStream) {
   int bitpos, i;
   *pImage = new CJBig2_Image(GBW, GBH);
   if (!(*pImage)->m_pData) {
diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.h b/core/fxcodec/jbig2/JBig2_GrdProc.h
index 1268192..447447f 100644
--- a/core/fxcodec/jbig2/JBig2_GrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_GrdProc.h
@@ -29,8 +29,7 @@
                                     JBig2ArithCtx* gbContext,
                                     IFX_Pause* pPause);
   FXCODEC_STATUS Start_decode_MMR(CJBig2_Image** pImage,
-                                  CJBig2_BitStream* pStream,
-                                  IFX_Pause* pPause);
+                                  CJBig2_BitStream* pStream);
   FXCODEC_STATUS Continue_decode(IFX_Pause* pPause);
   FX_RECT GetReplaceRect() const { return m_ReplaceRect; }
 
diff --git a/core/fxcodec/jbig2/JBig2_GsidProc.cpp b/core/fxcodec/jbig2/JBig2_GsidProc.cpp
index e65b47d..0f0a16d 100644
--- a/core/fxcodec/jbig2/JBig2_GsidProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_GsidProc.cpp
@@ -68,8 +68,7 @@
   return GSVALS.release();
 }
 
-uint32_t* CJBig2_GSIDProc::decode_MMR(CJBig2_BitStream* pStream,
-                                      IFX_Pause* pPause) {
+uint32_t* CJBig2_GSIDProc::decode_MMR(CJBig2_BitStream* pStream) {
   auto pGRD = pdfium::MakeUnique<CJBig2_GRDProc>();
   pGRD->MMR = GSMMR;
   pGRD->GBW = GSW;
@@ -77,7 +76,7 @@
 
   std::unique_ptr<CJBig2_Image*> GSPLANES(FX_Alloc(CJBig2_Image*, GSBPP));
   JBIG2_memset(GSPLANES.get(), 0, sizeof(CJBig2_Image*) * GSBPP);
-  pGRD->Start_decode_MMR(&GSPLANES.get()[GSBPP - 1], pStream, nullptr);
+  pGRD->Start_decode_MMR(&GSPLANES.get()[GSBPP - 1], pStream);
   if (!GSPLANES.get()[GSBPP - 1])
     return nullptr;
 
@@ -85,7 +84,7 @@
   pStream->offset(3);
   int32_t J = GSBPP - 2;
   while (J >= 0) {
-    pGRD->Start_decode_MMR(&GSPLANES.get()[J], pStream, nullptr);
+    pGRD->Start_decode_MMR(&GSPLANES.get()[J], pStream);
     if (!GSPLANES.get()[J]) {
       for (int32_t K = GSBPP - 1; K > J; --K)
         delete GSPLANES.get()[K];
diff --git a/core/fxcodec/jbig2/JBig2_GsidProc.h b/core/fxcodec/jbig2/JBig2_GsidProc.h
index 3d5dc2d..45e7599 100644
--- a/core/fxcodec/jbig2/JBig2_GsidProc.h
+++ b/core/fxcodec/jbig2/JBig2_GsidProc.h
@@ -21,7 +21,7 @@
                          JBig2ArithCtx* gbContext,
                          IFX_Pause* pPause);
 
-  uint32_t* decode_MMR(CJBig2_BitStream* pStream, IFX_Pause* pPause);
+  uint32_t* decode_MMR(CJBig2_BitStream* pStream);
 
  public:
   bool GSMMR;
diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.cpp b/core/fxcodec/jbig2/JBig2_HtrdProc.cpp
index 8899fb1..1e8710b 100644
--- a/core/fxcodec/jbig2/JBig2_HtrdProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_HtrdProc.cpp
@@ -68,8 +68,7 @@
   return HTREG.release();
 }
 
-CJBig2_Image* CJBig2_HTRDProc::decode_MMR(CJBig2_BitStream* pStream,
-                                          IFX_Pause* pPause) {
+CJBig2_Image* CJBig2_HTRDProc::decode_MMR(CJBig2_BitStream* pStream) {
   uint32_t ng, mg;
   int32_t x, y;
   uint32_t* GI;
@@ -85,7 +84,7 @@
   pGID->GSH = HGH;
   pGID->GSBPP = (uint8_t)HBPP;
   pGID->GSUSESKIP = 0;
-  GI = pGID->decode_MMR(pStream, pPause);
+  GI = pGID->decode_MMR(pStream);
   if (!GI)
     return nullptr;
 
diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.h b/core/fxcodec/jbig2/JBig2_HtrdProc.h
index 9a9a5c5..e562123 100644
--- a/core/fxcodec/jbig2/JBig2_HtrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_HtrdProc.h
@@ -21,7 +21,7 @@
                              JBig2ArithCtx* gbContext,
                              IFX_Pause* pPause);
 
-  CJBig2_Image* decode_MMR(CJBig2_BitStream* pStream, IFX_Pause* pPause);
+  CJBig2_Image* decode_MMR(CJBig2_BitStream* pStream);
 
  public:
   uint32_t HBW;
diff --git a/core/fxcodec/jbig2/JBig2_PddProc.cpp b/core/fxcodec/jbig2/JBig2_PddProc.cpp
index 3eef302..e3403ee 100644
--- a/core/fxcodec/jbig2/JBig2_PddProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_PddProc.cpp
@@ -57,8 +57,7 @@
   return pDict.release();
 }
 
-CJBig2_PatternDict* CJBig2_PDDProc::decode_MMR(CJBig2_BitStream* pStream,
-                                               IFX_Pause* pPause) {
+CJBig2_PatternDict* CJBig2_PDDProc::decode_MMR(CJBig2_BitStream* pStream) {
   uint32_t GRAY;
   CJBig2_Image* BHDC = nullptr;
   auto pDict = pdfium::MakeUnique<CJBig2_PatternDict>();
@@ -70,7 +69,7 @@
   pGRD->MMR = HDMMR;
   pGRD->GBW = (GRAYMAX + 1) * HDPW;
   pGRD->GBH = HDPH;
-  pGRD->Start_decode_MMR(&BHDC, pStream, nullptr);
+  pGRD->Start_decode_MMR(&BHDC, pStream);
   if (!BHDC)
     return nullptr;
 
diff --git a/core/fxcodec/jbig2/JBig2_PddProc.h b/core/fxcodec/jbig2/JBig2_PddProc.h
index 578f603..3bb97d0 100644
--- a/core/fxcodec/jbig2/JBig2_PddProc.h
+++ b/core/fxcodec/jbig2/JBig2_PddProc.h
@@ -21,7 +21,7 @@
                                    JBig2ArithCtx* gbContext,
                                    IFX_Pause* pPause);
 
-  CJBig2_PatternDict* decode_MMR(CJBig2_BitStream* pStream, IFX_Pause* pPause);
+  CJBig2_PatternDict* decode_MMR(CJBig2_BitStream* pStream);
 
  public:
   bool HDMMR;
diff --git a/core/fxcodec/jbig2/JBig2_SddProc.cpp b/core/fxcodec/jbig2/JBig2_SddProc.cpp
index 8e6c4ac..e296e32 100644
--- a/core/fxcodec/jbig2/JBig2_SddProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_SddProc.cpp
@@ -6,7 +6,9 @@
 
 #include "core/fxcodec/jbig2/JBig2_SddProc.h"
 
+#include <algorithm>
 #include <memory>
+#include <utility>
 #include <vector>
 
 #include "core/fxcodec/jbig2/JBig2_ArithIntDecoder.h"
@@ -263,8 +265,7 @@
 CJBig2_SymbolDict* CJBig2_SDDProc::decode_Huffman(
     CJBig2_BitStream* pStream,
     std::vector<JBig2ArithCtx>* gbContext,
-    std::vector<JBig2ArithCtx>* grContext,
-    IFX_Pause* pPause) {
+    std::vector<JBig2ArithCtx>* grContext) {
   std::vector<std::unique_ptr<CJBig2_Image>> SDNEWSYMS;
   std::vector<uint32_t> SDNEWSYMWIDTHS;
   uint32_t HCHEIGHT, NSYMSDECODED;
@@ -488,7 +489,7 @@
         pGRD->MMR = 1;
         pGRD->GBW = TOTWIDTH;
         pGRD->GBH = HCHEIGHT;
-        pGRD->Start_decode_MMR(&BHC, pStream, nullptr);
+        pGRD->Start_decode_MMR(&BHC, pStream);
         pStream->alignByte();
       }
       nTmp = 0;
diff --git a/core/fxcodec/jbig2/JBig2_SddProc.h b/core/fxcodec/jbig2/JBig2_SddProc.h
index 86479c7..20e0569 100644
--- a/core/fxcodec/jbig2/JBig2_SddProc.h
+++ b/core/fxcodec/jbig2/JBig2_SddProc.h
@@ -16,7 +16,6 @@
 class CJBig2_HuffmanTable;
 class CJBig2_Image;
 class CJBig2_SymbolDict;
-class IFX_Pause;
 
 class CJBig2_SDDProc {
  public:
@@ -26,8 +25,7 @@
 
   CJBig2_SymbolDict* decode_Huffman(CJBig2_BitStream* pStream,
                                     std::vector<JBig2ArithCtx>* gbContext,
-                                    std::vector<JBig2ArithCtx>* grContext,
-                                    IFX_Pause* pPause);
+                                    std::vector<JBig2ArithCtx>* grContext);
 
   bool SDHUFF;
   bool SDREFAGG;
diff --git a/core/fxge/dib/cfx_imagerenderer.cpp b/core/fxge/dib/cfx_imagerenderer.cpp
index aa81855..cff95fd 100644
--- a/core/fxge/dib/cfx_imagerenderer.cpp
+++ b/core/fxge/dib/cfx_imagerenderer.cpp
@@ -101,10 +101,8 @@
 bool CFX_ImageRenderer::Continue(IFX_Pause* pPause) {
   if (m_Status == 1)
     return m_Stretcher->Continue(pPause);
-
   if (m_Status != 2)
     return false;
-
   if (m_pTransformer->Continue(pPause))
     return true;
 
diff --git a/core/fxge/dib/cfx_imagestretcher.cpp b/core/fxge/dib/cfx_imagestretcher.cpp
index e0ba750..d633318 100644
--- a/core/fxge/dib/cfx_imagestretcher.cpp
+++ b/core/fxge/dib/cfx_imagestretcher.cpp
@@ -128,7 +128,6 @@
 bool CFX_ImageStretcher::Continue(IFX_Pause* pPause) {
   if (m_Flags & FXDIB_DOWNSAMPLE)
     return ContinueQuickStretch(pPause);
-
   return ContinueStretch(pPause);
 }
 
diff --git a/core/fxge/dib/cfx_imagetransformer.cpp b/core/fxge/dib/cfx_imagetransformer.cpp
index b34c555..4b5fe0b 100644
--- a/core/fxge/dib/cfx_imagetransformer.cpp
+++ b/core/fxge/dib/cfx_imagetransformer.cpp
@@ -262,10 +262,8 @@
 
   if (m_Status == 2)
     return m_Stretcher->Continue(pPause);
-
   if (m_Status != 3)
     return false;
-
   if (m_Stretcher->Continue(pPause))
     return true;
 
diff --git a/core/fxge/dib/cstretchengine.cpp b/core/fxge/dib/cstretchengine.cpp
index 0025331..9fdaa02 100644
--- a/core/fxge/dib/cstretchengine.cpp
+++ b/core/fxge/dib/cstretchengine.cpp
@@ -357,9 +357,9 @@
 
 bool CStretchEngine::Continue(IFX_Pause* pPause) {
   while (m_State == 1) {
-    if (ContinueStretchHorz(pPause)) {
+    if (ContinueStretchHorz(pPause))
       return true;
-    }
+
     m_State = 2;
     StretchVert();
   }
@@ -401,7 +401,6 @@
 bool CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause) {
   if (!m_DestWidth)
     return false;
-
   if (m_pSource->SkipToScanline(m_CurRow, pPause))
     return true;