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
This commit is contained in:
caryclark@google.com 2012-09-24 19:33:57 +00:00
parent cdb426d55a
commit 594dd3cd78
14 changed files with 47 additions and 318 deletions

View File

@ -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',

View File

@ -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',

View File

@ -75,7 +75,6 @@
'Debug': {
'defines': [
'SK_DEBUG',
'SK_ENABLE_INST_COUNT',
'GR_DEBUG=1',
],
},

View File

@ -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',
},
},

View File

@ -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)
#

View File

@ -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',
],
},
}],

View File

@ -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?

View File

@ -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:

View File

@ -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',

View File

@ -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>', ],

View File

@ -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"

View File

@ -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

View File

@ -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) {

View File

@ -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];
}
}