aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
diff options
context:
space:
mode:
Diffstat (limited to 'src/ports')
-rw-r--r--src/ports/SkFontConfigInterface.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ports/SkFontConfigInterface.cpp b/src/ports/SkFontConfigInterface.cpp
index 864d6159ef..a30bd2dac2 100644
--- a/src/ports/SkFontConfigInterface.cpp
+++ b/src/ports/SkFontConfigInterface.cpp
@@ -6,6 +6,7 @@
*/
#include "SkFontConfigInterface.h"
+#include "SkFontMgr.h"
#include "SkMutex.h"
#include "SkRefCnt.h"
@@ -21,6 +22,13 @@ sk_sp<SkFontConfigInterface> SkFontConfigInterface::RefGlobal() {
return sk_ref_sp(SkFontConfigInterface::GetSingletonDirectInterface());
}
+SkFontConfigInterface* SkFontConfigInterface::SetGlobal(SkFontConfigInterface* fc) {
+ SkAutoMutexAcquire ac(gFontConfigInterfaceMutex);
+
+ gFontConfigInterface = sk_ref_sp(fc);
+ return fc;
+}
+
void SkFontConfigInterface::SetGlobal(sk_sp<SkFontConfigInterface> fc) {
SkAutoMutexAcquire ac(gFontConfigInterfaceMutex);