aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
diff options
context:
space:
mode:
authorGravatar yangsu@google.com <yangsu@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-21 13:09:32 +0000
committerGravatar yangsu@google.com <yangsu@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-21 13:09:32 +0000
commitccb74eabccf19f66b6bf31f4acae89b62baa16c3 (patch)
tree3b139651321fff4d9646c5adcee031da2abc90be /src/ports
parent2d54d06adc58f0a6372fb2a1b2eca832965b863c (diff)
Changed mac specific files to use ApplicationServices rather than Carbon
Diffstat (limited to 'src/ports')
-rw-r--r--src/ports/SkFontHost_mac_coretext.cpp17
-rw-r--r--src/ports/SkImageDecoder_CG.cpp2
2 files changed, 13 insertions, 6 deletions
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"