| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |