Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2453)

Unified Diff: core/fxge/skia/fx_skia_device.cpp

Issue 2075383002: Remove some fx_dib functions with unused parameters. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix build, fix skia Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxge/include/fx_font.h ('k') | core/fxge/win32/fx_win32_device.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/skia/fx_skia_device.cpp
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index f253b06c6da6c2b9e9620332d8ed676484b0294e..a031e890e76bede361f1881430ed1c30f974ffc4 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() {
« no previous file with comments | « core/fxge/include/fx_font.h ('k') | core/fxge/win32/fx_win32_device.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698