summaryrefslogtreecommitdiff
path: root/core/fxge/agg
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-09-28 22:06:20 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-28 22:06:20 -0700
commitaca4fc767d663e43d323b96a75804a8f5cafd8d4 (patch)
tree3e4e5c168af167ba6044c83431511b9a978773ed /core/fxge/agg
parent3873f302948e37aad7066c8231575f486015cc34 (diff)
downloadpdfium-aca4fc767d663e43d323b96a75804a8f5cafd8d4.tar.xz
Replace a few more std::unique_ptr.reset() with WrapUnique assignments.
And fix a typo. TBR=tsepez@chromium.org Review-Url: https://codereview.chromium.org/2382443004
Diffstat (limited to 'core/fxge/agg')
-rw-r--r--core/fxge/agg/fx_agg_driver.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp
index 6271c1097e..34d2a05d80 100644
--- a/core/fxge/agg/fx_agg_driver.cpp
+++ b/core/fxge/agg/fx_agg_driver.cpp
@@ -498,7 +498,7 @@ int CFX_AggDeviceDriver::GetDeviceCaps(int caps_id) const {
void CFX_AggDeviceDriver::SaveState() {
std::unique_ptr<CFX_ClipRgn> pClip;
if (m_pClipRgn)
- pClip.reset(new CFX_ClipRgn(*m_pClipRgn));
+ pClip = WrapUnique(new CFX_ClipRgn(*m_pClipRgn));
m_StateStack.push_back(std::move(pClip));
}
@@ -510,7 +510,7 @@ void CFX_AggDeviceDriver::RestoreState(bool bKeepSaved) {
if (bKeepSaved) {
if (m_StateStack.back())
- m_pClipRgn.reset(new CFX_ClipRgn(*m_StateStack.back()));
+ m_pClipRgn = WrapUnique(new CFX_ClipRgn(*m_StateStack.back()));
} else {
m_pClipRgn = std::move(m_StateStack.back());
m_StateStack.pop_back();
@@ -544,8 +544,8 @@ FX_BOOL CFX_AggDeviceDriver::SetClip_PathFill(const CFX_PathData* pPathData,
int fill_mode) {
m_FillFlags = fill_mode;
if (!m_pClipRgn) {
- m_pClipRgn.reset(new CFX_ClipRgn(GetDeviceCaps(FXDC_PIXEL_WIDTH),
- GetDeviceCaps(FXDC_PIXEL_HEIGHT)));
+ m_pClipRgn = WrapUnique(new CFX_ClipRgn(GetDeviceCaps(FXDC_PIXEL_WIDTH),
+ GetDeviceCaps(FXDC_PIXEL_HEIGHT)));
}
if (pPathData->GetPointCount() == 5 || pPathData->GetPointCount() == 4) {
CFX_FloatRect rectf;
@@ -577,8 +577,8 @@ FX_BOOL CFX_AggDeviceDriver::SetClip_PathStroke(
const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState) {
if (!m_pClipRgn) {
- m_pClipRgn.reset(new CFX_ClipRgn(GetDeviceCaps(FXDC_PIXEL_WIDTH),
- GetDeviceCaps(FXDC_PIXEL_HEIGHT)));
+ m_pClipRgn = WrapUnique(new CFX_ClipRgn(GetDeviceCaps(FXDC_PIXEL_WIDTH),
+ GetDeviceCaps(FXDC_PIXEL_HEIGHT)));
}
CAgg_PathData path_data;
path_data.BuildPath(pPathData, nullptr);