Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(733)

Unified Diff: src/ports/SkFontHost_fontconfig.cpp

Issue 15111004: Move the FontConfigTypeface class into private header. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ports/SkFontConfigTypeface.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_fontconfig.cpp
diff --git a/src/ports/SkFontHost_fontconfig.cpp b/src/ports/SkFontHost_fontconfig.cpp
index dcf4a9d25d6f5939bbb5b28e01281da943d668b6..f42ab3fc991e32202f683560401ee89aa776e111 100644
--- a/src/ports/SkFontHost_fontconfig.cpp
+++ b/src/ports/SkFontHost_fontconfig.cpp
@@ -6,6 +6,7 @@
*/
#include "SkFontConfigInterface.h"
+#include "SkFontConfigTypeface.h"
#include "SkFontDescriptor.h"
#include "SkFontHost.h"
#include "SkFontHost_FreeType_common.h"
@@ -55,57 +56,6 @@ SkFontConfigInterface* SkFontHost_fontconfig_ref_global() {
///////////////////////////////////////////////////////////////////////////////
-class FontConfigTypeface : public SkTypeface_FreeType {
- SkFontConfigInterface::FontIdentity fIdentity;
- SkString fFamilyName;
- SkStream* fLocalStream;
-
-public:
- FontConfigTypeface(Style style,
- const SkFontConfigInterface::FontIdentity& fi,
- const SkString& familyName)
- : INHERITED(style, SkTypefaceCache::NewFontID(), false)
- , fIdentity(fi)
- , fFamilyName(familyName)
- , fLocalStream(NULL) {}
-
- FontConfigTypeface(Style style, SkStream* localStream)
- : INHERITED(style, SkTypefaceCache::NewFontID(), false) {
- // we default to empty fFamilyName and fIdentity
- fLocalStream = localStream;
- SkSafeRef(localStream);
- }
-
- virtual ~FontConfigTypeface() {
- SkSafeUnref(fLocalStream);
- }
-
- const SkFontConfigInterface::FontIdentity& getIdentity() const {
- return fIdentity;
- }
-
- const char* getFamilyName() const { return fFamilyName.c_str(); }
- SkStream* getLocalStream() const { return fLocalStream; }
-
- bool isFamilyName(const char* name) const {
- return fFamilyName.equals(name);
- }
-
-protected:
- friend class SkFontHost; // hack until we can make public versions
-
- virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE;
- virtual size_t onGetTableData(SkFontTableTag, size_t offset,
- size_t length, void* data) const SK_OVERRIDE;
- virtual void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE;
- virtual SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE;
-
-private:
- typedef SkTypeface_FreeType INHERITED;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-
struct FindRec {
FindRec(const char* name, SkTypeface::Style style)
: fFamilyName(name) // don't need to make a deep copy
« no previous file with comments | « src/ports/SkFontConfigTypeface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698