Prevent kDefaultFontFamilies from being destroyed during atexit.
Change-Id: Ie9324622c27fefe2d876f462b7c106dbc2a4f2cb Bug: skia:13432 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550177 Reviewed-by: Julia Lavrova <jlavrova@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
This commit is contained in:
parent
b9307774a2
commit
de3e1964cf
@ -260,7 +260,7 @@ public:
|
||||
void setPlaceholder() { fIsPlaceholder = true; }
|
||||
|
||||
private:
|
||||
static const std::vector<SkString> kDefaultFontFamilies;
|
||||
static const std::vector<SkString>* kDefaultFontFamilies;
|
||||
|
||||
Decoration fDecoration = {
|
||||
TextDecoration::kNoDecoration,
|
||||
@ -274,7 +274,7 @@ private:
|
||||
|
||||
SkFontStyle fFontStyle;
|
||||
|
||||
std::vector<SkString> fFontFamilies = kDefaultFontFamilies;
|
||||
std::vector<SkString> fFontFamilies = *kDefaultFontFamilies;
|
||||
|
||||
SkScalar fFontSize = 14.0;
|
||||
SkScalar fHeight = 1.0;
|
||||
|
@ -6,7 +6,8 @@
|
||||
namespace skia {
|
||||
namespace textlayout {
|
||||
|
||||
const std::vector<SkString> TextStyle::kDefaultFontFamilies = { SkString(DEFAULT_FONT_FAMILY) };
|
||||
const std::vector<SkString>* TextStyle::kDefaultFontFamilies =
|
||||
new std::vector<SkString>{SkString(DEFAULT_FONT_FAMILY)};
|
||||
|
||||
TextStyle TextStyle::cloneForPlaceholder() {
|
||||
TextStyle result;
|
||||
|
Loading…
Reference in New Issue
Block a user