Remove SkFontHost includes and friends.
authorbungeman <bungeman@google.com>
Mon, 23 Feb 2015 16:25:00 +0000 (08:25 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 23 Feb 2015 16:25:00 +0000 (08:25 -0800)
SkFontHost no longer exists as a class, so remove the includes and stop
making it a friend.

Review URL: https://codereview.chromium.org/943333004

include/core/SkAdvancedTypefaceMetrics.h
include/core/SkTypeface.h
include/ports/SkFontConfigInterface.h
src/core/SkTypeface.cpp
src/ports/SkFontConfigTypeface.h
src/ports/SkFontHost_FreeType.cpp
src/ports/SkFontHost_fontconfig.cpp
src/ports/SkFontHost_linux.cpp
src/ports/SkFontHost_mac.cpp
src/ports/SkFontHost_win.cpp

index 1192688..06757c0 100644 (file)
@@ -19,8 +19,8 @@
 /** \class SkAdvancedTypefaceMetrics
 
     The SkAdvancedTypefaceMetrics class is used by the PDF backend to correctly
-    embed typefaces.  This class is filled in with information about a given
-    typeface by the SkFontHost class.
+    embed typefaces. This class is created and filled in with information by
+    SkTypeface::getAdvancedTypefaceMetrics.
 */
 
 class SkAdvancedTypefaceMetrics : public SkRefCnt {
index 618e16d..6a6d724 100644 (file)
@@ -386,8 +386,6 @@ private:
 
     friend class SkPaint;
     friend class SkGlyphCache;  // GetDefaultTypeface
-    // just so deprecated fonthost can call protected methods
-    friend class SkFontHost;
 
     typedef SkWeakRefCnt INHERITED;
 };
index 8c084a6..d8b27c0 100644 (file)
@@ -19,8 +19,8 @@ struct SkBaseMutex;
 /**
  *  \class SkFontConfigInterface
  *
- *  Provides SkFontHost clients with access to fontconfig services. They will
- *  access the global instance found in RefGlobal().
+ *  A simple interface for remotable font management.
+ *  The global instance can be found with RefGlobal().
  */
 class SK_API SkFontConfigInterface : public SkRefCnt {
 public:
@@ -99,8 +99,7 @@ public:
      *  libfontconfig. This does not affect the refcnt of the returned instance.
      *  The mutex may be used to guarantee the singleton is only constructed once.
      */
-    static SkFontConfigInterface* GetSingletonDirectInterface
-        (SkBaseMutex* mutex = NULL);
+    static SkFontConfigInterface* GetSingletonDirectInterface(SkBaseMutex* mutex = NULL);
 
     // New APIS, which have default impls for now (which do nothing)
 
index 84cab09..ad928bb 100644 (file)
@@ -69,7 +69,7 @@ SK_DECLARE_STATIC_MUTEX(gCreateDefaultMutex);
 
 // As a template arguments, these must have external linkage.
 SkTypeface* sk_create_default_typeface(int style) {
-    // If backed by fontconfig, it's not safe to call SkFontHost::CreateTypeface concurrently.
+    // It is not safe to call FontConfigTypeface::LegacyCreateTypeface concurrently.
     // To be safe, we serialize here with a mutex so only one call to
     // CreateTypeface is happening at any given time.
     // TODO(bungeman, mtklein): This is sad.  Make our fontconfig code safe?
index 74f43ed..851bfb7 100644 (file)
@@ -42,8 +42,6 @@ public:
     static SkTypeface* LegacyCreateTypeface(const char familyName[], SkTypeface::Style);
 
 protected:
-    friend class SkFontHost;    // hack until we can make public versions
-
     FontConfigTypeface(const SkFontStyle& style,
                        const SkFontConfigInterface::FontIdentity& fi,
                        const SkString& familyName)
index 828d74a..f462e1e 100644 (file)
@@ -11,7 +11,6 @@
 #include "SkColorPriv.h"
 #include "SkDescriptor.h"
 #include "SkFDot6.h"
-#include "SkFontHost.h"
 #include "SkFontHost_FreeType_common.h"
 #include "SkGlyph.h"
 #include "SkMask.h"
index 4b5eddb..fa74f51 100644 (file)
@@ -8,7 +8,6 @@
 #include "SkFontConfigInterface.h"
 #include "SkFontConfigTypeface.h"
 #include "SkFontDescriptor.h"
-#include "SkFontHost.h"
 #include "SkFontHost_FreeType_common.h"
 #include "SkFontStream.h"
 #include "SkStream.h"
index c6f932f..72508e9 100644 (file)
@@ -5,7 +5,6 @@
  * found in the LICENSE file.
  */
 
-#include "SkFontHost.h"
 #include "SkFontHost_FreeType_common.h"
 #include "SkFontDescriptor.h"
 #include "SkFontMgr.h"
index 4518708..fba8867 100755 (executable)
@@ -17,7 +17,6 @@
 #include <CoreFoundation/CoreFoundation.h>
 #endif
 
-#include "SkFontHost.h"
 #include "SkCGUtils.h"
 #include "SkColorPriv.h"
 #include "SkDescriptor.h"
@@ -466,8 +465,6 @@ public:
     AutoCFRelease<CTFontRef> fFontRef;
 
 protected:
-    friend class SkFontHost;    // to access our protected members for deprecated methods
-
     int onGetUPEM() const SK_OVERRIDE;
     SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE;
     void onGetFamilyName(SkString* familyName) const SK_OVERRIDE;
index a1d92fc..7d39da2 100755 (executable)
@@ -12,7 +12,6 @@
 #include "SkData.h"
 #include "SkDescriptor.h"
 #include "SkFontDescriptor.h"
-#include "SkFontHost.h"
 #include "SkGlyph.h"
 #include "SkHRESULT.h"
 #include "SkMaskGamma.h"