summaryrefslogtreecommitdiff
path: root/core/fxge/skia
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-03 15:24:27 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-03 15:24:27 -0700
commit36eb4bdcae719cf33c536ff72ac000482aed8382 (patch)
treeb3c3467fa10eafc3863a619ef511d1bf20af6367 /core/fxge/skia
parent76383db4906c9357292846ace77566b34eb47de9 (diff)
downloadpdfium-36eb4bdcae719cf33c536ff72ac000482aed8382.tar.xz
Add ptr_util.h from base until std::make_unique<> available
Review-Url: https://codereview.chromium.org/2386273004
Diffstat (limited to 'core/fxge/skia')
-rw-r--r--core/fxge/skia/fx_skia_device.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 6a492dd074..928b56fa61 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -20,7 +20,7 @@
#include "core/fxge/cfx_pathdata.h"
#include "core/fxge/cfx_renderdevice.h"
#include "core/fxge/skia/fx_skia_device.h"
-
+#include "third_party/base/ptr_util.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColorFilter.h"
#include "third_party/skia/include/core/SkColorPriv.h"
@@ -1586,7 +1586,7 @@ void CFX_FxgeDevice::Clear(uint32_t color) {
SkPictureRecorder* CFX_FxgeDevice::CreateRecorder(int size_x, int size_y) {
CFX_SkiaDeviceDriver* skDriver = new CFX_SkiaDeviceDriver(size_x, size_y);
- SetDeviceDriver(WrapUnique(skDriver));
+ SetDeviceDriver(pdfium::WrapUnique(skDriver));
return skDriver->GetRecorder();
}
@@ -1597,15 +1597,15 @@ bool CFX_FxgeDevice::Attach(CFX_DIBitmap* pBitmap,
if (!pBitmap)
return false;
SetBitmap(pBitmap);
- SetDeviceDriver(WrapUnique(new CFX_SkiaDeviceDriver(
- pBitmap, bRgbByteOrder, pOriDevice, bGroupKnockout)));
+ SetDeviceDriver(pdfium::MakeUnique<CFX_SkiaDeviceDriver>(
+ pBitmap, bRgbByteOrder, pOriDevice, bGroupKnockout));
return true;
}
bool CFX_FxgeDevice::AttachRecorder(SkPictureRecorder* recorder) {
if (!recorder)
return false;
- SetDeviceDriver(WrapUnique(new CFX_SkiaDeviceDriver(recorder)));
+ SetDeviceDriver(pdfium::MakeUnique<CFX_SkiaDeviceDriver>(recorder));
return true;
}
@@ -1620,8 +1620,8 @@ bool CFX_FxgeDevice::Create(int width,
return false;
}
SetBitmap(pBitmap);
- SetDeviceDriver(
- WrapUnique(new CFX_SkiaDeviceDriver(pBitmap, FALSE, pOriDevice, FALSE)));
+ SetDeviceDriver(pdfium::MakeUnique<CFX_SkiaDeviceDriver>(pBitmap, FALSE,
+ pOriDevice, FALSE));
return true;
}