aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-24 17:34:41 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-24 17:34:41 +0000
commitaa8483b49d069e15c9c8bce85bf2a440b27f5e9d (patch)
tree85355fa3fc47271c36d6538cd142909be726545e
parent1bb4be2384c48c2c8dfa4c855095792886b1b3a0 (diff)
SkSfntUtils should use public types.
git-svn-id: http://skia.googlecode.com/svn/trunk@4734 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--bench/ShaderMaskBench.cpp1
-rw-r--r--bench/TextBench.cpp1
-rw-r--r--include/utils/SkSfntUtils.h6
-rw-r--r--src/utils/SkSfntUtils.cpp8
4 files changed, 7 insertions, 9 deletions
diff --git a/bench/ShaderMaskBench.cpp b/bench/ShaderMaskBench.cpp
index 62be6c5bd0..bd31075797 100644
--- a/bench/ShaderMaskBench.cpp
+++ b/bench/ShaderMaskBench.cpp
@@ -11,7 +11,6 @@
#include "SkFontHost.h"
#include "SkPaint.h"
#include "SkRandom.h"
-#include "SkSfntUtils.h"
#include "SkString.h"
#include "SkTemplates.h"
diff --git a/bench/TextBench.cpp b/bench/TextBench.cpp
index ed8fb0e678..0bef92c7d7 100644
--- a/bench/TextBench.cpp
+++ b/bench/TextBench.cpp
@@ -10,7 +10,6 @@
#include "SkFontHost.h"
#include "SkPaint.h"
#include "SkRandom.h"
-#include "SkSfntUtils.h"
#include "SkString.h"
#include "SkTemplates.h"
diff --git a/include/utils/SkSfntUtils.h b/include/utils/SkSfntUtils.h
index d87a4ed665..4e8d7548f9 100644
--- a/include/utils/SkSfntUtils.h
+++ b/include/utils/SkSfntUtils.h
@@ -10,7 +10,7 @@
#define SkSfntUtils_DEFINED
#include "Sk64.h"
-#include "SkFontHost.h"
+#include "SkTypeface.h"
struct SkSfntTable_head {
SkFixed fVersion;
@@ -52,8 +52,8 @@ struct SkSfntTable_maxp {
class SkSfntUtils {
public:
- static bool ReadTable_head(SkFontID, SkSfntTable_head*);
- static bool ReadTable_maxp(SkFontID, SkSfntTable_maxp*);
+ static bool ReadTable_head(SkTypeface&, SkSfntTable_head*);
+ static bool ReadTable_maxp(SkTypeface&, SkSfntTable_maxp*);
};
#endif
diff --git a/src/utils/SkSfntUtils.cpp b/src/utils/SkSfntUtils.cpp
index 54f7cc33aa..d74a0e6409 100644
--- a/src/utils/SkSfntUtils.cpp
+++ b/src/utils/SkSfntUtils.cpp
@@ -30,12 +30,12 @@ static Sk64 parse_be64(const uint8_t*& p) {
///////////////////////////////////////////////////////////////////////////////
-bool SkSfntUtils::ReadTable_head(SkFontID fontID, SkSfntTable_head* head) {
+bool SkSfntUtils::ReadTable_head(SkTypeface& typeface, SkSfntTable_head* head) {
static const uint32_t gTag = SkSetFourByteTag('h', 'e', 'a', 'd');
static const size_t gSize = 54;
uint8_t storage[gSize];
- size_t size = SkFontHost::GetTableData(fontID, gTag, 0, gSize, storage);
+ size_t size = typeface.getTableData(gTag, 0, gSize, storage);
if (size != gSize) {
return false;
}
@@ -62,12 +62,12 @@ bool SkSfntUtils::ReadTable_head(SkFontID fontID, SkSfntTable_head* head) {
return true;
}
-bool SkSfntUtils::ReadTable_maxp(SkFontID fontID, SkSfntTable_maxp* maxp) {
+bool SkSfntUtils::ReadTable_maxp(SkTypeface& typeface, SkSfntTable_maxp* maxp) {
static const uint32_t gTag = SkSetFourByteTag('m', 'a', 'x', 'p');
static const size_t gSize = 32;
uint8_t storage[gSize];
- size_t size = SkFontHost::GetTableData(fontID, gTag, 0, gSize, storage);
+ size_t size = typeface.getTableData(gTag, 0, gSize, storage);
if (size != gSize) {
return false;
}