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

Unified Diff: core/fxge/dib/fx_dib_transform.cpp

Issue 2386273004: Add ptr_util.h from base until std::make_unique<> available (Closed)
Patch Set: 2016 Created 4 years, 2 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/dib/fx_dib_main.cpp ('k') | core/fxge/ge/cfx_font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/dib/fx_dib_transform.cpp
diff --git a/core/fxge/dib/fx_dib_transform.cpp b/core/fxge/dib/fx_dib_transform.cpp
index a559fee55d3c9d7223bd7d452bbfe517267083bc..559c6e2a3849d90b6a16b7632dc25cdc570f8470 100644
--- a/core/fxge/dib/fx_dib_transform.cpp
+++ b/core/fxge/dib/fx_dib_transform.cpp
@@ -7,6 +7,7 @@
#include "core/fxge/dib/dib_int.h"
#include "core/fxge/fx_dib.h"
+#include "third_party/base/ptr_util.h"
namespace {
@@ -363,8 +364,8 @@ FX_BOOL CFX_ImageTransformer::Start() {
result_clip.Offset(-result_rect.left, -result_rect.top);
result_clip = FXDIB_SwapClipBox(result_clip, dest_width, dest_height,
m_pMatrix->c > 0, m_pMatrix->b < 0);
- m_Stretcher = WrapUnique(new CFX_ImageStretcher(
- &m_Storer, m_pSrc, dest_height, dest_width, result_clip, m_Flags));
+ m_Stretcher = pdfium::MakeUnique<CFX_ImageStretcher>(
+ &m_Storer, m_pSrc, dest_height, dest_width, result_clip, m_Flags);
m_Stretcher->Start();
m_Status = 1;
return TRUE;
@@ -376,8 +377,8 @@ FX_BOOL CFX_ImageTransformer::Start() {
int dest_height = m_pMatrix->d > 0 ? (int)-FXSYS_ceil(m_pMatrix->d)
: (int)-FXSYS_floor(m_pMatrix->d);
result_clip.Offset(-result_rect.left, -result_rect.top);
- m_Stretcher = WrapUnique(new CFX_ImageStretcher(
- &m_Storer, m_pSrc, dest_width, dest_height, result_clip, m_Flags));
+ m_Stretcher = pdfium::MakeUnique<CFX_ImageStretcher>(
+ &m_Storer, m_pSrc, dest_width, dest_height, result_clip, m_Flags);
m_Stretcher->Start();
m_Status = 2;
return TRUE;
@@ -395,9 +396,8 @@ FX_BOOL CFX_ImageTransformer::Start() {
clip_rect_f.Transform(&m_dest2stretch);
m_StretchClip = clip_rect_f.GetOuterRect();
m_StretchClip.Intersect(0, 0, stretch_width, stretch_height);
- m_Stretcher = WrapUnique(new CFX_ImageStretcher(&m_Storer, m_pSrc,
- stretch_width, stretch_height,
- m_StretchClip, m_Flags));
+ m_Stretcher = pdfium::MakeUnique<CFX_ImageStretcher>(
+ &m_Storer, m_pSrc, stretch_width, stretch_height, m_StretchClip, m_Flags);
m_Stretcher->Start();
m_Status = 3;
return TRUE;
« no previous file with comments | « core/fxge/dib/fx_dib_main.cpp ('k') | core/fxge/ge/cfx_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698