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

Unified Diff: xfa/fxgraphics/cfx_graphics.cpp

Issue 2572293002: More unique_ptr returns from DIB methods. (Closed)
Patch Set: win build Created 4 years 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/win32/fx_win32_print.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxgraphics/cfx_graphics.cpp
diff --git a/xfa/fxgraphics/cfx_graphics.cpp b/xfa/fxgraphics/cfx_graphics.cpp
index 5b3bc8cb9de40d2e0c19727abb07f13ee17f4428..059872f81cb278fb427590c902fd85e90d87952b 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;
« no previous file with comments | « core/fxge/win32/fx_win32_print.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698