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

Side by Side Diff: src/ports/SkFontHost_FreeType.cpp

Issue 1945353003: Revert of SK_DECLARE_STATIC_MUTEX -> static SkMutex (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/ports/SkFontConfigInterface_direct.cpp ('k') | src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkAdvancedTypefaceMetrics.h" 8 #include "SkAdvancedTypefaceMetrics.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Ubuntu >= 11.04 (previous deprecated April 2013) 138 // Ubuntu >= 11.04 (previous deprecated April 2013)
139 // Debian >= 6.0 (good) 139 // Debian >= 6.0 (good)
140 // OpenSuse >= 11.4 (previous deprecated January 2012 / Nov 2013 for Evergre en 11.2) 140 // OpenSuse >= 11.4 (previous deprecated January 2012 / Nov 2013 for Evergre en 11.2)
141 // Fedora >= 14 (good) 141 // Fedora >= 14 (good)
142 // Android >= Gingerbread (good) 142 // Android >= Gingerbread (good)
143 typedef FT_Error (*FT_Library_SetLcdFilterWeightsProc)(FT_Library, unsigned char*); 143 typedef FT_Error (*FT_Library_SetLcdFilterWeightsProc)(FT_Library, unsigned char*);
144 }; 144 };
145 145
146 struct SkFaceRec; 146 struct SkFaceRec;
147 147
148 static SkMutex gFTMutex; 148 SK_DECLARE_STATIC_MUTEX(gFTMutex);
149 static FreeTypeLibrary* gFTLibrary; 149 static FreeTypeLibrary* gFTLibrary;
150 static SkFaceRec* gFaceRecHead; 150 static SkFaceRec* gFaceRecHead;
151 151
152 // Private to ref_ft_library and unref_ft_library 152 // Private to ref_ft_library and unref_ft_library
153 static int gFTCount; 153 static int gFTCount;
154 154
155 // Caller must lock gFTMutex before calling this function. 155 // Caller must lock gFTMutex before calling this function.
156 static bool ref_ft_library() { 156 static bool ref_ft_library() {
157 gFTMutex.assertHeld(); 157 gFTMutex.assertHeld();
158 SkASSERT(gFTCount >= 0); 158 SkASSERT(gFTCount >= 0);
(...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 SkDEBUGF(("Requested font axis not found: %s '%c%c%c%c'\n", 1819 SkDEBUGF(("Requested font axis not found: %s '%c%c%c%c'\n",
1820 name.c_str(), 1820 name.c_str(),
1821 (skTag >> 24) & 0xFF, 1821 (skTag >> 24) & 0xFF,
1822 (skTag >> 16) & 0xFF, 1822 (skTag >> 16) & 0xFF,
1823 (skTag >> 8) & 0xFF, 1823 (skTag >> 8) & 0xFF,
1824 (skTag) & 0xFF)); 1824 (skTag) & 0xFF));
1825 } 1825 }
1826 } 1826 }
1827 ) 1827 )
1828 } 1828 }
OLDNEW
« no previous file with comments | « src/ports/SkFontConfigInterface_direct.cpp ('k') | src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698