Index: core/fxge/dib/fx_dib_main.cpp |
diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp |
index 14cd0f4da694ffffca1a9a35efe6d03942ad9104..df448a66bde6c7955e7417c5eb21a0f9da7fd303 100644 |
--- a/core/fxge/dib/fx_dib_main.cpp |
+++ b/core/fxge/dib/fx_dib_main.cpp |
@@ -13,6 +13,7 @@ |
#include "core/fxge/cfx_gemodule.h" |
#include "core/fxge/dib/dib_int.h" |
#include "core/fxge/ge/cfx_cliprgn.h" |
+#include "third_party/base/ptr_util.h" |
void CmykDecode(uint32_t cmyk, int& c, int& m, int& y, int& k) { |
c = FXSYS_GetCValue(cmyk); |
@@ -1461,7 +1462,7 @@ CFX_DIBitmap* CFX_DIBSource::FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const { |
CFX_DIBExtractor::CFX_DIBExtractor(const CFX_DIBSource* pSrc) { |
if (pSrc->GetBuffer()) { |
- m_pBitmap = WrapUnique(new CFX_DIBitmap); |
+ m_pBitmap = pdfium::MakeUnique<CFX_DIBitmap>(); |
if (!m_pBitmap->Create(pSrc->GetWidth(), pSrc->GetHeight(), |
pSrc->GetFormat(), pSrc->GetBuffer())) { |
m_pBitmap.reset(); |
@@ -1567,9 +1568,9 @@ FX_BOOL CFX_ImageRenderer::Start(CFX_DIBitmap* pDevice, |
m_Composer.Compose(pDevice, pClipRgn, bitmap_alpha, mask_color, m_ClipBox, |
TRUE, m_Matrix.c > 0, m_Matrix.b < 0, m_bRgbByteOrder, |
alpha_flag, pIccTransform, m_BlendType); |
- m_Stretcher = WrapUnique(new CFX_ImageStretcher(&m_Composer, pSource, |
- dest_height, dest_width, |
- bitmap_clip, dib_flags)); |
+ m_Stretcher = pdfium::MakeUnique<CFX_ImageStretcher>( |
+ &m_Composer, pSource, dest_height, dest_width, bitmap_clip, |
+ dib_flags); |
if (!m_Stretcher->Start()) |
return FALSE; |
@@ -1600,8 +1601,8 @@ FX_BOOL CFX_ImageRenderer::Start(CFX_DIBitmap* pDevice, |
FALSE, FALSE, FALSE, m_bRgbByteOrder, alpha_flag, |
pIccTransform, m_BlendType); |
m_Status = 1; |
- m_Stretcher = WrapUnique(new CFX_ImageStretcher( |
- &m_Composer, pSource, dest_width, dest_height, bitmap_clip, dib_flags)); |
+ m_Stretcher = pdfium::MakeUnique<CFX_ImageStretcher>( |
+ &m_Composer, pSource, dest_width, dest_height, bitmap_clip, dib_flags); |
return m_Stretcher->Start(); |
} |
@@ -1680,7 +1681,7 @@ FX_BOOL CFX_BitmapStorer::SetInfo(int width, |
int height, |
FXDIB_Format src_format, |
uint32_t* pSrcPalette) { |
- m_pBitmap = WrapUnique(new CFX_DIBitmap); |
+ m_pBitmap = pdfium::MakeUnique<CFX_DIBitmap>(); |
if (!m_pBitmap->Create(width, height, src_format)) { |
m_pBitmap.reset(); |
return FALSE; |