Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: trunk/src/ports/SkFontHost_tables.cpp

Issue 13001002: remove GetTable* APIs from SkFontHost, and rely on SkTypeface::onGetTable* (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/ports/SkFontHost_mac.cpp ('k') | trunk/src/ports/SkHarfBuzzFont.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ports/SkFontHost_tables.cpp
===================================================================
--- trunk/src/ports/SkFontHost_tables.cpp (revision 8303)
+++ trunk/src/ports/SkFontHost_tables.cpp (working copy)
@@ -1,56 +0,0 @@
-/*
- * Copyright 2011 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkEndian.h"
-#include "SkFontHost.h"
-#include "SkFontStream.h"
-#include "SkStream.h"
-
-int SkFontHost::CountTables(SkFontID fontID) {
- SkStream* stream = SkFontHost::OpenStream(fontID);
- if (NULL == stream) {
- return 0;
- }
-
- SkAutoUnref au(stream);
- int ttcIndex = 0;
- return SkFontStream::GetTableTags(stream, ttcIndex, NULL);
-}
-
-int SkFontHost::GetTableTags(SkFontID fontID, SkFontTableTag tags[]) {
- SkStream* stream = SkFontHost::OpenStream(fontID);
- if (NULL == stream) {
- return 0;
- }
-
- SkAutoUnref au(stream);
- int ttcIndex = 0;
- return SkFontStream::GetTableTags(stream, ttcIndex, tags);
-}
-
-size_t SkFontHost::GetTableSize(SkFontID fontID, SkFontTableTag tag) {
- SkStream* stream = SkFontHost::OpenStream(fontID);
- if (NULL == stream) {
- return 0;
- }
-
- SkAutoUnref au(stream);
- int ttcIndex = 0;
- return SkFontStream::GetTableData(stream, ttcIndex, tag, 0, ~0U, NULL);
-}
-
-size_t SkFontHost::GetTableData(SkFontID fontID, SkFontTableTag tag,
- size_t offset, size_t length, void* data) {
- SkStream* stream = SkFontHost::OpenStream(fontID);
- if (NULL == stream) {
- return 0;
- }
-
- SkAutoUnref au(stream);
- int ttcIndex = 0;
- return SkFontStream::GetTableData(stream, ttcIndex, tag, offset, length, data);
-}
« no previous file with comments | « trunk/src/ports/SkFontHost_mac.cpp ('k') | trunk/src/ports/SkHarfBuzzFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698