diff options
author | tsepez <tsepez@chromium.org> | 2016-12-06 06:29:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-06 06:29:28 -0800 |
commit | 1a1d7648d3e338b756e464cebb2ae1a815359afa (patch) | |
tree | defa2de6d2cb61efd95ef212eb3e89e1a5811032 /core/fpdfapi/render/cpdf_imagerenderer.cpp | |
parent | 7341149c634e0ab9a619898826440f6e952cf0aa (diff) | |
download | pdfium-1a1d7648d3e338b756e464cebb2ae1a815359afa.tar.xz |
Return unique_ptrs from CFX_DIBitmap::Clone().
Because that's what clone does. Perform immediate release
in some spots to avoid disrupting too much at once.
Review-Url: https://codereview.chromium.org/2534953004
Diffstat (limited to 'core/fpdfapi/render/cpdf_imagerenderer.cpp')
-rw-r--r-- | core/fpdfapi/render/cpdf_imagerenderer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp index bdcd2b3c65..eae32443d8 100644 --- a/core/fpdfapi/render/cpdf_imagerenderer.cpp +++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp @@ -94,7 +94,7 @@ bool CPDF_ImageRenderer::StartRenderDIBSource() { m_pImageObject->m_GeneralState.GetTransferFunc()->TranslateImage( m_Loader.m_pBitmap, !m_Loader.m_bCached); if (m_Loader.m_bCached && m_Loader.m_pMask) - m_Loader.m_pMask = m_Loader.m_pMask->Clone(); + m_Loader.m_pMask = m_Loader.m_pMask->Clone().release(); m_Loader.m_bCached = false; } } @@ -110,7 +110,7 @@ bool CPDF_ImageRenderer::StartRenderDIBSource() { } m_FillArgb = m_pRenderStatus->GetFillArgb(m_pImageObject); } else if (m_pRenderStatus->m_Options.m_ColorMode == RENDER_COLOR_GRAY) { - m_pClone.reset(m_pDIBSource->Clone()); + m_pClone = m_pDIBSource->Clone(); m_pClone->ConvertColorScale(m_pRenderStatus->m_Options.m_BackColor, m_pRenderStatus->m_Options.m_ForeColor); m_pDIBSource = m_pClone.get(); @@ -400,7 +400,7 @@ bool CPDF_ImageRenderer::StartDIBSource() { } } #ifdef _SKIA_SUPPORT_ - CFX_DIBitmap* premultiplied = m_pDIBSource->Clone(); + CFX_DIBitmap* premultiplied = m_pDIBSource->Clone().release(); if (m_pDIBSource->HasAlpha()) CFX_SkiaDeviceDriver::PreMultiply(premultiplied); if (m_pRenderStatus->m_pDevice->StartDIBitsWithBlend( |