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

Unified Diff: core/fxge/win32/fx_win32_device.cpp

Issue 2534953004: Return unique_ptrs from CFX_DIBitmap::Clone(). (Closed)
Patch Set: win again Created 4 years 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
Index: core/fxge/win32/fx_win32_device.cpp
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index 004f344d67f655cd1f994cded4c37866bf0d4b18..a8510ce7563a0dd3718bdddc69a3a83be438bbaa 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -813,7 +813,7 @@ bool CGdiDeviceDriver::GDI_SetDIBits(CFX_DIBitmap* pBitmap1,
} else {
CFX_DIBitmap* pBitmap = pBitmap1;
if (pBitmap->IsCmykImage()) {
- pBitmap = pBitmap->CloneConvert(FXDIB_Rgb);
+ pBitmap = pBitmap->CloneConvert(FXDIB_Rgb).release();
if (!pBitmap)
return false;
}
@@ -857,7 +857,7 @@ bool CGdiDeviceDriver::GDI_StretchDIBits(CFX_DIBitmap* pBitmap1,
if (m_DeviceClass == FXDC_PRINTER &&
((int64_t)pBitmap->GetWidth() * pBitmap->GetHeight() >
(int64_t)abs(dest_width) * abs(dest_height))) {
- pToStrechBitmap = pBitmap->StretchTo(dest_width, dest_height);
+ pToStrechBitmap = pBitmap->StretchTo(dest_width, dest_height).release();
del = true;
}
CFX_ByteString toStrechBitmapInfo =

Powered by Google App Engine
This is Rietveld 408576698