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

Unified Diff: src/ports/SkFontHost_FreeType.cpp

Issue 1817633002: Make FreeType usable on Windows. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: add missing file Created 4 years, 9 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/SkAdvancedTypefaceMetrics.cpp ('k') | src/ports/SkFontMgr_custom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_FreeType.cpp
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index f01c7d7cc5498ded51368439d11661cc0240c12f..e7cb6d2963684370a7569f1c3c18a7c98d0e1d27 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -361,7 +361,8 @@ static FT_Face ref_ft_face(const SkTypeface* typeface) {
}
// Caller must lock gFTMutex before calling this function.
-static void unref_ft_face(FT_Face face) {
+extern void unref_ft_face(FT_Face face);
+void unref_ft_face(FT_Face face) {
gFTMutex.assertHeld();
SkFaceRec* rec = gFaceRecHead;
@@ -1284,7 +1285,6 @@ void SkScalerContext_FreeType::generateFontMetrics(SkPaint::FontMetrics* metrics
SkAutoMutexAcquire ac(gFTMutex);
if (this->setupSize()) {
- ERROR:
sk_bzero(metrics, sizeof(*metrics));
return;
}
@@ -1376,7 +1376,8 @@ void SkScalerContext_FreeType::generateFontMetrics(SkPaint::FontMetrics* metrics
metrics->fFlags &= ~SkPaint::FontMetrics::kUnderlineThinknessIsValid_Flag;
metrics->fFlags &= ~SkPaint::FontMetrics::kUnderlinePositionIsValid_Flag;
} else {
- goto ERROR;
+ sk_bzero(metrics, sizeof(*metrics));
+ return;
}
// synthesize elements that were not provided by the os/2 table or format-specific metrics
« no previous file with comments | « src/core/SkAdvancedTypefaceMetrics.cpp ('k') | src/ports/SkFontMgr_custom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698