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

Unified Diff: src/ports/SkFontHost_FreeType.cpp

Issue 12699002: Upstream changes from Android. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: more fiex Created 7 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/effects/SkMagnifierImageFilter.cpp ('k') | tests/MatrixTest.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 b98cdcdfb47405aaf8171a0bb3709822c7877ec5..9422cf99d32abc8cde9f554e6efe5cb004bd948b 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -694,6 +694,13 @@ void SkFontHost::FilterRec(SkScalerContext::Rec* rec, SkTypeface*) {
#ifdef SK_BUILD_FOR_ANDROID
uint32_t SkFontHost::GetUnitsPerEm(SkFontID fontID) {
SkAutoMutexAcquire ac(gFTMutex);
+ FT_Library libInit = NULL;
+ if (gFTCount == 0) {
+ if (!InitFreetype())
+ sk_throw();
+ libInit = gFTLibrary;
+ }
+ SkAutoTCallIProc<struct FT_LibraryRec_, FT_Done_FreeType> ftLib(libInit);
SkFaceRec *rec = ref_ft_face(fontID);
uint16_t unitsPerEm = 0;
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | tests/MatrixTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698