Stage SkFontMgr factories to return smart pointers.
authorBen Wagner <bungeman@google.com>
Tue, 3 Jan 2017 18:32:36 +0000 (13:32 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Wed, 4 Jan 2017 14:51:09 +0000 (14:51 +0000)
commit3546ff10c2e1e91f5afe1efaab4e5e14f71689d1
treecbcf83ae724df22c6cc5704a75be9095a28058db
parent8bc9f7b32867cb46fd7b56c11bf9dfa79a7d246e
Stage SkFontMgr factories to return smart pointers.

All the SkFontMgr factories currently return bare pointers and sometimes
even document the ownership rules. Since such factories can be
implemented by external ports, the ownership rules should be explicit in
order to prevent simple reference counting issues.

Change-Id: I25b598ce0954cd473a3fb1f8adc0cb86331583ca
Reviewed-on: https://skia-review.googlesource.com/6533
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
24 files changed:
gm/fontmgr.cpp
include/ports/SkFontMgr.h
include/ports/SkFontMgr_FontConfigInterface.h
include/ports/SkFontMgr_android.h
include/ports/SkFontMgr_custom.h
include/ports/SkFontMgr_fontconfig.h
include/ports/SkTypeface_win.h
src/core/SkFontMgr.cpp
src/ports/SkFontHost_mac.cpp
src/ports/SkFontHost_win.cpp
src/ports/SkFontMgr_FontConfigInterface.cpp
src/ports/SkFontMgr_FontConfigInterface_factory.cpp
src/ports/SkFontMgr_android.cpp
src/ports/SkFontMgr_android_factory.cpp
src/ports/SkFontMgr_custom.cpp
src/ports/SkFontMgr_custom_directory_factory.cpp
src/ports/SkFontMgr_custom_embedded_factory.cpp
src/ports/SkFontMgr_custom_empty_factory.cpp
src/ports/SkFontMgr_empty_factory.cpp
src/ports/SkFontMgr_fontconfig.cpp
src/ports/SkFontMgr_fontconfig_factory.cpp
src/ports/SkFontMgr_win_dw.cpp
src/ports/SkFontMgr_win_dw_factory.cpp
src/ports/SkFontMgr_win_gdi_factory.cpp