| Index: src/ports/SkFontMgr_android.cpp
|
| diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp
|
| index e966c84f1ff4054cce84cc66ab2caf0b7a3844ef..991993e4d226549b86330cc9e43273952fc9aafe 100644
|
| --- a/src/ports/SkFontMgr_android.cpp
|
| +++ b/src/ports/SkFontMgr_android.cpp
|
| @@ -39,6 +39,11 @@ static const char* gTestMainConfigFile = NULL;
|
| static const char* gTestFallbackConfigFile = NULL;
|
| static const char* gTestFontFilePrefix = NULL;
|
|
|
| +// HACK
|
| +#include "../../tools/timer/Timer.h"
|
| +static Timer gTimer;
|
| +static double gTime = 0.0;
|
| +
|
| class SkTypeface_Android : public SkTypeface_FreeType {
|
| public:
|
| SkTypeface_Android(int index,
|
| @@ -141,6 +146,7 @@ public:
|
| cannonicalFamilyName = &family.fNames[0];
|
| }
|
| // TODO? make this lazy
|
| +gTimer.start();
|
| for (int i = 0; i < family.fFonts.count(); ++i) {
|
| const FontFileInfo& fontFile = family.fFonts[i];
|
|
|
| @@ -181,6 +187,8 @@ public:
|
| style, isFixedWidth, familyName,
|
| lang, variant)));
|
| }
|
| +gTimer.end();
|
| +gTime += gTimer.fCpu;
|
| }
|
|
|
| virtual int count() SK_OVERRIDE {
|
| @@ -271,6 +279,7 @@ public:
|
| SkFontConfigParser::GetFontFamilies(fontFamilies);
|
| this->buildNameToFamilyMap(fontFamilies, NULL);
|
| this->findDefaultFont();
|
| +SkDebugf("Elapsed CPU time building font families: %g ms\n", gTime);
|
| }
|
| SkFontMgr_Android(const char* mainConfigFile, const char* fallbackConfigFile,
|
| const char* basePath)
|
|
|