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

Side by Side Diff: src/ports/SkFontConfigInterface_direct.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/SkDiscardableMemory_none.cpp ('k') | src/ports/SkFontHost_fontconfig.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 2009 Google Inc. 2 * Copyright 2009 Google Inc.
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 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */ 8 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */
9 9
10 #include <unistd.h>
11 #include <fcntl.h>
12
13 #include <fontconfig/fontconfig.h>
14
15 #include "SkBuffer.h" 10 #include "SkBuffer.h"
11 #include "SkDataTable.h"
16 #include "SkFontConfigInterface.h" 12 #include "SkFontConfigInterface.h"
17 #include "SkLazyPtr.h" 13 #include "SkFontStyle.h"
18 #include "SkMutex.h" 14 #include "SkMutex.h"
19 #include "SkStream.h" 15 #include "SkStream.h"
20 #include "SkString.h" 16 #include "SkString.h"
17 #include "SkTArray.h"
18 #include "SkTDArray.h"
19 #include "SkTemplates.h"
20 #include "SkTypeface.h"
21 #include "SkTypes.h"
22
23 #include <fontconfig/fontconfig.h>
24 #include <unistd.h>
21 25
22 size_t SkFontConfigInterface::FontIdentity::writeToMemory(void* addr) const { 26 size_t SkFontConfigInterface::FontIdentity::writeToMemory(void* addr) const {
23 size_t size = sizeof(fID) + sizeof(fTTCIndex); 27 size_t size = sizeof(fID) + sizeof(fTTCIndex);
24 size += sizeof(int32_t) + sizeof(int32_t) + sizeof(uint8_t); // weight, widt h, italic 28 size += sizeof(int32_t) + sizeof(int32_t) + sizeof(uint8_t); // weight, widt h, italic
25 size += sizeof(int32_t) + fString.size(); // store length+data 29 size += sizeof(int32_t) + fString.size(); // store length+data
26 if (addr) { 30 if (addr) {
27 SkWBuffer buffer(addr, size); 31 SkWBuffer buffer(addr, size);
28 32
29 buffer.write32(fID); 33 buffer.write32(fID);
30 buffer.write32(fTTCIndex); 34 buffer.write32(fTTCIndex);
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 *trimmedMatches.append() = match[i]; 732 *trimmedMatches.append() = match[i];
729 } 733 }
730 } 734 }
731 735
732 SkFontStyleSet_FC* sset = SkNEW_ARGS(SkFontStyleSet_FC, 736 SkFontStyleSet_FC* sset = SkNEW_ARGS(SkFontStyleSet_FC,
733 (trimmedMatches.begin(), 737 (trimmedMatches.begin(),
734 trimmedMatches.count())); 738 trimmedMatches.count()));
735 #endif 739 #endif
736 return false; 740 return false;
737 } 741 }
OLDNEW
« no previous file with comments | « src/ports/SkDiscardableMemory_none.cpp ('k') | src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698