aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/TextBench.cpp
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-08-11 15:35:36 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-08-11 15:35:36 +0000
commitcd21c809a9b4a68916bed6c9cb9012f251e3664f (patch)
tree11eda0e7ea9a5e922d8544e5c0e731cab0f0e1af /bench/TextBench.cpp
parente0d089900e898cdb834d48e3062622008d9da687 (diff)
remove dead code
git-svn-id: http://skia.googlecode.com/svn/trunk@311 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/TextBench.cpp')
-rw-r--r--bench/TextBench.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/bench/TextBench.cpp b/bench/TextBench.cpp
index 67cd766496..a4ed9f23dc 100644
--- a/bench/TextBench.cpp
+++ b/bench/TextBench.cpp
@@ -7,61 +7,6 @@
#include "SkString.h"
#include "SkTemplates.h"
-static void dump_font(const char name[], SkFontID fontID) {
- SkDebugf("Font \"%s\" %x\n", name, fontID);
- int count = SkFontHost::CountTables(fontID);
- SkAutoTArray<SkFontTableTag> storage(count);
- SkFontTableTag* tags = storage.get();
- SkFontHost::GetTableTags(fontID, tags);
- for (int i = 0; i < count; i++) {
- uint32_t tag = tags[i];
- uint8_t data[4];
- size_t size = SkFontHost::GetTableSize(fontID, tag);
- size_t bytes = SkFontHost::GetTableData(fontID, tag,
- 0, sizeof(data), data);
- SkDebugf(" tag=%c%c%c%c size=%d bytes=%d %x %x %x %x\n",
- uint8_t(tag>>24), uint8_t(tag>>16), uint8_t(tag>>8), uint8_t(tag),
- size, bytes, data[0], data[1], data[2], data[3]);
- }
-
- SkSfntTable_head head;
- if (SkSfntUtils::ReadTable_head(fontID, &head)) {
- SkDebugf("--- head: version=%x magic=%x upem=%d style=%x\n", head.fVersion,
- head.fMagicNumber, head.fUnitsPerEm, head.fMacStyle);
- } else {
- SkDebugf("------- head wasn't read\n");
- }
-
- SkSfntTable_maxp maxp;
- if (SkSfntUtils::ReadTable_maxp(fontID, &maxp)) {
- SkDebugf("--- maxp: version=%x glyphs=%d points=%d ctrs=%d\n", maxp.fVersion,
- maxp.fNumGlyphs, maxp.fMaxPoints, maxp.fMaxContours);
- } else {
- SkDebugf("------- maxp wasn't read\n");
- }
-}
-
-static void test_tables() {
- static bool gOnce;
- if (gOnce) {
- return;
- }
- gOnce = true;
-
- static const char* gNames[] = {
- "Arial", "Times", "Courier"
- };
-
- for (size_t i = 0; i < SK_ARRAY_COUNT(gNames); i++) {
- SkTypeface* tf = SkTypeface::CreateFromName(gNames[i], SkTypeface::kNormal);
- if (tf) {
- SkFontID fontID = tf->uniqueID();
- dump_font(gNames[i], fontID);
- tf->unref();
- }
- }
-}
-
/* Some considerations for performance:
short -vs- long strings (measuring overhead)
tiny -vs- large pointsize (measure blit -vs- overhead)
@@ -80,10 +25,6 @@ class TextBench : public SkBenchmark {
enum { N = 300 };
public:
TextBench(const char text[], int ps, bool linearText, bool posText) {
- if (false) {
- test_tables();
- }
-
fText.set(text);
fPaint.setAntiAlias(true);