From 8b0a335b6b4bcaebde35100307d371b4614c3fd6 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Thu, 19 Apr 2012 18:52:39 +0000 Subject: retarget fonttable tests to use SkTypeface api, rather than (should-be-private) SkFontHost api git-svn-id: http://skia.googlecode.com/svn/trunk@3732 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tests/FontHostTest.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/FontHostTest.cpp b/tests/FontHostTest.cpp index eab7bc4246..234d177e66 100644 --- a/tests/FontHostTest.cpp +++ b/tests/FontHostTest.cpp @@ -6,8 +6,8 @@ */ #include "Test.h" +#include "SkPaint.h" #include "SkTypeface.h" -#include "SkFontHost.h" //#define DUMP_TABLES @@ -27,16 +27,16 @@ static const struct TagSize { static void test_tables(skiatest::Reporter* reporter, SkTypeface* face) { SkFontID fontID = face->uniqueID(); - int count = SkFontHost::CountTables(fontID); + int count = face->countTables(); SkAutoTMalloc storage(count); SkFontTableTag* tags = storage.get(); - int count2 = SkFontHost::GetTableTags(fontID, tags); + int count2 = face->getTableTags(tags); REPORTER_ASSERT(reporter, count2 == count); for (int i = 0; i < count; ++i) { - size_t size = SkFontHost::GetTableSize(fontID, tags[i]); + size_t size = face->getTableSize(tags[i]); REPORTER_ASSERT(reporter, size > 0); #ifdef DUMP_TABLES @@ -58,8 +58,7 @@ static void test_tables(skiatest::Reporter* reporter, SkTypeface* face) { // do we get the same size from GetTableData and GetTableSize { SkAutoMalloc data(size); - size_t size2 = SkFontHost::GetTableData(fontID, tags[i], 0, size, - data.get()); + size_t size2 = face->getTableData(tags[i], 0, size, data.get()); REPORTER_ASSERT(reporter, size2 == size); } } -- cgit v1.2.3