aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/SkAdvancedTypefaceMetrics.cpp9
-rw-r--r--src/ports/SkFontHost_mac_coretext.cpp17
-rw-r--r--src/ports/SkImageDecoder_CG.cpp2
3 files changed, 20 insertions, 8 deletions
diff --git a/src/core/SkAdvancedTypefaceMetrics.cpp b/src/core/SkAdvancedTypefaceMetrics.cpp
index 05d5c28e6a..d9022246bd 100644
--- a/src/core/SkAdvancedTypefaceMetrics.cpp
+++ b/src/core/SkAdvancedTypefaceMetrics.cpp
@@ -23,7 +23,12 @@
#endif
#ifdef SK_BUILD_FOR_MAC
-#include <Carbon/Carbon.h>
+#import <ApplicationServices/ApplicationServices.h>
+#endif
+
+#ifdef SK_BUILD_FOR_IOS
+#include <CoreText/CoreText.h>
+#include <CoreGraphics/CoreGraphics.h>
#endif
namespace skia_advanced_typeface_metrics_utils {
@@ -146,7 +151,7 @@ template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData(
FT_Face face,
int num_glyphs,
bool (*getAdvance)(FT_Face face, int gId, int16_t* data));
-#elif defined(SK_BUILD_FOR_MAC)
+#elif defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData(
CTFontRef ctFont,
int num_glyphs,
diff --git a/src/ports/SkFontHost_mac_coretext.cpp b/src/ports/SkFontHost_mac_coretext.cpp
index f9eba95c7b..30a2d67381 100644
--- a/src/ports/SkFontHost_mac_coretext.cpp
+++ b/src/ports/SkFontHost_mac_coretext.cpp
@@ -14,7 +14,14 @@
** limitations under the License.
*/
#include <vector>
-#include <Carbon/Carbon.h>
+#ifdef SK_BUILD_FOR_MAC
+#import <ApplicationServices/ApplicationServices.h>
+#endif
+
+#ifdef SK_BUILD_FOR_IOS
+#include <CoreText/CoreText.h>
+#include <CoreGraphics/CoreGraphics.h>
+#endif
#include "SkFontHost.h"
#include "SkDescriptor.h"
@@ -788,9 +795,9 @@ struct TableEntry {
uint32_t fLength;
};
-static uint32 CalcTableCheckSum(uint32 *table, uint32 numberOfBytesInTable) {
- uint32 sum = 0;
- uint32 nLongs = (numberOfBytesInTable + 3) / 4;
+static uint32_t CalcTableCheckSum(uint32_t *table, uint32_t numberOfBytesInTable) {
+ uint32_t sum = 0;
+ uint32_t nLongs = (numberOfBytesInTable + 3) / 4;
while (nLongs-- > 0) {
sum += SkEndian_SwapBE32(*table++);
@@ -847,7 +854,7 @@ SkStream* SkFontHost::OpenStream(SkFontID uniqueID) {
GetTableData(uniqueID, tableTags[index], 0, tableSize, dataPtr);
entry->fTag = SkEndian_SwapBE32(tableTags[index]);
entry->fCheckSum = SkEndian_SwapBE32(CalcTableCheckSum(
- (uint32*)dataPtr, tableSize));
+ (uint32_t*)dataPtr, tableSize));
entry->fOffset = SkEndian_SwapBE32(dataPtr - dataStart);
entry->fLength = SkEndian_SwapBE32(tableSize);
dataPtr += (tableSize + 3) & ~3;
diff --git a/src/ports/SkImageDecoder_CG.cpp b/src/ports/SkImageDecoder_CG.cpp
index f7cc1ee368..eb7ee16f39 100644
--- a/src/ports/SkImageDecoder_CG.cpp
+++ b/src/ports/SkImageDecoder_CG.cpp
@@ -13,7 +13,7 @@
** limitations under the License.
*/
-#include <Carbon/Carbon.h>
+#include <ApplicationServices/ApplicationServices.h>
#include "SkImageDecoder.h"
#include "SkImageEncoder.h"
#include "SkMovie.h"