aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-24 19:33:57 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-24 19:33:57 +0000
commit594dd3cd78e2f970d53bb0934fbbb63b41e1d40c (patch)
treeaeb48bc17abb7631ecac0998dc8b1609b386670b
parentcdb426d55a4bc4dae4f6d4f23e6994762950fdc3 (diff)
iOS support work in progress
include/core/SkTypes.h - address unsigned warning include/core/SkInstCnt.h src/core/SkInstCnt.cpp gyp/common.gypi - always define SK_ENABLE_INST_COUNT for debug builds src/views/mac/SkNSView.mm - only call glClear if there is a GL context src/ports/SkImageDecoder_CG.cpp - fix iOS hack by using proper include gyp/opts.gyp - exclude more ARM files from iOS for now (see issue 900) gyp/common_conditions.gypi - add release, more ios specific common settings gyp/bench.gyp - add iOS condition gyp/SampleApp.gyp - remove precompiled header, hardcoded SDK path - add more frameworks gyp/debugger.gyp - fix syntax error - add iOS/Android condition gyp/core.gyp - remove hardcoded SDK path, add more frameworks gyp/common_variables.gypi - add ios SDK path - add ios SDK version gyp/iOSSampleApp.gyp - remove obsolete project gyp/zlib.gyp - add ios library path Review URL: https://codereview.appspot.com/6551070 git-svn-id: http://skia.googlecode.com/svn/trunk@5649 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--gyp/SampleApp.gyp19
-rw-r--r--gyp/bench.gyp2
-rw-r--r--gyp/common.gypi1
-rw-r--r--gyp/common_conditions.gypi10
-rw-r--r--gyp/common_variables.gypi8
-rw-r--r--gyp/core.gyp17
-rw-r--r--gyp/debugger.gyp5
-rw-r--r--gyp/iOSSampleApp.gyp275
-rw-r--r--gyp/opts.gyp6
-rw-r--r--gyp/zlib.gyp8
-rw-r--r--include/core/SkInstCnt.h4
-rw-r--r--include/core/SkTypes.h2
-rw-r--r--src/ports/SkImageDecoder_CG.cpp4
-rw-r--r--src/views/mac/SkNSView.mm4
14 files changed, 47 insertions, 318 deletions
diff --git a/gyp/SampleApp.gyp b/gyp/SampleApp.gyp
index 753d3744cb..e54dbe0b37 100644
--- a/gyp/SampleApp.gyp
+++ b/gyp/SampleApp.gyp
@@ -210,7 +210,6 @@
'../experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig',
'../experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig',
'../experimental/iOSSampleApp/iOSSampleApp-Info.plist',
- '../experimental/iOSSampleApp/iOSSampleApp_Prefix.pch',
'../experimental/iOSSampleApp/Shared/SkOptionListController.h',
'../experimental/iOSSampleApp/Shared/SkOptionListController.mm',
'../experimental/iOSSampleApp/Shared/SkUIRootViewController.h',
@@ -248,21 +247,6 @@
'../experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig',
],
'link_settings': {
- 'variables': {
- 'ios_sdk_version%': '5.1',
- },
- 'conditions' : [
- [ 'skia_arch_type == "x86"', {
- 'variables': {
- 'ios_sdk_dir%': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator',
- },
- }],
- [ 'skia_arch_type == "arm"', {
- 'variables': {
- 'ios_sdk_dir%': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS',
- },
- }],
- ],
'libraries': [
'<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/CoreFoundation.framework',
'<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/CoreGraphics.framework',
@@ -271,6 +255,8 @@
'<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/Foundation.framework',
'<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/QuartzCore.framework',
'<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/OpenGLES.framework',
+ '<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/ImageIO.framework',
+ '<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/MobileCoreServices.framework',
],
},
'include_dirs' : [
@@ -279,7 +265,6 @@
'../experimental/iOSSampleApp/iPhone',
'../include/utils/ios',
],
- 'xcode_config_file': '../experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig',
'mac_bundle_resources' : [
'../experimental/iOSSampleApp/iPad/MainWindow_iPad.xib',
'../experimental/iOSSampleApp/iPhone/MainWindow_iPhone.xib',
diff --git a/gyp/bench.gyp b/gyp/bench.gyp
index 44ebbf2d0e..7a413e1d24 100644
--- a/gyp/bench.gyp
+++ b/gyp/bench.gyp
@@ -57,7 +57,7 @@
'core.gyp:core',
],
'conditions': [
- [ 'skia_os != "mac"', {
+ [ 'skia_os not in ["mac", "ios"]', {
'sources!': [
'../bench/BenchSysTimer_mach.h',
'../bench/BenchSysTimer_mach.cpp',
diff --git a/gyp/common.gypi b/gyp/common.gypi
index 4b558f893e..b6202262d0 100644
--- a/gyp/common.gypi
+++ b/gyp/common.gypi
@@ -75,7 +75,6 @@
'Debug': {
'defines': [
'SK_DEBUG',
- 'SK_ENABLE_INST_COUNT',
'GR_DEBUG=1',
],
},
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index 934eba9591..2ec0ef8014 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -219,13 +219,21 @@
'GCC_OPTIMIZATION_LEVEL': '0',
},
},
+ 'Release': {
+ 'xcode_settings': {
+ 'GCC_OPTIMIZATION_LEVEL': '3',
+ },
+ 'defines': [ 'NDEBUG' ],
+ },
},
'xcode_settings': {
- 'ARCHS': 'armv7',
+ 'ARCHS': 'armv6 armv7',
'CODE_SIGNING_REQUIRED': 'NO',
'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
+ 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)',
'SYMROOT': '<(DEPTH)/xcodebuild',
'SDKROOT': 'iphoneos',
+ 'TARGETED_DEVICE_FAMILY': '1,2',
'OTHER_CPLUSPLUSFLAGS': '-fvisibility=hidden -fvisibility-inlines-hidden',
},
},
diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi
index ee89ca94e0..8e4ab80b9c 100644
--- a/gyp/common_variables.gypi
+++ b/gyp/common_variables.gypi
@@ -67,6 +67,11 @@
}, {
'skia_static_initializers%': 1,
}],
+ [ 'skia_arch_type == "x86"', {
+ 'ios_sdk_dir%': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator',
+ }, {
+ 'ios_sdk_dir%': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS',
+ }],
],
'skia_scalar%': 'float',
@@ -78,6 +83,7 @@
'android_make_apk%': 1,
'skia_nacl%': 0,
'skia_gpu%': 1,
+ 'ios_sdk_version%': '5.1',
'skia_osx_sdkroot%': 'macosx10.6',
},
@@ -97,6 +103,8 @@
'skia_gpu%': '<(skia_gpu)',
'skia_osx_sdkroot%': '<(skia_osx_sdkroot)',
'skia_static_initializers%': '<(skia_static_initializers)',
+ 'ios_sdk_version%': '<(ios_sdk_version)',
+ 'ios_sdk_dir%': '<(ios_sdk_dir)',
# These are referenced by our .gypi files that list files (e.g. core.gypi)
#
diff --git a/gyp/core.gyp b/gyp/core.gyp
index b565c086ab..d4d6abbd1d 100644
--- a/gyp/core.gyp
+++ b/gyp/core.gyp
@@ -57,21 +57,6 @@
'../include/utils/mac/SkCGUtils.h',
],
'link_settings': {
- 'variables': {
- 'ios_sdk_version%': '5.1',
- },
- 'conditions' : [
- [ 'skia_arch_type == "x86"', {
- 'variables': {
- 'ios_sdk_dir%': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator',
- },
- }],
- [ 'skia_arch_type == "arm"', {
- 'variables': {
- 'ios_sdk_dir%': '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS',
- },
- }],
- ],
'libraries': [
'<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/CoreFoundation.framework',
'<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/CoreGraphics.framework',
@@ -80,6 +65,8 @@
'<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/Foundation.framework',
'<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/QuartzCore.framework',
'<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/OpenGLES.framework',
+ '<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/ImageIO.framework',
+ '<(ios_sdk_dir)<(ios_sdk_version).sdk/System/Library/Frameworks/MobileCoreServices.framework',
],
},
}],
diff --git a/gyp/debugger.gyp b/gyp/debugger.gyp
index 3c721236e3..94025382fc 100644
--- a/gyp/debugger.gyp
+++ b/gyp/debugger.gyp
@@ -67,7 +67,7 @@
},
}],
[ 'skia_os == "mac" and skia_arch_width != 64', {
- 'error': '<!(skia_arch_width must be 64 bits when building the debugger on mac'
+ 'error': '<!(skia_arch_width must be 64 bits when building the debugger on mac)'
}],
[ 'skia_os == "mac"', {
'mac_bundle' : 1,
@@ -84,6 +84,9 @@
],
},
}],
+ [ 'skia_os in ["android", "ios"]', {
+ 'error': '<!(debugger unsupported with skia_os=<(skia_os))'
+ }],
[ 'skia_os == "win"', {
'include_dirs': [
# TODO(chudy): Dynamically generate these paths?
diff --git a/gyp/iOSSampleApp.gyp b/gyp/iOSSampleApp.gyp
deleted file mode 100644
index dca28c4aa6..0000000000
--- a/gyp/iOSSampleApp.gyp
+++ /dev/null
@@ -1,275 +0,0 @@
-{
- 'defines!': [
- 'SK_BUILD_FOR_MAC',
- ],
- 'targets': [
- {
- 'target_name': 'iOSSampleApp',
- 'type': 'executable',
- 'mac_bundle' : 1,
- 'include_dirs' : [
- '../src/core', # needed to get SkConcaveToTriangle, maybe this should be moved to include dir?
- '../gm', # SampleGM.cpp pulls gm.h
- '../include/pipe', # To pull in SkGPipe.h for pipe reader/writer
- ],
- 'sources': [
- # gm files needed for SampleGM.cpp
- '../gm/bitmapfilters.cpp',
- '../gm/blurs.cpp',
- '../gm/complexclip.cpp',
- '../gm/filltypes.cpp',
- '../gm/gm.h',
- '../gm/gradients.cpp',
- '../gm/nocolorbleed.cpp',
- '../gm/points.cpp',
- '../gm/poly2poly.cpp',
- '../gm/shadertext.cpp',
- '../gm/shadows.cpp',
- '../gm/tilemodes.cpp',
- '../gm/xfermodes.cpp',
-
- '../samplecode/ClockFaceView.cpp',
- '../samplecode/OverView.cpp',
- '../samplecode/OverView.h',
- '../samplecode/Sample2PtRadial.cpp',
- '../samplecode/SampleAll.cpp',
- '../samplecode/SampleAnimator.cpp',
- '../samplecode/SampleApp.cpp',
- '../samplecode/SampleArc.cpp',
- '../samplecode/SampleAvoid.cpp',
- '../samplecode/SampleBigBlur.cpp',
- '../samplecode/SampleBigGradient.cpp',
- '../samplecode/SampleBitmapRect.cpp',
- '../samplecode/SampleBlur.cpp',
- '../samplecode/SampleCamera.cpp',
- '../samplecode/SampleCircle.cpp',
- '../samplecode/SampleCode.h',
- '../samplecode/SampleColorFilter.cpp',
- '../samplecode/SampleComplexClip.cpp',
- '../samplecode/SampleConcavePaths.cpp',
- '../samplecode/SampleCull.cpp',
- '../samplecode/SampleDecode.cpp',
- '../samplecode/SampleDegenerateTwoPtRadials.cpp',
- '../samplecode/SampleDither.cpp',
- '../samplecode/SampleDitherBitmap.cpp',
- '../samplecode/SampleDrawBitmap.cpp',
- '../samplecode/SampleDrawLooper.cpp',
- '../samplecode/SampleEffects.cpp',
- '../samplecode/SampleEmboss.cpp',
- '../samplecode/SampleEncode.cpp',
- '../samplecode/SampleExtractAlpha.cpp',
- '../samplecode/SampleFillType.cpp',
- '../samplecode/SampleFilter.cpp',
- '../samplecode/SampleFilter2.cpp',
- '../samplecode/SampleFontCache.cpp',
- '../samplecode/SampleFontScalerTest.cpp',
- '../samplecode/SampleFuzz.cpp',
- '../samplecode/SampleGM.cpp',
- '../samplecode/SampleGradients.cpp',
- '../samplecode/SampleHairline.cpp',
- '../samplecode/SampleImage.cpp',
- '../samplecode/SampleImageDir.cpp',
- '../samplecode/SampleLayerMask.cpp',
- '../samplecode/SampleLayers.cpp',
- '../samplecode/SampleLCD.cpp',
- '../samplecode/SampleLineClipper.cpp',
- '../samplecode/SampleLines.cpp',
- '../samplecode/SampleMeasure.cpp',
- '../samplecode/SampleMipMap.cpp',
- '../samplecode/SampleMovie.cpp',
- '../samplecode/SampleNinePatch.cpp',
- '../samplecode/SampleOvalTest.cpp',
- '../samplecode/SampleOverflow.cpp',
- '../samplecode/SamplePageFlip.cpp',
- '../samplecode/SamplePatch.cpp',
- '../samplecode/SamplePath.cpp',
- '../samplecode/SamplePathClip.cpp',
- '../samplecode/SamplePathEffects.cpp',
- '../samplecode/SamplePicture.cpp',
- '../samplecode/SamplePoints.cpp',
- '../samplecode/SamplePolyToPoly.cpp',
- '../samplecode/SampleAARects.cpp',
- '../samplecode/SampleRegion.cpp',
- '../samplecode/SampleRepeatTile.cpp',
- '../samplecode/SampleShaders.cpp',
- '../samplecode/SampleShaderText.cpp',
- '../samplecode/SampleSkLayer.cpp',
- '../samplecode/SampleSlides.cpp',
- '../samplecode/SampleStrokePath.cpp',
- '../samplecode/SampleStrokeText.cpp',
- '../samplecode/SampleTests.cpp',
- '../samplecode/SampleText.cpp',
- '../samplecode/SampleTextAlpha.cpp',
- '../samplecode/SampleTextBox.cpp',
- '../samplecode/SampleTextEffects.cpp',
- '../samplecode/SampleTextOnPath.cpp',
- '../samplecode/SampleTextureDomain.cpp',
- '../samplecode/SampleTiling.cpp',
- '../samplecode/SampleTinyBitmap.cpp',
- '../samplecode/SampleTriangles.cpp',
- '../samplecode/SampleTypeface.cpp',
- '../samplecode/SampleUnitMapper.cpp',
- '../samplecode/SampleVertices.cpp',
- '../samplecode/SampleXfermodes.cpp',
- '../samplecode/SampleXfermodesBlur.cpp',
-
- # Dependencies for the pipe code in SampleApp
- '../src/pipe/SkGPipeRead.cpp',
- '../src/pipe/SkGPipeWrite.cpp',
-
- # DrawingBoard
- '../experimental/DrawingBoard/SkColorPalette.h',
- '../experimental/DrawingBoard/SkColorPalette.cpp',
- '../experimental/DrawingBoard/SkNetPipeController.h',
- '../experimental/DrawingBoard/SkNetPipeController.cpp',
- '../experimental/DrawingBoard/SampleDrawingClient.cpp',
- '../experimental/DrawingBoard/SampleDrawingServer.cpp',
-
- # Networking
- '../experimental/Networking/SampleNetPipeReader.cpp',
- '../experimental/Networking/SkSockets.cpp',
- '../experimental/Networking/SkSockets.h',
-
- # Transition
- '../src/utils/SkInterpolator.cpp',
- '../include/utils/SkInterpolator.h',
- '../samplecode/TransitionView.cpp',
- '../samplecode/TransitionView.h',
- ],
- 'sources!': [
- '../samplecode/SampleSkLayer.cpp', #relies on SkMatrix44 which doesn't compile
- '../samplecode/SampleTests.cpp', #includes unknown file SkShaderExtras.h
- '../samplecode/SampleWarp.cpp',
- '../samplecode/SampleFontCache.cpp',
- ],
- 'dependencies': [
- 'core.gyp:core',
- 'effects.gyp:effects',
- 'images.gyp:images',
- 'ports.gyp:ports',
- 'views.gyp:views',
- 'utils.gyp:utils',
- 'animator.gyp:animator',
- 'xml.gyp:xml',
- 'experimental.gyp:experimental',
- 'gpu.gyp:gr',
- 'gpu.gyp:skgr',
- 'pdf.gyp:pdf',
- ],
- 'conditions' : [
- [ 'OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', {
- 'sources!': [
- '../samplecode/SampleDecode.cpp',
- ],
- }],
- [ 'OS == "win"', {
- 'sources!': [
- # require UNIX functions
- '../samplecode/SampleEncode.cpp',
- '../samplecode/SamplePageFlip.cpp',
- ],
- }],
- [ 'OS == "mac"', {
- 'sources!': [
- '../samplecode/SampleDecode.cpp',
- '../src/gpu/mac/GrGLDefaultInterface_mac.cpp',
- ],
- 'sources': [
- # Shared resources
- '../experimental/SkEventNotifier.h',
- '../experimental/SkEventNotifier.mm',
- '../experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig',
- '../experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig',
- '../experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig',
- '../experimental/iOSSampleApp/iOSSampleApp-Info.plist',
- '../experimental/iOSSampleApp/iOSSampleApp_Prefix.pch',
- '../experimental/iOSSampleApp/Shared/SkOptionListController.h',
- '../experimental/iOSSampleApp/Shared/SkOptionListController.mm',
- '../experimental/iOSSampleApp/Shared/SkUIRootViewController.h',
- '../experimental/iOSSampleApp/Shared/SkUIRootViewController.mm',
- '../experimental/iOSSampleApp/Shared/SkOptionsTableViewController.h',
- '../experimental/iOSSampleApp/Shared/SkOptionsTableViewController.mm',
- '../experimental/iOSSampleApp/Shared/SkUIView.h',
- '../experimental/iOSSampleApp/Shared/SkUIView.mm',
- '../experimental/iOSSampleApp/Shared/SkUIDetailViewController.h',
- '../experimental/iOSSampleApp/Shared/SkUIDetailViewController.mm',
- '../experimental/iOSSampleApp/Shared/main.m',
-
- # iPad
- '../experimental/iOSSampleApp/iPad/AppDelegate_iPad.h',
- '../experimental/iOSSampleApp/iPad/AppDelegate_iPad.mm',
- '../experimental/iOSSampleApp/iPad/SkUISplitViewController.h',
- '../experimental/iOSSampleApp/iPad/SkUISplitViewController.mm',
- '../experimental/iOSSampleApp/iPad/MainWindow_iPad.xib',
-
- # iPhone
- '../experimental/iOSSampleApp/iPhone/AppDelegate_iPhone.h',
- '../experimental/iOSSampleApp/iPhone/AppDelegate_iPhone.mm',
- '../experimental/iOSSampleApp/iPhone/SkUINavigationController.h',
- '../experimental/iOSSampleApp/iPhone/SkUINavigationController.mm',
- '../experimental/iOSSampleApp/iPhone/MainWindow_iPhone.xib',
-
- '../src/views/ios/SkOSWindow_iOS.mm',
- '../src/utils/ios/SkImageDecoder_iOS.mm',
- '../src/utils/ios/SkStream_NSData.mm',
- '../src/utils/ios/SkOSFile_iOS.mm',
-
- '../include/utils/mac/SkCGUtils.h',
- '../src/utils/mac/SkCreateCGImageRef.cpp',
- '../experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig',
- '../experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig',
- ],
- 'link_settings': {
- 'libraries': [
- '/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/CoreFoundation.framework',
- '/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/CoreGraphics.framework',
- '/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/CoreText.framework',
- '/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/UIKit.framework',
- '/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/Foundation.framework',
- '/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/QuartzCore.framework',
- '/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/OpenGLES.framework',
- ],
- 'libraries!': [
- #remove mac dependencies
- '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
- '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
- '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
- '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
- '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
- ],
- },
- 'include_dirs' : [
- '../experimental/iOSSampleApp',
- '../experimental/iOSSampleApp/iPad',
- '../experimental/iOSSampleApp/iPhone',
- '../include/utils/ios',
- '../../include/gpu',
- ],
- #'xcode_settings' : {
- # 'INFOPLIST_FILE' : '../experimental/iOSSampleApp/iOSSampleApp-Info.plist',
- # 'ARCHS' : 'armv6 armv7',
- # 'IPHONEOS_DEPLOYMENT_TARGET' : '4.2',
- # 'SDKROOT' : 'iphoneos',
- # 'TARGETED_DEVICE_FAMILY' : '1,2',
- # 'USER_HEADER_SEARCH_PATHS' : '../../gpu/include/** ../../include/**',
- # 'CODE_SIGN_IDENTITY' : 'iPhone Developer',
- # 'GCC_PREPROCESSOR_DEFINITIONS' : 'SK_BUILD_FOR_IOS',
- # 'GCC_OPTIMIZATION_LEVEL' : '0',
- #},
- 'xcode_config_file': '../experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig',
- 'mac_bundle_resources' : [
- '../experimental/iOSSampleApp/iPad/MainWindow_iPad.xib',
- '../experimental/iOSSampleApp/iPhone/MainWindow_iPhone.xib',
- ],
- }],
-
- ],
- },
- ],
-}
-
-# Local Variables:
-# tab-width:2
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=2 shiftwidth=2:
diff --git a/gyp/opts.gyp b/gyp/opts.gyp
index d5a4b9d4e8..e5ceb36aa7 100644
--- a/gyp/opts.gyp
+++ b/gyp/opts.gyp
@@ -74,13 +74,15 @@
}],
[ 'skia_os == "ios"', {
'sources!': [
- # this needs to be rewritten to be xcode-friendly
+ # these fail to compile under xcode for ios
'../src/opts/memset.arm.S',
+ '../src/opts/SkBitmapProcState_opts_arm.cpp',
+ '../src/opts/SkBlitRow_opts_arm.cpp',
],
}],
],
}],
- [ '(skia_arch_type == "arm" and armv7 == 0) or (skia_arch_type == "x86" and skia_os == "ios")', {
+ [ '(skia_arch_type == "arm" and armv7 == 0) or (skia_os == "ios")', {
'sources': [
'../src/opts/SkBitmapProcState_opts_none.cpp',
'../src/opts/SkBlitRow_opts_none.cpp',
diff --git a/gyp/zlib.gyp b/gyp/zlib.gyp
index d41924d1bc..af11169ae0 100644
--- a/gyp/zlib.gyp
+++ b/gyp/zlib.gyp
@@ -21,6 +21,14 @@
},
'defines': [ 'SK_ZLIB_INCLUDE=<zlib.h>', ],
}],
+ [ 'skia_os == "ios"', {
+ 'link_settings': {
+ 'libraries': [
+ '<(ios_sdk_dir)<(ios_sdk_version).sdk/usr/lib/libz.dylib',
+ ],
+ },
+ 'defines': [ 'SK_ZLIB_INCLUDE=<zlib.h>', ],
+ }],
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android"]', {
'link_settings': { 'libraries': [ '-lz', ], },
'defines': [ 'SK_ZLIB_INCLUDE=<zlib.h>', ],
diff --git a/include/core/SkInstCnt.h b/include/core/SkInstCnt.h
index 09ce0ca1b1..6866be994d 100644
--- a/include/core/SkInstCnt.h
+++ b/include/core/SkInstCnt.h
@@ -18,6 +18,10 @@
* At the end of an application a call to all the "root" objects'
* CheckInstanceCount methods should be made
*/
+#if defined SK_DEBUG && !defined SK_ENABLE_INST_COUNT
+#define SK_ENABLE_INST_COUNT
+#endif
+
#ifdef SK_ENABLE_INST_COUNT
#include <stdlib.h>
#include "SkTArray.h"
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index eb87181e7f..d44c560412 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -185,7 +185,7 @@ typedef uint8_t SkBool8;
#define SK_MaxU16 0xFFFF
#define SK_MinU16 0
#define SK_MaxS32 0x7FFFFFFF
-#define SK_MinS32 0x80000001
+#define SK_MinS32 -SK_MaxS32
#define SK_MaxU32 0xFFFFFFFF
#define SK_MinU32 0
#define SK_NaN32 0x80000000
diff --git a/src/ports/SkImageDecoder_CG.cpp b/src/ports/SkImageDecoder_CG.cpp
index ac2eb0e03d..3930c72f02 100644
--- a/src/ports/SkImageDecoder_CG.cpp
+++ b/src/ports/SkImageDecoder_CG.cpp
@@ -21,9 +21,7 @@
#ifdef SK_BUILD_FOR_IOS
#include <CoreGraphics/CoreGraphics.h>
#include <ImageIO/ImageIO.h>
-//#include <UTCoreTypes.h> // FIXME: hack -- can't figure out how to include this
-extern const CFStringRef kUTTypeJPEG __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_3_0);
-extern const CFStringRef kUTTypePNG __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_3_0);
+#include <MobileCoreServices/MobileCoreServices.h>
#endif
static void malloc_release_proc(void* info, const void* data, size_t size) {
diff --git a/src/views/mac/SkNSView.mm b/src/views/mac/SkNSView.mm
index b3c6762747..f43af64df1 100644
--- a/src/views/mac/SkNSView.mm
+++ b/src/views/mac/SkNSView.mm
@@ -57,7 +57,9 @@ SK_COMPILE_ASSERT(SK_SUPPORT_GPU, not_implemented_for_non_gpu_build);
- (void)resizeSkView:(NSSize)newSize {
if (NULL != fWind && (fWind->width() != newSize.width || fWind->height() != newSize.height)) {
fWind->resize((int) newSize.width, (int) newSize.height);
- glClear(GL_STENCIL_BUFFER_BIT);
+ if (NULL != fGLContext) {
+ glClear(GL_STENCIL_BUFFER_BIT);
+ }
[fGLContext update];
}
}