From a588de1feee74221d455b544bc9ceb5c0c6d4fac Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Tue, 15 May 2018 19:12:44 +0000 Subject: Revert "Remove non-smart SkFontConfigInterface::SetGlobal." This reverts commit 31aa27da9dcb835cba04918a2d4db921d3552881. Reason for revert: breaks a build and forgot to remove declaration Original change's description: > Remove non-smart SkFontConfigInterface::SetGlobal. > > This method is no longer used and is superseded by the 'smart' version. > > Change-Id: I491dda095224d443d184e8d73b36b1328227c99e > Reviewed-on: https://skia-review.googlesource.com/128312 > Reviewed-by: Herb Derby > Commit-Queue: Ben Wagner TBR=bungeman@google.com,herb@google.com Change-Id: Ie0fb3dc055d01cf7e3a4ec83fb92de33c07a7f58 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/128360 Reviewed-by: Ben Wagner Commit-Queue: Ben Wagner --- src/ports/SkFontConfigInterface.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/ports') 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::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 fc) { SkAutoMutexAcquire ac(gFontConfigInterfaceMutex); -- cgit v1.2.3