diff options
author | bungeman <bungeman@google.com> | 2014-10-20 13:33:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-20 13:33:19 -0700 |
commit | a4c4a2d8cd65abb1e5ac20813831cdb9ace6c7ee (patch) | |
tree | cf64b94cb51a6316cf89080697cdd5d54e459ecc /src/core/SkTypeface.cpp | |
parent | fca302ccf464933e44e00255654d27a7705abb7f (diff) |
Replace SkTypeface::Style with SkFontStyle.
Committed: https://skia.googlesource.com/skia/+/43b8b36b20ae00e2d78421c4cda1f3f922983a20
Review URL: https://codereview.chromium.org/488143002
Diffstat (limited to 'src/core/SkTypeface.cpp')
-rw-r--r-- | src/core/SkTypeface.cpp | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp index 81038bc986..84cbdbfe66 100644 --- a/src/core/SkTypeface.cpp +++ b/src/core/SkTypeface.cpp @@ -14,26 +14,10 @@ #include "SkStream.h" #include "SkTypeface.h" -//#define TRACE_LIFECYCLE - -#ifdef TRACE_LIFECYCLE - static int32_t gTypefaceCounter; -#endif - -SkTypeface::SkTypeface(Style style, SkFontID fontID, bool isFixedPitch) - : fUniqueID(fontID), fStyle(style), fIsFixedPitch(isFixedPitch) { -#ifdef TRACE_LIFECYCLE - SkDebugf("SkTypeface: create %p fontID %d total %d\n", - this, fontID, ++gTypefaceCounter); -#endif -} +SkTypeface::SkTypeface(const SkFontStyle& style, SkFontID fontID, bool isFixedPitch) + : fUniqueID(fontID), fStyle(style), fIsFixedPitch(isFixedPitch) { } -SkTypeface::~SkTypeface() { -#ifdef TRACE_LIFECYCLE - SkDebugf("SkTypeface: destroy %p fontID %d total %d\n", - this, fUniqueID, --gTypefaceCounter); -#endif -} +SkTypeface::~SkTypeface() { } /////////////////////////////////////////////////////////////////////////////// @@ -43,7 +27,7 @@ public: return SkNEW(SkEmptyTypeface); } protected: - SkEmptyTypeface() : SkTypeface(SkTypeface::kNormal, 0, true) { } + SkEmptyTypeface() : SkTypeface(SkFontStyle(), 0, true) { } virtual SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE { return NULL; } virtual SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE { |