Convert pdfium::MakeUnique<> to std::make_unique<> in fxge
Change-Id: I85c95d131396a3fdc5cda8b2122da9634f23ab5b
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/70031
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp
index 8fd0315..b7da517 100644
--- a/core/fxge/agg/fx_agg_driver.cpp
+++ b/core/fxge/agg/fx_agg_driver.cpp
@@ -17,7 +17,6 @@
#include "core/fxge/dib/cfx_dibitmap.h"
#include "core/fxge/dib/cfx_imagerenderer.h"
#include "core/fxge/dib/cfx_imagestretcher.h"
-#include "third_party/base/ptr_util.h"
#include "third_party/base/span.h"
#include "third_party/base/stl_util.h"
@@ -1206,7 +1205,7 @@
void CFX_AggDeviceDriver::SaveState() {
std::unique_ptr<CFX_ClipRgn> pClip;
if (m_pClipRgn)
- pClip = pdfium::MakeUnique<CFX_ClipRgn>(*m_pClipRgn);
+ pClip = std::make_unique<CFX_ClipRgn>(*m_pClipRgn);
m_StateStack.push_back(std::move(pClip));
}
@@ -1218,7 +1217,7 @@
if (bKeepSaved) {
if (m_StateStack.back())
- m_pClipRgn = pdfium::MakeUnique<CFX_ClipRgn>(*m_StateStack.back());
+ m_pClipRgn = std::make_unique<CFX_ClipRgn>(*m_StateStack.back());
} else {
m_pClipRgn = std::move(m_StateStack.back());
m_StateStack.pop_back();
@@ -1255,7 +1254,7 @@
m_FillFlags = fill_mode;
if (!m_pClipRgn) {
- m_pClipRgn = pdfium::MakeUnique<CFX_ClipRgn>(
+ m_pClipRgn = std::make_unique<CFX_ClipRgn>(
GetDeviceCaps(FXDC_PIXEL_WIDTH), GetDeviceCaps(FXDC_PIXEL_HEIGHT));
}
size_t size = pPathData->GetPoints().size();
@@ -1289,7 +1288,7 @@
const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState) {
if (!m_pClipRgn) {
- m_pClipRgn = pdfium::MakeUnique<CFX_ClipRgn>(
+ m_pClipRgn = std::make_unique<CFX_ClipRgn>(
GetDeviceCaps(FXDC_PIXEL_WIDTH), GetDeviceCaps(FXDC_PIXEL_HEIGHT));
}
CAgg_PathData path_data;
@@ -1576,7 +1575,7 @@
if (!m_pBitmap->GetBuffer())
return true;
- *handle = pdfium::MakeUnique<CFX_ImageRenderer>(
+ *handle = std::make_unique<CFX_ImageRenderer>(
m_pBitmap, m_pClipRgn.get(), pSource, bitmap_alpha, argb, matrix, options,
m_bRgbByteOrder);
return true;
@@ -1601,7 +1600,7 @@
return false;
SetBitmap(pBitmap);
- SetDeviceDriver(pdfium::MakeUnique<CFX_AggDeviceDriver>(
+ SetDeviceDriver(std::make_unique<CFX_AggDeviceDriver>(
pBitmap, bRgbByteOrder, pBackdropBitmap, bGroupKnockout));
return true;
}
@@ -1616,7 +1615,7 @@
return false;
SetBitmap(pBitmap);
- SetDeviceDriver(pdfium::MakeUnique<CFX_AggDeviceDriver>(
+ SetDeviceDriver(std::make_unique<CFX_AggDeviceDriver>(
pBitmap, false, pBackdropBitmap, false));
return true;
}
diff --git a/core/fxge/android/cfpf_skiadevicemodule.cpp b/core/fxge/android/cfpf_skiadevicemodule.cpp
index bb3f70a..ff68b9f 100644
--- a/core/fxge/android/cfpf_skiadevicemodule.cpp
+++ b/core/fxge/android/cfpf_skiadevicemodule.cpp
@@ -9,7 +9,6 @@
#include <utility>
#include "core/fxge/android/cfpf_skiafontmgr.h"
-#include "third_party/base/ptr_util.h"
namespace {
@@ -34,7 +33,7 @@
CFPF_SkiaFontMgr* CFPF_SkiaDeviceModule::GetFontMgr() {
if (!m_pFontMgr) {
- auto pNewMgr = pdfium::MakeUnique<CFPF_SkiaFontMgr>();
+ auto pNewMgr = std::make_unique<CFPF_SkiaFontMgr>();
if (!pNewMgr->InitFTLibrary())
return nullptr;
m_pFontMgr = std::move(pNewMgr);
diff --git a/core/fxge/android/cfpf_skiafontmgr.cpp b/core/fxge/android/cfpf_skiafontmgr.cpp
index b5e7a20..1115fbf 100644
--- a/core/fxge/android/cfpf_skiafontmgr.cpp
+++ b/core/fxge/android/cfpf_skiafontmgr.cpp
@@ -18,7 +18,6 @@
#include "core/fxge/android/cfpf_skiapathfont.h"
#include "core/fxge/fx_font.h"
#include "core/fxge/fx_freetype.h"
-#include "third_party/base/ptr_util.h"
namespace {
@@ -328,7 +327,7 @@
return nullptr;
auto pFont =
- pdfium::MakeUnique<CFPF_SkiaFont>(this, pBestFont, dwStyle, uCharset);
+ std::make_unique<CFPF_SkiaFont>(this, pBestFont, dwStyle, uCharset);
if (!pFont->IsValid())
return nullptr;
@@ -417,7 +416,7 @@
if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31)))
dwStyle |= FXFONT_SYMBOLIC;
- return pdfium::MakeUnique<CFPF_SkiaPathFont>(
+ return std::make_unique<CFPF_SkiaPathFont>(
file, FXFT_Get_Face_Family_Name(face->GetRec()), dwStyle,
face->GetRec()->face_index, FPF_SkiaGetFaceCharset(pOS2),
face->GetRec()->num_glyphs);
diff --git a/core/fxge/android/fx_android_impl.cpp b/core/fxge/android/fx_android_impl.cpp
index 755de14..f93223b 100644
--- a/core/fxge/android/fx_android_impl.cpp
+++ b/core/fxge/android/fx_android_impl.cpp
@@ -11,7 +11,6 @@
#include "core/fxge/android/cfx_androidfontinfo.h"
#include "core/fxge/cfx_fontmgr.h"
#include "core/fxge/cfx_gemodule.h"
-#include "third_party/base/ptr_util.h"
class CAndroidPlatform : public CFX_GEModule::PlatformIface {
public:
@@ -27,7 +26,7 @@
if (!pFontMgr)
return;
- auto pFontInfo = pdfium::MakeUnique<CFX_AndroidFontInfo>();
+ auto pFontInfo = std::make_unique<CFX_AndroidFontInfo>();
pFontInfo->Init(pFontMgr);
CFX_GEModule::Get()->GetFontMgr()->SetSystemFontInfo(std::move(pFontInfo));
}
@@ -39,5 +38,5 @@
// static
std::unique_ptr<CFX_GEModule::PlatformIface>
CFX_GEModule::PlatformIface::Create() {
- return pdfium::MakeUnique<CAndroidPlatform>();
+ return std::make_unique<CAndroidPlatform>();
}
diff --git a/core/fxge/apple/fx_mac_impl.cpp b/core/fxge/apple/fx_mac_impl.cpp
index 957883a..fc8d1bd 100644
--- a/core/fxge/apple/fx_mac_impl.cpp
+++ b/core/fxge/apple/fx_mac_impl.cpp
@@ -14,7 +14,6 @@
#include "core/fxge/cfx_fontmgr.h"
#include "core/fxge/fx_font.h"
#include "core/fxge/systemfontinfo_iface.h"
-#include "third_party/base/ptr_util.h"
namespace {
@@ -133,7 +132,7 @@
std::unique_ptr<SystemFontInfoIface> SystemFontInfoIface::CreateDefault(
const char** pUserPaths) {
- auto pInfo = pdfium::MakeUnique<CFX_MacFontInfo>();
+ auto pInfo = std::make_unique<CFX_MacFontInfo>();
if (!pInfo->ParseFontCfg(pUserPaths)) {
pInfo->AddPath("~/Library/Fonts");
pInfo->AddPath("/Library/Fonts");
@@ -155,5 +154,5 @@
// static
std::unique_ptr<CFX_GEModule::PlatformIface>
CFX_GEModule::PlatformIface::Create() {
- return pdfium::MakeUnique<CApplePlatform>();
+ return std::make_unique<CApplePlatform>();
}
diff --git a/core/fxge/cfx_folderfontinfo.cpp b/core/fxge/cfx_folderfontinfo.cpp
index 92517c5..6b659ba 100644
--- a/core/fxge/cfx_folderfontinfo.cpp
+++ b/core/fxge/cfx_folderfontinfo.cpp
@@ -16,7 +16,6 @@
#include "core/fxcrt/fx_stream.h"
#include "core/fxge/cfx_fontmapper.h"
#include "core/fxge/fx_font.h"
-#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
#define CHARSET_FLAG_ANSI (1 << 0)
@@ -244,8 +243,8 @@
if (pdfium::Contains(m_FontList, facename))
return;
- auto pInfo = pdfium::MakeUnique<FontFaceInfo>(path, facename, tables, offset,
- filesize);
+ auto pInfo =
+ std::make_unique<FontFaceInfo>(path, facename, tables, offset, filesize);
ByteString os2 =
LoadTableFromTT(pFile, tables.raw_str(), nTables, 0x4f532f32, filesize);
if (os2.GetLength() >= 86) {
diff --git a/core/fxge/cfx_folderfontinfo_unittest.cpp b/core/fxge/cfx_folderfontinfo_unittest.cpp
index 0e7e08b..dea29d4 100644
--- a/core/fxge/cfx_folderfontinfo_unittest.cpp
+++ b/core/fxge/cfx_folderfontinfo_unittest.cpp
@@ -7,7 +7,6 @@
#include <utility>
#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
namespace {
@@ -24,20 +23,20 @@
class CFX_FolderFontInfoTest : public ::testing::Test {
public:
CFX_FolderFontInfoTest() {
- auto arial_info = pdfium::MakeUnique<CFX_FolderFontInfo::FontFaceInfo>(
+ auto arial_info = std::make_unique<CFX_FolderFontInfo::FontFaceInfo>(
/*filePath=*/"", kArial, /*fontTables=*/"",
/*fontOffset=*/0, /*fileSize=*/0);
arial_info->m_Charsets = 2;
auto times_new_roman_info =
- pdfium::MakeUnique<CFX_FolderFontInfo::FontFaceInfo>(
+ std::make_unique<CFX_FolderFontInfo::FontFaceInfo>(
/*filePath=*/"", kTimesNewRoman, /*fontTables=*/"",
/*fontOffset=*/0, /*fileSize=*/0);
auto bookshelf_symbol7_info =
- pdfium::MakeUnique<CFX_FolderFontInfo::FontFaceInfo>(
+ std::make_unique<CFX_FolderFontInfo::FontFaceInfo>(
/*filePath=*/"", kBookshelfSymbol7, /*fontTables=*/"",
/*fontOffset=*/0, /*fileSize=*/0);
bookshelf_symbol7_info->m_Charsets = 2;
- auto symbol_info = pdfium::MakeUnique<CFX_FolderFontInfo::FontFaceInfo>(
+ auto symbol_info = std::make_unique<CFX_FolderFontInfo::FontFaceInfo>(
/*filePath=*/"", kSymbol, /*fontTables=*/"",
/*fontOffset=*/0, /*fileSize=*/0);
symbol_info->m_Charsets = 2;
diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
index 49d8bad..12c1d32 100644
--- a/core/fxge/cfx_font.cpp
+++ b/core/fxge/cfx_font.cpp
@@ -23,7 +23,6 @@
#include "core/fxge/cfx_substfont.h"
#include "core/fxge/fx_font.h"
#include "core/fxge/scoped_font_transform.h"
-#include "third_party/base/ptr_util.h"
#include "third_party/base/span.h"
#define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em)
@@ -60,7 +59,7 @@
const RetainPtr<IFX_SeekableReadStream>& pFile,
int32_t faceIndex,
std::unique_ptr<FXFT_StreamRec>* stream) {
- auto stream1 = pdfium::MakeUnique<FXFT_StreamRec>();
+ auto stream1 = std::make_unique<FXFT_StreamRec>();
stream1->base = nullptr;
stream1->size = static_cast<unsigned long>(pFile->GetSize());
stream1->pos = 0;
@@ -354,7 +353,7 @@
bool bVertical) {
m_bEmbedded = false;
m_bVertical = bVertical;
- m_pSubstFont = pdfium::MakeUnique<CFX_SubstFont>();
+ m_pSubstFont = std::make_unique<CFX_SubstFont>();
m_Face = CFX_GEModule::Get()->GetFontMgr()->FindSubstFont(
face_name, bTrueType, flags, weight, italic_angle, CharsetCP,
m_pSubstFont.get());
@@ -694,7 +693,7 @@
funcs.delta = 0;
OUTLINE_PARAMS params;
- auto pPath = pdfium::MakeUnique<CFX_PathData>();
+ auto pPath = std::make_unique<CFX_PathData>();
params.m_pPath = pPath.get();
params.m_CurX = params.m_CurY = 0;
params.m_CoordUnit = 64 * 64.0;
diff --git a/core/fxge/cfx_fontmgr.cpp b/core/fxge/cfx_fontmgr.cpp
index 7a08d0f..b585cf1 100644
--- a/core/fxge/cfx_fontmgr.cpp
+++ b/core/fxge/cfx_fontmgr.cpp
@@ -15,7 +15,6 @@
#include "core/fxge/fontdata/chromefontdata/chromefontdata.h"
#include "core/fxge/fx_font.h"
#include "core/fxge/systemfontinfo_iface.h"
-#include "third_party/base/ptr_util.h"
namespace {
@@ -86,7 +85,7 @@
CFX_FontMgr::CFX_FontMgr()
: m_FTLibrary(FTLibraryInitHelper()),
- m_pBuiltinMapper(pdfium::MakeUnique<CFX_FontMapper>(this)),
+ m_pBuiltinMapper(std::make_unique<CFX_FontMapper>(this)),
m_FTLibrarySupportsHinting(SetLcdFilterMode() ||
FreeTypeVersionSupportsHinting()) {}
diff --git a/core/fxge/cfx_gemodule.cpp b/core/fxge/cfx_gemodule.cpp
index 5d268bf..9b6769d 100644
--- a/core/fxge/cfx_gemodule.cpp
+++ b/core/fxge/cfx_gemodule.cpp
@@ -9,7 +9,6 @@
#include "core/fxge/cfx_folderfontinfo.h"
#include "core/fxge/cfx_fontcache.h"
#include "core/fxge/cfx_fontmgr.h"
-#include "third_party/base/ptr_util.h"
namespace {
@@ -19,8 +18,8 @@
CFX_GEModule::CFX_GEModule(const char** pUserFontPaths)
: m_pPlatform(PlatformIface::Create()),
- m_pFontMgr(pdfium::MakeUnique<CFX_FontMgr>()),
- m_pFontCache(pdfium::MakeUnique<CFX_FontCache>()),
+ m_pFontMgr(std::make_unique<CFX_FontMgr>()),
+ m_pFontCache(std::make_unique<CFX_FontCache>()),
m_pUserFontPaths(pUserFontPaths) {}
CFX_GEModule::~CFX_GEModule() = default;
diff --git a/core/fxge/cfx_glyphcache.cpp b/core/fxge/cfx_glyphcache.cpp
index f91f8b3..b48697b 100644
--- a/core/fxge/cfx_glyphcache.cpp
+++ b/core/fxge/cfx_glyphcache.cpp
@@ -24,7 +24,6 @@
#include "core/fxge/render_defines.h"
#include "core/fxge/scoped_font_transform.h"
#include "third_party/base/numerics/safe_math.h"
-#include "third_party/base/ptr_util.h"
#if defined _SKIA_SUPPORT_ || _SKIA_SUPPORT_PATHS_
#include "third_party/skia/include/core/SkStream.h"
@@ -194,9 +193,9 @@
if (bmwidth > kMaxGlyphDimension || bmheight > kMaxGlyphDimension)
return nullptr;
int dib_width = bmwidth;
- auto pGlyphBitmap = pdfium::MakeUnique<CFX_GlyphBitmap>(
- FXFT_Get_Glyph_BitmapLeft(GetFaceRec()),
- FXFT_Get_Glyph_BitmapTop(GetFaceRec()));
+ auto pGlyphBitmap =
+ std::make_unique<CFX_GlyphBitmap>(FXFT_Get_Glyph_BitmapLeft(GetFaceRec()),
+ FXFT_Get_Glyph_BitmapTop(GetFaceRec()));
pGlyphBitmap->GetBitmap()->Create(
dib_width, bmheight,
anti_alias == FT_RENDER_MODE_MONO ? FXDIB_1bppMask : FXDIB_8bppMask);
@@ -320,14 +319,14 @@
if (!m_pTypeface) {
pdfium::span<const uint8_t> span = pFont->GetFontSpan();
m_pTypeface = SkTypeface::MakeFromStream(
- pdfium::MakeUnique<SkMemoryStream>(span.data(), span.size()));
+ std::make_unique<SkMemoryStream>(span.data(), span.size()));
}
#if defined(OS_WIN)
if (!m_pTypeface) {
sk_sp<SkFontMgr> customMgr(SkFontMgr_New_Custom_Empty());
pdfium::span<const uint8_t> span = pFont->GetFontSpan();
m_pTypeface = customMgr->makeFromStream(
- pdfium::MakeUnique<SkMemoryStream>(span.data(), span.size()));
+ std::make_unique<SkMemoryStream>(span.data(), span.size()));
}
#endif // defined(OS_WIN)
return m_pTypeface.get();
diff --git a/core/fxge/cfx_unicodeencodingex.cpp b/core/fxge/cfx_unicodeencodingex.cpp
index a2fa24a..3e187e8 100644
--- a/core/fxge/cfx_unicodeencodingex.cpp
+++ b/core/fxge/cfx_unicodeencodingex.cpp
@@ -11,7 +11,6 @@
#include "core/fxge/cfx_font.h"
#include "core/fxge/fx_font.h"
#include "core/fxge/fx_freetype.h"
-#include "third_party/base/ptr_util.h"
#define FXFM_ENC_TAG(a, b, c, d) \
(((uint32_t)(a) << 24) | ((uint32_t)(b) << 16) | ((uint32_t)(c) << 8) | \
@@ -47,7 +46,7 @@
uint32_t nEncodingID) {
if (FXFT_Select_Charmap(pFont->GetFaceRec(), nEncodingID))
return nullptr;
- return pdfium::MakeUnique<CFX_UnicodeEncodingEx>(pFont, nEncodingID);
+ return std::make_unique<CFX_UnicodeEncodingEx>(pFont, nEncodingID);
}
} // namespace
diff --git a/core/fxge/dib/cfx_imagerenderer.cpp b/core/fxge/dib/cfx_imagerenderer.cpp
index 5c15a9c..39d46106 100644
--- a/core/fxge/dib/cfx_imagerenderer.cpp
+++ b/core/fxge/dib/cfx_imagerenderer.cpp
@@ -12,7 +12,6 @@
#include "core/fxge/dib/cfx_dibitmap.h"
#include "core/fxge/dib/cfx_imagestretcher.h"
#include "core/fxge/dib/cfx_imagetransformer.h"
-#include "third_party/base/ptr_util.h"
CFX_ImageRenderer::CFX_ImageRenderer(const RetainPtr<CFX_DIBitmap>& pDevice,
const CFX_ClipRgn* pClipRgn,
@@ -50,14 +49,14 @@
m_Composer.Compose(pDevice, pClipRgn, bitmap_alpha, mask_color, m_ClipBox,
true, m_Matrix.c > 0, m_Matrix.b < 0, m_bRgbByteOrder,
BlendMode::kNormal);
- m_Stretcher = pdfium::MakeUnique<CFX_ImageStretcher>(
+ m_Stretcher = std::make_unique<CFX_ImageStretcher>(
&m_Composer, pSource, dest_height, dest_width, bitmap_clip, options);
if (m_Stretcher->Start())
m_Status = 1;
return;
}
m_Status = 2;
- m_pTransformer = pdfium::MakeUnique<CFX_ImageTransformer>(
+ m_pTransformer = std::make_unique<CFX_ImageTransformer>(
pSource, m_Matrix, options, &m_ClipBox);
return;
}
@@ -78,7 +77,7 @@
m_Composer.Compose(pDevice, pClipRgn, bitmap_alpha, mask_color, m_ClipBox,
false, false, false, m_bRgbByteOrder, BlendMode::kNormal);
m_Status = 1;
- m_Stretcher = pdfium::MakeUnique<CFX_ImageStretcher>(
+ m_Stretcher = std::make_unique<CFX_ImageStretcher>(
&m_Composer, pSource, dest_width, dest_height, bitmap_clip, options);
m_Stretcher->Start();
}
diff --git a/core/fxge/dib/cfx_imagestretcher.cpp b/core/fxge/dib/cfx_imagestretcher.cpp
index 1499e8a..40c8061 100644
--- a/core/fxge/dib/cfx_imagestretcher.cpp
+++ b/core/fxge/dib/cfx_imagestretcher.cpp
@@ -14,7 +14,6 @@
#include "core/fxge/dib/cfx_dibitmap.h"
#include "core/fxge/dib/cstretchengine.h"
#include "core/fxge/fx_dib.h"
-#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
namespace {
@@ -130,7 +129,7 @@
}
bool CFX_ImageStretcher::StartStretch() {
- m_pStretchEngine = pdfium::MakeUnique<CStretchEngine>(
+ m_pStretchEngine = std::make_unique<CStretchEngine>(
m_pDest.Get(), m_DestFormat, m_DestWidth, m_DestHeight, m_ClipRect,
m_pSource, m_ResampleOptions);
m_pStretchEngine->StartStretchHorz();
diff --git a/core/fxge/dib/cfx_imagetransformer.cpp b/core/fxge/dib/cfx_imagetransformer.cpp
index 3afc48c..bc0c778 100644
--- a/core/fxge/dib/cfx_imagetransformer.cpp
+++ b/core/fxge/dib/cfx_imagetransformer.cpp
@@ -15,7 +15,6 @@
#include "core/fxge/fx_dib.h"
#include "third_party/base/compiler_specific.h"
#include "third_party/base/numerics/safe_conversions.h"
-#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
namespace {
@@ -330,7 +329,7 @@
result_clip.Offset(-result_rect.left, -result_rect.top);
result_clip = FXDIB_SwapClipBox(result_clip, dest_width, dest_height,
m_matrix.c > 0, m_matrix.b < 0);
- m_Stretcher = pdfium::MakeUnique<CFX_ImageStretcher>(
+ m_Stretcher = std::make_unique<CFX_ImageStretcher>(
&m_Storer, m_pSrc, dest_height, dest_width, result_clip,
m_ResampleOptions);
m_Stretcher->Start();
@@ -343,7 +342,7 @@
int dest_height = static_cast<int>(m_matrix.d > 0 ? -ceil(m_matrix.d)
: -floor(m_matrix.d));
result_clip.Offset(-result_rect.left, -result_rect.top);
- m_Stretcher = pdfium::MakeUnique<CFX_ImageStretcher>(
+ m_Stretcher = std::make_unique<CFX_ImageStretcher>(
&m_Storer, m_pSrc, dest_width, dest_height, result_clip,
m_ResampleOptions);
m_Stretcher->Start();
@@ -373,7 +372,7 @@
m_dest2stretch = dest_to_strech;
m_StretchClip = stretch_clip;
- m_Stretcher = pdfium::MakeUnique<CFX_ImageStretcher>(
+ m_Stretcher = std::make_unique<CFX_ImageStretcher>(
&m_Storer, m_pSrc, stretch_width, stretch_height, m_StretchClip,
m_ResampleOptions);
m_Stretcher->Start();
diff --git a/core/fxge/fx_ge_linux.cpp b/core/fxge/fx_ge_linux.cpp
index d76d39d..c76c99d 100644
--- a/core/fxge/fx_ge_linux.cpp
+++ b/core/fxge/fx_ge_linux.cpp
@@ -13,7 +13,6 @@
#include "core/fxge/cfx_gemodule.h"
#include "core/fxge/fx_font.h"
#include "core/fxge/systemfontinfo_iface.h"
-#include "third_party/base/ptr_util.h"
#if _FX_PLATFORM_ == _FX_PLATFORM_LINUX_
namespace {
@@ -153,7 +152,7 @@
std::unique_ptr<SystemFontInfoIface> SystemFontInfoIface::CreateDefault(
const char** pUserPaths) {
- auto pInfo = pdfium::MakeUnique<CFX_LinuxFontInfo>();
+ auto pInfo = std::make_unique<CFX_LinuxFontInfo>();
if (!pInfo->ParseFontCfg(pUserPaths)) {
pInfo->AddPath("/usr/share/fonts");
pInfo->AddPath("/usr/share/X11/fonts/Type1");
@@ -178,6 +177,6 @@
// static
std::unique_ptr<CFX_GEModule::PlatformIface>
CFX_GEModule::PlatformIface::Create() {
- return pdfium::MakeUnique<CLinuxPlatform>();
+ return std::make_unique<CLinuxPlatform>();
}
#endif // _FX_PLATFORM_ == _FX_PLATFORM_LINUX_
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 9f0414a..9187f53 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -1895,7 +1895,7 @@
#endif
std::unique_ptr<CFX_ClipRgn> pClip;
if (m_pClipRgn)
- pClip = pdfium::MakeUnique<CFX_ClipRgn>(*m_pClipRgn);
+ pClip = std::make_unique<CFX_ClipRgn>(*m_pClipRgn);
m_StateStack.push_back(std::move(pClip));
#endif // _SKIA_SUPPORT_PATHS_
}
@@ -1921,7 +1921,7 @@
#endif
if (bKeepSaved) {
if (m_StateStack.back())
- m_pClipRgn = pdfium::MakeUnique<CFX_ClipRgn>(*m_StateStack.back());
+ m_pClipRgn = std::make_unique<CFX_ClipRgn>(*m_StateStack.back());
} else {
m_pClipRgn = std::move(m_StateStack.back());
m_StateStack.pop_back();
@@ -1946,7 +1946,7 @@
SkBitmap bitmap;
bitmap.installPixels(imageInfo, pThisLayer->GetBuffer(),
pThisLayer->GetPitch());
- auto canvas = pdfium::MakeUnique<SkCanvas>(bitmap);
+ auto canvas = std::make_unique<SkCanvas>(bitmap);
canvas->translate(
-path_rect.left,
-path_rect.top); // FIXME(caryclark) wrong sign(s)? upside down?
@@ -1969,7 +1969,7 @@
#ifdef _SKIA_SUPPORT_PATHS_
m_FillFlags = fill_mode;
if (!m_pClipRgn) {
- m_pClipRgn = pdfium::MakeUnique<CFX_ClipRgn>(
+ m_pClipRgn = std::make_unique<CFX_ClipRgn>(
GetDeviceCaps(FXDC_PIXEL_WIDTH), GetDeviceCaps(FXDC_PIXEL_HEIGHT));
}
#endif // _SKIA_SUPPORT_PATHS_
@@ -2024,7 +2024,7 @@
#ifdef _SKIA_SUPPORT_PATHS_
if (!m_pClipRgn) {
- m_pClipRgn = pdfium::MakeUnique<CFX_ClipRgn>(
+ m_pClipRgn = std::make_unique<CFX_ClipRgn>(
GetDeviceCaps(FXDC_PIXEL_WIDTH), GetDeviceCaps(FXDC_PIXEL_HEIGHT));
}
#endif // _SKIA_SUPPORT_PATHS_
@@ -2547,7 +2547,7 @@
if (!m_pBitmap->GetBuffer())
return true;
m_pBitmap->UnPreMultiply();
- *handle = pdfium::MakeUnique<CFX_ImageRenderer>(
+ *handle = std::make_unique<CFX_ImageRenderer>(
m_pBitmap, m_pClipRgn.get(), pSource, bitmap_alpha, argb, matrix, options,
m_bRgbByteOrder);
#endif // _SKIA_SUPPORT_PATHS_
@@ -2729,7 +2729,7 @@
if (!pBitmap)
return false;
SetBitmap(pBitmap);
- SetDeviceDriver(pdfium::MakeUnique<CFX_SkiaDeviceDriver>(
+ SetDeviceDriver(std::make_unique<CFX_SkiaDeviceDriver>(
pBitmap, bRgbByteOrder, pBackdropBitmap, bGroupKnockout));
return true;
}
@@ -2738,7 +2738,7 @@
bool CFX_DefaultRenderDevice::AttachRecorder(SkPictureRecorder* recorder) {
if (!recorder)
return false;
- SetDeviceDriver(pdfium::MakeUnique<CFX_SkiaDeviceDriver>(recorder));
+ SetDeviceDriver(std::make_unique<CFX_SkiaDeviceDriver>(recorder));
return true;
}
#endif // _SKIA_SUPPORT_
@@ -2753,7 +2753,7 @@
return false;
}
SetBitmap(pBitmap);
- SetDeviceDriver(pdfium::MakeUnique<CFX_SkiaDeviceDriver>(
+ SetDeviceDriver(std::make_unique<CFX_SkiaDeviceDriver>(
pBitmap, false, pBackdropBitmap, false));
return true;
}
diff --git a/core/fxge/win32/cfx_psrenderer.cpp b/core/fxge/win32/cfx_psrenderer.cpp
index f215de6..a445174 100644
--- a/core/fxge/win32/cfx_psrenderer.cpp
+++ b/core/fxge/win32/cfx_psrenderer.cpp
@@ -23,7 +23,6 @@
#include "core/fxge/fx_dib.h"
#include "core/fxge/text_char_pos.h"
#include "core/fxge/win32/cpsoutput.h"
-#include "third_party/base/ptr_util.h"
struct PSGlyph {
UnownedPtr<CFX_Font> m_pFont;
@@ -494,7 +493,7 @@
}
if (m_PSFontList.empty() || m_PSFontList.back()->m_nGlyphs == 256) {
- m_PSFontList.push_back(pdfium::MakeUnique<CPSFont>());
+ m_PSFontList.push_back(std::make_unique<CPSFont>());
m_PSFontList.back()->m_nGlyphs = 0;
std::ostringstream buf;
buf << "8 dict begin/FontType 3 def/FontMatrix[1 0 0 1 0 0]def\n"
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index e1a046f..3fe4a50 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -701,7 +701,7 @@
// static
std::unique_ptr<CFX_GEModule::PlatformIface>
CFX_GEModule::PlatformIface::Create() {
- return pdfium::MakeUnique<CWin32Platform>();
+ return std::make_unique<CWin32Platform>();
}
CGdiDeviceDriver::CGdiDeviceDriver(HDC hDC, DeviceType device_type)
diff --git a/core/fxge/win32/fx_win32_device_embeddertest.cpp b/core/fxge/win32/fx_win32_device_embeddertest.cpp
index cb088e7..3d91a96 100644
--- a/core/fxge/win32/fx_win32_device_embeddertest.cpp
+++ b/core/fxge/win32/fx_win32_device_embeddertest.cpp
@@ -9,7 +9,6 @@
#include <memory>
#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/base/ptr_util.h"
namespace {
@@ -24,7 +23,7 @@
m_hDC = CreateCompatibleDC(nullptr);
ASSERT_TRUE(m_hDC);
CFX_GEModule::Create(nullptr);
- m_driver = pdfium::MakeUnique<CFX_WindowsRenderDevice>(m_hDC, nullptr);
+ m_driver = std::make_unique<CFX_WindowsRenderDevice>(m_hDC, nullptr);
m_driver->SaveState();
}