aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
diff options
context:
space:
mode:
Diffstat (limited to 'src/ports')
-rw-r--r--src/ports/SkFontHost_mac.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp
index 72d4690870..8593b39611 100644
--- a/src/ports/SkFontHost_mac.cpp
+++ b/src/ports/SkFontHost_mac.cpp
@@ -35,7 +35,7 @@
#include "SkOTTable_hhea.h"
#include "SkOTTable_loca.h"
#include "SkOTUtils.h"
-#include "SkOncePtr.h"
+#include "SkOnce.h"
#include "SkPaint.h"
#include "SkPath.h"
#include "SkSFNTHeader.h"
@@ -778,12 +778,12 @@ static CTFontDrawGlyphsProc* choose_CTFontDrawGlyphs() {
return &legacy_CTFontDrawGlyphs;
}
-SK_DECLARE_STATIC_ONCE_PTR(CTFontDrawGlyphsProc, gCTFontDrawGlyphs);
-
CGRGBPixel* Offscreen::getCG(const SkScalerContext_Mac& context, const SkGlyph& glyph,
CGGlyph glyphID, size_t* rowBytesPtr,
bool generateA8FromLCD) {
- auto ctFontDrawGlyphs = gCTFontDrawGlyphs.get(choose_CTFontDrawGlyphs);
+ static SkOnce once;
+ static CTFontDrawGlyphsProc* ctFontDrawGlyphs;
+ once([]{ ctFontDrawGlyphs = choose_CTFontDrawGlyphs(); });
if (!fRGBSpace) {
//It doesn't appear to matter what color space is specified.