summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/fx_codec_progress.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-24 19:45:09 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-24 19:45:09 +0000
commit16d18d935d055b74e05f615c0325318a329a7fe1 (patch)
treebce3c35b6db03cedd537a67a28cf91eb0b502b1c /core/fxcodec/codec/fx_codec_progress.cpp
parent1cb4d6b14cc9375dc04f57d3f2149eccb9e327a8 (diff)
downloadpdfium-16d18d935d055b74e05f615c0325318a329a7fe1.tar.xz
Use span<uint8_t> in more fxcodec code.
There are also small tweaks in tests to ensure strict order of stack variable lifetimes. Change-Id: Ic9d5c6a2bdd378b517be627f8e29f725bafdc2ad Reviewed-on: https://pdfium-review.googlesource.com/41310 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/fx_codec_progress.cpp')
-rw-r--r--core/fxcodec/codec/fx_codec_progress.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp
index 8ebb119dff..c5fb1e3a13 100644
--- a/core/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/fxcodec/codec/fx_codec_progress.cpp
@@ -765,7 +765,7 @@ bool CCodec_ProgressiveDecoder::BmpDetectImageType(CFX_DIBAttribute* pAttribute,
}
m_offSet += size;
- pBmpModule->Input(m_pBmpContext.get(), m_pSrcBuf, size);
+ pBmpModule->Input(m_pBmpContext.get(), {m_pSrcBuf, size});
std::vector<uint32_t> palette;
int32_t readResult = pBmpModule->ReadHeader(
m_pBmpContext.get(), &m_SrcWidth, &m_SrcHeight, &m_BmpIsTopBottom,
@@ -873,7 +873,7 @@ bool CCodec_ProgressiveDecoder::BmpReadMoreData(CCodec_BmpModule* pBmpModule,
return false;
}
m_offSet += dwSize;
- pBmpModule->Input(m_pBmpContext.get(), m_pSrcBuf, dwSize + dwAvail);
+ pBmpModule->Input(m_pBmpContext.get(), {m_pSrcBuf, dwSize + dwAvail});
return true;
}
@@ -969,8 +969,8 @@ bool CCodec_ProgressiveDecoder::GifReadMoreData(CCodec_GifModule* pGifModule,
}
m_offSet += dwAmountToFetchFromFile;
- pGifModule->Input(m_pGifContext.get(), m_pSrcBuf,
- dwAmountToFetchFromFile + dwUnusedBuffer);
+ pGifModule->Input(m_pGifContext.get(),
+ {m_pSrcBuf, dwAmountToFetchFromFile + dwUnusedBuffer});
m_InvalidateGifBuffer = false;
return true;
}
@@ -989,7 +989,7 @@ bool CCodec_ProgressiveDecoder::GifDetectImageType(CFX_DIBAttribute* pAttribute,
return false;
}
m_offSet += size;
- pGifModule->Input(m_pGifContext.get(), m_pSrcBuf, size);
+ pGifModule->Input(m_pGifContext.get(), {m_pSrcBuf, size});
m_SrcComponents = 1;
CFX_GifDecodeStatus readResult = pGifModule->ReadHeader(
m_pGifContext.get(), &m_SrcWidth, &m_SrcHeight, &m_GifPltNumber,