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

Issue 2339273002: SkFontData to use smart pointers. (Closed)

Created:
4 years, 3 months ago by bungeman-skia
Modified:
4 years, 3 months ago
CC:
reviews_skia.org
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

SkFontData to use smart pointers. The SkFontData type is not exposed externally, so any method which uses it can be updated to use smart pointers without affecting external users. Updating this first will make updating the public API much easier. This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It appears that no one outside Skia is currently using SkStream::NewfromFile so this is a good time to update it as well. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c Committed: https://skia.googlesource.com/skia/+/f93d71122e4fcfcdc674a0163455990b13855f2f

Patch Set 1 #

Patch Set 2 : Also Mac. #

Total comments: 2

Patch Set 3 : SkStream::MakeFromFile as well. #

Total comments: 2

Patch Set 4 : Parameter evaluation, keep Chromium happy. #

Patch Set 5 : Add empty definitions to link. #

Patch Set 6 : Add trivial bodies to the trivial implementations. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+253 lines, -347 lines) Patch
M bench/nanobench.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M dm/DMSrcSink.cpp View 1 2 4 chunks +7 lines, -7 lines 0 comments Download
M include/core/SkStream.h View 1 2 1 chunk +2 lines, -4 lines 0 comments Download
M include/core/SkTypeface.h View 1 2 3 4 5 3 chunks +8 lines, -7 lines 0 comments Download
M include/ports/SkFontMgr.h View 1 2 3 4 5 2 chunks +5 lines, -3 lines 0 comments Download
M include/utils/mac/SkCGUtils.h View 1 2 3 2 chunks +4 lines, -12 lines 0 comments Download
M samplecode/SampleAnimator.cpp View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M src/animator/SkAnimateMaker.cpp View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/animator/SkAnimator.cpp View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/core/SkFontDescriptor.h View 3 chunks +10 lines, -11 lines 0 comments Download
M src/core/SkFontDescriptor.cpp View 3 chunks +6 lines, -5 lines 0 comments Download
M src/core/SkFontMgr.cpp View 2 chunks +4 lines, -6 lines 0 comments Download
M src/core/SkStream.cpp View 2 chunks +7 lines, -8 lines 0 comments Download
M src/core/SkTypeface.cpp View 5 chunks +11 lines, -10 lines 0 comments Download
M src/images/SkMovie.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M src/ports/SkFontConfigInterface_direct.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/ports/SkFontConfigTypeface.h View 1 chunk +1 line, -1 line 0 comments Download
M src/ports/SkFontHost_FreeType.cpp View 1 2 6 chunks +9 lines, -11 lines 0 comments Download
M src/ports/SkFontHost_FreeType_common.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M src/ports/SkFontHost_mac.cpp View 1 7 chunks +18 lines, -15 lines 0 comments Download
M src/ports/SkFontHost_win.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/ports/SkFontMgr_FontConfigInterface.cpp View 1 2 6 chunks +16 lines, -15 lines 0 comments Download
M src/ports/SkFontMgr_android.cpp View 1 2 9 chunks +29 lines, -27 lines 0 comments Download
M src/ports/SkFontMgr_custom.cpp View 1 2 11 chunks +26 lines, -24 lines 0 comments Download
M src/ports/SkFontMgr_fontconfig.cpp View 1 2 9 chunks +21 lines, -20 lines 0 comments Download
M src/ports/SkFontMgr_win_dw.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/utils/SkWhitelistTypefaces.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M src/utils/mac/SkCreateCGImageRef.cpp View 1 1 chunk +0 lines, -65 lines 0 comments Download
M src/utils/mac/SkStream_mac.cpp View 1 2 3 2 chunks +8 lines, -8 lines 0 comments Download
M tests/BadIcoTest.cpp View 1 2 1 chunk +2 lines, -4 lines 0 comments Download
M tests/CodecTest.cpp View 1 2 15 chunks +17 lines, -28 lines 0 comments Download
M tests/ColorSpaceTest.cpp View 1 2 1 chunk +1 line, -6 lines 0 comments Download
M tests/ExifTest.cpp View 1 2 2 chunks +2 lines, -7 lines 0 comments Download
M tests/SerializationTest.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M tests/YUVTest.cpp View 1 2 1 chunk +1 line, -7 lines 0 comments Download
M tools/Resources.cpp View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M tools/dump_record.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M tools/get_images_from_skps.cpp View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M tools/lua/lua_pictures.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M tools/viewer/SKPSlide.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 40 (28 generated)
bungeman-skia
Trying to get some low hanging fruit from the smart pointer tree before trying to ...
4 years, 3 months ago (2016-09-14 22:08:39 UTC) #7
mtklein_C
lgtm
4 years, 3 months ago (2016-09-14 22:17:49 UTC) #9
mtklein_C
lgtm
4 years, 3 months ago (2016-09-14 22:17:52 UTC) #10
reed1
lgtm w/ request https://codereview.chromium.org/2339273002/diff/20001/include/core/SkStream.h File include/core/SkStream.h (right): https://codereview.chromium.org/2339273002/diff/20001/include/core/SkStream.h#newcode53 include/core/SkStream.h:53: static SkStreamAsset* NewFromFile(const char path[]) { ...
4 years, 3 months ago (2016-09-15 13:38:49 UTC) #12
bungeman-skia
https://codereview.chromium.org/2339273002/diff/20001/include/core/SkStream.h File include/core/SkStream.h (right): https://codereview.chromium.org/2339273002/diff/20001/include/core/SkStream.h#newcode53 include/core/SkStream.h:53: static SkStreamAsset* NewFromFile(const char path[]) { On 2016/09/15 13:38:49, ...
4 years, 3 months ago (2016-09-15 16:35:47 UTC) #15
hal.canary
lgtm
4 years, 3 months ago (2016-09-15 16:36:38 UTC) #16
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/2339273002/40001
4 years, 3 months ago (2016-09-15 17:02:09 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c
4 years, 3 months ago (2016-09-15 17:03:30 UTC) #23
bungeman-skia
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/2343933002/ by bungeman@google.com. ...
4 years, 3 months ago (2016-09-15 17:57:17 UTC) #24
bungeman-skia
Chromium has a subclass of SkTypeface in a test which overrides the changed files. Added ...
4 years, 3 months ago (2016-09-15 20:13:19 UTC) #26
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/2339273002/100001
4 years, 3 months ago (2016-09-16 13:23:05 UTC) #38
commit-bot: I haz the power
4 years, 3 months ago (2016-09-16 13:24:23 UTC) #40
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://skia.googlesource.com/skia/+/f93d71122e4fcfcdc674a0163455990b13855f2f

Powered by Google App Engine
This is Rietveld 408576698