aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/FontHostTest.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-19 18:52:39 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-19 18:52:39 +0000
commit8b0a335b6b4bcaebde35100307d371b4614c3fd6 (patch)
treeba6589a2f0e227df3fbccd69dc42f930b1078877 /tests/FontHostTest.cpp
parent44706382dd9a70e9fcd3a06638abb503bbe35c96 (diff)
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
Diffstat (limited to 'tests/FontHostTest.cpp')
-rw-r--r--tests/FontHostTest.cpp11
1 files 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<SkFontTableTag> 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);
}
}