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

Issue 2534953004: Return unique_ptrs from CFX_DIBitmap::Clone(). (Closed)

Created:
4 years ago by Tom Sepez
Modified:
4 years ago
Reviewers:
npm, dsinclair
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Return unique_ptrs from CFX_DIBitmap::Clone(). Because that's what clone does. Perform immediate release in some spots to avoid disrupting too much at once. Committed: https://pdfium.googlesource.com/pdfium/+/1a1d7648d3e338b756e464cebb2ae1a815359afa

Patch Set 1 #

Patch Set 2 : revive patch, widespread release() #

Patch Set 3 : win compile #

Patch Set 4 : skia compile #

Patch Set 5 : MaybeOwned, remove dead code. #

Patch Set 6 : order #

Patch Set 7 : iwyu #

Patch Set 8 : win again #

Total comments: 25

Patch Set 9 : reviewd #

Patch Set 10 : typo #

Total comments: 4

Patch Set 11 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -235 lines) Patch
M core/fpdfapi/font/cpdf_type3char.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/render/cpdf_imagecacheentry.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/render/cpdf_imagerenderer.cpp View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M core/fpdfapi/render/cpdf_renderstatus.cpp View 1 2 3 4 5 6 4 chunks +5 lines, -10 lines 0 comments Download
M core/fpdfapi/render/cpdf_type3cache.cpp View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M core/fpdfapi/render/fpdf_render_loadimage.cpp View 1 2 3 4 1 chunk +0 lines, -10 lines 0 comments Download
M core/fpdfapi/render/render_int.h View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M core/fxcodec/codec/fx_codec_progress.cpp View 2 3 4 5 6 4 chunks +4 lines, -5 lines 0 comments Download
M core/fxge/agg/fx_agg_driver.cpp View 2 3 4 5 2 chunks +5 lines, -8 lines 0 comments Download
M core/fxge/dib/fx_dib_convert.cpp View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -3 lines 0 comments Download
M core/fxge/dib/fx_dib_main.cpp View 1 2 3 4 5 6 7 8 9 10 10 chunks +61 lines, -111 lines 0 comments Download
M core/fxge/dib/fx_dib_transform.cpp View 1 2 3 4 5 6 2 chunks +14 lines, -11 lines 0 comments Download
M core/fxge/fx_dib.h View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -14 lines 0 comments Download
M core/fxge/win32/fx_win32_device.cpp View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -7 lines 0 comments Download
M core/fxge/win32/fx_win32_gdipext.cpp View 1 2 3 4 5 6 7 8 9 10 7 chunks +22 lines, -21 lines 0 comments Download
M xfa/fxbarcode/BC_TwoDimWriter.cpp View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M xfa/fxbarcode/oned/BC_OneDimWriter.cpp View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M xfa/fxfa/app/xfa_ffwidget.cpp View 1 2 3 4 5 6 7 8 4 chunks +19 lines, -21 lines 0 comments Download

Messages

Total messages: 41 (31 generated)
Tom Sepez
NPM, ready for review.
4 years ago (2016-12-05 19:04:47 UTC) #14
Tom Sepez
Dan, too.
4 years ago (2016-12-05 20:27:15 UTC) #23
npm
Great! Just a couple of comments https://codereview.chromium.org/2534953004/diff/140001/core/fxge/dib/fx_dib_convert.cpp File core/fxge/dib/fx_dib_convert.cpp (right): https://codereview.chromium.org/2534953004/diff/140001/core/fxge/dib/fx_dib_convert.cpp#newcode789 core/fxge/dib/fx_dib_convert.cpp:789: std::unique_ptr<CFX_DIBitmap> pClone(new CFX_DIBitmap); ...
4 years ago (2016-12-05 20:37:23 UTC) #24
dsinclair
https://codereview.chromium.org/2534953004/diff/140001/core/fxge/dib/fx_dib_main.cpp File core/fxge/dib/fx_dib_main.cpp (right): https://codereview.chromium.org/2534953004/diff/140001/core/fxge/dib/fx_dib_main.cpp#newcode670 core/fxge/dib/fx_dib_main.cpp:670: const_cast<CFX_DIBSource*>(pSrcBitmap)); Should we remove the const from the signature? ...
4 years ago (2016-12-05 20:41:27 UTC) #25
Tom Sepez
https://codereview.chromium.org/2534953004/diff/140001/core/fxge/dib/fx_dib_convert.cpp File core/fxge/dib/fx_dib_convert.cpp (right): https://codereview.chromium.org/2534953004/diff/140001/core/fxge/dib/fx_dib_convert.cpp#newcode789 core/fxge/dib/fx_dib_convert.cpp:789: std::unique_ptr<CFX_DIBitmap> pClone(new CFX_DIBitmap); On 2016/12/05 20:37:23, npm wrote: > ...
4 years ago (2016-12-05 21:38:14 UTC) #26
npm
lgtm https://codereview.chromium.org/2534953004/diff/180001/core/fxge/dib/fx_dib_main.cpp File core/fxge/dib/fx_dib_main.cpp (right): https://codereview.chromium.org/2534953004/diff/180001/core/fxge/dib/fx_dib_main.cpp#newcode839 core/fxge/dib/fx_dib_main.cpp:839: static_cast<CFX_DIBitmap*>(const_cast<CFX_DIBSource*>(pSrcBitmap))); I think you no longer need const_cast, ...
4 years ago (2016-12-05 21:57:05 UTC) #31
Tom Sepez
https://codereview.chromium.org/2534953004/diff/180001/core/fxge/dib/fx_dib_main.cpp File core/fxge/dib/fx_dib_main.cpp (right): https://codereview.chromium.org/2534953004/diff/180001/core/fxge/dib/fx_dib_main.cpp#newcode839 core/fxge/dib/fx_dib_main.cpp:839: static_cast<CFX_DIBitmap*>(const_cast<CFX_DIBSource*>(pSrcBitmap))); On 2016/12/05 21:57:05, npm wrote: > I think ...
4 years ago (2016-12-05 22:01:25 UTC) #34
dsinclair
lgtm
4 years ago (2016-12-06 14:10:24 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2534953004/200001
4 years ago (2016-12-06 14:10:28 UTC) #38
commit-bot: I haz the power
4 years ago (2016-12-06 14:29:34 UTC) #41
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://pdfium.googlesource.com/pdfium/+/1a1d7648d3e338b756e464cebb2ae1a81535...

Powered by Google App Engine
This is Rietveld 408576698