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

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

Issue 1226403007: Use SK_DECLARE_STATIC_MUTEX for global mutex. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkTypes.h" // Keep this before any #ifdef ... 9 #include "SkTypes.h" // Keep this before any #ifdef ...
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "SkUtils.h" 46 #include "SkUtils.h"
47 #include "SkUtils.h" 47 #include "SkUtils.h"
48 48
49 #include <dlfcn.h> 49 #include <dlfcn.h>
50 50
51 // Experimental code to use a global lock whenever we access CG, to see if this reduces 51 // Experimental code to use a global lock whenever we access CG, to see if this reduces
52 // crashes in Chrome 52 // crashes in Chrome
53 #define USE_GLOBAL_MUTEX_FOR_CG_ACCESS 53 #define USE_GLOBAL_MUTEX_FOR_CG_ACCESS
54 54
55 #ifdef USE_GLOBAL_MUTEX_FOR_CG_ACCESS 55 #ifdef USE_GLOBAL_MUTEX_FOR_CG_ACCESS
56 static SkMutex gCGMutex; 56 SK_DECLARE_STATIC_MUTEX(gCGMutex);
57 #define AUTO_CG_LOCK() SkAutoMutexAcquire amc(gCGMutex) 57 #define AUTO_CG_LOCK() SkAutoMutexAcquire amc(gCGMutex)
58 #else 58 #else
59 #define AUTO_CG_LOCK() 59 #define AUTO_CG_LOCK()
60 #endif 60 #endif
61 61
62 // Set to make glyph bounding boxes visible. 62 // Set to make glyph bounding boxes visible.
63 #define SK_SHOW_TEXT_BLIT_COVERAGE 0 63 #define SK_SHOW_TEXT_BLIT_COVERAGE 0
64 64
65 class SkScalerContext_Mac; 65 class SkScalerContext_Mac;
66 66
(...skipping 2417 matching lines...) Expand 10 before | Expand all | Expand 10 after
2484 } 2484 }
2485 return face; 2485 return face;
2486 } 2486 }
2487 }; 2487 };
2488 2488
2489 /////////////////////////////////////////////////////////////////////////////// 2489 ///////////////////////////////////////////////////////////////////////////////
2490 2490
2491 SkFontMgr* SkFontMgr::Factory() { 2491 SkFontMgr* SkFontMgr::Factory() {
2492 return SkNEW(SkFontMgr_Mac); 2492 return SkNEW(SkFontMgr_Mac);
2493 } 2493 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698