diff options
author | tsepez <tsepez@chromium.org> | 2016-12-14 19:48:47 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-14 19:48:47 -0800 |
commit | b8642f8a3c3a6d359c4e319b8ba91f8df6448a4f (patch) | |
tree | bc5443fec6a3bf35dd883a66cdfd056397998013 /xfa/fxgraphics/cfx_graphics.cpp | |
parent | c7739322e5cdcc5779bdde2a1560ea3dee891e51 (diff) | |
download | pdfium-b8642f8a3c3a6d359c4e319b8ba91f8df6448a4f.tar.xz |
More unique_ptr returns from DIB methods.
Review-Url: https://codereview.chromium.org/2572293002
Diffstat (limited to 'xfa/fxgraphics/cfx_graphics.cpp')
-rw-r--r-- | xfa/fxgraphics/cfx_graphics.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fxgraphics/cfx_graphics.cpp b/xfa/fxgraphics/cfx_graphics.cpp index 5b3bc8cb9d..059872f81c 100644 --- a/xfa/fxgraphics/cfx_graphics.cpp +++ b/xfa/fxgraphics/cfx_graphics.cpp @@ -1230,8 +1230,8 @@ FWL_Error CFX_Graphics::RenderDeviceDrawImage(CFX_DIBSource* source, point.x, point.y); m2.Concat(m1); int32_t left, top; - std::unique_ptr<CFX_DIBitmap> bmp1(source->FlipImage(false, true)); - std::unique_ptr<CFX_DIBitmap> bmp2(bmp1->TransformTo(&m2, left, top)); + std::unique_ptr<CFX_DIBitmap> bmp1 = source->FlipImage(false, true); + std::unique_ptr<CFX_DIBitmap> bmp2 = bmp1->TransformTo(&m2, left, top); CFX_RectF r; GetClipRect(r); CFX_DIBitmap* bitmap = m_renderDevice->GetBitmap(); @@ -1257,14 +1257,14 @@ FWL_Error CFX_Graphics::RenderDeviceStretchImage(CFX_DIBSource* source, if (matrix) { m1.Concat(*matrix); } - std::unique_ptr<CFX_DIBitmap> bmp1( - source->StretchTo((int32_t)rect.Width(), (int32_t)rect.Height())); + std::unique_ptr<CFX_DIBitmap> bmp1 = + source->StretchTo((int32_t)rect.Width(), (int32_t)rect.Height()); CFX_Matrix m2; m2.Set(rect.Width(), 0.0, 0.0, rect.Height(), rect.left, rect.top); m2.Concat(m1); int32_t left, top; - std::unique_ptr<CFX_DIBitmap> bmp2(bmp1->FlipImage(false, true)); - std::unique_ptr<CFX_DIBitmap> bmp3(bmp2->TransformTo(&m2, left, top)); + std::unique_ptr<CFX_DIBitmap> bmp2 = bmp1->FlipImage(false, true); + std::unique_ptr<CFX_DIBitmap> bmp3 = bmp2->TransformTo(&m2, left, top); CFX_RectF r; GetClipRect(r); CFX_DIBitmap* bitmap = m_renderDevice->GetBitmap(); @@ -1487,8 +1487,8 @@ FWL_Error CFX_Graphics::SetDIBitsWithMatrix(CFX_DIBSource* source, 0); m.Concat(*matrix); int32_t left, top; - std::unique_ptr<CFX_DIBitmap> bmp1(source->FlipImage(false, true)); - std::unique_ptr<CFX_DIBitmap> bmp2(bmp1->TransformTo(&m, left, top)); + std::unique_ptr<CFX_DIBitmap> bmp1 = source->FlipImage(false, true); + std::unique_ptr<CFX_DIBitmap> bmp2 = bmp1->TransformTo(&m, left, top); m_renderDevice->SetDIBits(bmp2.get(), left, top); } return FWL_Error::Succeeded; |