diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-03-01 12:15:00 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-01 20:43:46 +0000 |
commit | b4a261855b34b4c8d938118762ae609a34a3ae99 (patch) | |
tree | 7b084e874cbf41eec73a3cec949dc810983cc0cf /xfa/fxfa/app | |
parent | fed39cf4a23341cf9cb5a5b432248b4247022282 (diff) | |
download | pdfium-b4a261855b34b4c8d938118762ae609a34a3ae99.tar.xz |
Create virtual codec APIs so chrome/fuzzers can link separately
The one step to make an actual concrete class is conditionalized
in fpdfview and is unconditional in the fuzzer.
Also replace the clumsy C-style callbacks with a delegate
interface as long as we are making new interfaces.
Change-Id: I733a437483ce5e0c34211cfbbda05105336f55b5
Reviewed-on: https://pdfium-review.googlesource.com/2887
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r-- | xfa/fxfa/app/xfa_ffwidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index 1ffd712a3a..9995fd11b2 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -1128,7 +1128,7 @@ CFX_DIBitmap* XFA_LoadImageFromBuffer( CFX_DIBAttribute dibAttr; CFX_DIBitmap* pBitmap = nullptr; - CCodec_ProgressiveDecoder* pProgressiveDecoder = + std::unique_ptr<CCodec_ProgressiveDecoder> pProgressiveDecoder = pCodecMgr->CreateProgressiveDecoder(); pProgressiveDecoder->LoadImageInfo(pImageFileRead, type, &dibAttr, false); switch (dibAttr.m_wDPIUnit) { @@ -1164,9 +1164,9 @@ CFX_DIBitmap* XFA_LoadImageFromBuffer( pProgressiveDecoder->ContinueDecode(); } } - delete pProgressiveDecoder; return pBitmap; } + void XFA_RectWidthoutMargin(CFX_RectF& rt, const CXFA_Margin& mg, bool bUI) { if (!mg) { return; |