summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffwidget.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-27 21:24:06 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-27 21:24:06 +0000
commit9ca9e297661b4a3ee9c25f68d3f9c8e0c270bda9 (patch)
tree8b28edc1ce78727da78138df2cdf6ea328e99ddd /xfa/fxfa/cxfa_ffwidget.cpp
parent9b93815edae6687d79d73c153c30d27e280c7571 (diff)
downloadpdfium-9ca9e297661b4a3ee9c25f68d3f9c8e0c270bda9.tar.xz
Convert CFX_GifContext::GetFrameNum to size_t
This CL removes the CollectionSize and updates call locations as needed. Bug: pdfium:774 Change-Id: I813c500b3a17a194407ceb1304252b9b16fe1779 Reviewed-on: https://pdfium-review.googlesource.com/19590 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffwidget.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index 7847bea982..a34e67ae9d 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -1985,15 +1985,16 @@ RetainPtr<CFX_DIBitmap> XFA_LoadImageFromBuffer(
pProgressiveDecoder->GetHeight(), dibFormat);
pBitmap->Clear(0xffffffff);
- int32_t nFrames;
- if (pProgressiveDecoder->GetFrames(&nFrames) != FXCODEC_STATUS_DECODE_READY ||
- nFrames <= 0) {
+ size_t nFrames;
+ FXCODEC_STATUS status;
+ std::tie(status, nFrames) = pProgressiveDecoder->GetFrames();
+ if (status != FXCODEC_STATUS_DECODE_READY || nFrames == 0) {
pBitmap = nullptr;
return pBitmap;
}
- FXCODEC_STATUS status = pProgressiveDecoder->StartDecode(
- pBitmap, 0, 0, pBitmap->GetWidth(), pBitmap->GetHeight());
+ status = pProgressiveDecoder->StartDecode(pBitmap, 0, 0, pBitmap->GetWidth(),
+ pBitmap->GetHeight());
if (IsFXCodecErrorStatus(status)) {
pBitmap = nullptr;
return pBitmap;