diff options
author | thestig <thestig@chromium.org> | 2016-06-22 07:29:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-22 07:29:08 -0700 |
commit | 726b3db9b05c785923c65a260c59a9a9190c29e0 (patch) | |
tree | 9ac0909d9992af059ed4655bc062f46b9205a3c9 /core/fxge/skia | |
parent | ca0bc7deead753698af70dced5e619176e37c65a (diff) | |
download | pdfium-726b3db9b05c785923c65a260c59a9a9190c29e0.tar.xz |
Remove some fx_dib functions with unused parameters.
Review-Url: https://codereview.chromium.org/2075383002
Diffstat (limited to 'core/fxge/skia')
-rw-r--r-- | core/fxge/skia/fx_skia_device.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index ad7bd2d291..4b69d2fee6 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -938,32 +938,30 @@ FX_BOOL CFX_SkiaDeviceDriver::GetDIBits(CFX_DIBitmap* pBitmap, FX_RECT rect(left, top, left + pBitmap->GetWidth(), top + pBitmap->GetHeight()); - CFX_DIBitmap* pBack; + std::unique_ptr<CFX_DIBitmap> pBack; if (m_pOriDevice) { - pBack = m_pOriDevice->Clone(&rect); + pBack.reset(m_pOriDevice->Clone(&rect)); if (!pBack) return TRUE; pBack->CompositeBitmap(0, 0, pBack->GetWidth(), pBack->GetHeight(), m_pBitmap, 0, 0); } else { - pBack = m_pBitmap->Clone(&rect); + pBack.reset(m_pBitmap->Clone(&rect)); if (!pBack) return TRUE; } - FX_BOOL bRet = TRUE; left = std::min(left, 0); top = std::min(top, 0); if (m_bRgbByteOrder) { RgbByteOrderTransferBitmap(pBitmap, 0, 0, rect.Width(), rect.Height(), - pBack, left, top); - } else { - bRet = pBitmap->TransferBitmap(0, 0, rect.Width(), rect.Height(), pBack, - left, top, nullptr); + pBack.get(), left, top); + return TRUE; } - delete pBack; - return bRet; + + return pBitmap->TransferBitmap(0, 0, rect.Width(), rect.Height(), pBack.get(), + left, top); } CFX_DIBitmap* CFX_SkiaDeviceDriver::GetBackDrop() { |