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

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

Issue 12919013: move SK_MMAP_SUPPORT into SkPreConfig, so we can know about its availability (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_ascender.cpp ('k') | trunk/src/ports/SkFontHost_linux.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ports/SkFontHost_freetype_mac.cpp
===================================================================
--- trunk/src/ports/SkFontHost_freetype_mac.cpp (revision 8197)
+++ trunk/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 | « trunk/src/ports/SkFontHost_ascender.cpp ('k') | trunk/src/ports/SkFontHost_linux.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698