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

Side by Side Diff: src/ports/SkFontMgr_android_parser.cpp

Issue 1207893002: Clean up a few includes, introduce iwyu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SkTypes to export stddef. Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « src/ports/SkFontMgr_android_parser.h ('k') | src/ports/SkFontMgr_custom.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The Android Open Source Project 2 * Copyright 2011 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkFontMgr_android_parser.h" 8 #include "SkFontMgr_android_parser.h"
9 #include "SkStream.h" 9 #include "SkStream.h"
10 #include "SkTDArray.h" 10 #include "SkTDArray.h"
11 #include "SkTSearch.h" 11 #include "SkTSearch.h"
12 #include "SkTypeface.h" 12 #include "SkTemplates.h"
13 13
14 #include <dirent.h>
14 #include <expat.h> 15 #include <expat.h>
15 #include <dirent.h>
16 16
17 #include <stdlib.h> 17 #include <stdlib.h>
18 #include <string.h>
18 19
19 #define LMP_SYSTEM_FONTS_FILE "/system/etc/fonts.xml" 20 #define LMP_SYSTEM_FONTS_FILE "/system/etc/fonts.xml"
20 #define OLD_SYSTEM_FONTS_FILE "/system/etc/system_fonts.xml" 21 #define OLD_SYSTEM_FONTS_FILE "/system/etc/system_fonts.xml"
21 #define FALLBACK_FONTS_FILE "/system/etc/fallback_fonts.xml" 22 #define FALLBACK_FONTS_FILE "/system/etc/fallback_fonts.xml"
22 #define VENDOR_FONTS_FILE "/vendor/etc/fallback_fonts.xml" 23 #define VENDOR_FONTS_FILE "/vendor/etc/fallback_fonts.xml"
23 24
24 #define LOCALE_FALLBACK_FONTS_SYSTEM_DIR "/system/etc" 25 #define LOCALE_FALLBACK_FONTS_SYSTEM_DIR "/system/etc"
25 #define LOCALE_FALLBACK_FONTS_VENDOR_DIR "/vendor/etc" 26 #define LOCALE_FALLBACK_FONTS_VENDOR_DIR "/vendor/etc"
26 #define LOCALE_FALLBACK_FONTS_PREFIX "fallback_fonts-" 27 #define LOCALE_FALLBACK_FONTS_PREFIX "fallback_fonts-"
27 #define LOCALE_FALLBACK_FONTS_SUFFIX ".xml" 28 #define LOCALE_FALLBACK_FONTS_SUFFIX ".xml"
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 const char* tag = fTag.c_str(); 788 const char* tag = fTag.c_str();
788 789
789 // strip off the rightmost "-.*" 790 // strip off the rightmost "-.*"
790 const char* parentTagEnd = strrchr(tag, '-'); 791 const char* parentTagEnd = strrchr(tag, '-');
791 if (parentTagEnd == NULL) { 792 if (parentTagEnd == NULL) {
792 return SkLanguage(); 793 return SkLanguage();
793 } 794 }
794 size_t parentTagLen = parentTagEnd - tag; 795 size_t parentTagLen = parentTagEnd - tag;
795 return SkLanguage(tag, parentTagLen); 796 return SkLanguage(tag, parentTagLen);
796 } 797 }
OLDNEW
« no previous file with comments | « src/ports/SkFontMgr_android_parser.h ('k') | src/ports/SkFontMgr_custom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698