From c5d47d11e65f603a3e37ee876bc74751a30df592 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Thu, 26 Feb 2015 20:54:24 +0100 Subject: Revert "Move coverage bitmap from FontCollection to FontFamily" * Seeing sporadic crashes with this patch. Reverting for now. This reverts commit 4e4ab1a6c8347e977245d1126d10e48a3412d35d. Change-Id: Ibcda62e8268e9a5559c0517695fa61f36f0d34d0 --- include/minikin/FontCollection.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/minikin/FontCollection.h') diff --git a/include/minikin/FontCollection.h b/include/minikin/FontCollection.h index ffdb4d1..12700c6 100644 --- a/include/minikin/FontCollection.h +++ b/include/minikin/FontCollection.h @@ -21,6 +21,7 @@ #include #include +#include #include namespace android { @@ -51,12 +52,17 @@ private: static const int kLogCharsPerPage = 8; static const int kPageMask = (1 << kLogCharsPerPage) - 1; + struct FontInstance { + SparseBitSet* mCoverage; + FontFamily* mFamily; + }; + struct Range { size_t start; size_t end; }; - FontFamily* getFamilyForChar(uint32_t ch, FontLanguage lang, int variant) const; + const FontInstance* getInstanceForChar(uint32_t ch, FontLanguage lang, int variant) const; // static for allocating unique id's static uint32_t sNextId; @@ -68,10 +74,10 @@ private: uint32_t mMaxChar; // This vector has ownership of the bitsets and typeface objects. - std::vector mFamilies; + std::vector mInstances; // This vector contains pointers into mInstances - std::vector mFamilyVec; + std::vector mInstanceVec; // These are offsets into mInstanceVec, one range per page std::vector mRanges; -- cgit v1.2.3