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

Unified Diff: src/ports/SkFontHost_freetype_mac.cpp

Issue 12921003: reland 8200 w/ fix for android (use fullpath instead of path) (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
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 | « src/ports/SkFontHost_ascender.cpp ('k') | src/ports/SkFontHost_linux.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_freetype_mac.cpp
===================================================================
--- src/ports/SkFontHost_freetype_mac.cpp (revision 8205)
+++ src/ports/SkFontHost_freetype_mac.cpp (working copy)
@@ -6,7 +6,6 @@
*/
#include "SkFontHost.h"
-#include "SkMMapStream.h"
#include "SkTypefaceCache.h"
#define FONT_PATH "/Library/Fonts/Skia.ttf"
@@ -26,7 +25,11 @@
};
static FTMacTypeface* create_from_path(const char path[]) {
- SkStream* stream = new SkMMAPStream(path);
+ SkStream* stream = SkStream::NewFromFile(path);
+ if (!stream) {
+ return NULL;
+ }
+
size_t size = stream->getLength();
SkASSERT(size);
FTMacTypeface* tf = new FTMacTypeface(SkTypeface::kNormal,
« no previous file with comments | « src/ports/SkFontHost_ascender.cpp ('k') | src/ports/SkFontHost_linux.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698