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

Unified Diff: src/core/SkTypeface.cpp

Issue 488143002: Replace SkTypeface::Style with SkFontStyle. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add expectations, remove whitespace. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkFontHost.cpp ('k') | src/core/SkTypefaceCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTypeface.cpp
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
index 81038bc986e510e35922c21625b519839ae84dc0..84cbdbfe6643b034374f97231604b1ce5b8c82a2 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 {
« no previous file with comments | « src/core/SkFontHost.cpp ('k') | src/core/SkTypefaceCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698