diff options
author | thestig <thestig@chromium.org> | 2016-05-23 14:56:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-23 14:56:02 -0700 |
commit | 490d6128e6faef423fa6f965f792513e138bc04a (patch) | |
tree | c9e3ea73ae672b0861c92a188a9b84e808d827ea /core/fpdfapi/fpdf_render/fpdf_render_image.cpp | |
parent | 109975b30dbb2b047001a840b8a1e77434fce7b3 (diff) | |
download | pdfium-chromium/2748.tar.xz |
Make CPDF_Function::Load() return an unique_ptr.chromium/2750chromium/2749chromium/2748
Review-Url: https://codereview.chromium.org/2000973002
Diffstat (limited to 'core/fpdfapi/fpdf_render/fpdf_render_image.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_render/fpdf_render_image.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp index 53c40b66ee..d84c0037fd 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp @@ -872,20 +872,21 @@ CCodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder( int nComps, int bpc, const CPDF_Dictionary* pParams); + CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict, FX_RECT* pClipRect, const CFX_Matrix* pMatrix) { - if (!pSMaskDict) { - return NULL; - } + if (!pSMaskDict) + return nullptr; + CPDF_Stream* pGroup = pSMaskDict->GetStreamBy("G"); - if (!pGroup) { - return NULL; - } + if (!pGroup) + return nullptr; + std::unique_ptr<CPDF_Function> pFunc; CPDF_Object* pFuncObj = pSMaskDict->GetDirectObjectBy("TR"); if (pFuncObj && (pFuncObj->IsDictionary() || pFuncObj->IsStream())) - pFunc.reset(CPDF_Function::Load(pFuncObj)); + pFunc = CPDF_Function::Load(pFuncObj); CFX_Matrix matrix = *pMatrix; matrix.TranslateI(-pClipRect->left, -pClipRect->top); |