diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index b8d57b47..00000000 Binary files a/.DS_Store and /dev/null differ diff --git a/README.md b/README.md index b27b2227..b53ce6c0 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ -# iOS_Tips -> iOS的一些示例,不定时更新~ 由于内容后期会较多,文件可能会有点大,建议终端用git clone命令下载,这样以后只需git pull更新。 -GitHub:https://github.com/wsl2ls/iOS_Tips.git -掘金:https://juejin.im/user/5c00d97b6fb9a049fb436288 +# [iOS_Tips](https://github.com/wsl2ls/iOS_Tips) +> iOS的一些示例,不定时更新~ + +| [简书 ](https://www.jianshu.com/u/e15d1f644bea) | [掘金](https://juejin.im/user/5c00d97b6fb9a049fb436288) | +| ---- | ---- | +| [CSDN](https://blog.csdn.net/wsl2ls) | [微博](https://weibo.com/5732733120/profile?rightmod=1&wvr=6&mod=personinfo&is_all=1) | ### 目录 -> 1、暗黑模式 -> 2、AppleID登录应用 -> 3、AVFoundation相关 +> 1、[暗黑模式](#1-暗黑模式适配) +> 2、[AppleID登录应用](#2-AppleID登录应用) +> 3、[AVFoundation相关](#3-AVFoundation相关) >> 3.1、AVFoundation 高仿微信相机拍摄和编辑 >> 3.2、AVFoundation 人脸检测 >> 3.3、AVFoundation 实时滤镜 @@ -14,32 +16,45 @@ GitHub:https://github.com/wsl2ls/iOS_Tips.git >> 3.5、VideoToolBox和AudioToolBox音视频编解码 >> 3.6、AVFoundation 利用摄像头实时识别物体颜色 >> 3.7、AVFoundation 原生二维码扫描识别和生成 ->> -> 4、OpenGL ES学习 -> 5、LeetCode算法练习 -> 6、键盘和UIMenuController的并存问题 -> 7、iOS Crash防护 -> 8、WKWebView相关 + +> 4、[OpenGL ES学习](#4-OpenGLES学习) +> 5、[LeetCode算法练习](#5-LeetCode算法练习) +> 6、[工作中踩过的坑](#6-工作中踩过的坑) +>> 6.1、键盘和UIMenuController不能同时存在的问题 +>> 6.2、全屏侧滑手势/UIScrollView/UISlider间滑动手势冲突 +>> 6.3、UITableView/UICollectionView获取特定位置的cell +>> 6.4、UIScrollView视觉差动画 +>> 6.5、iOS 传感器集锦 +>> 6.6、iOS 自定义转场动画 +>> 6.7、二进制重排优化启动速度 +>> 6.8、iOS APM应用性能监控管理(doing) +>> 6.9、ipa瘦身之扫描无用资源 +>> 6.10、多个UIScrollView嵌套/个人中心页 + +> 7、[iOS Crash防护](#7-iOSCrash防护) +> 8、[WKWebView相关](#8-WKWebView相关) >> 8.1、WKWebView的使用 ->> 8.2、WKWebView+UITableView混排 ->> 8.3、UIScrollView实现原理 ->> 8.4、WKWebView离线缓存功能 ->> 8.5、Html非文本元素替换为原生组件展示 ->> -> 问题说明 - +>> 8.2、WKWebView+UITableView混排 +>> 8.3、WKWebView离线缓存功能 +>> 8.4、Html非文本元素替换为原生组件展示 +>> 8.5、UIScrollView实现原理 +>> 8.6、UITableView的实现原理 + +> [高质量技术博客集合](iOS_Tips/DarkMode/WorkIssues/高质量技术博客.md) +> [结尾](#结尾) + -## 1、 暗黑模式适配 +## 1-暗黑模式适配 ![暗黑模式](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/暗黑模式.gif) -## 2、AppleID登录应用 +## 2-AppleID登录应用 * 查看本仓库下的AddingTheSignInWithAppleFlowToYourApp -## 3、AVFoundation相关 +## 3-AVFoundation相关 -### 3.1、[微信相机拍摄照片、小视频以及编辑功能](https://www.jianshu.com/p/a2a04cabb98d) +#### 3.1-[微信相机拍摄照片、小视频以及编辑功能](https://www.jianshu.com/p/a2a04cabb98d) > 效果描述: > * 1、自定义相机 拍摄视频和照片 > * 2、切换前后摄像头、调整焦距/设置聚焦点、横屏拍摄 @@ -49,49 +64,42 @@ GitHub:https://github.com/wsl2ls/iOS_Tips.git > 主要类:SLAvCaptureTool(音视频采集录制工具)、SLAvEditExport(导出编辑的音视频)。关于视频的压缩问题,可以通过降低采集时的分辨率sessionPreset、降低写入文件时的分辨率(AVVideoWidthKey宽AVVideoHeightKey高)和码率(AVVideoCodecKey)、指定高的FormatProfile(AVVideoProfileLevelKey)等方法来实现,同时也要保证一定的清晰度满足业务的需求, 可以看看这篇文章https://www.jianshu.com/p/4f69c22c6dce |![拍摄视频.gif](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/3、小视频1.gif)|![拍摄照片](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/3、小视频2.gif)|![横屏视频](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/3、小视频3.gif)| - -***** - +| ---- | ---- | ---- | |![视频编辑](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/3、小视频4.gif)|![视频编辑](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/3、小视频5.gif)|![图片编辑](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/3、小视频6.gif)| - -**** - |![图片编辑](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/3、小视频7.gif)|![图片裁剪](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/3、小视频8.gif)| -### 3.2、[人脸检测](https://www.jianshu.com/p/f236dc161a90) +#### 3.2-[人脸检测](https://www.jianshu.com/p/f236dc161a90) ![人脸识别](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/4、人脸识别.gif) -### 3.3、[实时滤镜拍摄和导出](https://www.jianshu.com/p/f236dc161a90) +#### 3.3-[实时滤镜拍摄和导出](https://www.jianshu.com/p/f236dc161a90) > 主要类: 是由SLAvCaptureTool拆分的 SLAvCaptureSession(采集) + SLAvWriterInput(录制) 两个工具类,方便扩展,录制写入实现的方式也略有不同 ![人脸识别](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/5、实时滤镜拍摄.gif) -### 3.4、[GPUImage框架的使用](https://www.jianshu.com/p/97740cd381f7) +#### 3.4-[GPUImage框架的使用](https://www.jianshu.com/p/97740cd381f7) > 效果描述:实时拍摄添加水印和滤镜、本地视频添加水印、GIF图水印 -* 遗留问题:一个启动周期内,第一次启动摄像头时打开特慢,之后就特别块,还没找到原因,望知道到的告知一下🤝 - ![GPUImage框架的使用](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/6、GPUImage.gif) -### 3.5、VideoToolBox和AudioToolBox音视频编解码 +#### 3.5-VideoToolBox和AudioToolBox音视频编解码 > 请查看本仓库下的 VideoEncoder&Decoder 文件 ![音视频编码](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/7、音视频编码.gif) -### 3.6、AVFoundation 利用摄像头实时识别物体颜色 +#### 3.6-AVFoundation 利用摄像头实时识别物体颜色 ![音视频编码](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/3.6、拾色器.gif) -### 3.7、[AVFoundation 原生二维码扫描识别和生成](https://juejin.im/post/5c0e1db651882539c60d0434) +#### 3.7-[AVFoundation 原生二维码扫描识别和生成](https://juejin.im/post/5c0e1db651882539c60d0434) > 该代码地址在:https://github.com/wsl2ls/ScanQRcode -## 4、[OpenGL ES学习](https://www.jianshu.com/p/9259689cac06) +## 4-OpenGLES学习 > 示例描述: > * 1、GLKit 绘制图片和正方体 @@ -101,44 +109,64 @@ GitHub:https://github.com/wsl2ls/iOS_Tips.git |![OpenGLES学习.gif](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/8、OpenGLES学习1.gif)|![OpenGLES学习](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/8、OpenGLES学习2.gif)|![OpenGLES学习](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/8、OpenGLES学习3.gif)| -## 5、[LeetCode算法练习](https://github.com/wsl2ls/AlgorithmSet.git) +## 5-LeetCode算法练习 > [LeetCode算法练习集合(Swift版) ~ 每天一道算法题](https://github.com/wsl2ls/AlgorithmSet.git) -## 6、[键盘和UIMenuController的并存问题](https://www.jianshu.com/p/ed1b57c4ecea) +## 6-工作中踩过的坑 + +#### 6.1-[键盘和UIMenuController的并存问题](https://www.jianshu.com/p/ed1b57c4ecea) | ![问题描述.gif](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/10、键盘和UIMenuController不能同时出现的问题描述.gif) | ![并存问题解决](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/10、键盘和UIMenuController并存问题解决.gif) | -## 7、iOS Crash防护 +#### 6.2-[全屏侧滑手势/UIScrollView/UISlider间滑动手势冲突](https://juejin.im/post/5c0e1e73f265da616413d828) +#### 6.3-[UITableView/UICollectionView获取特定位置的cell](https://juejin.im/post/5c0e1df95188250d2722a3bc) +#### 6.4-[UIScrollView视觉差动画](https://juejin.im/post/5c088b45f265da610e7fe156) +#### 6.5-[iOS 传感器集锦](https://juejin.im/post/5c088a1051882517165dd15d) +#### 6.6-[iOS 自定义转场动画](https://juejin.im/post/5c088ba36fb9a049fb43737b) +#### 6.7-[二进制重排优化启动速度](https://juejin.im/post/5ea79839f265da7bba509590) +#### 6.8-[iOS APM应用性能监控管理(doing)]() + +> CPU占用率、内存/磁盘使用率、卡顿监控定位、Crash防护、线程数量监控、网络监控(TCP 建立连接时间 、DNS 时间、 SSL时间、首包时间、响应时间 、流量)、ViewController启动耗时监测 、load方法的耗时、方法执行耗时...... + +#### 6.9、ipa瘦身之扫描无用资源 + +> 扫描项目中无用的图片、类等文件资源, 此示例主要针对于此项目中的图片资源,其他类型资源实现原理相同。 + +#### 6.10、多个UIScrollView嵌套/个人中心页 + +![多个UIScrollView嵌套](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/多个UIScrollView嵌套.gif) + +## 7-iOSCrash防护 + +> Crash防护内容涉及 NSArray/NSMutableArray、NSDictionary/NSMutableDictionary、NSString/NSMutableString、Unrecognized Selector、KVO、KVC 、异步线程刷新UI、野指针定位、内存泄漏/循环引用;主要是对常见易错的地方进行容错处理,避免崩溃,并保存出错时的函数调用栈,以方便快速定位代码,主要是利用的runtime和fishook知识。 -> NSArray/NSMutableArray、NSDictionary/NSMutableDictionary、NSString/NSMutableString、Unrecognized Selector、KVO、KVC 、野指针定位、内存泄漏/循环引用 +![iOSCrash防护](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/iOSCrash防护.gif) -## 8、[WKWebView相关](https://juejin.im/post/5ed999fd51882542f9389949) +## 8-WKWebView相关 -> WKWebView的使用、WKWebView+UITableView混排、UIScrollView实现原理、WKWebView离线缓存功能、Html非文本元素替换为原生组件展示 +> [WKWebView的使用](https://juejin.im/post/5c0e1e2ae51d451d971743a1)、[WKWebView+UITableView混排](https://juejin.im/post/5ed999fd51882542f9389949)、WKWebView离线缓存功能、HTML非文本元素替换为原生组件展示、UIScrollView实现原理、UITableView的实现原理 -![音视频编码](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/12、WKWebView.gif) +![WKWebView相关](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/12、WKWebView.gif) -## 问题说明: +## 结尾 -> * 1、主工程就是iOS_Tips下的DarkMode,别怀疑🤣,历史遗留问题😁😀,大部分内容都在里面,run一下就明白了🤝 -> * 2、小视频拍摄录制失败,主要集中在plus和X系列手机上:可能是由于写入的视频宽高videoSize设置的问题,各位可以先试试这样设置 +> * 1、主工程就是iOS_Tips下的DarkMode,别怀疑🤣,历史遗留问题😁😀,大部分内容都在里面,run一下就明白了🤝; +> * 2、该demo里面有些功能还没有写博客介绍,后期有时间会补上,不过代码我一般喜欢写注释,所以我相信大家读起来应该也容易理解,建议大家看完之后,自己也可以写写,把整个流程过一遍,也许会比我写的更好哟; +> * 3、[看过的高质量技术博客集合](iOS_Tips/DarkMode/WorkIssues/高质量技术博客.md),这些博客质量都挺高的,都出自各个大厂、大佬之手,认真看完绝对干活满满; +> * 4、小视频拍摄录制失败,主要集中在plus和X系列手机上:可能是由于写入的视频宽高videoSize设置的问题,各位可以先试试这样设置 avCaptureTool.videoSize = CGSizeMake(self.view.width * 0.8, self.view.height * 0.8); -> * 3、iPhoneX/XR系列崩溃,错误代码是pods > pods > FBRetainCycleDetector > fishhook.c 第104行 -indirect_symbol_bindings[i] = cur->rebindings[j].replacement: FBRetainCycleDetector 这个是三方库里的,检测内存泄漏的,你可以把 MLeaksFinder 移除,这只是一个辅助调试工具。 +> * 5、当你编译的时候,XCode出现Unable to load contents of file list 错误,导致出现此原因是pods版本不一致,请更新pods版本或者重新安装。 +> * 6、如果发现我简书或掘金上的文章无法查看了,请联系我。 +#### Welcome to you 👏 您的follow和start,是我前进的动力,Thanks♪(・ω・)ノ 🤝 -## Welcome To Follow Me +| [简书 ](https://www.jianshu.com/u/e15d1f644bea) | [掘金](https://juejin.im/user/5c00d97b6fb9a049fb436288) | QQ交流群 | 微信公众号 | 微信交流群 | +| ---- | ---- | ---- | ---- | ---- | +| [CSDN](https://blog.csdn.net/wsl2ls) | [微博](https://weibo.com/5732733120/profile?rightmod=1&wvr=6&mod=personinfo&is_all=1) | [835303405](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/QQ交流群.png) | [iOS2679114653](https://github.com/wsl2ls/iOS_TipsPreview/blob/master/PrviewPicture/微信公众号.png) | w2679114653(加我拉入群) | -> 您的follow和start,是我前进的动力,Thanks♪(・ω・)ノ -> * [简书](https://www.jianshu.com/u/e15d1f644bea) -> * [微博](https://weibo.com/5732733120/profile?rightmod=1&wvr=6&mod=personinfo&is_all=1) -> * [掘金](https://juejin.im/user/5c00d97b6fb9a049fb436288) -> * [CSDN](https://blog.csdn.net/wsl2ls) -> * QQ交流群:835303405 -> * 微信公众号:iOS2679114653 -> * 微信号:w2679114653(备注来意) +[回到顶部](#iOS_Tips) ![QQ交流群: 835303405](QQ交流群.png) diff --git a/iOS_Tips/.DS_Store b/iOS_Tips/.DS_Store index d0876515..36605046 100644 Binary files a/iOS_Tips/.DS_Store and b/iOS_Tips/.DS_Store differ diff --git a/iOS_Tips/DarkMode.xcodeproj/project.pbxproj b/iOS_Tips/DarkMode.xcodeproj/project.pbxproj index 2f82fdcb..08387bb0 100644 --- a/iOS_Tips/DarkMode.xcodeproj/project.pbxproj +++ b/iOS_Tips/DarkMode.xcodeproj/project.pbxproj @@ -7,8 +7,19 @@ objects = { /* Begin PBXBuildFile section */ + 2C5F11A7257BCB7000904B70 /* YYAnimatedImageView+iOS14.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C5F11A6257BCB7000904B70 /* YYAnimatedImageView+iOS14.m */; }; + 2CC813682553CE88009DAC9B /* 已浏览.md in Resources */ = {isa = PBXBuildFile; fileRef = 2CC813672553CE88009DAC9B /* 已浏览.md */; }; + 2CEBE85D24A6E65600BA21F3 /* SLTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CEBE85B24A6E65600BA21F3 /* SLTimer.m */; }; 780F5303236D8462000D0EA8 /* SLGridView.m in Sources */ = {isa = PBXBuildFile; fileRef = 780F5302236D8462000D0EA8 /* SLGridView.m */; }; 780F5306236D8570000D0EA8 /* SLImageClipController.m in Sources */ = {isa = PBXBuildFile; fileRef = 780F5305236D8570000D0EA8 /* SLImageClipController.m */; }; + 7811F76F24B2C791000AA044 /* SLBinaryResetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7811F76E24B2C791000AA044 /* SLBinaryResetViewController.m */; }; + 7811F77124B2C818000AA044 /* wsl.order in Resources */ = {isa = PBXBuildFile; fileRef = 7811F77024B2C818000AA044 /* wsl.order */; }; + 7811F7AD24B32A1E000AA044 /* Write Link Map File.png in Resources */ = {isa = PBXBuildFile; fileRef = 7811F7AA24B32A1E000AA044 /* Write Link Map File.png */; }; + 7811F7AE24B32A1E000AA044 /* Other c Flags.png in Resources */ = {isa = PBXBuildFile; fileRef = 7811F7AB24B32A1E000AA044 /* Other c Flags.png */; }; + 7811F7AF24B32A1E000AA044 /* Order File.png in Resources */ = {isa = PBXBuildFile; fileRef = 7811F7AC24B32A1E000AA044 /* Order File.png */; }; + 781D9D0624DD662E00FAE73D /* UIView+SLAsynUpdateUI.m in Sources */ = {isa = PBXBuildFile; fileRef = 781D9D0524DD662E00FAE73D /* UIView+SLAsynUpdateUI.m */; }; + 781DA28B24DFD52500FAE73D /* SLAPMLoadTime.m in Sources */ = {isa = PBXBuildFile; fileRef = 781DA28924DFD52400FAE73D /* SLAPMLoadTime.m */; }; + 781DA28E24E00F9E00FAE73D /* QiCallTraceCore.c in Sources */ = {isa = PBXBuildFile; fileRef = 781DA28C24E00F9E00FAE73D /* QiCallTraceCore.c */; }; 7822CCF8235B054200E70C29 /* SLPaddingLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7822CCF7235B054200E70C29 /* SLPaddingLabel.m */; }; 782CFB1D239DDE95001B5528 /* SLSplitScreenViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 782CFB1C239DDE95001B5528 /* SLSplitScreenViewController.m */; }; 782CFB20239DEA05001B5528 /* SLSplitScreenCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 782CFB1F239DEA05001B5528 /* SLSplitScreenCell.m */; }; @@ -57,11 +68,20 @@ 783FB4612394A76B0039AEFD /* shaderf.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 783FB45F2394A76B0039AEFD /* shaderf.fsh */; }; 784B72062334685E006AEE47 /* SLAvPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 784B72052334685E006AEE47 /* SLAvPlayer.m */; }; 784B720923348241006AEE47 /* SLAvCaptureTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 784B720823348241006AEE47 /* SLAvCaptureTool.m */; }; + 784C4BE124BC40D200D5C199 /* SLAPMViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 784C4BE024BC40D200D5C199 /* SLAPMViewController.m */; }; + 784C4BE424BC4C5E00D5C199 /* SLAPMManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 784C4BE324BC4C5E00D5C199 /* SLAPMManager.m */; }; + 784C4BE724BC53D500D5C199 /* SLAPMCpu.m in Sources */ = {isa = PBXBuildFile; fileRef = 784C4BE624BC53D500D5C199 /* SLAPMCpu.m */; }; + 784C4BEA24BDA2DE00D5C199 /* SLProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 784C4BE924BDA2DE00D5C199 /* SLProxy.m */; }; + 784C4BED24BDA5D700D5C199 /* SLAPMFluency.m in Sources */ = {isa = PBXBuildFile; fileRef = 784C4BEC24BDA5D700D5C199 /* SLAPMFluency.m */; }; + 784C4C3A24C2EE6600D5C199 /* SLAPMMemoryDisk.m in Sources */ = {isa = PBXBuildFile; fileRef = 784C4C3924C2EE6600D5C199 /* SLAPMMemoryDisk.m */; }; + 784C4C6E24C5B4F500D5C199 /* 笔记.md in Resources */ = {isa = PBXBuildFile; fileRef = 784C4C6D24C5B4F500D5C199 /* 笔记.md */; }; + 784C4C7024C5B5DD00D5C199 /* 高质量技术博客.md in Resources */ = {isa = PBXBuildFile; fileRef = 784C4C6F24C5B5DD00D5C199 /* 高质量技术博客.md */; }; 7851CB362331CC87002295B5 /* SLDarkModeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7851CB332331CC87002295B5 /* SLDarkModeViewController.m */; }; 7851CB372331CC87002295B5 /* SLDarkModeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7851CB352331CC87002295B5 /* SLDarkModeViewController.xib */; }; 7851CB43233222E2002295B5 /* UIView+SLFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 7851CB41233222E2002295B5 /* UIView+SLFrame.m */; }; 7857977823725C21004CD664 /* SLFaceDetectController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7857977723725C21004CD664 /* SLFaceDetectController.m */; }; 7857FD4B24729E8500D3D986 /* BSBacktraceLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 7857FD4A24729E8500D3D986 /* BSBacktraceLogger.m */; }; + 785D06642522C32700F174BA /* 面试题.md in Resources */ = {isa = PBXBuildFile; fileRef = 785D06632522C32700F174BA /* 面试题.md */; }; 7860D78E2398D34E008C53EC /* SLMixColorTextureVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 7860D78D2398D34E008C53EC /* SLMixColorTextureVC.m */; }; 7860D791239922B4008C53EC /* SLGLKPyramidVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 7860D790239922B4008C53EC /* SLGLKPyramidVC.m */; }; 786147F12362A39500C5424C /* Resources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 786147F02362A39500C5424C /* Resources.bundle */; }; @@ -76,8 +96,13 @@ 78665C70246D4B9F0001B749 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78665C6F246D4B9F0001B749 /* SystemConfiguration.framework */; }; 78665C72246D4BB10001B749 /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 78665C71246D4BB10001B749 /* libicucore.tbd */; }; 78665C74246D4BBB0001B749 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 78665C73246D4BBB0001B749 /* libsqlite3.tbd */; }; + 7869C72224A8B6D200527546 /* SLPictureBrowseController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7869C71E24A8B6D100527546 /* SLPictureBrowseController.m */; }; + 7869C72324A8B6D200527546 /* SLPictureTransitionAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 7869C72124A8B6D200527546 /* SLPictureTransitionAnimation.m */; }; 78777CE0238FEA48006FA671 /* SLOpenGLController.m in Sources */ = {isa = PBXBuildFile; fileRef = 78777CDF238FEA48006FA671 /* SLOpenGLController.m */; }; 78777CE6238FF65C006FA671 /* SLDelayPerform.m in Sources */ = {isa = PBXBuildFile; fileRef = 78777CE5238FF65C006FA671 /* SLDelayPerform.m */; }; + 78799EA224EE7EEC00DA8C7A /* SLUnusedResourceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 78799EA124EE7EEC00DA8C7A /* SLUnusedResourceViewController.m */; }; + 78799EAB24EFC60C00DA8C7A /* SLResourceInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 78799EAA24EFC60C00DA8C7A /* SLResourceInfo.m */; }; + 78799EB224F1027300DA8C7A /* unused.png in Resources */ = {isa = PBXBuildFile; fileRef = 78799EB124F1027300DA8C7A /* unused.png */; }; 787C7DBE245D74E4005DF7ED /* NSMutableArray+SLCrashProtector.m in Sources */ = {isa = PBXBuildFile; fileRef = 787C7DB2245D74E3005DF7ED /* NSMutableArray+SLCrashProtector.m */; }; 787C7DBF245D74E4005DF7ED /* NSMutableDictionary+SLCrashProtector.m in Sources */ = {isa = PBXBuildFile; fileRef = 787C7DB3245D74E3005DF7ED /* NSMutableDictionary+SLCrashProtector.m */; }; 787C7DC0245D74E4005DF7ED /* NSDictionary+SLCrashProtector.m in Sources */ = {isa = PBXBuildFile; fileRef = 787C7DB5245D74E3005DF7ED /* NSDictionary+SLCrashProtector.m */; }; @@ -99,10 +124,23 @@ 7884246B249070D900C2E505 /* UIColor+SLCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 7884246A249070D900C2E505 /* UIColor+SLCommon.m */; }; 7884247F2492102900C2E505 /* SLWorkIssuesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7884247E2492102900C2E505 /* SLWorkIssuesViewController.m */; }; 788424822492159F00C2E505 /* SLNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 788424812492159F00C2E505 /* SLNavigationController.m */; }; + 7884248B2493851B00C2E505 /* SLViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7884248A2493851B00C2E505 /* SLViewController.m */; }; + 7884248E24963FD200C2E505 /* SLReusableManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7884248D24963FD200C2E505 /* SLReusableManager.m */; }; + 788424C724978E9200C2E505 /* SLKeyChain.m in Sources */ = {isa = PBXBuildFile; fileRef = 788424C624978E9200C2E505 /* SLKeyChain.m */; }; 788ACD622390BFD400737EC2 /* SLLoadImageVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 788ACD612390BFD400737EC2 /* SLLoadImageVC.m */; }; 788ACD652390EA3A00737EC2 /* SLCubeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 788ACD642390EA3A00737EC2 /* SLCubeViewController.m */; }; 788ADB382441F48F00302CD9 /* SLCrashViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 788ADB362441F48F00302CD9 /* SLCrashViewController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 788ADB392441F48F00302CD9 /* SLCrashViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 788ADB372441F48F00302CD9 /* SLCrashViewController.xib */; }; + 78908DC324FFBE5D004164C2 /* SLScrollviewNesteVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 78908DC224FFBE5D004164C2 /* SLScrollviewNesteVC.m */; }; + 78908DCD2500F099004164C2 /* SLMenuView.m in Sources */ = {isa = PBXBuildFile; fileRef = 78908DCC2500F099004164C2 /* SLMenuView.m */; }; + 78908DFA25078F84004164C2 /* SLScrollViewJuejin.m in Sources */ = {isa = PBXBuildFile; fileRef = 78908DF925078F84004164C2 /* SLScrollViewJuejin.m */; }; + 78908DFD25079323004164C2 /* SLScrollViewWeibo.m in Sources */ = {isa = PBXBuildFile; fileRef = 78908DFC25079323004164C2 /* SLScrollViewWeibo.m */; }; + 78908E0025079451004164C2 /* SLPanTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 78908DFF25079451004164C2 /* SLPanTableView.m */; }; + 789AD16324C99DCA00CB0B4C /* SLAPMThreadCount.m in Sources */ = {isa = PBXBuildFile; fileRef = 789AD16224C99DCA00CB0B4C /* SLAPMThreadCount.m */; }; + 789AD1C824D7FA5F00CB0B4C /* SLAPMURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 789AD1C724D7FA5F00CB0B4C /* SLAPMURLProtocol.m */; }; + 789AD1CF24D9024300CB0B4C /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 789AD1CD24D9024300CB0B4C /* Reachability.m */; }; + 789AD1D224D9622B00CB0B4C /* UIViewController+SLAPMVCTime.m in Sources */ = {isa = PBXBuildFile; fileRef = 789AD1D124D9622B00CB0B4C /* UIViewController+SLAPMVCTime.m */; }; + 789AD1D524D97F8500CB0B4C /* SLSystemAppInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 789AD1D424D97F8500CB0B4C /* SLSystemAppInfo.m */; }; + 78A179A8249B0AA8006F52E3 /* NSDictionary+SLExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 78A179A6249B0AA8006F52E3 /* NSDictionary+SLExtension.m */; }; 78A1998C2451BEE7005B2B4B /* UIButton+SLTitleImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 78A1998B2451BEE7005B2B4B /* UIButton+SLTitleImage.m */; }; 78A1998F2451C049005B2B4B /* SLButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 78A1998E2451C049005B2B4B /* SLButton.m */; }; 78A35B1C23978A5D004BCCB7 /* SLShaderCubeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 78A35B1B23978A5D004BCCB7 /* SLShaderCubeViewController.m */; }; @@ -126,6 +164,7 @@ 78D30965239688EF00DC373A /* GLESMath.c in Sources */ = {isa = PBXBuildFile; fileRef = 78D30960239688EF00DC373A /* GLESMath.c */; }; 78DAA113235FF61E00A60F64 /* SLEditVideoClipping.m in Sources */ = {isa = PBXBuildFile; fileRef = 78DAA112235FF61E00A60F64 /* SLEditVideoClipping.m */; }; 78DAA1162360256200A60F64 /* SLEditSelectedBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 78DAA1152360256200A60F64 /* SLEditSelectedBox.m */; }; + 78DF7F652510B45000F6C007 /* SLScrollViewJianShu.m in Sources */ = {isa = PBXBuildFile; fileRef = 78DF7F642510B45000F6C007 /* SLScrollViewJianShu.m */; }; 78E1791723517F700007E4BB /* SLImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 78E1791223517F700007E4BB /* SLImageView.m */; }; 78E1791823517F700007E4BB /* SLImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 78E1791323517F700007E4BB /* SLImage.m */; }; 78E1791923517F700007E4BB /* SLImageDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 78E1791423517F700007E4BB /* SLImageDecoder.m */; }; @@ -176,16 +215,34 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 2C5F11A5257BCB7000904B70 /* YYAnimatedImageView+iOS14.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "YYAnimatedImageView+iOS14.h"; sourceTree = ""; }; + 2C5F11A6257BCB7000904B70 /* YYAnimatedImageView+iOS14.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "YYAnimatedImageView+iOS14.m"; sourceTree = ""; }; + 2CC813672553CE88009DAC9B /* 已浏览.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = "已浏览.md"; sourceTree = ""; }; + 2CC8137925540CB8009DAC9B /* HMLog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HMLog.h; sourceTree = ""; }; + 2CEBE85B24A6E65600BA21F3 /* SLTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLTimer.m; sourceTree = ""; }; + 2CEBE85C24A6E65600BA21F3 /* SLTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SLTimer.h; sourceTree = ""; }; 780F5301236D845B000D0EA8 /* SLGridView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLGridView.h; sourceTree = ""; }; 780F5302236D8462000D0EA8 /* SLGridView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLGridView.m; sourceTree = ""; }; 780F5304236D8570000D0EA8 /* SLImageClipController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLImageClipController.h; sourceTree = ""; }; 780F5305236D8570000D0EA8 /* SLImageClipController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLImageClipController.m; sourceTree = ""; }; + 7811F76D24B2C791000AA044 /* SLBinaryResetViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLBinaryResetViewController.h; sourceTree = ""; }; + 7811F76E24B2C791000AA044 /* SLBinaryResetViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLBinaryResetViewController.m; sourceTree = ""; }; + 7811F77024B2C818000AA044 /* wsl.order */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wsl.order; sourceTree = ""; }; + 7811F7AA24B32A1E000AA044 /* Write Link Map File.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Write Link Map File.png"; sourceTree = ""; }; + 7811F7AB24B32A1E000AA044 /* Other c Flags.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Other c Flags.png"; sourceTree = ""; }; + 7811F7AC24B32A1E000AA044 /* Order File.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Order File.png"; sourceTree = ""; }; + 781D9D0424DD662E00FAE73D /* UIView+SLAsynUpdateUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+SLAsynUpdateUI.h"; sourceTree = ""; }; + 781D9D0524DD662E00FAE73D /* UIView+SLAsynUpdateUI.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+SLAsynUpdateUI.m"; sourceTree = ""; }; + 781DA28924DFD52400FAE73D /* SLAPMLoadTime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLAPMLoadTime.m; sourceTree = ""; }; + 781DA28A24DFD52500FAE73D /* SLAPMLoadTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SLAPMLoadTime.h; sourceTree = ""; }; + 781DA28C24E00F9E00FAE73D /* QiCallTraceCore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = QiCallTraceCore.c; sourceTree = ""; }; + 781DA28D24E00F9E00FAE73D /* QiCallTraceCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QiCallTraceCore.h; sourceTree = ""; }; 7822CCF6235B054200E70C29 /* SLPaddingLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLPaddingLabel.h; sourceTree = ""; }; 7822CCF7235B054200E70C29 /* SLPaddingLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLPaddingLabel.m; sourceTree = ""; }; 782CFB1B239DDE95001B5528 /* SLSplitScreenViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLSplitScreenViewController.h; sourceTree = ""; }; 782CFB1C239DDE95001B5528 /* SLSplitScreenViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLSplitScreenViewController.m; sourceTree = ""; }; - 782CFB1E239DEA05001B5528 /* SLSplitScreenCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SLSplitScreenCell.h; path = DarkMode/OpenGL/Controller/SLSplitScreenCell.h; sourceTree = SOURCE_ROOT; }; - 782CFB1F239DEA05001B5528 /* SLSplitScreenCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SLSplitScreenCell.m; path = DarkMode/OpenGL/Controller/SLSplitScreenCell.m; sourceTree = SOURCE_ROOT; }; + 782CFB1E239DEA05001B5528 /* SLSplitScreenCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SLSplitScreenCell.h; path = DarkMode/OpenGL/View/SLSplitScreenCell.h; sourceTree = SOURCE_ROOT; }; + 782CFB1F239DEA05001B5528 /* SLSplitScreenCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SLSplitScreenCell.m; path = DarkMode/OpenGL/View/SLSplitScreenCell.m; sourceTree = SOURCE_ROOT; }; 782CFB21239DFD0F001B5528 /* SplitScreen_2.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = SplitScreen_2.fsh; sourceTree = ""; }; 782CFB22239DFD0F001B5528 /* SplitScreen_2.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = SplitScreen_2.vsh; sourceTree = ""; }; 782CFB25239DFD88001B5528 /* SplitScreen_1.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = SplitScreen_1.fsh; sourceTree = ""; }; @@ -244,6 +301,20 @@ 784B72052334685E006AEE47 /* SLAvPlayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLAvPlayer.m; sourceTree = ""; }; 784B720723348241006AEE47 /* SLAvCaptureTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLAvCaptureTool.h; sourceTree = ""; }; 784B720823348241006AEE47 /* SLAvCaptureTool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLAvCaptureTool.m; sourceTree = ""; }; + 784C4BDF24BC40D200D5C199 /* SLAPMViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLAPMViewController.h; sourceTree = ""; }; + 784C4BE024BC40D200D5C199 /* SLAPMViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLAPMViewController.m; sourceTree = ""; }; + 784C4BE224BC4C5E00D5C199 /* SLAPMManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLAPMManager.h; sourceTree = ""; }; + 784C4BE324BC4C5E00D5C199 /* SLAPMManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLAPMManager.m; sourceTree = ""; }; + 784C4BE524BC53D500D5C199 /* SLAPMCpu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLAPMCpu.h; sourceTree = ""; }; + 784C4BE624BC53D500D5C199 /* SLAPMCpu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLAPMCpu.m; sourceTree = ""; }; + 784C4BE824BDA2DE00D5C199 /* SLProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLProxy.h; sourceTree = ""; }; + 784C4BE924BDA2DE00D5C199 /* SLProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLProxy.m; sourceTree = ""; }; + 784C4BEB24BDA5D700D5C199 /* SLAPMFluency.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLAPMFluency.h; sourceTree = ""; }; + 784C4BEC24BDA5D700D5C199 /* SLAPMFluency.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLAPMFluency.m; sourceTree = ""; }; + 784C4C3824C2EE6600D5C199 /* SLAPMMemoryDisk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLAPMMemoryDisk.h; sourceTree = ""; }; + 784C4C3924C2EE6600D5C199 /* SLAPMMemoryDisk.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLAPMMemoryDisk.m; sourceTree = ""; }; + 784C4C6D24C5B4F500D5C199 /* 笔记.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = "笔记.md"; sourceTree = ""; }; + 784C4C6F24C5B5DD00D5C199 /* 高质量技术博客.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = "高质量技术博客.md"; sourceTree = ""; }; 7851CB332331CC87002295B5 /* SLDarkModeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLDarkModeViewController.m; sourceTree = ""; }; 7851CB342331CC87002295B5 /* SLDarkModeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SLDarkModeViewController.h; sourceTree = ""; }; 7851CB352331CC87002295B5 /* SLDarkModeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SLDarkModeViewController.xib; sourceTree = ""; }; @@ -253,6 +324,7 @@ 7857977723725C21004CD664 /* SLFaceDetectController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLFaceDetectController.m; sourceTree = ""; }; 7857FD4924729E8500D3D986 /* BSBacktraceLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BSBacktraceLogger.h; sourceTree = ""; }; 7857FD4A24729E8500D3D986 /* BSBacktraceLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSBacktraceLogger.m; sourceTree = ""; }; + 785D06632522C32700F174BA /* 面试题.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = "面试题.md"; sourceTree = ""; }; 7860D78C2398D34E008C53EC /* SLMixColorTextureVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLMixColorTextureVC.h; sourceTree = ""; }; 7860D78D2398D34E008C53EC /* SLMixColorTextureVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLMixColorTextureVC.m; sourceTree = ""; }; 7860D78F239922B4008C53EC /* SLGLKPyramidVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLGLKPyramidVC.h; sourceTree = ""; }; @@ -275,10 +347,19 @@ 78665C6F246D4B9F0001B749 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 78665C71246D4BB10001B749 /* libicucore.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.tbd; path = usr/lib/libicucore.tbd; sourceTree = SDKROOT; }; 78665C73246D4BBB0001B749 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; + 7869C71E24A8B6D100527546 /* SLPictureBrowseController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLPictureBrowseController.m; sourceTree = ""; }; + 7869C71F24A8B6D100527546 /* SLPictureBrowseController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SLPictureBrowseController.h; sourceTree = ""; }; + 7869C72024A8B6D200527546 /* SLPictureTransitionAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SLPictureTransitionAnimation.h; sourceTree = ""; }; + 7869C72124A8B6D200527546 /* SLPictureTransitionAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLPictureTransitionAnimation.m; sourceTree = ""; }; 78777CDE238FEA48006FA671 /* SLOpenGLController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLOpenGLController.h; sourceTree = ""; }; 78777CDF238FEA48006FA671 /* SLOpenGLController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLOpenGLController.m; sourceTree = ""; }; 78777CE4238FF65C006FA671 /* SLDelayPerform.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLDelayPerform.h; sourceTree = ""; }; 78777CE5238FF65C006FA671 /* SLDelayPerform.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLDelayPerform.m; sourceTree = ""; }; + 78799EA024EE7EEC00DA8C7A /* SLUnusedResourceViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLUnusedResourceViewController.h; sourceTree = ""; }; + 78799EA124EE7EEC00DA8C7A /* SLUnusedResourceViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLUnusedResourceViewController.m; sourceTree = ""; }; + 78799EA924EFC60C00DA8C7A /* SLResourceInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLResourceInfo.h; sourceTree = ""; }; + 78799EAA24EFC60C00DA8C7A /* SLResourceInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLResourceInfo.m; sourceTree = ""; }; + 78799EB124F1027300DA8C7A /* unused.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = unused.png; sourceTree = ""; }; 787C7DB2245D74E3005DF7ED /* NSMutableArray+SLCrashProtector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+SLCrashProtector.m"; sourceTree = ""; }; 787C7DB3245D74E3005DF7ED /* NSMutableDictionary+SLCrashProtector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableDictionary+SLCrashProtector.m"; sourceTree = ""; }; 787C7DB4245D74E3005DF7ED /* NSString+SLCrashProtector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SLCrashProtector.h"; sourceTree = ""; }; @@ -321,13 +402,40 @@ 7884247E2492102900C2E505 /* SLWorkIssuesViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLWorkIssuesViewController.m; sourceTree = ""; }; 788424802492159F00C2E505 /* SLNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLNavigationController.h; sourceTree = ""; }; 788424812492159F00C2E505 /* SLNavigationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLNavigationController.m; sourceTree = ""; }; + 788424892493851B00C2E505 /* SLViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLViewController.h; sourceTree = ""; }; + 7884248A2493851B00C2E505 /* SLViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLViewController.m; sourceTree = ""; }; + 7884248C24963FD200C2E505 /* SLReusableManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLReusableManager.h; sourceTree = ""; }; + 7884248D24963FD200C2E505 /* SLReusableManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLReusableManager.m; sourceTree = ""; }; + 788424C524978E9200C2E505 /* SLKeyChain.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLKeyChain.h; sourceTree = ""; }; + 788424C624978E9200C2E505 /* SLKeyChain.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLKeyChain.m; sourceTree = ""; }; 788ACD602390BFD400737EC2 /* SLLoadImageVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLLoadImageVC.h; sourceTree = ""; }; 788ACD612390BFD400737EC2 /* SLLoadImageVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLLoadImageVC.m; sourceTree = ""; }; 788ACD632390EA3A00737EC2 /* SLCubeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLCubeViewController.h; sourceTree = ""; }; 788ACD642390EA3A00737EC2 /* SLCubeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLCubeViewController.m; sourceTree = ""; }; 788ADB352441F48F00302CD9 /* SLCrashViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLCrashViewController.h; sourceTree = ""; }; 788ADB362441F48F00302CD9 /* SLCrashViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLCrashViewController.m; sourceTree = ""; }; - 788ADB372441F48F00302CD9 /* SLCrashViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SLCrashViewController.xib; sourceTree = ""; }; + 78908DC124FFBE5D004164C2 /* SLScrollviewNesteVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLScrollviewNesteVC.h; sourceTree = ""; }; + 78908DC224FFBE5D004164C2 /* SLScrollviewNesteVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLScrollviewNesteVC.m; sourceTree = ""; }; + 78908DCB2500F099004164C2 /* SLMenuView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLMenuView.h; sourceTree = ""; }; + 78908DCC2500F099004164C2 /* SLMenuView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLMenuView.m; sourceTree = ""; }; + 78908DF825078F84004164C2 /* SLScrollViewJuejin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLScrollViewJuejin.h; sourceTree = ""; }; + 78908DF925078F84004164C2 /* SLScrollViewJuejin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLScrollViewJuejin.m; sourceTree = ""; }; + 78908DFB25079323004164C2 /* SLScrollViewWeibo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLScrollViewWeibo.h; sourceTree = ""; }; + 78908DFC25079323004164C2 /* SLScrollViewWeibo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLScrollViewWeibo.m; sourceTree = ""; }; + 78908DFE25079451004164C2 /* SLPanTableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLPanTableView.h; sourceTree = ""; }; + 78908DFF25079451004164C2 /* SLPanTableView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLPanTableView.m; sourceTree = ""; }; + 789AD16124C99DCA00CB0B4C /* SLAPMThreadCount.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLAPMThreadCount.h; sourceTree = ""; }; + 789AD16224C99DCA00CB0B4C /* SLAPMThreadCount.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLAPMThreadCount.m; sourceTree = ""; }; + 789AD1C624D7FA5F00CB0B4C /* SLAPMURLProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLAPMURLProtocol.h; sourceTree = ""; }; + 789AD1C724D7FA5F00CB0B4C /* SLAPMURLProtocol.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLAPMURLProtocol.m; sourceTree = ""; }; + 789AD1CD24D9024300CB0B4C /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = ""; }; + 789AD1CE24D9024300CB0B4C /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = ""; }; + 789AD1D024D9622B00CB0B4C /* UIViewController+SLAPMVCTime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIViewController+SLAPMVCTime.h"; sourceTree = ""; }; + 789AD1D124D9622B00CB0B4C /* UIViewController+SLAPMVCTime.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+SLAPMVCTime.m"; sourceTree = ""; }; + 789AD1D324D97F8500CB0B4C /* SLSystemAppInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLSystemAppInfo.h; sourceTree = ""; }; + 789AD1D424D97F8500CB0B4C /* SLSystemAppInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLSystemAppInfo.m; sourceTree = ""; }; + 78A179A6249B0AA8006F52E3 /* NSDictionary+SLExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+SLExtension.m"; sourceTree = ""; }; + 78A179A7249B0AA8006F52E3 /* NSDictionary+SLExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+SLExtension.h"; sourceTree = ""; }; 78A1998A2451BEE7005B2B4B /* UIButton+SLTitleImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+SLTitleImage.h"; sourceTree = ""; }; 78A1998B2451BEE7005B2B4B /* UIButton+SLTitleImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+SLTitleImage.m"; sourceTree = ""; }; 78A1998D2451C049005B2B4B /* SLButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SLButton.h; sourceTree = ""; }; @@ -374,6 +482,8 @@ 78DAA112235FF61E00A60F64 /* SLEditVideoClipping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLEditVideoClipping.m; sourceTree = ""; }; 78DAA1142360256200A60F64 /* SLEditSelectedBox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLEditSelectedBox.h; sourceTree = ""; }; 78DAA1152360256200A60F64 /* SLEditSelectedBox.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLEditSelectedBox.m; sourceTree = ""; }; + 78DF7F632510B45000F6C007 /* SLScrollViewJianShu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLScrollViewJianShu.h; sourceTree = ""; }; + 78DF7F642510B45000F6C007 /* SLScrollViewJianShu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLScrollViewJianShu.m; sourceTree = ""; }; 78E1791123517F700007E4BB /* SLImageDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SLImageDecoder.h; sourceTree = ""; }; 78E1791223517F700007E4BB /* SLImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLImageView.m; sourceTree = ""; }; 78E1791323517F700007E4BB /* SLImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLImage.m; sourceTree = ""; }; @@ -423,6 +533,7 @@ 78EF8B6324188767008D0CD7 /* SLAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLAlertView.m; sourceTree = ""; }; 78F42021237915730093497C /* SLGPUImageController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLGPUImageController.h; sourceTree = ""; }; 78F42022237915730093497C /* SLGPUImageController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLGPUImageController.m; sourceTree = ""; }; + 78F4E41224E5404A000B2ADE /* SLToolMacro.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLToolMacro.h; sourceTree = ""; }; 78F54914233383D800910215 /* SLBlurView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SLBlurView.h; sourceTree = ""; }; 78F54915233383D800910215 /* SLBlurView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLBlurView.m; sourceTree = ""; }; 78FA0F9B235407E6003E456B /* SLDrawView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SLDrawView.h; sourceTree = ""; }; @@ -481,6 +592,44 @@ name = Frameworks; sourceTree = ""; }; + 2C09ED9425401113009E96B6 /* 设计模式 */ = { + isa = PBXGroup; + children = ( + ); + path = "设计模式"; + sourceTree = ""; + }; + 2C09ED95254011A2009E96B6 /* View */ = { + isa = PBXGroup; + children = ( + 782CFB1E239DEA05001B5528 /* SLSplitScreenCell.h */, + 782CFB1F239DEA05001B5528 /* SLSplitScreenCell.m */, + ); + path = View; + sourceTree = ""; + }; + 2C5F115C257BC96A00904B70 /* YYAnimatedImageViewCategory */ = { + isa = PBXGroup; + children = ( + 2C5F11A5257BCB7000904B70 /* YYAnimatedImageView+iOS14.h */, + 2C5F11A6257BCB7000904B70 /* YYAnimatedImageView+iOS14.m */, + ); + path = YYAnimatedImageViewCategory; + sourceTree = ""; + }; + 7811F76C24B2C70D000AA044 /* 二进制重排 */ = { + isa = PBXGroup; + children = ( + 7811F7AC24B32A1E000AA044 /* Order File.png */, + 7811F7AB24B32A1E000AA044 /* Other c Flags.png */, + 7811F7AA24B32A1E000AA044 /* Write Link Map File.png */, + 7811F77024B2C818000AA044 /* wsl.order */, + 7811F76D24B2C791000AA044 /* SLBinaryResetViewController.h */, + 7811F76E24B2C791000AA044 /* SLBinaryResetViewController.m */, + ); + path = "二进制重排"; + sourceTree = ""; + }; 782E3EB52373F892001E0DF9 /* Filter */ = { isa = PBXGroup; children = ( @@ -493,6 +642,8 @@ 7835047E24586BA30071283E /* ThirdLibary */ = { isa = PBXGroup; children = ( + 2C5F115C257BC96A00904B70 /* YYAnimatedImageViewCategory */, + 789AD1CC24D9024300CB0B4C /* Reachability */, 7857FD4824729E8500D3D986 /* BSBacktraceLogger */, 78D3095D239688EF00DC373A /* OpenGLUtils */, 7835047F24586BAC0071283E /* Fishhook */, @@ -550,6 +701,16 @@ path = ShaderLanguage; sourceTree = ""; }; + 784C4BDE24BC409600D5C199 /* APM */ = { + isa = PBXGroup; + children = ( + 784C4BDF24BC40D200D5C199 /* SLAPMViewController.h */, + 784C4BE024BC40D200D5C199 /* SLAPMViewController.m */, + 789AD1C524D43A3700CB0B4C /* APMMonitor */, + ); + path = APM; + sourceTree = ""; + }; 7851CB322331CC87002295B5 /* Dark */ = { isa = PBXGroup; children = ( @@ -576,6 +737,8 @@ 7851CB41233222E2002295B5 /* UIView+SLFrame.m */, 7830A5A22358904600BC79BA /* UIView+SLImage.h */, 7830A5A32358904600BC79BA /* UIView+SLImage.m */, + 78A179A7249B0AA8006F52E3 /* NSDictionary+SLExtension.h */, + 78A179A6249B0AA8006F52E3 /* NSDictionary+SLExtension.m */, 786147F823630C4D00C5424C /* UIImage+SLCommon.h */, 786147F923630C4D00C5424C /* UIImage+SLCommon.m */, 78A1998A2451BEE7005B2B4B /* UIButton+SLTitleImage.h */, @@ -619,6 +782,8 @@ 787C7DBA245D74E4005DF7ED /* NSMutableString+SLCrashProtector.m */, 7862533724599D420017F8F1 /* NSObject+SLCrashProtector.h */, 7862532C24599D420017F8F1 /* NSObject+SLCrashProtector.m */, + 781D9D0424DD662E00FAE73D /* UIView+SLAsynUpdateUI.h */, + 781D9D0524DD662E00FAE73D /* UIView+SLAsynUpdateUI.m */, 7862532F24599D420017F8F1 /* SLKVODelegate.h */, 7862533A24599D420017F8F1 /* SLKVODelegate.m */, 787C7DC4245D77D8005DF7ED /* SLZombieCatcher.h */, @@ -639,12 +804,29 @@ path = SLCrashProtector; sourceTree = ""; }; + 7869C71D24A8B5CA00527546 /* WebNative */ = { + isa = PBXGroup; + children = ( + 78BDE051248E0BEB002ED386 /* WebNative.html */, + 78BDE057248E541E002ED386 /* WebNativeJson.txt */, + 78BDE04E248E0AFB002ED386 /* SLWebNativeViewController.h */, + 78BDE04F248E0AFB002ED386 /* SLWebNativeViewController.m */, + 7884248C24963FD200C2E505 /* SLReusableManager.h */, + 7884248D24963FD200C2E505 /* SLReusableManager.m */, + 7869C71F24A8B6D100527546 /* SLPictureBrowseController.h */, + 7869C71E24A8B6D100527546 /* SLPictureBrowseController.m */, + 7869C72024A8B6D200527546 /* SLPictureTransitionAnimation.h */, + 7869C72124A8B6D200527546 /* SLPictureTransitionAnimation.m */, + ); + path = WebNative; + sourceTree = ""; + }; 78777CDB238FEA15006FA671 /* OpenGL */ = { isa = PBXGroup; children = ( + 2C09ED95254011A2009E96B6 /* View */, 783FB45D2394A7580039AEFD /* ShaderLanguage */, 78777CDC238FEA15006FA671 /* Controller */, - 78777CDD238FEA15006FA671 /* View */, ); path = OpenGL; sourceTree = ""; @@ -676,25 +858,26 @@ path = Controller; sourceTree = ""; }; - 78777CDD238FEA15006FA671 /* View */ = { - isa = PBXGroup; - children = ( - 782CFB1E239DEA05001B5528 /* SLSplitScreenCell.h */, - 782CFB1F239DEA05001B5528 /* SLSplitScreenCell.m */, - ); - path = View; - sourceTree = ""; - }; 78777CE1238FF551006FA671 /* Tool */ = { isa = PBXGroup; children = ( 78AA10F42371A7B50044A6F8 /* PrefixHeader.pch */, + 2CC8137925540CB8009DAC9B /* HMLog.h */, + 78F4E41224E5404A000B2ADE /* SLToolMacro.h */, 78777CE4238FF65C006FA671 /* SLDelayPerform.h */, 78777CE5238FF65C006FA671 /* SLDelayPerform.m */, 783504622452C20B0071283E /* SLMethod.h */, 783504632452C20B0071283E /* SLMethod.m */, 788424802492159F00C2E505 /* SLNavigationController.h */, 788424812492159F00C2E505 /* SLNavigationController.m */, + 788424892493851B00C2E505 /* SLViewController.h */, + 7884248A2493851B00C2E505 /* SLViewController.m */, + 788424C524978E9200C2E505 /* SLKeyChain.h */, + 788424C624978E9200C2E505 /* SLKeyChain.m */, + 2CEBE85C24A6E65600BA21F3 /* SLTimer.h */, + 2CEBE85B24A6E65600BA21F3 /* SLTimer.m */, + 784C4BE824BDA2DE00D5C199 /* SLProxy.h */, + 784C4BE924BDA2DE00D5C199 /* SLProxy.m */, ); path = Tool; sourceTree = ""; @@ -731,6 +914,18 @@ path = UI; sourceTree = ""; }; + 78799E9F24EE7E7F00DA8C7A /* 查找项目无用资源 */ = { + isa = PBXGroup; + children = ( + 78799EB124F1027300DA8C7A /* unused.png */, + 78799EA024EE7EEC00DA8C7A /* SLUnusedResourceViewController.h */, + 78799EA124EE7EEC00DA8C7A /* SLUnusedResourceViewController.m */, + 78799EA924EFC60C00DA8C7A /* SLResourceInfo.h */, + 78799EAA24EFC60C00DA8C7A /* SLResourceInfo.m */, + ); + path = "查找项目无用资源"; + sourceTree = ""; + }; 78842455248F92D400C2E505 /* AVFoundation */ = { isa = PBXGroup; children = ( @@ -757,8 +952,16 @@ 7884247C24920FCA00C2E505 /* WorkIssues */ = { isa = PBXGroup; children = ( + 784C4C6F24C5B5DD00D5C199 /* 高质量技术博客.md */, + 784C4C6D24C5B4F500D5C199 /* 笔记.md */, + 785D06632522C32700F174BA /* 面试题.md */, + 2CC813672553CE88009DAC9B /* 已浏览.md */, 7884247D2492102900C2E505 /* SLWorkIssuesViewController.h */, 7884247E2492102900C2E505 /* SLWorkIssuesViewController.m */, + 78908DC024FFBD83004164C2 /* ScrollView嵌套 */, + 78799E9F24EE7E7F00DA8C7A /* 查找项目无用资源 */, + 784C4BDE24BC409600D5C199 /* APM */, + 7811F76C24B2C70D000AA044 /* 二进制重排 */, 78EF8B5C24162B07008D0CD7 /* UIMenuController */, ); path = WorkIssues; @@ -770,11 +973,65 @@ 7862532B24599D420017F8F1 /* SLCrashProtector */, 788ADB352441F48F00302CD9 /* SLCrashViewController.h */, 788ADB362441F48F00302CD9 /* SLCrashViewController.m */, - 788ADB372441F48F00302CD9 /* SLCrashViewController.xib */, ); path = Crash; sourceTree = ""; }; + 78908DC024FFBD83004164C2 /* ScrollView嵌套 */ = { + isa = PBXGroup; + children = ( + 78908DC124FFBE5D004164C2 /* SLScrollviewNesteVC.h */, + 78908DC224FFBE5D004164C2 /* SLScrollviewNesteVC.m */, + 78908DF825078F84004164C2 /* SLScrollViewJuejin.h */, + 78908DF925078F84004164C2 /* SLScrollViewJuejin.m */, + 78908DFB25079323004164C2 /* SLScrollViewWeibo.h */, + 78908DFC25079323004164C2 /* SLScrollViewWeibo.m */, + 78DF7F632510B45000F6C007 /* SLScrollViewJianShu.h */, + 78DF7F642510B45000F6C007 /* SLScrollViewJianShu.m */, + 78908DFE25079451004164C2 /* SLPanTableView.h */, + 78908DFF25079451004164C2 /* SLPanTableView.m */, + 78908DCB2500F099004164C2 /* SLMenuView.h */, + 78908DCC2500F099004164C2 /* SLMenuView.m */, + ); + path = "ScrollView嵌套"; + sourceTree = ""; + }; + 789AD1C524D43A3700CB0B4C /* APMMonitor */ = { + isa = PBXGroup; + children = ( + 784C4BE224BC4C5E00D5C199 /* SLAPMManager.h */, + 784C4BE324BC4C5E00D5C199 /* SLAPMManager.m */, + 784C4BE524BC53D500D5C199 /* SLAPMCpu.h */, + 784C4BE624BC53D500D5C199 /* SLAPMCpu.m */, + 784C4C3824C2EE6600D5C199 /* SLAPMMemoryDisk.h */, + 784C4C3924C2EE6600D5C199 /* SLAPMMemoryDisk.m */, + 784C4BEB24BDA5D700D5C199 /* SLAPMFluency.h */, + 784C4BEC24BDA5D700D5C199 /* SLAPMFluency.m */, + 789AD16124C99DCA00CB0B4C /* SLAPMThreadCount.h */, + 789AD16224C99DCA00CB0B4C /* SLAPMThreadCount.m */, + 789AD1C624D7FA5F00CB0B4C /* SLAPMURLProtocol.h */, + 789AD1C724D7FA5F00CB0B4C /* SLAPMURLProtocol.m */, + 789AD1D024D9622B00CB0B4C /* UIViewController+SLAPMVCTime.h */, + 789AD1D124D9622B00CB0B4C /* UIViewController+SLAPMVCTime.m */, + 781DA28A24DFD52500FAE73D /* SLAPMLoadTime.h */, + 781DA28924DFD52400FAE73D /* SLAPMLoadTime.m */, + 781DA28C24E00F9E00FAE73D /* QiCallTraceCore.c */, + 781DA28D24E00F9E00FAE73D /* QiCallTraceCore.h */, + 789AD1D324D97F8500CB0B4C /* SLSystemAppInfo.h */, + 789AD1D424D97F8500CB0B4C /* SLSystemAppInfo.m */, + ); + path = APMMonitor; + sourceTree = ""; + }; + 789AD1CC24D9024300CB0B4C /* Reachability */ = { + isa = PBXGroup; + children = ( + 789AD1CE24D9024300CB0B4C /* Reachability.h */, + 789AD1CD24D9024300CB0B4C /* Reachability.m */, + ); + path = Reachability; + sourceTree = ""; + }; 78AA10F32371A1EF0044A6F8 /* FaceDetect */ = { isa = PBXGroup; children = ( @@ -825,8 +1082,9 @@ 7884247C24920FCA00C2E505 /* WorkIssues */, 788ADB342441F46500302CD9 /* Crash */, 78E72D4E24766E1300751373 /* WKWebView */, - 78B10489232F57C30051579F /* Main.storyboard */, + 2C09ED9425401113009E96B6 /* 设计模式 */, 78B1048C232F57C50051579F /* Assets.xcassets */, + 78B10489232F57C30051579F /* Main.storyboard */, 78B1048E232F57C50051579F /* LaunchScreen.storyboard */, 78B10491232F57C50051579F /* Info.plist */, 78B10492232F57C50051579F /* main.m */, @@ -932,18 +1190,15 @@ children = ( 78BDE04C248BFBD7002ED386 /* wsl.png */, 78E72D58247BA29600751373 /* WebTableView.html */, - 78BDE051248E0BEB002ED386 /* WebNative.html */, - 78BDE057248E541E002ED386 /* WebNativeJson.txt */, 78E72D71247E861300751373 /* SLWebViewListController.h */, 78E72D72247E861300751373 /* SLWebViewListController.m */, 78E72D4F24766E4B00751373 /* SLWebViewController.h */, 78E72D5024766E4B00751373 /* SLWebViewController.m */, 78BDE049248A6A74002ED386 /* SLUrlProtocolAddCookie.h */, 78BDE04A248A6A74002ED386 /* SLUrlProtocolAddCookie.m */, - 78BDE04E248E0AFB002ED386 /* SLWebNativeViewController.h */, - 78BDE04F248E0AFB002ED386 /* SLWebNativeViewController.m */, 78842452248F863500C2E505 /* SLTableViewController.h */, 78842453248F863500C2E505 /* SLTableViewController.m */, + 7869C71D24A8B5CA00527546 /* WebNative */, 78E72D8324822E7500751373 /* WebTableView */, 78E72D9324852C2F00751373 /* WebCache */, ); @@ -1160,29 +1415,37 @@ 782CFB63239E623D001B5528 /* Cirlce.fsh in Resources */, 782CFB23239DFD0F001B5528 /* SplitScreen_2.fsh in Resources */, 782CFB38239E22AC001B5528 /* SplitScreen_9.vsh in Resources */, + 7811F7AE24B32A1E000AA044 /* Other c Flags.png in Resources */, 782CFB53239E4587001B5528 /* SplitScreen_16.vsh in Resources */, 782CFB6E239E69F3001B5528 /* Scale.vsh in Resources */, 78BDE04D248BFBD7002ED386 /* wsl.png in Resources */, 782CFB37239E22AC001B5528 /* SplitScreen_9.fsh in Resources */, + 784C4C7024C5B5DD00D5C199 /* 高质量技术博客.md in Resources */, + 7811F7AF24B32A1E000AA044 /* Order File.png in Resources */, 782CFB76239E6A02001B5528 /* SoulOut.vsh in Resources */, 782CFB54239E4587001B5528 /* SplitScreen_16.fsh in Resources */, 78BDE058248E541E002ED386 /* WebNativeJson.txt in Resources */, 782CFB34239E04AD001B5528 /* SplitScreen_6.vsh in Resources */, 782CFB62239E623D001B5528 /* Cirlce.vsh in Resources */, - 788ADB392441F48F00302CD9 /* SLCrashViewController.xib in Resources */, 782CFB5F239E622E001B5528 /* Mosaic.fsh in Resources */, 782CFB6D239E69F3001B5528 /* Scale.fsh in Resources */, 782CFB71239E69FA001B5528 /* Shake.vsh in Resources */, 78B1048B232F57C30051579F /* Main.storyboard in Resources */, + 785D06642522C32700F174BA /* 面试题.md in Resources */, + 78799EB224F1027300DA8C7A /* unused.png in Resources */, 782CFB27239DFD89001B5528 /* SplitScreen_1.fsh in Resources */, 783FB4612394A76B0039AEFD /* shaderf.fsh in Resources */, + 7811F7AD24B32A1E000AA044 /* Write Link Map File.png in Resources */, 782CFB2F239E04A2001B5528 /* SplitScreen_4.vsh in Resources */, + 784C4C6E24C5B4F500D5C199 /* 笔记.md in Resources */, 782CFB67239E6651001B5528 /* HexagonMosaic.vsh in Resources */, 782CFB2B239E0479001B5528 /* SplitScreen_3.vsh in Resources */, 782CFB5B239E6227001B5528 /* Gray.vsh in Resources */, 782CFB5E239E622E001B5528 /* Mosaic.vsh in Resources */, + 7811F77124B2C818000AA044 /* wsl.order in Resources */, 78E72D59247BA29600751373 /* WebTableView.html in Resources */, 782CFB7A239E6A11001B5528 /* Glitch.vsh in Resources */, + 2CC813682553CE88009DAC9B /* 已浏览.md in Resources */, 782CFB5A239E6227001B5528 /* Gray.fsh in Resources */, 782CFB66239E6651001B5528 /* HexagonMosaic.fsh in Resources */, 782CFB79239E6A11001B5528 /* Glitch.fsh in Resources */, @@ -1255,6 +1518,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 781DA28B24DFD52500FAE73D /* SLAPMLoadTime.m in Sources */, 782CFB1D239DDE95001B5528 /* SLSplitScreenViewController.m in Sources */, 7857977823725C21004CD664 /* SLFaceDetectController.m in Sources */, 7835048524586BAC0071283E /* queue.c in Sources */, @@ -1262,15 +1526,20 @@ 78A1998F2451C049005B2B4B /* SLButton.m in Sources */, 78B10488232F57C30051579F /* ViewController.m in Sources */, 78FA0FA02354141E003E456B /* SLAvEditExport.m in Sources */, + 78A179A8249B0AA8006F52E3 /* NSDictionary+SLExtension.m in Sources */, 78BDE050248E0AFB002ED386 /* SLWebNativeViewController.m in Sources */, + 78DF7F652510B45000F6C007 /* SLScrollViewJianShu.m in Sources */, 78F42023237915730093497C /* SLGPUImageController.m in Sources */, 7860D791239922B4008C53EC /* SLGLKPyramidVC.m in Sources */, 787C7DC3245D74E4005DF7ED /* NSString+SLCrashProtector.m in Sources */, 784B72062334685E006AEE47 /* SLAvPlayer.m in Sources */, 78DAA113235FF61E00A60F64 /* SLEditVideoClipping.m in Sources */, 782E3EB42373D8C7001E0DF9 /* SLAvWriterInput.m in Sources */, + 789AD1D524D97F8500CB0B4C /* SLSystemAppInfo.m in Sources */, + 78908DFD25079323004164C2 /* SLScrollViewWeibo.m in Sources */, 78804A7E237D5E3E0087E152 /* SLWaterMarkController.m in Sources */, 78EF8B6024162B96008D0CD7 /* SLMenuViewController.m in Sources */, + 7869C72224A8B6D200527546 /* SLPictureBrowseController.m in Sources */, 78D30964239688EF00DC373A /* GLESUtils.m in Sources */, 784B720923348241006AEE47 /* SLAvCaptureTool.m in Sources */, 786147F42362D79000C5424C /* SLMosaicView.m in Sources */, @@ -1281,21 +1550,28 @@ 78B10482232F57C30051579F /* AppDelegate.m in Sources */, 78E72D7C24810E2D00751373 /* SLDynamicItem.m in Sources */, 78777CE0238FEA48006FA671 /* SLOpenGLController.m in Sources */, + 2C5F11A7257BCB7000904B70 /* YYAnimatedImageView+iOS14.m in Sources */, + 78908DC324FFBE5D004164C2 /* SLScrollviewNesteVC.m in Sources */, 7851CB362331CC87002295B5 /* SLDarkModeViewController.m in Sources */, 78D30965239688EF00DC373A /* GLESMath.c in Sources */, + 7811F76F24B2C791000AA044 /* SLBinaryResetViewController.m in Sources */, 788ACD652390EA3A00737EC2 /* SLCubeViewController.m in Sources */, + 7884248E24963FD200C2E505 /* SLReusableManager.m in Sources */, + 784C4BEA24BDA2DE00D5C199 /* SLProxy.m in Sources */, 7857FD4B24729E8500D3D986 /* BSBacktraceLogger.m in Sources */, 78E72D8224811F6600751373 /* SLWebCacheViewController.m in Sources */, 78E72D8F2483DC2600751373 /* SLWebCacheManager.m in Sources */, 787C7DC9245D77D9005DF7ED /* SLZombieSafeFree.m in Sources */, 786147FA23630C4D00C5424C /* UIImage+SLCommon.m in Sources */, 78FA0F9D235407E6003E456B /* SLDrawView.m in Sources */, + 784C4BE724BC53D500D5C199 /* SLAPMCpu.m in Sources */, 780F5303236D8462000D0EA8 /* SLGridView.m in Sources */, 7851CB43233222E2002295B5 /* UIView+SLFrame.m in Sources */, 7884246B249070D900C2E505 /* UIColor+SLCommon.m in Sources */, 787C7DBF245D74E4005DF7ED /* NSMutableDictionary+SLCrashProtector.m in Sources */, 7830A5A42358904600BC79BA /* UIView+SLImage.m in Sources */, 78A35B1C23978A5D004BCCB7 /* SLShaderCubeViewController.m in Sources */, + 78908E0025079451004164C2 /* SLPanTableView.m in Sources */, 787C7DC0245D74E4005DF7ED /* NSDictionary+SLCrashProtector.m in Sources */, 78E1791723517F700007E4BB /* SLImageView.m in Sources */, 78E1791823517F700007E4BB /* SLImage.m in Sources */, @@ -1305,11 +1581,16 @@ 78E72D8C2482958300751373 /* WKWebView+SLExtension.m in Sources */, 7884247F2492102900C2E505 /* SLWorkIssuesViewController.m in Sources */, 78E72D542477A4E700751373 /* SLWebTableViewController.m in Sources */, + 2CEBE85D24A6E65600BA21F3 /* SLTimer.m in Sources */, 783504642452C20B0071283E /* SLMethod.m in Sources */, + 78908DFA25078F84004164C2 /* SLScrollViewJuejin.m in Sources */, + 784C4BE124BC40D200D5C199 /* SLAPMViewController.m in Sources */, 787C7E4524656524005DF7ED /* UIView+SLMLeakFinder.m in Sources */, + 789AD1CF24D9024300CB0B4C /* Reachability.m in Sources */, 7862533F24599D420017F8F1 /* NSObject+SLCrashProtector.m in Sources */, 787C7DC2245D74E4005DF7ED /* NSMutableString+SLCrashProtector.m in Sources */, 782E3EB12373D889001E0DF9 /* SLAvCaptureSession.m in Sources */, + 789AD1C824D7FA5F00CB0B4C /* SLAPMURLProtocol.m in Sources */, 78842464248F964000C2E505 /* SLAVListViewController.m in Sources */, 78E179362351A40D0007E4BB /* SLEditMenuView.m in Sources */, 78BDE04B248A6A74002ED386 /* SLUrlProtocolAddCookie.m in Sources */, @@ -1318,13 +1599,19 @@ 787F01A3236AD8A5002AC1A9 /* SLEditImageController.m in Sources */, 780F5306236D8570000D0EA8 /* SLImageClipController.m in Sources */, 782CFB6A239E68D5001B5528 /* SLSpecialEffectsViewController.m in Sources */, + 7884248B2493851B00C2E505 /* SLViewController.m in Sources */, + 784C4BED24BDA5D700D5C199 /* SLAPMFluency.m in Sources */, 78E72D5124766E4B00751373 /* SLWebViewController.m in Sources */, 78B10493232F57C50051579F /* main.m in Sources */, + 788424C724978E9200C2E505 /* SLKeyChain.m in Sources */, + 7869C72324A8B6D200527546 /* SLPictureTransitionAnimation.m in Sources */, 78E179372351A40D0007E4BB /* SLShotFocusView.m in Sources */, 787C7DC8245D77D9005DF7ED /* SLZombieCatcher.m in Sources */, + 78799EA224EE7EEC00DA8C7A /* SLUnusedResourceViewController.m in Sources */, 78A4BD45236C5DF20021AE32 /* SLEditVideoController.m in Sources */, 78B10485232F57C30051579F /* SceneDelegate.m in Sources */, 783FB45C2394A4E10039AEFD /* SLShaderLanguageViewController.m in Sources */, + 78908DCD2500F099004164C2 /* SLMenuView.m in Sources */, 788424822492159F00C2E505 /* SLNavigationController.m in Sources */, 7835048424586BAC0071283E /* fishhook.c in Sources */, 787C7E42246557A5005DF7ED /* SLZombieFinder.m in Sources */, @@ -1333,8 +1620,12 @@ 78E72D73247E861300751373 /* SLWebViewListController.m in Sources */, 782CFB57239E5FE6001B5528 /* SLShaderFilterViewController.m in Sources */, 7822CCF8235B054200E70C29 /* SLPaddingLabel.m in Sources */, + 784C4BE424BC4C5E00D5C199 /* SLAPMManager.m in Sources */, + 784C4C3A24C2EE6600D5C199 /* SLAPMMemoryDisk.m in Sources */, 78842468248FAED100C2E505 /* SLColorPickerViewController.m in Sources */, + 789AD1D224D9622B00CB0B4C /* UIViewController+SLAPMVCTime.m in Sources */, 787C7DCF2462B03D005DF7ED /* UINavigationController+SLMLeakFinder.m in Sources */, + 789AD16324C99DCA00CB0B4C /* SLAPMThreadCount.m in Sources */, 788ACD622390BFD400737EC2 /* SLLoadImageVC.m in Sources */, 78E72D5C247BDDE700751373 /* SLWebTableViewController2.m in Sources */, 78842454248F863500C2E505 /* SLTableViewController.m in Sources */, @@ -1342,9 +1633,12 @@ 787C7DD22462C5F3005DF7ED /* UIViewController+SLMLeakFinder.m in Sources */, 788ADB382441F48F00302CD9 /* SLCrashViewController.m in Sources */, 78DAA1162360256200A60F64 /* SLEditSelectedBox.m in Sources */, + 78799EAB24EFC60C00DA8C7A /* SLResourceInfo.m in Sources */, 787C7DCC2462ADE5005DF7ED /* NSObject+SLMLeakFinder.m in Sources */, 78E72D792480B36800751373 /* SLScrollViewController.m in Sources */, 782CFB20239DEA05001B5528 /* SLSplitScreenCell.m in Sources */, + 781DA28E24E00F9E00FAE73D /* QiCallTraceCore.c in Sources */, + 781D9D0624DD662E00FAE73D /* UIView+SLAsynUpdateUI.m in Sources */, 7830A59E2358520200BC79BA /* SLEditTextView.m in Sources */, 7860D78E2398D34E008C53EC /* SLMixColorTextureVC.m in Sources */, 78E72D7F24810ECC00751373 /* UIScrollView+SLCommon.m in Sources */, @@ -1526,17 +1820,21 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/DarkMode/General/SLAnimateImageView", + "$(PROJECT_DIR)/DarkMode/WorkIssues/APM/APMMonitor", ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "$(SRCROOT)/DarkMode/General/Tool/PrefixHeader.pch"; INFOPLIST_FILE = DarkMode/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_GENERATE_MAP_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); NEW_SETTING = ""; - PRODUCT_BUNDLE_IDENTIFIER = com.wsl2ls.tips; + ORDER_FILE = "$(SRCROOT)/DarkMode/WorkIssues/二进制重排/wsl.order"; + OTHER_CFLAGS = "-fsanitize-coverage=func,trace-pc-guard"; + PRODUCT_BUNDLE_IDENTIFIER = com.wsl2ls.iostip; PRODUCT_NAME = SLTips; PROVISIONING_PROFILE_SPECIFIER = ""; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1554,17 +1852,21 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/DarkMode/General/SLAnimateImageView", + "$(PROJECT_DIR)/DarkMode/WorkIssues/APM/APMMonitor", ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "$(SRCROOT)/DarkMode/General/Tool/PrefixHeader.pch"; INFOPLIST_FILE = DarkMode/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_GENERATE_MAP_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); NEW_SETTING = ""; - PRODUCT_BUNDLE_IDENTIFIER = com.wsl2ls.tips; + ORDER_FILE = "$(SRCROOT)/DarkMode/WorkIssues/二进制重排/wsl.order"; + OTHER_CFLAGS = "-fsanitize-coverage=func,trace-pc-guard"; + PRODUCT_BUNDLE_IDENTIFIER = com.wsl2ls.iostip; PRODUCT_NAME = SLTips; PROVISIONING_PROFILE_SPECIFIER = ""; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/iOS_Tips/DarkMode.xcodeproj/xcshareddata/xcschemes/DarkMode.xcscheme b/iOS_Tips/DarkMode.xcodeproj/xcshareddata/xcschemes/DarkMode.xcscheme new file mode 100644 index 00000000..55ea58eb --- /dev/null +++ b/iOS_Tips/DarkMode.xcodeproj/xcshareddata/xcschemes/DarkMode.xcscheme @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS_Tips/DarkMode.xcworkspace/contents.xcworkspacedata b/iOS_Tips/DarkMode.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index a8c127c2..00000000 --- a/iOS_Tips/DarkMode.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/iOS_Tips/DarkMode.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/iOS_Tips/DarkMode.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/iOS_Tips/DarkMode.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/iOS_Tips/DarkMode/.DS_Store b/iOS_Tips/DarkMode/.DS_Store index 3bed2bd9..05e7465d 100644 Binary files a/iOS_Tips/DarkMode/.DS_Store and b/iOS_Tips/DarkMode/.DS_Store differ diff --git a/iOS_Tips/DarkMode/AVFoundation/SLAVListViewController.m b/iOS_Tips/DarkMode/AVFoundation/SLAVListViewController.m index 4d6b1c54..41d87296 100644 --- a/iOS_Tips/DarkMode/AVFoundation/SLAVListViewController.m +++ b/iOS_Tips/DarkMode/AVFoundation/SLAVListViewController.m @@ -13,6 +13,7 @@ #import "SLFilterViewController.h" #import "SLGPUImageController.h" #import "SLColorPickerViewController.h" +#import "SLWebViewController.h" @interface SLAVListViewController () @property (nonatomic, strong) NSMutableArray *dataSource; @@ -58,7 +59,7 @@ - (void)getData { [SLGPUImageController class], [UIViewController class], [SLColorPickerViewController class], - [UIViewController class]]]; + [SLWebViewController class]]]; [self.tableView reloadData]; } @@ -83,7 +84,7 @@ - (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(N - (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cellID" forIndexPath:indexPath]; cell.textLabel.numberOfLines = 0; - cell.textLabel.text = [NSString stringWithFormat:@"%ld、%@",(long)indexPath.row + 1,self.dataSource[indexPath.row]]; + cell.textLabel.text = [NSString stringWithFormat:@"%ld、%@",(long)indexPath.row ,self.dataSource[indexPath.row]]; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { @@ -98,16 +99,13 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath [self presentViewController:nextVc animated:YES completion:nil]; } break; - case 5: - [self.navigationController pushViewController:nextVc animated:YES]; - break; case 4: [SLAlertView showAlertViewWithText:@"查看本仓库下的VideoEncoder&Decoder" delayHid:2]; break; case 6: - [SLAlertView showAlertViewWithText:@"AVFoundation 原生二维码扫描识别和生成:https://github.com/wsl2ls/ScanQRcode.git" delayHid:2]; - break; + ((SLWebViewController *)nextVc).urlString = @"https://juejin.im/post/5c0e1db651882539c60d0434"; default: + [self.navigationController pushViewController:nextVc animated:YES]; break; } } diff --git a/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLMosaicView.m b/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLMosaicView.m index 41287848..770323ca 100644 --- a/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLMosaicView.m +++ b/iOS_Tips/DarkMode/AVFoundation/SmallVideo/View/SLMosaicView.m @@ -207,7 +207,7 @@ - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { } else if (self.mosaicType == SLMosaicTypePaintbrush) { SLMosaicPointElement *blur = [ SLMosaicPointElement new]; blur.rect = CGRectMake(point.x-self.paintSize.width/2, point.y-self.paintSize.height/2, self.paintSize.width, self.paintSize.height); - blur.imageName = @"EditMosaicBrush.png"; + blur.imageName = @"EditMosaicBrush"; blur.color = self.brushColor ? self.brushColor(blur.rect.origin) : nil; SLMosaicLineLayer *layer = [SLMosaicLineLayer layer]; layer.frame = self.bounds; @@ -257,7 +257,7 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { //2、创建LFSplashBlur SLMosaicPointElement *blur = [SLMosaicPointElement new]; - blur.imageName = @"EditMosaicBrush.png"; + blur.imageName = @"EditMosaicBrush"; blur.color = self.brushColor ? self.brushColor(point) : nil; /** 新增随机位置 */ int x = self.paintSize.width + MIN(1, (int)(self.paintSize.width*0.4)); diff --git a/iOS_Tips/DarkMode/AppDelegate.m b/iOS_Tips/DarkMode/AppDelegate.m index dc1c6c60..f6470d77 100644 --- a/iOS_Tips/DarkMode/AppDelegate.m +++ b/iOS_Tips/DarkMode/AppDelegate.m @@ -31,7 +31,7 @@ void HandleException(NSException *exception) { // 异常名称 NSString *name = [exception name]; NSString *exceptionInfo = [NSString stringWithFormat:@"程序异常:%@ \nException reason:%@ \nException stack:%@",name, reason, stackArray]; -// NSLog(@"%@", exceptionInfo); + NSLog(@"%@", exceptionInfo); } //设置异常捕获处理方法 void SLSetUncaughtExceptionHandler(void) { diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/120-1.png b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/120-1.png new file mode 100644 index 00000000..ca22535d Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/120-1.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/120.png b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/120.png new file mode 100644 index 00000000..ca22535d Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/120.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/180.png b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/180.png new file mode 100644 index 00000000..6327000a Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/180.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/20.png b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/20.png new file mode 100644 index 00000000..46f762b3 Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/20.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/29.png b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/29.png new file mode 100644 index 00000000..8aabab5a Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/29.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/40-1.png b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/40-1.png new file mode 100644 index 00000000..586d20f5 Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/40-1.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/40.png b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/40.png new file mode 100644 index 00000000..586d20f5 Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/40.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/58-1.png b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/58-1.png new file mode 100644 index 00000000..c9ea4568 Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/58-1.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/58.png b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/58.png new file mode 100644 index 00000000..c9ea4568 Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/58.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/60.png b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/60.png new file mode 100644 index 00000000..5c18c4ea Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/60.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/80-1.png b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/80-1.png new file mode 100644 index 00000000..7e4bc746 Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/80-1.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/80.png b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/80.png new file mode 100644 index 00000000..0d8ad8dc Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/80.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/Contents.json b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/Contents.json index d8db8d65..4d575c16 100644 --- a/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/iOS_Tips/DarkMode/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,98 +1,110 @@ { "images" : [ { + "filename" : "40.png", "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { + "filename" : "60.png", "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" + "scale" : "3x", + "size" : "20x20" }, { + "filename" : "58.png", "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { + "filename" : "80-1.png", "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { + "filename" : "80.png", "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { + "filename" : "120-1.png", "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "scale" : "3x", + "size" : "40x40" }, { + "filename" : "120.png", "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "scale" : "2x", + "size" : "60x60" }, { + "filename" : "180.png", "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "scale" : "3x", + "size" : "60x60" }, { + "filename" : "20.png", "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" + "scale" : "1x", + "size" : "20x20" }, { + "filename" : "40-1.png", "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { + "filename" : "29.png", "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" + "scale" : "1x", + "size" : "29x29" }, { + "filename" : "58-1.png", "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" + "scale" : "1x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" + "scale" : "1x", + "size" : "76x76" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" + "scale" : "2x", + "size" : "76x76" }, { "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" + "scale" : "2x", + "size" : "83.5x83.5" }, { "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/Contents.json b/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/Contents.json new file mode 100644 index 00000000..87b7a55a --- /dev/null +++ b/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "nav_return_white@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "nav_return_white@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/nav_return_white@2x.png b/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/nav_return_white@2x.png new file mode 100644 index 00000000..c949317d Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/nav_return_white@2x.png differ diff --git a/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/nav_return_white@3x.png b/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/nav_return_white@3x.png new file mode 100644 index 00000000..8ef689b3 Binary files /dev/null and b/iOS_Tips/DarkMode/Assets.xcassets/nav_return_white.imageset/nav_return_white@3x.png differ diff --git a/iOS_Tips/DarkMode/Base.lproj/LaunchScreen.storyboard b/iOS_Tips/DarkMode/Base.lproj/LaunchScreen.storyboard index 3962dc99..36cf6dc9 100644 --- a/iOS_Tips/DarkMode/Base.lproj/LaunchScreen.storyboard +++ b/iOS_Tips/DarkMode/Base.lproj/LaunchScreen.storyboard @@ -1,9 +1,9 @@ - + - + @@ -20,7 +20,7 @@ + + + + + + + + - + + + - + + + + diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSArray+SLCrashProtector.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSArray+SLCrashProtector.m index 20cd24f2..1fc0b6b2 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSArray+SLCrashProtector.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSArray+SLCrashProtector.m @@ -10,7 +10,6 @@ #import "SLCrashProtector.h" - @implementation NSArray (SLCrashProtector) + (void)load { @@ -35,8 +34,9 @@ - (id)sl_objectAtIndex:(NSInteger)index { return [self sl_objectAtIndex:index]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason]]; - return nil; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + return self.lastObject; } }else { return [self sl_objectAtIndex:index]; @@ -50,8 +50,9 @@ - (id)sl_singleObjectAtIndex:(NSInteger)index { return [self sl_singleObjectAtIndex:index]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason]]; - return nil; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + return self.lastObject; } }else { return [self sl_singleObjectAtIndex:index]; @@ -66,8 +67,9 @@ - (id)sl_objectAtIndexedSubscript:(NSInteger)index { return [self sl_objectAtIndexedSubscript:index]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason]]; - return nil; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + return self.lastObject; } } return [self sl_objectAtIndexedSubscript:index]; @@ -83,7 +85,8 @@ - (id)sl_initWithObjects:(id _Nonnull const [])objects count:(NSUInteger)cnt{ }else{ //记录错误 NSString *errorInfo = [NSString stringWithFormat:@"异常:数组nil值 *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[%d]",i]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeArray errorDesc:errorInfo]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeArray errorDesc:errorInfo exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } } return [self sl_initWithObjects:objectsNew count:index]; diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSDictionary+SLCrashProtector.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSDictionary+SLCrashProtector.m index 197c1dca..54c66476 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSDictionary+SLCrashProtector.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSDictionary+SLCrashProtector.m @@ -27,7 +27,9 @@ + (void)load { - (id)sl_initWithObjects:(NSArray *)objects forKeys:(NSArray> *)keys { if (objects.count != keys.count) { NSString *errorInfo = [NSString stringWithFormat:@"异常:字典key/value个数不匹配 *** -[NSDictionary initWithObjects:forKeys:]: count of objects (%ld) differs from count of keys (%ld)",(unsigned long)objects.count,(unsigned long)keys.count]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeDictionary errorDesc:errorInfo]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeDictionary errorDesc:errorInfo exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + return nil;//huicha } NSUInteger index = 0; @@ -40,7 +42,8 @@ - (id)sl_initWithObjects:(NSArray *)objects forKeys:(NSArray> *)ke index ++; }else{ NSString *errorInfo = [NSString stringWithFormat:@"异常:字典nil值 *** -[NSDictionary initWithObjects:forKeys]: attempt to insert nil object from objects[%d]",i]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeDictionary errorDesc:errorInfo]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeDictionary errorDesc:errorInfo exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } } return [self sl_initWithObjects:[NSArray arrayWithObjects:objectsNew count:index] forKeys: [NSArray arrayWithObjects:keysNew count:index]]; @@ -58,7 +61,8 @@ - (id)sl_initWithObjects:(id _Nonnull const [])objects forKeys:(id index ++; }else{ NSString *errorInfo = [NSString stringWithFormat:@"异常:字典nil值 *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[%d]",i]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeDictionary errorDesc:errorInfo]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeDictionary errorDesc:errorInfo exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } } return [self sl_initWithObjects:objectsNew forKeys:keysNew count:index]; diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableArray+SLCrashProtector.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableArray+SLCrashProtector.m index 83d3712f..62b806e5 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableArray+SLCrashProtector.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableArray+SLCrashProtector.m @@ -34,8 +34,9 @@ - (id)sl_mObjectAtIndex:(NSInteger)index { return [self sl_mObjectAtIndex:index]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeMArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason]]; - return nil; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + return self.lastObject; } }else { return [self sl_mObjectAtIndex:index]; @@ -50,8 +51,9 @@ - (id)sl_mObjectAtIndexedSubscript:(NSInteger)index { return [self sl_mObjectAtIndexedSubscript:index]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeMArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason]]; - return nil; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + return self.lastObject; } } return [self sl_mObjectAtIndexedSubscript:index]; @@ -60,7 +62,8 @@ - (id)sl_mObjectAtIndexedSubscript:(NSInteger)index { - (void)sl_removeObjectsInRange:(NSRange)range { if (range.location+range.length>self.count) { NSString *errorInfo = [NSString stringWithFormat:@"异常:数组越界 *** -[__NSArrayM removeObjectsInRange:]: range {%ld, %ld} extends beyond bounds [0 .. %ld]",(unsigned long)range.location,(unsigned long)range.length,(unsigned long)self.count]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeMArray errorDesc:errorInfo]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMArray errorDesc:errorInfo exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; return; } [self sl_removeObjectsInRange:range]; @@ -68,7 +71,8 @@ - (void)sl_removeObjectsInRange:(NSRange)range { //越界 nil值 - (void)sl_replaceObjectAtIndex:(NSInteger)index withObject:(id)object { if (object == nil) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeMArray errorDesc:@"异常:数组nil值 *** -[__NSArrayM replaceObjectAtIndex:withObject:]: object cannot be nil"]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMArray errorDesc:@"异常:数组nil值 *** -[__NSArrayM replaceObjectAtIndex:withObject:]: object cannot be nil" exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; return; } if (index >= self.count) { @@ -76,7 +80,8 @@ - (void)sl_replaceObjectAtIndex:(NSInteger)index withObject:(id)object { return [self sl_replaceObjectAtIndex:index withObject:object]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeMArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } }else { [self sl_replaceObjectAtIndex:index withObject:object]; @@ -89,7 +94,8 @@ - (void)sl_replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray *) return [self sl_replaceObjectsInRange:range withObjectsFromArray:otherArray]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeMArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } }else{ [self sl_replaceObjectsInRange:range withObjectsFromArray:otherArray]; @@ -99,7 +105,10 @@ - (void)sl_replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray *) //越界 nil值 - (void)sl_insertObject:(id)object atIndex:(NSInteger)index { if (object == nil) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeMArray errorDesc:@"异常:数组nil值 *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil"]; + + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMArray errorDesc:@"异常:数组nil值 *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil" exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + return; } if (index > self.count) { @@ -107,7 +116,8 @@ - (void)sl_insertObject:(id)object atIndex:(NSInteger)index { return [self sl_insertObject:object atIndex:index]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeMArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } }else { [self sl_insertObject:object atIndex:index];; @@ -120,7 +130,8 @@ - (void)sl_insertObjects:(NSArray *)objects atIndexes:(NSIndexSet *)indexes { return [self sl_insertObjects:objects atIndexes:indexes]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeMArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMArray errorDesc:[NSString stringWithFormat:@"异常:数组越界 %@",exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } return; } @@ -137,7 +148,8 @@ - (id)sl_initWithObjects:(id _Nonnull const [])objects count:(NSUInteger)cnt{ }else{ //记录错误 NSString *errorInfo = [NSString stringWithFormat:@"异常:数组nil值 *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[%d]",i]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeMArray errorDesc:errorInfo]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMArray errorDesc:errorInfo exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } } return [self sl_initWithObjects:objectsNew count:index]; diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableDictionary+SLCrashProtector.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableDictionary+SLCrashProtector.m index b3663b51..8b9863c2 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableDictionary+SLCrashProtector.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableDictionary+SLCrashProtector.m @@ -29,7 +29,8 @@ - (void)sl_setObject:(id)anObject forKey:(id)aKey { [self sl_setObject:anObject forKey:aKey]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeMDictionary errorDesc:[@"异常:字典nil值 " stringByAppendingString:exception.reason]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMDictionary errorDesc:[@"异常:字典nil值 " stringByAppendingString:exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } }else{ [self sl_setObject:anObject forKey:aKey]; @@ -42,7 +43,8 @@ - (void)sl_removeObjectForKey:(id)aKey { [self sl_removeObjectForKey:aKey]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeMDictionary errorDesc:[@"异常:字典nil值 " stringByAppendingString:exception.reason]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMDictionary errorDesc:[@"异常:字典nil值 " stringByAppendingString:exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } }else{ [self sl_removeObjectForKey:aKey]; @@ -55,7 +57,8 @@ - (void)sl_setObject:(id)anObject forKeyedSubscript:(id)key { [self sl_setObject:anObject forKeyedSubscript:key]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeMDictionary errorDesc:[@"异常:字典nil值 " stringByAppendingString:exception.reason]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMDictionary errorDesc:[@"异常:字典nil值 " stringByAppendingString:exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } }else{ [self sl_setObject:anObject forKeyedSubscript:key]; @@ -75,7 +78,8 @@ - (id)sl_initWithObjects:(id _Nonnull const [])objects forKeys:(id index ++; }else{ NSString *errorInfo = [NSString stringWithFormat:@"异常:字典nil值 *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[%d]",i]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeMDictionary errorDesc:errorInfo]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMDictionary errorDesc:errorInfo exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } } return [self sl_initWithObjects:objectsNew forKeys:keysNew count:index]; diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableString+SLCrashProtector.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableString+SLCrashProtector.m index 0185bf9e..ecad62f6 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableString+SLCrashProtector.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSMutableString+SLCrashProtector.m @@ -29,7 +29,8 @@ - (void)sl_insertString:(NSString *)aString atIndex:(NSUInteger)loc{ [self sl_insertString:aString atIndex:loc]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeMString errorDesc:[@"异常:MutableString越界 " stringByAppendingString:exception.reason]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMString errorDesc:[@"异常:MutableString越界 " stringByAppendingString:exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } }else{ [self sl_insertString:aString atIndex:loc]; @@ -42,7 +43,8 @@ - (void)sl_deleteCharactersInRange:(NSRange)range{ [self sl_deleteCharactersInRange:range]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeMString errorDesc:[@"异常:MutableString越界 " stringByAppendingString:exception.reason]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeMString errorDesc:[@"异常:MutableString越界 " stringByAppendingString:exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } if (range.location < self.length) { [self sl_deleteCharactersInRange:NSMakeRange(range.location, self.length-range.location)]; diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSObject+SLCrashProtector.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSObject+SLCrashProtector.m index b0979e69..d0abfe5e 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSObject+SLCrashProtector.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSObject+SLCrashProtector.m @@ -37,7 +37,8 @@ + (void)unrecognizedSelectorCrashProtector { - (id)sl_forwardingTargetForSelector:(SEL)aSelector { //判断当前类是否重写了消息转发的相关方法,如果重写了,就走正常的消息转发流程 if (![self isOverideForwardingMethods:[self class]] && !IsSystemClass(self.class)) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeUnrecognizedSelector errorDesc:[NSString stringWithFormat:@"异常:未识别方法 [%@ +%@]",NSStringFromClass([self class]),NSStringFromSelector(aSelector)]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeUnrecognizedSelector errorDesc:[NSString stringWithFormat:@"异常:未识别方法 [%@ +%@]",NSStringFromClass([self class]),NSStringFromSelector(aSelector)] exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; //如果SLCrashHandler也没有实现aSelector,就动态添加上aSelector if (!class_getInstanceMethod([SLCrashHandler class], aSelector)) { class_addMethod([SLCrashHandler class], aSelector, (IMP)SL_DynamicAddMethodIMP, "v@:"); @@ -51,7 +52,8 @@ - (id)sl_forwardingTargetForSelector:(SEL)aSelector { + (id)sl_forwardingTargetForSelector:(SEL)aSelector { //判断当前类是否重写了消息转发的相关方法,如果重写了,就走正常的消息转发流程 if (![self isOverideForwardingMethods:[[self class] class]] && !IsSystemClass(self.class)) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeUnrecognizedSelector errorDesc:[NSString stringWithFormat:@"异常:未识别方法 [%@ +%@]",NSStringFromClass([[self class] class]),NSStringFromSelector(aSelector)]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeUnrecognizedSelector errorDesc:[NSString stringWithFormat:@"异常:未识别方法 [%@ +%@]",NSStringFromClass([self class]),NSStringFromSelector(aSelector)] exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; //如果SLCrashHandler也没有实现aSelector,就动态添加上aSelector if (!class_getInstanceMethod([[SLCrashHandler class] class], aSelector)) { class_addMethod([[SLCrashHandler class] class], aSelector, (IMP)SL_DynamicAddMethodIMP, "v@:"); @@ -112,7 +114,9 @@ - (void)sl_addObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath optio NSString *className = (NSStringFromClass(self.class) == nil) ? @"" : NSStringFromClass(self.class); NSString *errorReason = [NSString stringWithFormat:@"异常 KVO: Repeated additions to the observer:%@ for the key path:'%@' from %@", observer, keyPath, className]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeKVO errorDesc:errorReason]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeKVO errorDesc:errorReason exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + } } else { [self sl_addObserver:observer forKeyPath:keyPath options:options context:context]; @@ -128,7 +132,8 @@ - (void)sl_removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath{ // 移除 KVO 信息操作失败:移除了未注册的观察者 NSString *className = NSStringFromClass(self.class) == nil ? @"" : NSStringFromClass(self.class); NSString *errorReason = [NSString stringWithFormat:@"异常 KVO: Cannot remove an observer %@ for the key path '%@' from %@ , because it is not registered as an observer", observer, keyPath, className]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeKVO errorDesc:errorReason]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeKVO errorDesc:errorReason exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } } else { [self sl_removeObserver:observer forKeyPath:keyPath]; @@ -144,7 +149,8 @@ - (void)sl_removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath co // 移除 KVO 信息操作失败:移除了未注册的观察者 NSString *className = NSStringFromClass(self.class) == nil ? @"" : NSStringFromClass(self.class); NSString *errorReason = [NSString stringWithFormat:@"异常 KVO: Cannot remove an observer %@ for the key path '%@' from %@ , because it is not registered as an observer", observer, keyPath, className]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeKVO errorDesc:errorReason]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeKVO errorDesc:errorReason exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } } else { [self sl_removeObserver:observer forKeyPath:keyPath context:context]; @@ -160,7 +166,8 @@ - (void)sl_KVODealloc{ // 被观察者在 dealloc 时仍然注册着 KVO if (keyPaths.count > 0) { NSString *errorReason = [NSString stringWithFormat:@"异常 KVO: An instance %@ was deallocated while key value observers were still registered with it. The Keypaths is:'%@'", self, [keyPaths componentsJoinedByString:@","]]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeKVO errorDesc:errorReason]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeKVO errorDesc:errorReason exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } // 移除多余的观察者 for (NSString *keyPath in keyPaths) { @@ -171,22 +178,6 @@ - (void)sl_KVODealloc{ // } [self sl_KVODealloc]; } -/*是否是系统类*/ -static inline BOOL IsSystemClass(Class cls){ - __block BOOL isSystem = NO; - NSString *className = NSStringFromClass(cls); - if ([className hasPrefix:@"NS"]) { - isSystem = YES; - return isSystem; - } - NSBundle *mainBundle = [NSBundle bundleForClass:cls]; - if (mainBundle == [NSBundle mainBundle]) { - isSystem = NO; - }else{ - isSystem = YES; - } - return isSystem; -} #pragma mark - KVC /// KVC 防护 @@ -199,7 +190,9 @@ - (void)sl_setValue:(id)value forKey:(NSString *)key { [self sl_setValue:value forKey:key]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeKVC errorDesc:[@"异常 KVC: " stringByAppendingString:exception.reason]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeKVC errorDesc:[@"异常 KVC: " stringByAppendingString:exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + } return; } @@ -207,15 +200,18 @@ - (void)sl_setValue:(id)value forKey:(NSString *)key { } - (void)setNilValueForKey:(NSString *)key { NSString *crashMessages = [NSString stringWithFormat:@"异常 KVC: [<%@ %p> setNilValueForKey]: could not set nil as the value for the key %@.",NSStringFromClass([self class]),self,key]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeKVC errorDesc:crashMessages]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeKVC errorDesc:crashMessages exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } - (void)setValue:(id)value forUndefinedKey:(NSString *)key { NSString *crashMessages = [NSString stringWithFormat:@"异常 KVC: [<%@ %p> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key: %@,value:%@'",NSStringFromClass([self class]),self,key,value]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeKVC errorDesc:crashMessages]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeKVC errorDesc:crashMessages exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } - (nullable id)valueForUndefinedKey:(NSString *)key { NSString *crashMessages = [NSString stringWithFormat:@"异常 KVC: [<%@ %p> valueForUndefinedKey:]: this class is not key value coding-compliant for the key: %@",NSStringFromClass([self class]),self,key]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:nil type:SLCrashErrorTypeKVC errorDesc:crashMessages]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeKVC errorDesc:crashMessages exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; return self; } diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSObject+SLMLeakFinder.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSObject+SLMLeakFinder.m index 1ff9b88a..52454ad0 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSObject+SLMLeakFinder.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSObject+SLMLeakFinder.m @@ -7,6 +7,7 @@ // #import "NSObject+SLMLeakFinder.h" +#import "SLCrashProtector.h" @implementation NSObject (SLMLeakFinder) @@ -33,7 +34,11 @@ - (BOOL)willDealloc { - (void)notDealloc { NSString *className = NSStringFromClass([self class]); // NSLog(@"有内存没释放:\n 如果%@不应该被释放, 请重写[%@ -willDealloc] 并 returning NO .\nView-ViewController stack: %@", className, className, [self viewStack]); - NSLog(@"有内存没释放:如果%@不应该被释放, 请重写[%@ -willDealloc] 并 returning NO .\n", className, className); + NSString *desc = [NSString stringWithFormat:@"内存泄漏/循环引用:如果%@不应该被释放, 请重写[%@ -willDealloc] 并 returning NO .\n", className, className]; + NSLog(@"%@",desc); + NSException *exception = [NSException exceptionWithName:NSInternalInconsistencyException reason:desc userInfo:nil]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeLeak errorDesc:desc exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } //不需要监测内存泄漏的白名单类 diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSString+SLCrashProtector.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSString+SLCrashProtector.m index 5adf7d10..0faab0c4 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSString+SLCrashProtector.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/NSString+SLCrashProtector.m @@ -31,7 +31,8 @@ - (unichar)sl_characterAtIndex:(NSUInteger)index{ [self sl_characterAtIndex:index]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeString errorDesc:[@"异常:String越界 " stringByAppendingString:exception.reason]]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeString errorDesc:[@"异常:String越界 " stringByAppendingString:exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } return 0; } @@ -44,8 +45,8 @@ - (NSString *)sl_substringFromIndex:(NSUInteger)from{ instance = [self sl_substringFromIndex:from]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeString errorDesc:[@"异常:String越界 " stringByAppendingString:exception.reason]]; - + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeString errorDesc:[@"异常:String越界 " stringByAppendingString:exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } @finally { return instance; @@ -58,8 +59,8 @@ - (NSString *)sl_substringToIndex:(NSUInteger)to{ instance = [self sl_substringToIndex:to]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeString errorDesc:[@"异常:String越界 " stringByAppendingString:exception.reason]]; - + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeString errorDesc:[@"异常:String越界 " stringByAppendingString:exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } @finally { return instance; @@ -72,8 +73,8 @@ - (NSString *)sl_substringWithRange:(NSRange)range{ instance = [self sl_substringWithRange:range]; } @catch (NSException *exception) { - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeString errorDesc:[@"异常:String越界 " stringByAppendingString:exception.reason]]; - + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeString errorDesc:[@"异常:String越界 " stringByAppendingString:exception.reason] exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } @finally { return instance; diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLCrashHandler.h b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLCrashHandler.h index ff591426..e346238d 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLCrashHandler.h +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLCrashHandler.h @@ -11,8 +11,10 @@ NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSInteger, SLCrashErrorType) { + /*未知错误*/ + SLCrashErrorTypeUnknow = 0, /*Array*/ - SLCrashErrorTypeArray = 0, + SLCrashErrorTypeArray, /*NSMutableArray*/ SLCrashErrorTypeMArray, /*NSDictionary*/ @@ -29,8 +31,12 @@ typedef NS_ENUM(NSInteger, SLCrashErrorType) { SLCrashErrorTypeKVO, /*KVC异常*/ SLCrashErrorTypeKVC, + /*异步线程更新UI*/ + SLCrashErrorTypeAsynUpdateUI, /*野指针*/ - SLCrashErrorTypeZombie, + SLCrashErrorTypeZombie, + /*内存泄漏/循环引用*/ + SLCrashErrorTypeLeak }; /// 崩溃信息 @@ -43,18 +49,25 @@ typedef NS_ENUM(NSInteger, SLCrashErrorType) { @property (nonatomic, strong) NSException *exception; /// 当前线程的函数调用栈 @property (nonatomic, copy) NSArray *callStackSymbol; +///初始化 ++ (instancetype)errorWithErrorType:(SLCrashErrorType)errorType errorDesc:(NSString *)errorDesc exception:(nullable NSException *)exception callStack:(NSArray*)callStackSymbol; +@end + +@class SLCrashHandler; +@protocol SLCrashHandlerDelegate +///捕获到错误信息,交给外界delegate处理 +- (void)crashHandlerDidOutputCrashError:(SLCrashError *)crashError; @end -/// 崩溃处理程序 +/// 崩溃处理程序 注意:部分防护功能还不完善,比如野指针和内存泄漏/循环引用 @interface SLCrashHandler : NSObject -/// 异常捕获回调 提供给外界初始化实现自定义处理 ,日志上报等(注意线程安全) -@property (nonatomic, copy) void(^crashHandlerBlock)(SLCrashError *crashError); + +///异常捕获回调 提供给外界实现自定义处理 ,日志上报等(注意线程安全) +@property (nonatomic, weak) iddelegate; /// 单例 + (instancetype)defaultCrashHandler; -/// 捕获崩溃异常信息 -- (void)catchCrashException:(NSException * _Nullable )exception type:(SLCrashErrorType)errorType errorDesc:(NSString *)errorDesc; @end diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLCrashHandler.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLCrashHandler.m index cee8752d..500bc02e 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLCrashHandler.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLCrashHandler.m @@ -7,8 +7,24 @@ // #import "SLCrashHandler.h" +#import "BSBacktraceLogger.h" + +#import +#import @implementation SLCrashError ++ (instancetype)errorWithErrorType:(SLCrashErrorType)errorType errorDesc:(NSString *)errorDesc exception:(NSException *)exception callStack:(NSArray*)callStackSymbol { + SLCrashError *crashError = [SLCrashError new]; + crashError.errorDesc = errorDesc; + crashError.errorType = errorType; + crashError.exception = exception; + //获取当前线程的函数调用栈 + crashError.callStackSymbol = callStackSymbol; + return crashError; +} +@end + +@interface SLCrashHandler () @end @implementation SLCrashHandler @@ -18,23 +34,171 @@ + (instancetype)defaultCrashHandler { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ crashHandler = [[SLCrashHandler alloc] init]; + [crashHandler setCaughtCrashHandler]; }); return crashHandler; } -/// 捕获崩溃异常 -- (void)catchCrashException:(NSException *)exception type:(SLCrashErrorType)errorType errorDesc:(NSString *)errorDesc { - SLCrashError *crashError = [SLCrashError new]; - crashError.errorDesc = errorDesc; - crashError.errorType = SLCrashErrorTypeArray; - crashError.exception = exception; - //获取当前线程的函数调用栈 - crashError.callStackSymbol = [NSThread callStackSymbols]; - NSLog(@"%@" ,errorDesc); - if (self.crashHandlerBlock) { - self.crashHandlerBlock(crashError); - } +/// 捕获Mach、Signal、NSException 异常Crash +- (void)setCaughtCrashHandler { + [self setMachHandler]; + [self setSignalHandler]; + [self setExceptionHandler]; } +#pragma mark - Mach异常捕获 +// 创建Mach Port并监听消息 +- (void)setMachHandler { + mach_port_t server_port; + ///创建异常端口 + kern_return_t kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &server_port); + assert(kr == KERN_SUCCESS); + NSLog(@"创建异常消息监听端口: %d", server_port); + + ///申请set_exception_ports 的权限 + kr = mach_port_insert_right(mach_task_self(), server_port, server_port, MACH_MSG_TYPE_MAKE_SEND); + assert(kr == KERN_SUCCESS); + + ///设置异常端口 EXC_MASK_CRASH 捕获Mach_CRASH时会导致死锁 + kr = task_set_exception_ports(mach_task_self(), EXC_MASK_BAD_ACCESS, server_port, EXCEPTION_DEFAULT | MACH_EXCEPTION_CODES, THREAD_STATE_NONE); + + ///循环等待异常消息 + [self setMachPortListener:server_port]; +} + +- (void)setMachPortListener:(mach_port_t)mach_port { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + + __Request__exception_raise_state_identity_t mach_message; + + mach_message.Head.msgh_size = 1024; + mach_message.Head.msgh_local_port = mach_port; + + mach_msg_return_t mr; + + while (true) { + mr = mach_msg(&mach_message.Head, + MACH_RCV_MSG | MACH_RCV_LARGE, + 0, + mach_message.Head.msgh_size, + mach_message.Head.msgh_local_port, + MACH_MSG_TIMEOUT_NONE, + MACH_PORT_NULL); + + if (mr != MACH_MSG_SUCCESS && mr != MACH_RCV_TOO_LARGE) { + NSLog(@"error!"); + } + + mach_msg_id_t msg_id = mach_message.Head.msgh_id; + mach_port_t remote_port = mach_message.Head.msgh_remote_port; + mach_port_t local_port = mach_message.Head.msgh_local_port; + + NSLog(@"Receive a mach message:[%d], remote_port: %d, local_port: %d, exception code: %d", + msg_id, + remote_port, + local_port, + mach_message.exception); + + NSString * callStack = [BSBacktraceLogger bs_backtraceOfAllThread]; + NSString *exceptionInfo = [NSString stringWithFormat:@"mach异常:%@",callStack]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeUnknow errorDesc:exceptionInfo exception:nil callStack:@[callStack]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + //mach异常就终止当前程序 +// abort(); + } + }); +} + +#pragma mark - Unix signal信号捕获 +- (void)setSignalHandler { + ///注册信号Handler,Unix 信号捕获 + signal(SIGABRT, SL_UncaughtSignalHandler); + signal(SIGILL, SL_UncaughtSignalHandler); + signal(SIGSEGV, SL_UncaughtSignalHandler); + signal(SIGFPE, SL_UncaughtSignalHandler); + signal(SIGBUS, SL_UncaughtSignalHandler); + signal(SIGPIPE, SL_UncaughtSignalHandler); + signal(SIGKILL, SL_UncaughtSignalHandler); + signal(SIGTRAP, SL_UncaughtSignalHandler); +} +///异常信号处理回调 +void SL_UncaughtSignalHandler(int signal) { + NSString *exceptionInfo = [NSString stringWithFormat:@"异常信号:%@ Crash",signalName(signal)]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeUnknow errorDesc:exceptionInfo exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + +} +///信号名称 关于信号这部分可以看 https://mp.weixin.qq.com/s/hVj-j61Br3dox37SN79fDQ +NSString *signalName(int signal) { + switch (signal) { + case SIGABRT: + /* + abort() 发生的信号: + 典型的软件信号,通过 pthread_kill() 发送 + */ + return @"SIGABRT"; + case SIGILL: + /* + 非法指令,即机器码指令不正确: + 1, iOS 上偶现的问题,遇到之后用户会连续闪退,直到应用二进制的缓存重新加载 或重启手机。此问题挺影响体验,但是报给苹果不认,因为苹果那边没有收集到,目前没有太好办法。因为 iOS 应用内无法对一片内存同时获取 w+x 权限的,因此应用无法造成此类问题,所以判断是苹果的问题。 + */ + return @"SIGILL"; + case SIGSEGV: + /*段错误: + 1、访问未申请的虚拟内存地址 + 2、没有写权限的内存写入 + */ + return @"SIGSEGV"; + case SIGFPE: + /* + 算术运算出错,比如除0错误: + iOS 默认是不启用的,所以我们一般不会遇到 + */ + return @"SIGFPE"; + case SIGBUS: + /*总线错误 + 1、内存地址对齐出错 2、试图执行没有执行权限的代码地址 + */ + return @"SIGBUS"; + case SIGPIPE: + /*管道破裂 + 1, Socket通信是可能遇到,如读进程以及终止时,写进程继续写入数据。 + */ + return @"SIGPIPE"; + case SIGKILL: + /* + 进程内无法拦截: + 1, exit(), kill(9) 等函数调用 2, iOS系统杀进程用的,比如 watchDog 杀进程 + */ + return @"SIGKILL"; + case SIGTRAP: + /* + 由断点指令或其它trap指令产生: + 部分系统框架里面会用 __builtin_trap() 来产生一个 SIGTRAP 类型的 Crash + */ + return @"SIGTRAP"; + default: + return @"UNKNOWN"; + } +} +#pragma mark - NSException捕获 +/// 其他三方注册的异常处理 handler +static NSUncaughtExceptionHandler *otherUncaughtExceptionHandler = NULL; +- (void)setExceptionHandler { + ///先获取保留其他三方的异常Handler + otherUncaughtExceptionHandler = NSGetUncaughtExceptionHandler(); + ///注册自己的异常Handler + NSSetUncaughtExceptionHandler (SL_UncaughtExceptionHandler); +} +///异常捕获处理 +void SL_UncaughtExceptionHandler(NSException *exception) { + if (otherUncaughtExceptionHandler) { + //如果其他三方也有注册,则也执行其他三方的Handle,然后在执行自己的 + otherUncaughtExceptionHandler(exception); + } + NSString *exceptionInfo = [NSString stringWithFormat:@"异常:%@, %@",exception.name, exception.reason]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeUnknow errorDesc:exceptionInfo exception:exception callStack:exception.callStackSymbols]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; +} @end diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLCrashProtector.h b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLCrashProtector.h index d23bf45a..93575826 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLCrashProtector.h +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLCrashProtector.h @@ -17,13 +17,14 @@ /*交换实例方法*/ static inline void SL_ExchangeInstanceMethod(Class _originalClass ,SEL _originalSel, Class _targetClass, SEL _targetSel){ + //此处获得的方法可能是父类对象的 Method methodOriginal = class_getInstanceMethod(_originalClass, _originalSel); Method methodNew = class_getInstanceMethod(_targetClass, _targetSel); // class_addMethod 返回成功表示被替换的方法没实现,然后会通过 class_addMethod 方法先实现;返回失败则表示被替换方法已存在,可以直接进行 IMP 指针交换 BOOL didAddMethod = class_addMethod(_originalClass, _originalSel, method_getImplementation(methodNew), method_getTypeEncoding(methodNew)); if (didAddMethod) { // 进行方法的替换 - class_replaceMethod(_originalClass, _targetSel, method_getImplementation(methodOriginal), method_getTypeEncoding(methodOriginal)); + class_replaceMethod(_targetClass, _targetSel, method_getImplementation(methodOriginal), method_getTypeEncoding(methodOriginal)); }else{ // 交换 IMP 指针 method_exchangeImplementations(methodOriginal, methodNew); @@ -36,5 +37,22 @@ static inline void SL_ExchangeClassMethod(Class _class ,SEL _originalSel,SEL _ex method_exchangeImplementations(methodOriginal, methodNew); } +/*是否是系统类*/ +static inline BOOL IsSystemClass(Class cls){ + __block BOOL isSystem = NO; + NSString *className = NSStringFromClass(cls); + if ([className hasPrefix:@"NS"]) { + isSystem = YES; + return isSystem; + } + NSBundle *mainBundle = [NSBundle bundleForClass:cls]; + if (mainBundle == [NSBundle mainBundle]) { + isSystem = NO; + }else{ + isSystem = YES; + } + return isSystem; +} + #endif /* SLCrashProtector_h */ diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLKVODelegate.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLKVODelegate.m index 41cb5470..e731a827 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLKVODelegate.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLKVODelegate.m @@ -7,6 +7,7 @@ // #import "SLKVODelegate.h" +#import "SLCrashProtector.h" @interface SLKVODelegate () { @@ -110,7 +111,8 @@ - (void)observeValueForKeyPath:(NSString *)keyPath [observer observeValueForKeyPath:keyPath ofObject:object change:change context:context]; } @catch (NSException *exception) { NSString *reason = [NSString stringWithFormat:@"异常 KVO: %@",[exception description]]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeArray errorDesc:reason]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeKVO errorDesc:reason exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; } } } diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieCatcher.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieCatcher.m index e536bda1..ab077688 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieCatcher.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieCatcher.m @@ -124,8 +124,10 @@ - (NSString *)description - (void)_throwMessageSentExceptionWithSelector: (SEL)selector { NSException *exception = [NSException exceptionWithName:NSInternalInconsistencyException reason:[NSString stringWithFormat:@"( 野指针必现定位:-[%@ %@]) was sent to a zombie object at address: %p", NSStringFromClass(self.originClass), NSStringFromSelector(selector), self] userInfo:nil]; - [[SLCrashHandler defaultCrashHandler] catchCrashException:exception type:SLCrashErrorTypeZombie errorDesc:exception.reason]; - @throw exception; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeZombie errorDesc:exception.reason exception:exception callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + //是否需要强制抛出异常 +// @throw exception; } @end diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieFinder.h b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieFinder.h index 9a990e0c..5d44bdeb 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieFinder.h +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieFinder.h @@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN /* -fno-objc-arc 记得设置此类编译方式支持MRC */ -///zombie/野指针对象嗅探器 来源:https://github.com/sindrilin/LXDZombieSniffer.git +///zombie/野指针对象嗅探器 目前还不完善,不推荐使用 ,仅做交流学习 来源:https://github.com/sindrilin/LXDZombieSniffer.git @interface SLZombieFinder : NSObject ///启动zombie嗅探 @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN ///关闭zombie嗅探 + (void)closeSniffer; - ///添加嗅探白名单类 + ///添加嗅探白名单类 不嗅探名单之内的类 + (void)appendIgnoreClass: (Class)cls; @end diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieFinder.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieFinder.m index fdd9ba93..a4735a42 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieFinder.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/SLZombieFinder.m @@ -9,21 +9,36 @@ #import "SLZombieFinder.h" #import "SLZombieCatcher.h" #import +#import "SLCrashProtector.h" -typedef void (*SLDeallocPointer) (id obj); -static BOOL _enabled = NO; -static NSArray *_rootClasses = nil; -static NSDictionary *_rootClassDeallocImps = nil; +typedef void (*SLDeallocPointer) (id obj); ///指向Dealloc实现IMP的指针 +static BOOL _enabled = NO; //嗅探器是否已开启 +static NSArray *_rootClasses = nil; //根/基类 +static NSDictionary *_rootClassDeallocImps = nil; //存储根类Dealloc的方法实现IMP +static BOOL isOnlySnifferMyClass = NO; ///是否仅嗅探自己创建的类 默认NO +/// 嗅探/延迟释放实例的白名单类,不对在此名单中的类进行僵尸对象嗅探/延迟释放 static inline NSMutableSet *sl_sniff_white_list() { static NSMutableSet *lxd_sniff_white_list; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ lxd_sniff_white_list = [[NSMutableSet alloc] init]; + + [lxd_sniff_white_list addObject:@"_UITextSizeCache"]; + [lxd_sniff_white_list addObject:@"NSConcreteValue"]; + [lxd_sniff_white_list addObject:@"SLZombieCatcher"]; + [lxd_sniff_white_list addObject:@"OS_dispatch_data"]; + + [lxd_sniff_white_list addObject:@"__NSGlobalBlock__"]; + [lxd_sniff_white_list addObject:@"__NSStackBlock__ "]; + [lxd_sniff_white_list addObject:@"__NSMallocBlock__"]; + [lxd_sniff_white_list addObject:@"NSBlock"]; + [lxd_sniff_white_list addObject:@"NSValue"]; + }); return lxd_sniff_white_list; } - +///释放实例 static inline void sl_dealloc(__unsafe_unretained id obj) { Class currentCls = [obj class]; Class rootCls = currentCls; @@ -39,7 +54,7 @@ static inline void sl_dealloc(__unsafe_unretained id obj) { deallocImp(obj); } } - +///交换IMP,并返回method的原始IMP static inline IMP sl_swizzleMethodWithBlock(Method method, void *block) { IMP blockImplementation = imp_implementationWithBlock(block); return method_setImplementation(method, blockImplementation); @@ -78,24 +93,29 @@ + (void)appendIgnoreClass: (Class)cls { } } - #pragma mark - Private +///hook基类NSObject/NSProxy的dealloc方法,并指向swizzledDeallocBlock对应的IMP + (void)_swizzleDealloc { static void *swizzledDeallocBlock = NULL; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ + ///NSObject/NSProxy的dealloc交换后的方法实现 swizzledDeallocBlock = [^void(id obj) { Class currentClass = [obj class]; NSString *clsName = NSStringFromClass(currentClass); - if ([sl_sniff_white_list() containsObject: clsName]) { + //_UITextSizeCache 这个私有类的实例对象在dispatch_after里释放会崩溃,故排除 + if ([sl_sniff_white_list() containsObject:clsName] || [clsName hasPrefix:@"OS_xpc"] || [clsName hasPrefix:@"WK"]) { sl_dealloc(obj); } else { NSValue *objVal = [NSValue valueWithBytes: &obj objCType: @encode(typeof(obj))]; + ///动态转换obj对象的isa类对象为SLZombieCatcher,让SLZombieCatcher去捕获异常的消息并抛出异常 object_setClass(obj, [SLZombieCatcher class]); + ///保存原来的类 ((SLZombieCatcher *)obj).originClass = currentClass; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + ///延迟5秒释放此obj对象内存空间,如果释放前,有新消息发送给此地址的对象(SLZombieCatcher),就说明出现了野指针/坏内存访问 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ __unsafe_unretained id deallocObj = nil; [objVal getValue: &deallocObj]; object_setClass(deallocObj, currentClass); @@ -107,12 +127,14 @@ + (void)_swizzleDealloc { NSMutableDictionary *deallocImps = [NSMutableDictionary dictionary]; for (Class rootClass in _rootClasses) { + //设置方法dealloc的实现IMP为swizzledDeallocBlock的方法实现IMP,并存储原有的dealloc的IMP,适当时机去执行 IMP originalDeallocImp = sl_swizzleMethodWithBlock(class_getInstanceMethod(rootClass, @selector(dealloc)), swizzledDeallocBlock); [deallocImps setObject: [NSValue valueWithBytes: &originalDeallocImp objCType: @encode(typeof(IMP))] forKey: NSStringFromClass(rootClass)]; } _rootClassDeallocImps = [deallocImps copy]; } +///恢复原来的IMP指向 + (void)_unswizzleDealloc { [_rootClasses enumerateObjectsUsingBlock:^(Class rootClass, NSUInteger idx, BOOL *stop) { IMP originalDeallocImp = NULL; @@ -122,7 +144,6 @@ + (void)_unswizzleDealloc { NSParameterAssert(originalDeallocImp); method_setImplementation(class_getInstanceMethod(rootClass, @selector(dealloc)), originalDeallocImp); }]; - [_rootClassDeallocImps release]; _rootClassDeallocImps = nil; } diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIView+SLAsynUpdateUI.h b/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIView+SLAsynUpdateUI.h new file mode 100644 index 00000000..64d866bc --- /dev/null +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIView+SLAsynUpdateUI.h @@ -0,0 +1,18 @@ +// +// UIView+SLAsynUpdateUI.h +// DarkMode +// +// Created by wsl on 2020/8/7. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +///异步更新UI 防护 +@interface UIView (SLAsynUpdateUI) + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIView+SLAsynUpdateUI.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIView+SLAsynUpdateUI.m new file mode 100644 index 00000000..207dc33d --- /dev/null +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIView+SLAsynUpdateUI.m @@ -0,0 +1,64 @@ +// +// UIView+SLAsynUpdateUI.m +// DarkMode +// +// Created by wsl on 2020/8/7. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "UIView+SLAsynUpdateUI.h" +#import "SLCrashProtector.h" + +@implementation UIView (SLAsynUpdateUI) + ++ (void)load { + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + SL_ExchangeInstanceMethod([UIView class], @selector(setNeedsLayout), [UIView class], @selector(sl_setNeedsLayout)); + SL_ExchangeInstanceMethod([UIView class], @selector(setNeedsDisplay), [UIView class], @selector(sl_setNeedsDisplay)); + SL_ExchangeInstanceMethod([UIView class], @selector(setNeedsDisplayInRect:), [UIView class], @selector(sl_setNeedsDisplayInRect:)); + }); +} + +- (void)sl_setNeedsLayout{ + if ([self isAsynUpdateUI]) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self sl_setNeedsLayout]; + }); + }else { + [self sl_setNeedsLayout]; + } +} +- (void)sl_setNeedsDisplay{ + if ([self isAsynUpdateUI]) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self sl_setNeedsDisplay]; + }); + }else { + [self sl_setNeedsDisplay]; + } + +} +- (void)sl_setNeedsDisplayInRect:(CGRect)rect{ + if ([self isAsynUpdateUI]) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self sl_setNeedsDisplayInRect:rect]; + }); + }else { + [self sl_setNeedsDisplayInRect:rect]; + } + +} + +- (BOOL)isAsynUpdateUI{ + if(![NSThread isMainThread]){ + NSString *reason = [NSString stringWithFormat:@"异常:异步线程刷新UI"]; + SLCrashError *crashError = [SLCrashError errorWithErrorType:SLCrashErrorTypeAsynUpdateUI errorDesc:reason exception:nil callStack:[NSThread callStackSymbols]]; + [[SLCrashHandler defaultCrashHandler].delegate crashHandlerDidOutputCrashError:crashError]; + return YES; + } + return NO; +} + + +@end diff --git a/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIViewController+SLMLeakFinder.m b/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIViewController+SLMLeakFinder.m index aab78c98..fe6b4227 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIViewController+SLMLeakFinder.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashProtector/UIViewController+SLMLeakFinder.m @@ -7,6 +7,7 @@ // #import "UIViewController+SLMLeakFinder.h" +#import "SLCrashProtector.h" #import "NSObject+SLMLeakFinder.h" const void *const kSLHasBeenPoppedKey = &kSLHasBeenPoppedKey; diff --git a/iOS_Tips/DarkMode/Crash/SLCrashViewController.h b/iOS_Tips/DarkMode/Crash/SLCrashViewController.h index e32441a4..37f2d938 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashViewController.h +++ b/iOS_Tips/DarkMode/Crash/SLCrashViewController.h @@ -10,8 +10,8 @@ NS_ASSUME_NONNULL_BEGIN -//iOS Crash防护 -@interface SLCrashViewController : UIViewController +//iOS Crash防护 注意:部分防护功能还不完善,比如野指针和内存泄漏/循环引用 +@interface SLCrashViewController : SLViewController @end diff --git a/iOS_Tips/DarkMode/Crash/SLCrashViewController.m b/iOS_Tips/DarkMode/Crash/SLCrashViewController.m index e7d561f5..daee8442 100644 --- a/iOS_Tips/DarkMode/Crash/SLCrashViewController.m +++ b/iOS_Tips/DarkMode/Crash/SLCrashViewController.m @@ -7,9 +7,21 @@ // #import "SLCrashViewController.h" +#import "SLCrashProtector.h" #import "BSBacktraceLogger.h" -@interface SLCrashViewController () +/* + 参考资料: + https://www.jianshu.com/p/29051908c74b iOS Crash分析 + https://juejin.im/post/5d81fac66fb9a06af7126a44 iOS获取任意线程调用栈 + https://blog.csdn.net/jasonblog/article/details/49909209 iOS中线程Call Stack的捕获和解析(二) + https://www.jianshu.com/p/b5304d3412e4 iOS app崩溃捕获 + https://www.jianshu.com/p/8d43b4b47913 Crash产生原因 + https://developer.aliyun.com/article/499180 iOS Mach异常和signal信号 + */ +@interface SLCrashViewController () + +@property (nonatomic, strong) UITextView *textView; @property (nonatomic, copy) void(^testBlock)(void); //测试循环引用 @property (nonatomic, strong) NSMutableArray *testMArray; //测试循环引用 @@ -28,17 +40,88 @@ - (void)viewDidLoad { [super viewDidLoad]; [self setupUI]; } -- (void)dealloc { - NSLog(@"SLCrashViewController 释放"); -} #pragma mark - UI - (void)setupUI { self.navigationItem.title = @"iOS Crash防护"; - [SLCrashHandler defaultCrashHandler].crashHandlerBlock = ^(SLCrashError * _Nonnull crashError) { -// NSLog(@"%@/%@" ,crashError.errorDesc, [BSBacktraceLogger bs_backtraceOfCurrentThread]); - }; - [self testCallStack]; + self.view.backgroundColor = [UIColor whiteColor]; + + NSArray *methods = @[@"testArray", + @"testMutableArray", + @"testDictionary", + @"testMutableDictionary", + @"testString", + @"testMutableString", + @"testUnrecognizedSelector", + @"testKVO", + @"testKVC", + @"testAsynUpdateUI", + @"testWildPointer", + @"testMemoryLeak"]; + NSArray *titles = @[@"数组越界、空值", + @"可变数组越界、空值", + @"字典越界、空值", + @"可变字典越界、空值", + @"字符串越界、空值", + @"可变字符串越界、空值", + @"未实现方法", + @"KVO", + @"KVC", + @"异步刷新UI", + @"野指针", + @"内存泄漏/循环引用"]; + CGSize size = CGSizeMake(self.view.sl_width/4.0, 66); + int i = 0; + for (NSString *method in methods) { + UIButton *testBtn = [[UIButton alloc] initWithFrame:CGRectMake(i%4*size.width, SL_TopNavigationBarHeight+ i/4*size.height, size.width, size.height)]; + [testBtn setTitle:titles[i] forState:UIControlStateNormal]; + testBtn.backgroundColor = UIColor.orangeColor; + testBtn.titleLabel.numberOfLines = 0; + testBtn.titleLabel.textAlignment = NSTextAlignmentCenter; + testBtn.layer.borderColor = [UIColor blackColor].CGColor; + testBtn.layer.borderWidth = 1.0; + [testBtn addTarget:self action:NSSelectorFromString(method) forControlEvents:UIControlEventTouchUpInside]; + [self.view addSubview:testBtn]; + i++; + } + self.textView = [[UITextView alloc] initWithFrame:CGRectMake(0, SL_TopNavigationBarHeight+ i/4*size.height, self.view.sl_width, self.view.sl_height - (SL_TopNavigationBarHeight+ i/4*size.height))]; + self.textView.editable = NO; + self.textView.text = @"点击上方测试内容按钮,在此输出异常捕获结果..."; + [self.view addSubview:self.textView]; + + [SLCrashHandler defaultCrashHandler].delegate = self; + +} + +#pragma mark - SLCrashHandlerDelegate +///异常捕获回调 提供给外界实现自定义处理 ,日志上报等(注意线程安全) +- (void)crashHandlerDidOutputCrashError:(SLCrashError *)crashError { + NSString *errorInfo = [NSString stringWithFormat:@" 错误描述:%@ \n 调用栈:%@" ,crashError.errorDesc, crashError.callStackSymbol]; + + SL_DISPATCH_ON_MAIN_THREAD((^{ + [self.textView scrollsToTop]; + self.textView.text = errorInfo; + })); + ///日志写入缓存,适当时机上传后台 + NSString *logPath = [SL_CachesDir stringByAppendingFormat:@"/com.wsl2ls.CrashLog"]; + if(![[NSFileManager defaultManager] fileExistsAtPath:logPath]) { + [[NSFileManager defaultManager] createDirectoryAtPath:logPath withIntermediateDirectories:NO attributes:nil error:nil]; + } + if(![[NSFileManager defaultManager] fileExistsAtPath:[logPath stringByAppendingFormat:@"/log"]]) { + NSError *error; + [errorInfo writeToFile:[logPath stringByAppendingFormat:@"/log"] atomically:YES encoding:NSUTF8StringEncoding error:&error]; + }else { + NSFileHandle * fileHandle = [NSFileHandle fileHandleForWritingAtPath:[logPath stringByAppendingFormat:@"/log"]]; + [fileHandle seekToEndOfFile]; + [fileHandle writeData:[errorInfo dataUsingEncoding:NSUTF8StringEncoding]]; + [fileHandle closeFile]; + } + + //调试模式时,强制抛出异常,提醒开发者代码有问题 + #if DEBUG +// @throw crashError.exception; + #endif + } #pragma mark - Container Crash @@ -75,6 +158,7 @@ - (void)testMutableArray { NSMutableArray *mArray1 = [NSMutableArray arrayWithObject:nil]; NSMutableArray *mArray2 = [NSMutableArray arrayWithObject:@[nilObj]]; [mArray addObject:nilObj]; + } ///不可变字典防护 nil值 @@ -163,25 +247,49 @@ - (void)testKVC { [self setValue:@"wsl" forKeyPath:@"self.noProperty"]; } +#pragma mark - 异步刷新UI +///异步刷新UI +- (void)testAsynUpdateUI { + dispatch_async(dispatch_get_global_queue(0, 0), ^{ + UILabel* newView = [[UILabel alloc] initWithFrame:CGRectMake(0,0,150, 88)]; + newView.center = CGPointMake(self.view.sl_width/2.0, self.view.sl_height/2.0); + newView.backgroundColor = [UIColor greenColor]; + newView.text = @"异步刷新UI"; + [self.view addSubview:newView]; + [SLDelayPerform sl_startDelayPerform:^{ + [newView removeFromSuperview]; + } afterDelay:2.0]; + }); +} + #pragma mark - 野指针 ///野指针 随机性太强,不方便复现和定位问题,我们需要做的就是把随机变为必现,并且定位到对应的代码,方便查找解决 ///思路来源: https://www.jianshu.com/p/9fd4dc046046?utm_source=oschina-app - (void)testWildPointer { - //开启僵尸对象嗅探定位 + //开启僵尸对象嗅探定位 可以打开或关闭此开关看看效果就知道了 + // 目前还不完善,不推荐使用 ,仅做交流学习 [SLZombieFinder startSniffer]; + UILabel *label = [[UILabel alloc] init]; //-fno-objc-arc 记得设置此类编译方式支持MRC //testObj对象所在的内存空间已释放 [label release]; //这时新建一个示例对象,覆盖掉了野指针label所指向的内存空间,如果此时没有创建此同类,就会崩溃 - UILabel* newView = [[UILabel alloc] initWithFrame:CGRectMake(0,200,SL_kScreenWidth, 60)]; + UILabel* newView = [[UILabel alloc] initWithFrame:CGRectMake(0,SL_kScreenHeight- 60,SL_kScreenWidth, 60)]; newView.backgroundColor = [UIColor greenColor]; + newView.text = @"startSniffer开启 显示正常"; [self.view addSubview:newView]; - //向野指针label指向的内存对象发送修改颜色的消息,结果是newView接收到了,因为newView和label是同类,可以处理此消息,所以没有崩溃 + //向野指针label指向的内存对象发送修改颜色的消息,结果是newView接收到了,因为newView和label是同类,可以处理此消息,所以没有崩溃; 在不开启startSniffer时,就把newView的backgroundColor修改了,开启startSniffer后,阻断了向野指针发消息的过程 label.backgroundColor = [UIColor orangeColor]; + label.text = @"startSniffer关闭 我是野指针,显示错误"; + + + [SLDelayPerform sl_startDelayPerform:^{ + [newView removeFromSuperview]; + } afterDelay:2.0]; } @@ -190,23 +298,25 @@ - (void)testWildPointer { //思路来源:https://github.com/Tencent/MLeaksFinder.git //查找循引用连 FBRetainCycleDetector https://yq.aliyun.com/articles/66857 、 https://blog.csdn.net/majiakun1/article/details/78747226 - (void)testMemoryLeak { - self.testBlock = ^{ - self; - }; -// self.testMArray = [[NSMutableArray alloc] initWithObjects:self, nil]; + + //执行此方法后,返回上一级界面,发现SLCrashViewController对象没释放 + self.testBlock = ^{ + self; + }; + // self.testMArray = [[NSMutableArray alloc] initWithObjects:self, nil]; } -#pragma mark - 函数调用栈 +#pragma mark - 获取函数调用栈 ///获取任意线程的函数调用栈 https://toutiao.io/posts/aveig6/preview - (void)testCallStack { //打印当前线程调用栈 -// BSLOG; + BSLOG; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ - //在子线程中 打印主线程调用栈,会发现栈基本是空的,因为都已释放了 -// BSLOG_MAIN - BSLOG; + //在子线程中 打印主线程调用栈,会发现栈基本是空的,因为都已释放了 + // BSLOG_MAIN + // BSLOG; }); -// BSLOG_MAIN + // BSLOG_MAIN } @end diff --git a/iOS_Tips/DarkMode/Crash/SLCrashViewController.xib b/iOS_Tips/DarkMode/Crash/SLCrashViewController.xib deleted file mode 100644 index 48411054..00000000 --- a/iOS_Tips/DarkMode/Crash/SLCrashViewController.xib +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/iOS_Tips/DarkMode/General/.DS_Store b/iOS_Tips/DarkMode/General/.DS_Store index 205abbf8..51725728 100644 Binary files a/iOS_Tips/DarkMode/General/.DS_Store and b/iOS_Tips/DarkMode/General/.DS_Store differ diff --git a/iOS_Tips/DarkMode/General/Tool/HMLog.h b/iOS_Tips/DarkMode/General/Tool/HMLog.h new file mode 100644 index 00000000..ef1bf35f --- /dev/null +++ b/iOS_Tips/DarkMode/General/Tool/HMLog.h @@ -0,0 +1,236 @@ +// The MIT License (MIT) +// +// Copyright (c) 2020 Huimao Chen +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +// GCC_C_LANGUAGE_STANDARD = gnu99 + +#ifndef HMLog_h +#define HMLog_h + +#import + +#pragma mark - Parameters + +// All optional parameters should be defined before import "HMLog.h", or you can modify the source code + +#ifndef HMLogEnable +#define HMLogEnable 1 +#endif // HMLogEnable + +#ifndef HMPrintEnable +#define HMPrintEnable 1 +#endif // HMPrintEnable + +#ifndef HMLogPrefix +#define HMLogPrefix(index, valueString) [NSString stringWithFormat:@"%d: %s = ", index, valueString] +#endif // HMLogPrefix + +#ifndef HMLogHeaderFormatString +#define HMLogHeaderFormatString(FUNC, LINE) \ + [NSString stringWithFormat:@"================ %s [%d] ================\n", FUNC, LINE] +#endif // HMLogHeaderFormatString + +#ifndef HMLogTypeExtension +#define HMLogTypeExtension +#endif // HMLogTypeExtension + +#pragma mark - Core + +// format, private macro +#define _HMLogFormat(VAR) \ + , HMStringify(VAR), @encode(__typeof__(VAR)), (VAR) + +// HMFormatString +#define HMFormatString(...) \ + HMExpand(_HMFormatString(__func__, __LINE__, HMArgCount(__VA_ARGS__) HMForeach(_HMLogFormat, __VA_ARGS__))) + +// HMLog +#if HMLogEnable + #define HMLog(...) \ + _HMLog(HMFormatString(__VA_ARGS__)) +#else + #define HMLog(...) +#endif // HMLogEnable + +// HMPrint +#if HMPrintEnable + #define HMPrint(...) \ + _HMPrint(HMFormatString(__VA_ARGS__)) +#else + #define HMPrint(...) +#endif // HMPrintEnable + + +static inline NSString * _HMFormatString(const char *func, int line, int count, ...) { // func, line, count, [valueString, TypeEncode, value] + NSMutableString *result = [[NSMutableString alloc] init]; + + // handle header + [result appendString:HMLogHeaderFormatString(func, line)]; + + // handle arguments + va_list v; + va_start(v, count); + for (int i = 0; i < count; ++i) { + char *valueString = va_arg(v, char *); + char *type = va_arg(v, char *); + + id obj = nil; + if (strcmp(type, @encode(id)) == 0) { // "@" id + id actual = va_arg(v, id); + obj = actual; + + } else if (strcmp(type, @encode(CGPoint)) == 0) { // "{CGPoint=dd}" CGPoint + CGPoint actual = (CGPoint)va_arg(v, CGPoint); + obj = [NSValue value:&actual withObjCType:type]; + + } else if (strcmp(type, @encode(CGSize)) == 0) { // "{CGSize=dd}" CGSize + CGSize actual = (CGSize)va_arg(v, CGSize); + obj = [NSValue value:&actual withObjCType:type]; + + } else if (strcmp(type, @encode(CGRect)) == 0) { // "{CGRect={CGPoint=dd}{CGSize=dd}}" CGRect + CGRect actual = (CGRect)va_arg(v, CGRect); + obj = [NSValue value:&actual withObjCType:type]; + + } else if (strcmp(type, @encode(UIEdgeInsets)) == 0) { // "{UIEdgeInsets=dddd}" UIEdgeInsets + UIEdgeInsets actual = (UIEdgeInsets)va_arg(v, UIEdgeInsets); + obj = NSStringFromUIEdgeInsets(actual); + + } else if (strcmp(type, @encode(NSRange)) == 0) { // "{_NSRange=QQ}" NSRange + NSRange actual = (NSRange)va_arg(v, NSRange); + obj = NSStringFromRange(actual); + + } else if (strcmp(type, @encode(SEL)) == 0) { // ":" SEL + SEL actual = (SEL)va_arg(v, SEL); + obj = [NSString stringWithFormat:@"SEL: %@", NSStringFromSelector(actual)]; + + } else if (strcmp(type, @encode(Class)) == 0) { // "#" Class + Class actual = (Class)va_arg(v, Class); + obj = NSStringFromClass(actual); + + } else if (strcmp(type, @encode(char *)) == 0) { // "*" char * + char * actual = (char *)va_arg(v, char *); + obj = [NSString stringWithFormat:@"%s", actual]; + + } else if (strcmp(type, @encode(double)) == 0) { // "d" double + double actual = (double)va_arg(v, double); + obj = [NSNumber numberWithDouble:actual]; + + } else if (strcmp(type, @encode(float)) == 0) { // "f" float + float actual = (float)va_arg(v, double); + obj = [NSNumber numberWithFloat:actual]; + + } else if (strcmp(type, @encode(int)) == 0) { // "i" int + int actual = (int)va_arg(v, int); + obj = [NSNumber numberWithInt:actual]; + + } else if (strcmp(type, @encode(long)) == 0) { // "q" long + long actual = (long)va_arg(v, long); + obj = [NSNumber numberWithLong:actual]; + + } else if (strcmp(type, @encode(long long)) == 0) { // "q" long long + long long actual = (long long)va_arg(v, long long); + obj = [NSNumber numberWithLongLong:actual]; + + } else if (strcmp(type, @encode(short)) == 0) { // "s" short + short actual = (short)va_arg(v, int); + obj = [NSNumber numberWithShort:actual]; + + } else if (strcmp(type, @encode(char)) == 0) { // "c" char & BOOL(32bit) + char actual = (char)va_arg(v, int); + obj = [NSString stringWithFormat:@"%d char:%c", actual, actual]; + + } else if (strcmp(type, @encode(bool)) == 0) { // "B" bool & BOOL(64bit) + bool actual = (bool)va_arg(v, int); + obj = actual ? @"YES" : @"NO"; + + } else if (strcmp(type, @encode(unsigned char)) == 0) { // "C" unsigned char + unsigned char actual = (unsigned char)va_arg(v, unsigned int); + obj = [NSString stringWithFormat:@"%d unsigned char:%c", actual, actual]; + + } else if (strcmp(type, @encode(unsigned int)) == 0) { // "I" unsigned int + unsigned int actual = (unsigned int)va_arg(v, unsigned int); + obj = [NSNumber numberWithUnsignedInt:actual]; + + } else if (strcmp(type, @encode(unsigned long)) == 0) { // "Q" unsigned long + unsigned long actual = (unsigned long)va_arg(v, unsigned long); + obj = [NSNumber numberWithUnsignedLong:actual]; + + } else if (strcmp(type, @encode(unsigned long long)) == 0) { // "Q" unsigned long long + unsigned long long actual = (unsigned long long)va_arg(v, unsigned long long); + obj = [NSNumber numberWithUnsignedLongLong:actual]; + + } else if (strcmp(type, @encode(unsigned short)) == 0) { // "S" unsigned short + unsigned short actual = (unsigned short)va_arg(v, unsigned int); + obj = [NSNumber numberWithUnsignedShort:actual]; + + } HMLogTypeExtension else { + [result appendString:@"Error: unknown type"]; + break; + } + + [result appendFormat:@"%@%@\n", ((void)(valueString), HMLogPrefix(i, valueString)), obj]; + } + va_end(v); + + return [result copy]; +} + +static inline void _HMLog(NSString *str) { + NSLog(@"\n%@", str); +} + +static inline void _HMPrint(NSString *str) { + printf("%s\n", str.UTF8String); +} + +#pragma mark - Helper + +#define HMStringify(VALUE) _HMStringify(VALUE) +#define _HMStringify(VALUE) # VALUE + +#define HMConcat(A, B) _HMConcat(A, B) +#define _HMConcat(A, B) A ## B + +// Return the number of arguments (up to twenty) provided to the macro. +#define HMArgCount(...) _HMArgCount(A, ##__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) +#define _HMArgCount(A, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, COUNT, ...) COUNT + +// If the number of arguments is 0, return 0, otherwise return N. +#define HMArgCheck(...) _HMArgCheck(A, ##__VA_ARGS__, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, 0) +#define _HMArgCheck(A, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, OBJ, ...) OBJ + +// Each argument will be passed to the MACRO, the MACRO must be this form: MACRO(arg). Inspired by https://stackoverflow.com/questions/3136686/is-the-c99-preprocessor-turing-complete/10526117#10526117 +#define HMForeach(MACRO, ...) HMConcat(_HMForeach, HMArgCheck(__VA_ARGS__)) (MACRO, ##__VA_ARGS__) +#define _HMForeach() HMForeach +#define _HMForeach0(MACRO) +#define _HMForeachN(MACRO, A, ...) MACRO(A) HMDefer(_HMForeach)() (MACRO, ##__VA_ARGS__) + +#define HMEmpty() +#define HMDefer(ID) ID HMEmpty() + +// For more scans +#define HMExpand(...) _HMExpand1(_HMExpand1(_HMExpand1(__VA_ARGS__))) +#define _HMExpand1(...) _HMExpand2(_HMExpand2(_HMExpand2(__VA_ARGS__))) +#define _HMExpand2(...) _HMExpand3(_HMExpand3(_HMExpand3(__VA_ARGS__))) +#define _HMExpand3(...) __VA_ARGS__ + + +#endif // HMLog_h diff --git a/iOS_Tips/DarkMode/General/Tool/PrefixHeader.pch b/iOS_Tips/DarkMode/General/Tool/PrefixHeader.pch index cde07ac1..b2851d91 100644 --- a/iOS_Tips/DarkMode/General/Tool/PrefixHeader.pch +++ b/iOS_Tips/DarkMode/General/Tool/PrefixHeader.pch @@ -17,130 +17,18 @@ #ifdef __OBJC__ // 只被object-c文件所引用 -// 这个定义全工程都可以调用,不用重复引入 - -///我的联系方式 -#define SL_JianShuUrl @"https://www.jianshu.com/u/e15d1f644bea" -#define SL_GithubUrl @"https://github.com/wsl2ls/iOS_Tips.git" -#define SL_WeChat @"iOS2679114653" -#define SL_QQGroup @"835303405" -#define SL_WeiBo @"https://weibo.com/5732733120/profile?rightmod=1&wvr=6&mod=personinfo&is_all=1" -#define SL_CSDN @"https://blog.csdn.net/wsl2ls" -#define SL_JueJin @"https://juejin.im/user/5c00d97b6fb9a049fb436288" -#define SL_Blog @"https://wsl2ls.github.io" -//【腾讯文档】2020_慕课网/极客/腾讯课堂等课程资源:https://docs.qq.com/doc/DS1lhWkhPc2xEamx5 - -//---------------------- About UI/Device ---------------------------- -#define iPhone4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO) -#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO) -#define iPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO) -#define iPhone6Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO) -#define iPhone6PlusScale ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2001), [[UIScreen mainScreen] currentMode].size) : NO) -#define iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO) -#define iPhoneXR ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size) : NO) -#define iPhoneXM ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size) : NO) - -#define SL_SafeAreaEnable ((iPhoneX || iPhoneXR || iPhoneXM) ? YES : NO) - -#define SL_TopSafeAreaHeight (SL_SafeAreaEnable ? 44.f : 20.f) -#define SL_TopNavigationBarHeight (SL_SafeAreaEnable ? 88.f : 64.f) -#define SL_BottomTabbarHeight (SL_SafeAreaEnable ? (49.f + 34.f) : (49.f)) -#define SL_BottomSafeAreaHeight (SL_SafeAreaEnable ? (34.f) : (0.f)) - -/// 屏幕宽高 -#define SL_kScreenWidth [UIScreen mainScreen].bounds.size.width -#define SL_kScreenHeight [UIScreen mainScreen].bounds.size.height - -/** 判断是否为iPhone */ -#define isiPhone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) -/** 判断是否是iPad */ -#define isiPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) -/** 判断是否为iPod */ -#define isiPod ([[[UIDevice currentDevice] model] isEqualToString:@"iPod touch"]) - -//Get the OS version. 判断操作系统版本 -#define SL_IOSVERSION [[[UIDevice currentDevice] systemVersion] floatValue] -#define SL_CurrentSystemVersion ([[UIDevice currentDevice] systemVersion]) -#define SL_CurrentLanguage ([[NSLocale preferredLanguages] objectAtIndex:0]) - -//judge the simulator or hardware device 判断是真机还是模拟器 -#if TARGET_OS_IPHONE -//iPhone Device -#endif -#if TARGET_IPHONE_SIMULATOR -//iPhone Simulator -#endif - - -//---------------------- About Helper 辅助方法 ---------------------------- -/// 弱引用对象 -#define SL_WeakSelf __weak typeof(self) weakSelf = self; - -///主线程操作 -#define SL_DISPATCH_ON_MAIN_THREAD(mainQueueBlock) dispatch_async(dispatch_get_main_queue(),mainQueueBlock); -#define SL_GCDWithGlobal(block) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block) -#define sl_GCDWithMain(block) dispatch_async(dispatch_get_main_queue(),block) - -///NSUserDefaults 存储 -#define SL_UserDefaultSetObjectForKey(__VALUE__,__KEY__) \ -{\ -[[NSUserDefaults standardUserDefaults] setObject:__VALUE__ forKey:__KEY__];\ -[[NSUserDefaults standardUserDefaults] synchronize];\ -} -///NSUserDefaults 获得存储的对象 -#define SL_UserDefaultObjectForKey(__KEY__) [[NSUserDefaults standardUserDefaults] objectForKey:__KEY__] -///NSUserDefaults 删除对象 -#define SL_UserDefaultRemoveObjectForKey(__KEY__) \ -{\ -[[NSUserDefaults standardUserDefaults] removeObjectForKey:__KEY__];\ -[[NSUserDefaults standardUserDefaults] synchronize];\ -} - -/** 快速查询一段代码的执行时间 */ -/** 用法 - TICK - do your work here - TOCK - */ -#define TICK NSDate *startTime = [NSDate date]; -#define TOCK NSLog(@"Time:%f", -[startTime timeIntervalSinceNow]); - -//---------------------- About Color 颜色 ---------------------------- -/// 随机颜色 -#define SL_UIColorFromRandomColor [UIColor colorWithRed:arc4random()%255/255.0 green:arc4random()%255/255.0 blue:arc4random()%255/255.0 alpha:1.0] -/// rgb颜色 -#define SL_UIColorFromRGB(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)] -/// 16进制 颜色 -#define SL_UIColorFromHex(rgbValue, a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:(a)] - -//---------------------- About Log 打印日志 ---------------------------- -/// 打印 -#ifdef DEBUG -# define NSLog(fmt, ...) NSLog((fmt), ##__VA_ARGS__); -# define SL_Log(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); -#define SL_NSLog(...) printf("%f %s %ld :%s\n",[[NSDate date]timeIntervalSince1970],strrchr(__FILE__,'/'),[[NSNumber numberWithInt:__LINE__] integerValue],[[NSString stringWithFormat:__VA_ARGS__]UTF8String]); -#else -# define NSLog(fmt, ...) -# define SL_Log(...) -# define SL_NSLog(...) -#endif - -//---------------------- About Shader 着色器 ---------------------------- -//#x 将参数x字符串化 -#define STRINGIZE(x) #x -#define STRINGIZE2(x) STRINGIZE(x) -#define Shader_String(text) @ STRINGIZE2(text) +#import "SLToolMacro.h" #import "UIView+SLFrame.h" #import "SLDelayPerform.h" #import "SLAlertView.h" #import "Masonry.h" -#import "SLCrashProtector.h" #import "SLMethod.h" +#import "SLViewController.h" -#endif +#endif #endif /* PrefixHeader_pch */ diff --git a/iOS_Tips/DarkMode/General/Tool/SLKeyChain.h b/iOS_Tips/DarkMode/General/Tool/SLKeyChain.h new file mode 100644 index 00000000..fafe9f4b --- /dev/null +++ b/iOS_Tips/DarkMode/General/Tool/SLKeyChain.h @@ -0,0 +1,40 @@ +// +// SLKeyChain.h +// DarkMode +// +// Created by wsl on 2020/6/15. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXTERN NSString* const SLkeychainService; + +///存储管理用户账号和密码到钥匙串 +@interface SLKeyChain : NSObject + +/// 保存用户信息到钥匙串中 +/// @param service 存储服务的key,一个service可以存储多个account/password键值对 +/// @param account 账号 +/// @param password 密码 ++ (NSError *)saveKeychainWithService:(NSString *)service + account:(NSString *)account + password:(NSString *)password; +///从钥匙串中删除这条用户信息 ++ (NSError *)deleteWithService:(NSString *)service + account:(NSString *)account; + +///查询用户信息 查到的结果存在NSError中 ++ (NSError *)queryKeychainWithService:(NSString *)service + account:(NSString *)account; + +///更新钥匙串中的用户名和密码 ++ (NSError *)updateKeychainWithService:(NSString *)service + account:(NSString *)account + password:(NSString *)password; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/General/Tool/SLKeyChain.m b/iOS_Tips/DarkMode/General/Tool/SLKeyChain.m new file mode 100644 index 00000000..d3cd1acf --- /dev/null +++ b/iOS_Tips/DarkMode/General/Tool/SLKeyChain.m @@ -0,0 +1,141 @@ +// +// SLKeyChain.m +// DarkMode +// +// Created by wsl on 2020/6/15. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLKeyChain.h" +#import +#import + +NSString* const SLkeychainService = @"com.wsl.ios.keychain"; +static NSString* const keychainErrorDomain = @"com.wsl.ios.keychain.errorDomain"; +static NSInteger const kErrorCodeKeychainSomeArgumentsInvalid = 1000; //! 传入的部分参数无效 + +@implementation SLKeyChain + +///更新钥匙串中的用户名和密码 ++ (NSError *)updateKeychainWithService:(NSString *)service account:(NSString *)account password:(NSString *)password { + + if (!account || !password || !service) { + NSError *error = [self errorWithErrorCode:kErrorCodeKeychainSomeArgumentsInvalid]; + return error; + } + NSDictionary *queryItems = @{(id)kSecClass: (id)kSecClassGenericPassword, + (id)kSecAttrService: service, + (id)kSecAttrAccount: account + }; + NSData *passwordData = [password dataUsingEncoding:NSUTF8StringEncoding]; + NSDictionary *updatedItems = @{ + (id)kSecValueData: passwordData, + }; + OSStatus updateStatus = SecItemUpdate((CFDictionaryRef)queryItems, (CFDictionaryRef)updatedItems); + return [self errorWithErrorCode:updateStatus]; +} +///删除用户信息 ++ (NSError *)deleteWithService:(NSString *)service account:(NSString *)account { + + if (!service || !account) { + return [self errorWithErrorCode:kErrorCodeKeychainSomeArgumentsInvalid]; + } + NSDictionary *deleteSecItems = @{ + (id)kSecClass: (id)kSecClassGenericPassword, + (id)kSecAttrService: service, + (id)kSecAttrAccount: account + }; + OSStatus errorCode = SecItemDelete((CFDictionaryRef)deleteSecItems); + return [self errorWithErrorCode:errorCode]; +} +///查询用户信息 查到的结果存在NSError中 ++ (NSError *)queryKeychainWithService:(NSString *)service account:(NSString *)account { + + if (!service || !account) { + return [self errorWithErrorCode:kErrorCodeKeychainSomeArgumentsInvalid]; + } + NSDictionary *matchSecItems = @{ + (id)kSecClass: (id)kSecClassGenericPassword, + (id)kSecAttrService: service, + (id)kSecAttrAccount: account, + (id)kSecMatchLimit: (id)kSecMatchLimitOne, + (id)kSecReturnData: @(YES) + }; + CFTypeRef dataRef = nil; + OSStatus errorCode = SecItemCopyMatching((CFDictionaryRef)matchSecItems, (CFTypeRef *)&dataRef); + if (errorCode == errSecSuccess) { + NSString *password = [[NSString alloc] initWithData:CFBridgingRelease(dataRef) encoding:NSUTF8StringEncoding]; + return [self errorWithErrorCode:errSecSuccess errorMessage:password]; + } + return [self errorWithErrorCode:errorCode]; +} +///保存用户信息 ++ (NSError *)saveKeychainWithService:(NSString *)service account:(NSString *)account password:(NSString *)password { + + if (!account || !password || !service) { + NSError *error = [self errorWithErrorCode:kErrorCodeKeychainSomeArgumentsInvalid]; + return error; + } + + NSError *queryError = [self queryKeychainWithService:service account:account]; + if (queryError.code == errSecSuccess) { + // update + return [self updateKeychainWithService:service account:account password:password]; + } + + NSData *passwordData = [password dataUsingEncoding:NSUTF8StringEncoding]; + // save + NSDictionary *saveSecItems = @{(id)kSecClass: (id)kSecClassGenericPassword, + (id)kSecAttrService: service, + (id)kSecAttrAccount: account, + (id)kSecValueData: passwordData + }; + OSStatus saveStatus = SecItemAdd((CFDictionaryRef)saveSecItems, NULL); + return [self errorWithErrorCode:saveStatus]; +} +///错误信息 ++ (NSError *)errorWithErrorCode:(OSStatus)errorCode { + + NSString *errorMsg = nil; + + switch (errorCode) { + case errSecSuccess: { + NSLog(@"操作成功"); + return nil; + break; + } + case kErrorCodeKeychainSomeArgumentsInvalid: + errorMsg = NSLocalizedString(@"参数无效", nil); + break; + case errSecDuplicateItem: // -25299 + errorMsg = NSLocalizedString(@"The specified item already exists in the keychain. ", nil); + break; + case errSecItemNotFound: // -25300 + errorMsg = NSLocalizedString(@"The specified item could not be found in the keychain. ", nil); + break; + default: { + if (@available(iOS 11.3, *)) { + errorMsg = (__bridge_transfer NSString *)SecCopyErrorMessageString(errorCode, NULL); + } + break; + } + } + NSDictionary *errorUserInfo = nil; + if (errorMsg) { + errorUserInfo = @{NSLocalizedDescriptionKey: errorMsg}; + NSLog(@"%s--Line:%d--错误码:%d--错误信息:%@", __FUNCTION__, __LINE__, errorCode, errorMsg); + } + return [NSError errorWithDomain:keychainErrorDomain code:kErrorCodeKeychainSomeArgumentsInvalid userInfo:errorUserInfo]; +} + ++ (NSError *)errorWithErrorCode:(OSStatus)errCode errorMessage:(NSString *)errorMsg { + + if (errCode == errSecSuccess && errorMsg) { + NSLog(@"操作成功"); + return [NSError errorWithDomain:keychainErrorDomain code:errSecSuccess userInfo:@{NSLocalizedDescriptionKey: errorMsg}]; + } else { + return [self errorWithErrorCode:errCode]; + } +} + +@end diff --git a/iOS_Tips/DarkMode/General/Tool/SLMethod.h b/iOS_Tips/DarkMode/General/Tool/SLMethod.h index bae8385b..616e0520 100644 --- a/iOS_Tips/DarkMode/General/Tool/SLMethod.h +++ b/iOS_Tips/DarkMode/General/Tool/SLMethod.h @@ -54,6 +54,7 @@ static NSString * const SLUserDefaultsKey = @"SLUserDefaultsKey"; @return 返回属性字符串的size */ + (CGSize)sizeFromAttributedText:(NSAttributedString *)attributedText maxSize:(CGSize)maxSize; + /// 切四个不同半径圆角的函数 /// @param bounds 区域 /// @param cornerRadii 四个圆角的半径 diff --git a/iOS_Tips/DarkMode/General/Tool/SLProxy.h b/iOS_Tips/DarkMode/General/Tool/SLProxy.h new file mode 100644 index 00000000..860ace99 --- /dev/null +++ b/iOS_Tips/DarkMode/General/Tool/SLProxy.h @@ -0,0 +1,19 @@ +// +// SLProxy.h +// DarkMode +// +// Created by wsl on 2020/7/14. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +///消息转发中介 主要解决NSTimer、CADisplayLink等循环引用问题 +@interface SLProxy : NSProxy +///初始化方法 ++ (instancetype)proxyWithTarget:(id)target; +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/General/Tool/SLProxy.m b/iOS_Tips/DarkMode/General/Tool/SLProxy.m new file mode 100644 index 00000000..51e76a17 --- /dev/null +++ b/iOS_Tips/DarkMode/General/Tool/SLProxy.m @@ -0,0 +1,68 @@ +// +// SLProxy.m +// DarkMode +// +// Created by wsl on 2020/7/14. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLProxy.h" + +@interface SLProxy () +///转发对象目标 +@property (nullable, nonatomic, weak, readonly) id target; +@end +@implementation SLProxy ++ (instancetype)proxyWithTarget:(id)target { + return [[SLProxy alloc] initWithTarget:target]; +} +- (instancetype)initWithTarget:(id)target { + _target = target; + return self; +} +//将消息接收对象改为 _target +- (id)forwardingTargetForSelector:(SEL)selector { + return _target; +} +//self 对 target 是弱引用,一旦 target 被释放将调用下面两个方法,如果不实现的话会 crash +- (void)forwardInvocation:(NSInvocation *)invocation { + void *null = NULL; + [invocation setReturnValue:&null]; +} +- (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { + return [NSObject instanceMethodSignatureForSelector:@selector(init)]; +} +- (BOOL)respondsToSelector:(SEL)aSelector { + return [_target respondsToSelector:aSelector]; +} +- (BOOL)isEqual:(id)object { + return [_target isEqual:object]; +} +- (NSUInteger)hash { + return [_target hash]; +} +- (Class)superclass { + return [_target superclass]; +} +- (Class)class { + return [_target class]; +} +- (BOOL)isKindOfClass:(Class)aClass { + return [_target isKindOfClass:aClass]; +} +- (BOOL)isMemberOfClass:(Class)aClass { + return [_target isMemberOfClass:aClass]; +} +- (BOOL)conformsToProtocol:(Protocol *)aProtocol { + return [_target conformsToProtocol:aProtocol]; +} +- (BOOL)isProxy { + return YES; +} +- (NSString *)description { + return [_target description]; +} +- (NSString *)debugDescription { + return [_target debugDescription]; +} +@end diff --git a/iOS_Tips/DarkMode/General/Tool/SLTimer.h b/iOS_Tips/DarkMode/General/Tool/SLTimer.h new file mode 100644 index 00000000..3026c295 --- /dev/null +++ b/iOS_Tips/DarkMode/General/Tool/SLTimer.h @@ -0,0 +1,44 @@ +// +// SLTimer.h +// +// Created by wsl on 2020/6/15. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + + +#import + +///计时器 比NSTimer和CADisplayLink计时准确 +@interface SLTimer : NSObject + +/// 执行任务 返回任务名称 +/// @param task 任务Block +/// @param start 开始时间 +/// @param interval 时间间隔 +/// @param repeats 是否重复 +/// @param async 是否异步 ++ (NSString *)execTask:(void(^)(void))task + start:(NSTimeInterval)start + interval:(NSTimeInterval)interval + repeats:(BOOL)repeats + async:(BOOL)async; + +/// 执行任务 返回任务名称 +/// @param target 选择器执行者 +/// @param selector 选择器 +/// @param start 开始时间 +/// @param interval 时间间隔 +/// @param repeats 是否重复 +/// @param async 是否异步 ++ (NSString *)execTask:(id)target + selector:(SEL)selector + start:(NSTimeInterval)start + interval:(NSTimeInterval)interval + repeats:(BOOL)repeats + async:(BOOL)async; + +/// 取消任务 +/// @param taskName 任务名称 ++ (void)cancelTask:(NSString *)taskName; + +@end diff --git a/iOS_Tips/DarkMode/General/Tool/SLTimer.m b/iOS_Tips/DarkMode/General/Tool/SLTimer.m new file mode 100644 index 00000000..449dfeaa --- /dev/null +++ b/iOS_Tips/DarkMode/General/Tool/SLTimer.m @@ -0,0 +1,90 @@ +// +// SLTimer.m +// +// Created by wsl on 2020/6/15. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLTimer.h" + +@implementation SLTimer + +static NSMutableDictionary *timers_; +dispatch_semaphore_t semaphore_; ++ (void)initialize +{ + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + timers_ = [NSMutableDictionary dictionary]; + semaphore_ = dispatch_semaphore_create(1); + }); +} + ++ (NSString *)execTask:(void (^)(void))task start:(NSTimeInterval)start interval:(NSTimeInterval)interval repeats:(BOOL)repeats async:(BOOL)async +{ + if (!task || start < 0 || (interval <= 0 && repeats)) return nil; + + // 队列 + dispatch_queue_t queue = async ? dispatch_get_global_queue(0, 0) : dispatch_get_main_queue(); + + // 创建定时器 + dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue); + + // 设置时间 + dispatch_source_set_timer(timer, + dispatch_time(DISPATCH_TIME_NOW, start * NSEC_PER_SEC), + interval * NSEC_PER_SEC, 0); + + + dispatch_semaphore_wait(semaphore_, DISPATCH_TIME_FOREVER); + // 定时器的唯一标识 + NSString *name = [NSString stringWithFormat:@"%zd", timers_.count]; + // 存放到字典中 + timers_[name] = timer; + dispatch_semaphore_signal(semaphore_); + + // 设置回调 + dispatch_source_set_event_handler(timer, ^{ + task(); + + if (!repeats) { // 不重复的任务 + [self cancelTask:name]; + } + }); + + // 启动定时器 + dispatch_resume(timer); + + return name; +} + ++ (NSString *)execTask:(id)target selector:(SEL)selector start:(NSTimeInterval)start interval:(NSTimeInterval)interval repeats:(BOOL)repeats async:(BOOL)async +{ + if (!target || !selector) return nil; + + return [self execTask:^{ + if ([target respondsToSelector:selector]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + [target performSelector:selector]; +#pragma clang diagnostic pop + } + } start:start interval:interval repeats:repeats async:async]; +} + ++ (void)cancelTask:(NSString *)taskName; +{ + if (taskName.length == 0) return; + + dispatch_semaphore_wait(semaphore_, DISPATCH_TIME_FOREVER); + + dispatch_source_t timer = timers_[taskName]; + if (timer) { + dispatch_source_cancel(timer); + [timers_ removeObjectForKey:taskName]; + } + + dispatch_semaphore_signal(semaphore_); +} + +@end diff --git a/iOS_Tips/DarkMode/General/Tool/SLToolMacro.h b/iOS_Tips/DarkMode/General/Tool/SLToolMacro.h new file mode 100644 index 00000000..aea11776 --- /dev/null +++ b/iOS_Tips/DarkMode/General/Tool/SLToolMacro.h @@ -0,0 +1,149 @@ +// +// SLToolMacro.h +// DarkMode +// +// Created by wsl on 2020/8/13. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#ifndef SLToolMacro_h +#define SLToolMacro_h + +#pragma mark - Call Me +///我的联系方式 +#define SL_JianShuUrl @"https://www.jianshu.com/u/e15d1f644bea" +#define SL_GithubUrl @"https://github.com/wsl2ls/iOS_Tips.git" +#define SL_WeChat @"iOS2679114653" +#define SL_QQGroup @"835303405" +#define SL_WeiBo @"https://weibo.com/5732733120/profile?rightmod=1&wvr=6&mod=personinfo&is_all=1" +#define SL_CSDN @"https://blog.csdn.net/wsl2ls" +#define SL_JueJin @"https://juejin.im/user/5c00d97b6fb9a049fb436288" +#define SL_Blog @"https://wsl2ls.github.io" +//【腾讯文档】2020_慕课网/极客/腾讯课堂等课程资源:https://docs.qq.com/doc/DS1lhWkhPc2xEamx5 + +#pragma mark - About UI/Device +//---------------------- About UI/Device ---------------------------- +#define iPhone4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO) +#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO) +#define iPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO) +#define iPhone6Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO) +#define iPhone6PlusScale ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2001), [[UIScreen mainScreen] currentMode].size) : NO) +#define iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO) +#define iPhoneXR ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size) : NO) +#define iPhoneXM ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size) : NO) + +#define SL_SafeAreaEnable ((iPhoneX || iPhoneXR || iPhoneXM) ? YES : NO) + +#define SL_TopSafeAreaHeight (SL_SafeAreaEnable ? 44.f : 20.f) +#define SL_TopNavigationBarHeight (SL_SafeAreaEnable ? 88.f : 64.f) +#define SL_BottomTabbarHeight (SL_SafeAreaEnable ? (49.f + 34.f) : (49.f)) +#define SL_BottomSafeAreaHeight (SL_SafeAreaEnable ? (34.f) : (0.f)) + +/// 屏幕宽高 +#define SL_kScreenWidth [UIScreen mainScreen].bounds.size.width +#define SL_kScreenHeight [UIScreen mainScreen].bounds.size.height + +/** 判断是否为iPhone */ +#define isiPhone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) +/** 判断是否是iPad */ +#define isiPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) +/** 判断是否为iPod */ +#define isiPod ([[[UIDevice currentDevice] model] isEqualToString:@"iPod touch"]) + +//Get the OS version. 判断操作系统版本 +#define SL_IOSVERSION [[[UIDevice currentDevice] systemVersion] floatValue] +#define SL_CurrentSystemVersion ([[UIDevice currentDevice] systemVersion]) +#define SL_CurrentLanguage ([[NSLocale preferredLanguages] objectAtIndex:0]) + +//judge the simulator or hardware device 判断是真机还是模拟器 +#if TARGET_OS_IPHONE +//iPhone Device +#endif +#if TARGET_IPHONE_SIMULATOR +//iPhone Simulator +#endif + +#pragma mark - About Helper 辅助方法 +//---------------------- About Helper 辅助方法 ---------------------------- +/// 弱引用对象 +#define SL_WeakSelf __weak typeof(self) weakSelf = self; + +///主线程操作 +#define SL_DISPATCH_ON_MAIN_THREAD(mainQueueBlock) dispatch_async(dispatch_get_main_queue(),mainQueueBlock); +#define SL_GCDWithGlobal(block) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block) +#define sl_GCDWithMain(block) dispatch_async(dispatch_get_main_queue(),block) + +///NSUserDefaults 存储 +#define SL_UserDefaultSetObjectForKey(__VALUE__,__KEY__) \ +{\ +[[NSUserDefaults standardUserDefaults] setObject:__VALUE__ forKey:__KEY__];\ +[[NSUserDefaults standardUserDefaults] synchronize];\ +} +///NSUserDefaults 获得存储的对象 +#define SL_UserDefaultObjectForKey(__KEY__) [[NSUserDefaults standardUserDefaults] objectForKey:__KEY__] +///NSUserDefaults 删除对象 +#define SL_UserDefaultRemoveObjectForKey(__KEY__) \ +{\ +[[NSUserDefaults standardUserDefaults] removeObjectForKey:__KEY__];\ +[[NSUserDefaults standardUserDefaults] synchronize];\ +} + +/** 快速查询一段代码的执行时间 */ +/** 用法 + SL_StartTime + do your work here + SL_EndDuration + */ +#define SL_StartTime NSDate *startTime = [NSDate date] +#define SL_EndDuration -[startTime timeIntervalSinceNow] + +// STRING容错机制 +#define SL_IS_NULL(x) (!x || [x isKindOfClass:[NSNull class]]) +#define SL_IS_EMPTY_STRING(x) (SL_IS_NULL(x) || [x isEqual:@""] || [x isEqual:@"(null)"]) +#define SL_DEFUSE_EMPTY_STRING(x) (!SL_IS_EMPTY_STRING(x) ? x : @"") + + +//沙河目录 +///获取沙盒主目录路径 +#define SL_HomeDir NSHomeDirectory(); +/// 获取Documents目录路径 +#define SL_DocumentDir [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject] +/// 获取Library的目录路径 +#define SL_LibraryDir [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject] +/// 获取Caches目录路径 +#define SL_CachesDir [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject] +/// 获取tmp目录路径 +#define SL_TmpDir NSTemporaryDirectory() + +#pragma mark - About Color 颜色 +//---------------------- About Color 颜色 ---------------------------- +/// 随机颜色 +#define SL_UIColorFromRandomColor [UIColor colorWithRed:arc4random()%255/255.0 green:arc4random()%255/255.0 blue:arc4random()%255/255.0 alpha:1.0] +/// rgb颜色 +#define SL_UIColorFromRGB(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)] +/// 16进制 颜色 +#define SL_UIColorFromHex(rgbValue, a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:(a)] + +#pragma mark - About Log 打印日志 +//---------------------- About Log 打印日志 ---------------------------- +/// 打印 +#ifdef DEBUG +# define NSLog(fmt, ...) NSLog((fmt), ##__VA_ARGS__); +# define SL_Log(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); +#define SL_NSLog(...) printf("%f %s %ld :%s\n",[[NSDate date]timeIntervalSince1970],strrchr(__FILE__,'/'),[[NSNumber numberWithInt:__LINE__] integerValue],[[NSString stringWithFormat:__VA_ARGS__]UTF8String]); +#else +# define NSLog(fmt, ...) +# define SL_Log(...) +# define SL_NSLog(...) +#endif + +//---------------------- About Shader 着色器 ---------------------------- +//#x 将参数x字符串化 +#define STRINGIZE(x) #x +#define STRINGIZE2(x) STRINGIZE(x) +#define Shader_String(text) @ STRINGIZE2(text) + + + + +#endif /* SLToolMacro_h */ diff --git a/iOS_Tips/DarkMode/General/Tool/SLViewController.h b/iOS_Tips/DarkMode/General/Tool/SLViewController.h new file mode 100644 index 00000000..a50b2d0e --- /dev/null +++ b/iOS_Tips/DarkMode/General/Tool/SLViewController.h @@ -0,0 +1,17 @@ +// +// SLViewController.h +// DarkMode +// +// Created by wsl on 2020/6/12. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface SLViewController : UIViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/General/Tool/SLViewController.m b/iOS_Tips/DarkMode/General/Tool/SLViewController.m new file mode 100644 index 00000000..a5a63efe --- /dev/null +++ b/iOS_Tips/DarkMode/General/Tool/SLViewController.m @@ -0,0 +1,19 @@ +// +// SLViewController.m +// DarkMode +// +// Created by wsl on 2020/6/12. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLViewController.h" + +@interface SLViewController () + +@end + +@implementation SLViewController +- (void)dealloc { + NSLog(@"%@释放了",NSStringFromClass(self.class)); +} +@end diff --git a/iOS_Tips/DarkMode/Info.plist b/iOS_Tips/DarkMode/Info.plist index c37014be..02e052e3 100644 --- a/iOS_Tips/DarkMode/Info.plist +++ b/iOS_Tips/DarkMode/Info.plist @@ -38,19 +38,51 @@ LSRequiresIPhoneOS + NFCReaderUsageDescription + 访问NFC NSAppTransportSecurity NSAllowsArbitraryLoads + NSAppleMusicUsageDescription + 访问媒体资料库 + NSBluetoothPeripheralUsageDescription + 访问蓝牙 + NSCalendarsUsageDescription + 访问日历 NSCameraUsageDescription - 此功能需要获取你的相机权限 + 获取相机权限 + NSContactsUsageDescription + 访问通讯录 + NSFaceIDUsageDescription + 访问Face ID + NSHealthShareUsageDescription + 访问健康分享 + NSHealthUpdateUsageDescription + 访问健康更新 + NSHomeKitUsageDescription + 访问住宅配件 + NSLocationAlwaysUsageDescription + 始终访问位置 + NSLocationWhenInUseUsageDescription + 在使用期间访问位置 NSMicrophoneUsageDescription - 此功能需要你的麦克风权限 + 获取你的麦克风权限 + NSMotionUsageDescription + 访问运动与健身 NSPhotoLibraryAddUsageDescription - 此功能需要获取你的相册权限 + 保存到相册需要获取你的相册权限 NSPhotoLibraryUsageDescription - 此功能需要获取你的相册权限 + 相册浏览需要获取你的相册权限 + NSRemindersUsageDescription + 访问提醒事项 + NSSiriUsageDescription + 使用Siri功能 + NSSpeechRecognitionUsageDescription + 使用语音识别功能 + NSVideoSubscriberAccountUsageDescription + 访问电视提供商 UIApplicationSceneManifest UIApplicationSupportsMultipleScenes diff --git a/iOS_Tips/DarkMode/OpenGL/.DS_Store b/iOS_Tips/DarkMode/OpenGL/.DS_Store index 66924419..7d1ef824 100644 Binary files a/iOS_Tips/DarkMode/OpenGL/.DS_Store and b/iOS_Tips/DarkMode/OpenGL/.DS_Store differ diff --git a/iOS_Tips/DarkMode/OpenGL/Controller/SLOpenGLController.m b/iOS_Tips/DarkMode/OpenGL/Controller/SLOpenGLController.m index bc266f93..52886a3a 100644 --- a/iOS_Tips/DarkMode/OpenGL/Controller/SLOpenGLController.m +++ b/iOS_Tips/DarkMode/OpenGL/Controller/SLOpenGLController.m @@ -47,8 +47,23 @@ - (void)setupUI { #pragma mark - Data - (void)getData { //tableView、UIAlertView等系统控件,在不自定义颜色的情况下,默认颜色都是动态的,支持暗黑模式 - [self.dataSource addObjectsFromArray:@[@" GLKit 加载图片", @" GLKit 绘制正方体", @" GLKit 颜色和纹理混合金字塔",@" OpenGL ShaderLanguage(GLSL) 加载图片", @" GLSL 绘制金字塔", @" GLSL 颜色和纹理混合", @" GLSL 分屏特效", @" GLSL 滤镜集合", @"GLSL 抖音部分特效集合"]]; - [self.classArray addObjectsFromArray:@[[SLLoadImageVC class], [SLCubeViewController class], [SLGLKPyramidVC class], [SLShaderLanguageViewController class], [SLShaderCubeViewController class], [SLMixColorTextureVC class], [SLSplitScreenViewController class], [SLShaderFilterViewController class], [SLSpecialEffectsViewController class]]]; + [self.dataSource addObjectsFromArray:@[@" GLKit 加载图片", + @" GLKit 绘制正方体", + @" GLKit 颜色和纹理混合金字塔", + @" OpenGL ShaderLanguage(GLSL) 加载图片", + @" GLSL 绘制金字塔", @" GLSL 颜色和纹理混合", + @" GLSL 分屏特效", + @" GLSL 滤镜集合", + @"GLSL 抖音部分特效集合"]]; + [self.classArray addObjectsFromArray:@[[SLLoadImageVC class], + [SLCubeViewController class], + [SLGLKPyramidVC class], + [SLShaderLanguageViewController class], + [SLShaderCubeViewController class], + [SLMixColorTextureVC class], + [SLSplitScreenViewController class], + [SLShaderFilterViewController class], + [SLSpecialEffectsViewController class]]]; [self.tableView reloadData]; } #pragma mark - Getter diff --git a/iOS_Tips/DarkMode/OpenGL/Controller/SLShaderLanguageViewController.m b/iOS_Tips/DarkMode/OpenGL/Controller/SLShaderLanguageViewController.m index 3f46c8b4..7e8f5769 100644 --- a/iOS_Tips/DarkMode/OpenGL/Controller/SLShaderLanguageViewController.m +++ b/iOS_Tips/DarkMode/OpenGL/Controller/SLShaderLanguageViewController.m @@ -21,8 +21,8 @@ OpenGL ES 3种变量修饰符(varying, attribute, uniform) https://blog.csdn.net/hgl868/article/details/7846269 uniform: 由外部客户端传入,由函数glUniform** 提供赋值功能,类似于const, 被uniform 修饰变量在顶点/片元着色器中 只能用,不能修改 一般用来修饰矩阵 - attribute:只能在顶点着色器出现 - varying:中间传递,顶点和片元着色器之间传递数据 + attribute:只能在顶点着色器出现, + varying:中间传递,由顶点着色器传向片元着色器的数据变量 lowp, mediump和highp:精度修饰符声明了底层实现存储这些变量必须要使用的最小范围和精度。实现可能会使用比要求更大的范围和精度,但绝对不会比要求少。 @@ -325,7 +325,7 @@ -(void)renderLayer { //10.加载纹理 [self setupTexture]; - //11. 设置纹理采样器 sampler2D 纹理单元GL_TEXTURE0 - GL_TEXTURE15 总共有16个纹理单元 + //11. 设置纹理采样器sampler2D 纹理单元GL_TEXTURE0 - GL_TEXTURE15 总共有16个纹理单元 glUniform1i(glGetUniformLocation(self.myPrograme, "colorMap"), 0); //12.不使用索引数组 绘图 从第0个顶点开始,共六个顶点 @@ -424,7 +424,7 @@ - (GLuint)setupTexture{ //7、画图完毕就释放上下文 CGContextRelease(spriteContext); - //8、绑定纹理到默认的纹理ID( + //8、绑定纹理到默认的纹理ID: 0( glBindTexture(GL_TEXTURE_2D, 0); //9.设置纹理属性 diff --git a/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/shaderf.fsh b/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/shaderf.fsh index 636fc5d6..b411d604 100644 --- a/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/shaderf.fsh +++ b/iOS_Tips/DarkMode/OpenGL/ShaderLanguage/shaderf.fsh @@ -7,4 +7,6 @@ void main() } -// 后缀.vsh和.fsh 是可以自定义的,只是为了区分和管理顶点着色器和片元着色器,也可以用字符串存储 +// 后缀.vsh(顶点着色器)和.fsh(片元着色器) 是可以自定义的,只是为了区分和管理顶点着色器和片元着色器,也可以用字符串存储 +// colorMap 采样器 +// varyTextCoord 纹理坐标 由顶点着色器传入,必须和.vsh(顶点着色器)的变量保持一致 diff --git a/iOS_Tips/DarkMode/OpenGL/Controller/SLSplitScreenCell.h b/iOS_Tips/DarkMode/OpenGL/View/SLSplitScreenCell.h similarity index 100% rename from iOS_Tips/DarkMode/OpenGL/Controller/SLSplitScreenCell.h rename to iOS_Tips/DarkMode/OpenGL/View/SLSplitScreenCell.h diff --git a/iOS_Tips/DarkMode/OpenGL/Controller/SLSplitScreenCell.m b/iOS_Tips/DarkMode/OpenGL/View/SLSplitScreenCell.m similarity index 100% rename from iOS_Tips/DarkMode/OpenGL/Controller/SLSplitScreenCell.m rename to iOS_Tips/DarkMode/OpenGL/View/SLSplitScreenCell.m diff --git a/iOS_Tips/DarkMode/SLCategory/NSDictionary+SLExtension.h b/iOS_Tips/DarkMode/SLCategory/NSDictionary+SLExtension.h new file mode 100644 index 00000000..c434d8e3 --- /dev/null +++ b/iOS_Tips/DarkMode/SLCategory/NSDictionary+SLExtension.h @@ -0,0 +1,24 @@ +// +// NSDictionary+SLExtension.h +// +// +// Created by wsl on 2020/6/18. +// Copyright © 2020 wsl. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSDictionary (SLExtension) + +///容错处理 value 应为NSString +- (NSString *)sl_decodeStringFormDictWithKey:(NSString *)key; +///容错处理 value 为NSArray +- (NSArray *)sl_decodeArrayFormDictWithKey:(NSString *)key; +///容错处理 value 为NSDictionary +- (NSDictionary *)sl_decodeDictionaryFormDictWithKey:(NSString *)key; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/SLCategory/NSDictionary+SLExtension.m b/iOS_Tips/DarkMode/SLCategory/NSDictionary+SLExtension.m new file mode 100644 index 00000000..2f85564d --- /dev/null +++ b/iOS_Tips/DarkMode/SLCategory/NSDictionary+SLExtension.m @@ -0,0 +1,50 @@ +// +// NSDictionary+SLExtension.m +// +// +// Created by wsl on 2020/6/18. +// Copyright © 2020 wsl. All rights reserved. +// + +#import "NSDictionary+SLExtension.h" + +@implementation NSDictionary (SLExtension) + +///value 为NSString +- (NSString *)sl_decodeStringFormDictWithKey:(NSString *)key { + NSString *string = @""; + if (self && [self isKindOfClass:[NSDictionary class]]) { + NSDictionary *dict = (NSDictionary *)self; + if ([dict[key] isKindOfClass:[NSString class]]) { + string = dict[key]; + } + else if ([dict[key] isKindOfClass:[NSNumber class]]) { + string = [dict[key] stringValue]; + } + } + return string; +} +///value 为NSArray +- (NSArray *)sl_decodeArrayFormDictWithKey:(NSString *)key { + + NSArray *array = [NSArray array]; + if (self && [self isKindOfClass:[NSDictionary class]]) { + NSDictionary *dict = (NSDictionary *)self; + if ([dict[key] isKindOfClass:[NSArray class]]) { + array = dict[key]; + } + } + return array; +} +///容错处理 value 为NSDictionary +- (NSDictionary *)sl_decodeDictionaryFormDictWithKey:(NSString *)key { + NSDictionary *dictionary = [NSDictionary dictionary]; + if (self && [self isKindOfClass:[NSDictionary class]]) { + NSDictionary *dict = (NSDictionary *)self; + if ([dict[key] isKindOfClass:[NSDictionary class]]) { + dictionary = dict[key]; + } + } + return dictionary; +} +@end diff --git a/iOS_Tips/DarkMode/SLCategory/UIImage+SLCommon.h b/iOS_Tips/DarkMode/SLCategory/UIImage+SLCommon.h index 74889a70..c4c0fd6f 100644 --- a/iOS_Tips/DarkMode/SLCategory/UIImage+SLCommon.h +++ b/iOS_Tips/DarkMode/SLCategory/UIImage+SLCommon.h @@ -15,9 +15,13 @@ NS_ASSUME_NONNULL_BEGIN /// 将图片旋转弧度radians - (UIImage *)sl_imageRotatedByRadians:(CGFloat)radians; + /// 提取图片上某位置像素的颜色 - (UIColor *)sl_colorAtPixel:(CGPoint)point; +/// 图片缩放,针对大图片处理 ++ (UIImage *)sl_scaledImageWithData:(NSData *)data withSize:(CGSize)size scale:(CGFloat)scale orientation:(UIImageOrientation)orientation; + @end NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/SLCategory/UIImage+SLCommon.m b/iOS_Tips/DarkMode/SLCategory/UIImage+SLCommon.m index bd351721..b64d4ba0 100644 --- a/iOS_Tips/DarkMode/SLCategory/UIImage+SLCommon.m +++ b/iOS_Tips/DarkMode/SLCategory/UIImage+SLCommon.m @@ -78,4 +78,16 @@ - (UIColor *)sl_colorAtPixel:(CGPoint)point { return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } +/// 图片缩放,针对大图片处理 ++ (UIImage *)sl_scaledImageWithData:(NSData *)data withSize:(CGSize)size scale:(CGFloat)scale orientation:(UIImageOrientation)orientation { + CGFloat maxPixelSize = MAX(size.width, size.height); + CGImageSourceRef sourceRef = CGImageSourceCreateWithData((__bridge CFDataRef)data,nil); + NSDictionary *optoins = @{(__bridge id)kCGImageSourceCreateThumbnailFromImageAlways:(__bridge id)kCFBooleanTrue,(__bridge id)kCGImageSourceThumbnailMaxPixelSize:[NSNumber numberWithFloat:maxPixelSize]}; + CGImageRef imageRef = CGImageSourceCreateThumbnailAtIndex(sourceRef, 0, (__bridge CFDictionaryRef)optoins); + UIImage *image = [UIImage imageWithCGImage:imageRef scale:scale orientation:orientation]; + CGImageRelease(imageRef); + CFRelease(sourceRef); + return image; +} + @end diff --git a/iOS_Tips/DarkMode/ThirdLibary/Reachability/Reachability.h b/iOS_Tips/DarkMode/ThirdLibary/Reachability/Reachability.h new file mode 100644 index 00000000..50c048c1 --- /dev/null +++ b/iOS_Tips/DarkMode/ThirdLibary/Reachability/Reachability.h @@ -0,0 +1,64 @@ +/* + Copyright (C) 2016 Apple Inc. All Rights Reserved. + See LICENSE.txt for this sample’s licensing information + + Abstract: + Basic demonstration of how to use the SystemConfiguration Reachablity APIs. + */ + +#import +#import +#import + + +typedef enum : NSInteger { + NotReachable = 0, + ReachableViaWiFi, + ReachableViaWWAN +} NetworkStatus; + +#pragma mark IPv6 Support +//Reachability fully support IPv6. For full details, see ReadMe.md. + + +extern NSString *kReachabilityChangedNotification; + + +@interface Reachability : NSObject + +/*! + * Use to check the reachability of a given host name. + */ ++ (instancetype)reachabilityWithHostName:(NSString *)hostName; + +/*! + * Use to check the reachability of a given IP address. + */ ++ (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress; + +/*! + * Checks whether the default route is available. Should be used by applications that do not connect to a particular host. + */ ++ (instancetype)reachabilityForInternetConnection; + + +#pragma mark reachabilityForLocalWiFi +//reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information. +//+ (instancetype)reachabilityForLocalWiFi; + +/*! + * Start listening for reachability notifications on the current run loop. + */ +- (BOOL)startNotifier; +- (void)stopNotifier; + +- (NetworkStatus)currentReachabilityStatus; + +/*! + * WWAN may be available, but not active until a connection has been established. WiFi may require a connection for VPN on Demand. + */ +- (BOOL)connectionRequired; + +@end + + diff --git a/iOS_Tips/DarkMode/ThirdLibary/Reachability/Reachability.m b/iOS_Tips/DarkMode/ThirdLibary/Reachability/Reachability.m new file mode 100644 index 00000000..f081a16a --- /dev/null +++ b/iOS_Tips/DarkMode/ThirdLibary/Reachability/Reachability.m @@ -0,0 +1,242 @@ +/* + Copyright (C) 2016 Apple Inc. All Rights Reserved. + See LICENSE.txt for this sample’s licensing information + + Abstract: + Basic demonstration of how to use the SystemConfiguration Reachablity APIs. + */ + +#import +#import +#import +#import +#import + +#import + +#import "Reachability.h" + +#pragma mark IPv6 Support +//Reachability fully support IPv6. For full details, see ReadMe.md. + + +NSString *kReachabilityChangedNotification = @"kNetworkReachabilityChangedNotification"; + + +#pragma mark - Supporting functions + +#define kShouldPrintReachabilityFlags 1 + +static void PrintReachabilityFlags(SCNetworkReachabilityFlags flags, const char* comment) +{ +#if kShouldPrintReachabilityFlags + + NSLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n", + (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-', + (flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-', + + (flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-', + (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-', + (flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-', + (flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-', + comment + ); +#endif +} + + +static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info) +{ +#pragma unused (target, flags) + NSCAssert(info != NULL, @"info was NULL in ReachabilityCallback"); + NSCAssert([(__bridge NSObject*) info isKindOfClass: [Reachability class]], @"info was wrong class in ReachabilityCallback"); + + Reachability* noteObject = (__bridge Reachability *)info; + // Post a notification to notify the client that the network reachability changed. + [[NSNotificationCenter defaultCenter] postNotificationName: kReachabilityChangedNotification object: noteObject]; +} + + +#pragma mark - Reachability implementation + +@implementation Reachability +{ + SCNetworkReachabilityRef _reachabilityRef; +} + ++ (instancetype)reachabilityWithHostName:(NSString *)hostName +{ + Reachability* returnValue = NULL; + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, [hostName UTF8String]); + if (reachability != NULL) + { + returnValue= [[self alloc] init]; + if (returnValue != NULL) + { + returnValue->_reachabilityRef = reachability; + } + else { + CFRelease(reachability); + } + } + return returnValue; +} + + ++ (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress +{ + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, hostAddress); + + Reachability* returnValue = NULL; + + if (reachability != NULL) + { + returnValue = [[self alloc] init]; + if (returnValue != NULL) + { + returnValue->_reachabilityRef = reachability; + } + else { + CFRelease(reachability); + } + } + return returnValue; +} + + ++ (instancetype)reachabilityForInternetConnection +{ + struct sockaddr_in zeroAddress; + bzero(&zeroAddress, sizeof(zeroAddress)); + zeroAddress.sin_len = sizeof(zeroAddress); + zeroAddress.sin_family = AF_INET; + + return [self reachabilityWithAddress: (const struct sockaddr *) &zeroAddress]; +} + +#pragma mark reachabilityForLocalWiFi +//reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information. +//+ (instancetype)reachabilityForLocalWiFi + + + +#pragma mark - Start and stop notifier + +- (BOOL)startNotifier +{ + BOOL returnValue = NO; + SCNetworkReachabilityContext context = {0, (__bridge void *)(self), NULL, NULL, NULL}; + + if (SCNetworkReachabilitySetCallback(_reachabilityRef, ReachabilityCallback, &context)) + { + if (SCNetworkReachabilityScheduleWithRunLoop(_reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)) + { + returnValue = YES; + } + } + + return returnValue; +} + + +- (void)stopNotifier +{ + if (_reachabilityRef != NULL) + { + SCNetworkReachabilityUnscheduleFromRunLoop(_reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); + } +} + + +- (void)dealloc +{ + [self stopNotifier]; + if (_reachabilityRef != NULL) + { + CFRelease(_reachabilityRef); + } +} + + +#pragma mark - Network Flag Handling + +- (NetworkStatus)networkStatusForFlags:(SCNetworkReachabilityFlags)flags +{ + PrintReachabilityFlags(flags, "networkStatusForFlags"); + if ((flags & kSCNetworkReachabilityFlagsReachable) == 0) + { + // The target host is not reachable. + return NotReachable; + } + + NetworkStatus returnValue = NotReachable; + + if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0) + { + /* + If the target host is reachable and no connection is required then we'll assume (for now) that you're on Wi-Fi... + */ + returnValue = ReachableViaWiFi; + } + + if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) || + (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0)) + { + /* + ... and the connection is on-demand (or on-traffic) if the calling application is using the CFSocketStream or higher APIs... + */ + + if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0) + { + /* + ... and no [user] intervention is needed... + */ + returnValue = ReachableViaWiFi; + } + } + + if ((flags & kSCNetworkReachabilityFlagsIsWWAN) == kSCNetworkReachabilityFlagsIsWWAN) + { + /* + ... but WWAN connections are OK if the calling application is using the CFNetwork APIs. + */ + returnValue = ReachableViaWWAN; + } + + return returnValue; +} + + +- (BOOL)connectionRequired +{ + NSAssert(_reachabilityRef != NULL, @"connectionRequired called with NULL reachabilityRef"); + SCNetworkReachabilityFlags flags; + + if (SCNetworkReachabilityGetFlags(_reachabilityRef, &flags)) + { + return (flags & kSCNetworkReachabilityFlagsConnectionRequired); + } + + return NO; +} + + +- (NetworkStatus)currentReachabilityStatus +{ + NSAssert(_reachabilityRef != NULL, @"currentNetworkStatus called with NULL SCNetworkReachabilityRef"); + NetworkStatus returnValue = NotReachable; + SCNetworkReachabilityFlags flags; + + if (SCNetworkReachabilityGetFlags(_reachabilityRef, &flags)) + { + returnValue = [self networkStatusForFlags:flags]; + } + + return returnValue; +} + + +@end diff --git a/iOS_Tips/DarkMode/ThirdLibary/YYAnimatedImageViewCategory/YYAnimatedImageView+iOS14.h b/iOS_Tips/DarkMode/ThirdLibary/YYAnimatedImageViewCategory/YYAnimatedImageView+iOS14.h new file mode 100644 index 00000000..f6930df8 --- /dev/null +++ b/iOS_Tips/DarkMode/ThirdLibary/YYAnimatedImageViewCategory/YYAnimatedImageView+iOS14.h @@ -0,0 +1,18 @@ +// +// YYAnimatedImageView+iOS14.h +// DarkMode +// +// Created by 王先生 on 2020/12/5. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "YYAnimatedImageView.h" + +NS_ASSUME_NONNULL_BEGIN + +///主要解决 ios14YYAnimatedImageView图片显示问题 #573 https://github.com/ibireme/YYKit/issues/573 +@interface YYAnimatedImageView (iOS14) + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/ThirdLibary/YYAnimatedImageViewCategory/YYAnimatedImageView+iOS14.m b/iOS_Tips/DarkMode/ThirdLibary/YYAnimatedImageViewCategory/YYAnimatedImageView+iOS14.m new file mode 100644 index 00000000..2e3b766b --- /dev/null +++ b/iOS_Tips/DarkMode/ThirdLibary/YYAnimatedImageViewCategory/YYAnimatedImageView+iOS14.m @@ -0,0 +1,33 @@ +// +// YYAnimatedImageView+iOS14.m +// DarkMode +// +// Created by 王先生 on 2020/12/5. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "YYAnimatedImageView+iOS14.h" +#import + +@implementation YYAnimatedImageView (iOS14) ++(void)load { + // 获取系统的方法 + Method displayLayerMethod = class_getInstanceMethod(self, @selector(displayLayer:)); + // 获取更新的方法 + Method displayLayerNewMethod = class_getInstanceMethod(self, @selector(displayLayerNew:)); + // 方法交换 + method_exchangeImplementations(displayLayerMethod, displayLayerNewMethod); +} +-(void)displayLayerNew:(CALayer *)layer { + Ivar imageIvar = class_getInstanceVariable([self class], "_curFrame"); + UIImage *image = object_getIvar(self, imageIvar); + if (image) { + layer.contents = (__bridge id)image.CGImage; + } + else { + if (@available(iOS 14.0, *)) { + [super displayLayer:layer]; + } + } +} +@end diff --git a/iOS_Tips/DarkMode/ViewController.m b/iOS_Tips/DarkMode/ViewController.m index a83241dc..cc8af04d 100644 --- a/iOS_Tips/DarkMode/ViewController.m +++ b/iOS_Tips/DarkMode/ViewController.m @@ -97,8 +97,8 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath } break; case 4: { - [SLAlertView showAlertViewWithText:@"LeetCode算法练习集合地址:https://github.com/wsl2ls/AlgorithmSet.git" delayHid:2]; - } + [SLAlertView showAlertViewWithText:@"LeetCode算法练习集合: https://github.com/wsl2ls/AlgorithmSet.git" delayHid:2]; + } break; default: [self.navigationController pushViewController:nextVc animated:YES]; diff --git a/iOS_Tips/DarkMode/WKWebView/SLTableViewController.m b/iOS_Tips/DarkMode/WKWebView/SLTableViewController.m index 3f44d197..1c0d5d11 100644 --- a/iOS_Tips/DarkMode/WKWebView/SLTableViewController.m +++ b/iOS_Tips/DarkMode/WKWebView/SLTableViewController.m @@ -8,14 +8,256 @@ #import "SLTableViewController.h" -@interface SLTableViewController () +@interface SLTableViewCell : UIButton +@property (nonatomic, copy) NSString *cellID; +@property (nonatomic, assign) NSInteger index; +@end +@implementation SLTableViewCell +@end -@property (nonatomic, strong) UIScrollView *scrollView; +@class SLTableView; +@protocol SLTableViewDataSource +@required +///行数 +- (NSInteger)numberOfRowsInTableView:(SLTableView *)tableView; +///行高 +- (CGFloat)tableView:(SLTableView *)tableView heightForRowAtIndex:(NSInteger)index; +///行内容 +- (SLTableViewCell *)tableView:(SLTableView *)tableView cellForRowAtIndex:(NSInteger)index; +@end +@protocol SLTableViewDelegate +///选中行 +- (void)tableView:(SLTableView *)tableView didSelectRowAtIndex:(NSInteger)index; +@end +@interface SLTableView : UIScrollView +///复用池 +@property (nonatomic, strong) NSMutableDictionary *> *reusablePool; +///注册的类 +@property (nonatomic, strong) NSMutableDictionary *registerClasses; +/// 每一行的坐标位置 +@property (nonatomic, strong) NSMutableArray *frameArray; +/// 当前可见的cells +@property (nonatomic, strong) NSMutableArray *visibleCells; +///记录最后一次的偏移量,用来判断滑动方向 +@property (nonatomic, assign) CGFloat lastContentOffsetY; +///顶部即将展示的索引 +@property (nonatomic, assign) NSInteger willDisplayIndexTop; +///底部即将展示的索引 +@property (nonatomic, assign) NSInteger willDisplayIndexBottom; +///数据源代理 +@property (nonatomic, weak) iddelegate; +///数据源代理 +@property (nonatomic, weak) iddataSource; @end -@implementation SLTableViewController +@implementation SLTableView +@dynamic delegate; +#pragma mark - Override +- (void)willMoveToSuperview:(UIView *)newSuperview { + if (newSuperview) { + [self addKVO]; + } +} +- (void)dealloc { + [self removeKVO]; +} + +#pragma mark - Setter +- (void)setDelegate:(id)delegate{ + [super setDelegate:delegate]; +} +#pragma mark - Getter +- (NSMutableDictionary *)reusablePool { + if (!_reusablePool) { + _reusablePool = [NSMutableDictionary dictionary]; + } + return _reusablePool;; +} +- (NSMutableDictionary *)registerClasses { + if (!_registerClasses) { + _registerClasses = [NSMutableDictionary dictionary]; + } + return _registerClasses; +} +- (NSMutableArray *)frameArray { + if (!_frameArray) { + _frameArray = [NSMutableArray array]; + } + return _frameArray; +} +- (NSMutableArray *)visibleCells { + if (!_visibleCells) { + _visibleCells = [NSMutableArray array]; + } + return _visibleCells;; +} +- (id)delegate{ + id curDelegate = [super delegate]; + return curDelegate; +} + +#pragma mark - KVO +- (void)addKVO { + [self addObserver:self + forKeyPath:@"contentOffset" + options:NSKeyValueObservingOptionNew + context:nil]; +} +- (void)removeKVO{ + [self removeObserver:self forKeyPath:@"contentOffset"]; +} +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context{ + if(object == self && [keyPath isEqualToString:@"contentOffset"]) { + if(self.contentOffset.y > self.lastContentOffsetY) { + [self willDisplayCellWithDirection:NO]; + [self willDisappearCellWithDirection:YES]; + }else { + [self willDisplayCellWithDirection:YES]; + [self willDisappearCellWithDirection:NO]; + } + self.lastContentOffsetY = self.contentOffset.y; + } +} +#pragma mark - Help Methods +///刷新数据 +- (void)reloadData { + //清空布局信息 + [self.frameArray removeAllObjects]; + self.willDisplayIndexTop = -1; + //数据源个数 + NSInteger count = [self.dataSource numberOfRowsInTableView:self]; + self.willDisplayIndexBottom = count; + + CGFloat y = 0; + //获取每一行的布局信息 + for (int i = 0; i < count; i++) { + CGFloat cellHeight = [self.dataSource tableView:self heightForRowAtIndex:i]; + CGRect rect = CGRectMake(0, y, self.sl_width, cellHeight); + [self.frameArray addObject:[NSValue valueWithCGRect:rect]]; + + if (rect.origin.y + rect.size.height < self.contentOffset.y) { + self.willDisplayIndexTop = i; + } + + //按需加载 只加载坐标位置是在当前窗口显示的视图 + if (rect.origin.y + rect.size.height >= self.contentOffset.y && rect.origin.y <= self.contentOffset.y + self.sl_height) { + SLTableViewCell *cell = [self.dataSource tableView:self cellForRowAtIndex:i]; + cell.frame = rect; + [self addSubview:cell]; + [self.visibleCells addObject:cell]; + } + + if (rect.origin.y > self.contentOffset.y + self.sl_height && self.willDisplayIndexBottom == count) { + self.willDisplayIndexBottom = i; + } + + //下一行的起始纵坐标 + y += cellHeight; + + //最后 确定了内容大小contentSize + if (i == count - 1) { + self.contentSize = CGSizeMake(self.sl_width, y); + } + } +} +///根据cellID从复用池reusablePool取可重用的view,如果没有,重新创建一个新对象返回 +- (SLTableViewCell *)dequeueReusableCellWithIdentifier:(nonnull NSString *)cellID index:(NSInteger)index{ + NSHashTable *hashTable = self.reusablePool[cellID]; + SLTableViewCell *cell = hashTable.allObjects.firstObject; + if (cell == nil) { + //复用池reusablePool没有可重用的,就重新创建一个新对象返回 + cell = [[self.registerClasses[cellID] alloc] init]; + [cell addTarget:self action:@selector(didSelectedAction:) forControlEvents:UIControlEventTouchUpInside]; + cell.cellID = cellID; + }else { + //从缓冲池中取出可重用的cell + [hashTable removeObject:cell]; + } + cell.index = index; + return cell; +} +///注册样式 +- (void)registerClass:(Class)class forCellReuseIdentifier:(NSString *)cellID { + self.reusablePool[cellID] = [NSHashTable weakObjectsHashTable]; + self.registerClasses[cellID] = class; +} +///当前可见cell的索引 其实绘制cell的时候就可以先保存可见的索引,不用每次遍历查询 +- (NSArray *)indexForVisibleRows { + NSMutableArray *indexs = [NSMutableArray array]; + for (NSInteger i = self.willDisplayIndexTop+1; i < self.willDisplayIndexBottom; i++) { + [indexs addObject:@(i)]; + } + return indexs; +} +///即将显示的cell,显示时创建或从缓存池中取出调整坐标位置 top:YES上/NO下 +- (void)willDisplayCellWithDirection:(BOOL)top { + if(top) { + if (_willDisplayIndexTop < 0) return; + CGRect rect = [self.frameArray[self.willDisplayIndexTop] CGRectValue]; + //按需加载 只加载坐标位置是在当前窗口显示的视图 + if (rect.origin.y + rect.size.height >= self.contentOffset.y && rect.origin.y <= self.contentOffset.y + self.sl_height) { + NSLog(@"上 第 %ld 个cell显示",self.willDisplayIndexTop); + SLTableViewCell *cell = [self.dataSource tableView:self cellForRowAtIndex:self.willDisplayIndexTop]; + cell.frame = rect; + [self addSubview:cell]; + self.willDisplayIndexTop -=1; + [self.visibleCells insertObject:cell atIndex:0]; + } + }else { + NSInteger count = [self.dataSource numberOfRowsInTableView:self]; + if (_willDisplayIndexBottom >= count) return; + CGRect rect = [self.frameArray[self.willDisplayIndexBottom] CGRectValue]; + //按需加载 只加载坐标位置是在当前窗口显示的视图 + if (rect.origin.y + rect.size.height >= self.contentOffset.y && rect.origin.y <= self.contentOffset.y + self.sl_height) { + NSLog(@"下 第 %ld 个cell显示",self.willDisplayIndexBottom); + SLTableViewCell *cell = [self.dataSource tableView:self cellForRowAtIndex:self.willDisplayIndexBottom]; + cell.frame = rect; + [self addSubview:cell]; + self.willDisplayIndexBottom +=1; + [self.visibleCells addObject:cell]; + } + } +} +//即将消失的cell,在消失时放入缓冲池里 top:YES上/NO下 +- (void)willDisappearCellWithDirection:(BOOL)top { + if(top) { + if (self.willDisplayIndexTop+1 >= self.frameArray.count) return; + CGRect rect = [self.frameArray[self.willDisplayIndexTop+1] CGRectValue]; + if (rect.origin.y + rect.size.height < self.contentOffset.y) { + self.willDisplayIndexTop = self.willDisplayIndexTop+1; + NSLog(@"上 第 %ld 个cell消失",self.willDisplayIndexTop); + SLTableViewCell *cell = self.visibleCells.firstObject; + NSHashTable * hashTable= self.reusablePool[cell.cellID]; + [hashTable addObject:cell]; + [self.visibleCells removeObjectAtIndex:0]; + } + }else { + if (self.willDisplayIndexBottom-1 < 0) return; + CGRect rect = [self.frameArray[self.willDisplayIndexBottom-1] CGRectValue]; + if (rect.origin.y > self.contentOffset.y + self.sl_height) { + self.willDisplayIndexBottom = self.willDisplayIndexBottom-1; + NSLog(@"下 第 %ld 个cell消失",self.willDisplayIndexBottom); + SLTableViewCell *cell = self.visibleCells.lastObject; + NSHashTable * hashTable= self.reusablePool[cell.cellID]; + [hashTable addObject:cell]; + [self.visibleCells removeLastObject]; + } + } +} + +#pragma mark - Events Handle +- (void)didSelectedAction:(SLTableViewCell *)cell { + [self.delegate tableView:self didSelectRowAtIndex:cell.index]; +} +@end + +@interface SLTableViewController () +@property (nonatomic, strong) SLTableView *tableView; +@end + +@implementation SLTableViewController #pragma mark - Override - (void)viewDidLoad { [super viewDidLoad]; @@ -25,24 +267,48 @@ - (void)viewDidLoad { #pragma mark - UI - (void)setupUI { self.view.backgroundColor = [UIColor whiteColor]; - [self.view addSubview:self.scrollView]; + [self.view addSubview:self.tableView]; + [self.tableView reloadData]; } -#pragma mark - Data - #pragma mark - Getter -- (UIScrollView *)scrollView { - if (!_scrollView) { - _scrollView = [[UIScrollView alloc] init]; +- (SLTableView *)tableView { + if (!_tableView) { + _tableView = [[SLTableView alloc] initWithFrame:self.view.bounds]; + _tableView.dataSource = self; + _tableView.delegate = self; + if (@available(iOS 11.0, *)) { + _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + self.automaticallyAdjustsScrollViewInsets = NO; + } + [_tableView registerClass:[SLTableViewCell class] forCellReuseIdentifier:@"cellID"]; } - return _scrollView;; + return _tableView; } -#pragma mark - HelpMethods - -#pragma mark - EventsHandle - -#pragma mark - UICollectionViewDelegate, UICollectionViewDataSource - +#pragma mark - SLTableViewDataSource +///行数 +- (NSInteger)numberOfRowsInTableView:(SLTableView *)tableView { + return 40; +} +///行高 +- (CGFloat)tableView:(SLTableView *)tableView heightForRowAtIndex:(NSInteger)index { + return 100; +} +///行内容 +- (SLTableViewCell *)tableView:(SLTableView *)tableView cellForRowAtIndex:(NSInteger)index { + SLTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellID" index:index]; + cell.layer.borderWidth = 3; + [cell setTitle:[NSString stringWithFormat:@"第 %ld 个",(long)index] forState:UIControlStateNormal]; + [cell setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; + cell.titleLabel.textAlignment = NSTextAlignmentCenter; + return cell; +} +#pragma mark - SLTableViewDelegate +///选中行 +- (void)tableView:(SLTableView *)tableView didSelectRowAtIndex:(NSInteger)index { + NSLog(@"选中 %ld",(long)index); +} @end diff --git a/iOS_Tips/DarkMode/WKWebView/SLWebNativeViewController.m b/iOS_Tips/DarkMode/WKWebView/SLWebNativeViewController.m deleted file mode 100644 index d8406a8b..00000000 --- a/iOS_Tips/DarkMode/WKWebView/SLWebNativeViewController.m +++ /dev/null @@ -1,282 +0,0 @@ -// -// SLWebNativeViewController.m -// DarkMode -// -// Created by wsl on 2020/6/8. -// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. -// - -#import "SLWebNativeViewController.h" -#import -#import -#import -#import "SLAvPlayer.h" -#import - - -@interface SLWebNativeModel : NSObject -@property (nonatomic, copy) NSString *tagID; //标签ID -@property (nonatomic, copy) NSString *type; //元素类型 -@property (nonatomic, copy) NSString *imgUrl; //图片地址 -@property (nonatomic, copy) NSString *videoUrl; //视频地址 -@property (nonatomic, copy) NSString *audioUrl; //音频地址 -@property (nonatomic, assign) CGFloat width; //该标签元素内容宽 -@property (nonatomic, assign) CGFloat height; //该标签元素内容高 -@end -@implementation SLWebNativeModel -@end - -/* - HTML中部分非文本元素,替换为用native组件来实现展示,来达到个性化自定义、灵活、提高渲染效率、简化web和OC交互的处理流程。 - 本示例 仅以用native组件替换HTML中的img、video、audio 内容来做展示,当然你也可以替换HTML中其它的标签元素。 - 注意:1.用native组件替换时,我们也需要进行一些native组件复用、按需加载的优化处理,类似于tableView的机制。 - 2.html界面调整时,要去重新调用JS方法获取原生标签的位置并更新native组件的位置。 - 3.如果仅需要处理HTML的图片元素,也可以不用原生组件imageView展示,原生下载处理图片,然后通过oc调用JS设置图片 - */ -@interface SLWebNativeViewController () -@property (nonatomic, strong) WKWebView * webView; -///网页加载进度视图 -@property (nonatomic, strong) UIProgressView * progressView; -/// WKWebView 内容的高度 -@property (nonatomic, assign) CGFloat webContentHeight; -/// 原生组件所需的HTML中元素的数据 -@property (nonatomic, strong) NSMutableArray *dataSource; -///视频播放 -@property (nonatomic, strong) SLAvPlayer *avPlayer; -@end - -@implementation SLWebNativeViewController - -#pragma mark - Override -- (void)viewDidLoad { - [super viewDidLoad]; - [self getData]; - [self setupUI]; - [self addKVO]; -} -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - [self.progressView removeFromSuperview]; -} -- (void)dealloc { - [self removeKVO]; - NSLog(@"%@释放了",NSStringFromClass(self.class)); -} - -#pragma mark - UI -- (void)setupUI { - self.navigationItem.title = @"Html非文本元素替换为native组件展示"; - [self.view addSubview:self.webView]; - - NSString *path = [[NSBundle mainBundle] pathForResource:@"WebNative.html" ofType:nil]; - NSString *htmlString = [[NSString alloc]initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; - [_webView loadHTMLString:htmlString baseURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]]]; -} - -#pragma mark - Data -/// 获取原生组件所需的HTML中元素的数据 -- (void)getData { - NSData *contentData = [[NSFileManager defaultManager] contentsAtPath:[[NSBundle mainBundle] pathForResource:@"WebNativeJson" ofType:@"txt"]]; - NSDictionary * dataDict = [NSJSONSerialization JSONObjectWithData:contentData options:kNilOptions error:nil]; - for (NSDictionary *dict in dataDict[@"dataList"]) { - SLWebNativeModel *model = [SLWebNativeModel yy_modelWithDictionary:dict]; - [self.dataSource addObject:model]; - } -} - -#pragma mark - Getter -- (WKWebView *)webView { - if(_webView == nil){ - //创建网页配置 - WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init]; - _webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, SL_kScreenWidth, SL_kScreenHeight) configuration:config]; - _webView.navigationDelegate = self; - _webView.UIDelegate = self; - } - return _webView; -} -- (UIProgressView *)progressView { - if (!_progressView){ - _progressView = [[UIProgressView alloc] initWithFrame:CGRectMake(0, 0, SL_kScreenWidth, 2)]; - _progressView.tintColor = [UIColor blueColor]; - _progressView.trackTintColor = [UIColor clearColor]; - } - if (_progressView.superview == nil) { - [self.navigationController.navigationBar addSubview:_progressView]; - } - return _progressView; -} -- (NSMutableArray *)dataSource { - if (!_dataSource) { - _dataSource = [NSMutableArray array]; - } - return _dataSource; -} -- (SLAvPlayer *)avPlayer { - if (!_avPlayer) { - _avPlayer = [[SLAvPlayer alloc] init]; - } - return _avPlayer; -} - -#pragma mark - KVO -///添加键值对监听 -- (void)addKVO { - //监听网页加载进度 - [self.webView addObserver:self - forKeyPath:NSStringFromSelector(@selector(estimatedProgress)) - options:NSKeyValueObservingOptionNew - context:nil]; - //监听网页内容高度 - [self.webView.scrollView addObserver:self - forKeyPath:@"contentSize" - options:NSKeyValueObservingOptionNew - context:nil]; -} -///移除监听 -- (void)removeKVO { - //移除观察者 - [_webView removeObserver:self - forKeyPath:NSStringFromSelector(@selector(estimatedProgress))]; - [_webView.scrollView removeObserver:self - forKeyPath:NSStringFromSelector(@selector(contentSize))]; -} -//kvo监听 必须实现此方法 --(void)observeValueForKeyPath:(NSString *)keyPath - ofObject:(id)object - change:(NSDictionary *)change - context:(void *)context{ - - if ([keyPath isEqualToString:NSStringFromSelector(@selector(estimatedProgress))] - && object == _webView) { - // NSLog(@"网页加载进度 = %f",_webView.estimatedProgress); - self.progressView.progress = _webView.estimatedProgress; - if (_webView.estimatedProgress >= 1.0f) { - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - self.progressView.progress = 0; - }); - } - }else if ([keyPath isEqualToString:NSStringFromSelector(@selector(contentSize))] - && object == _webView.scrollView) { - if (_webContentHeight == _webView.scrollView.contentSize.height) { - }else { - _webContentHeight = _webView.scrollView.contentSize.height; - } - } -} - -#pragma mark - Events Handle -- (void)playVideoAction:(UIButton *)btn { - SLWebNativeModel *model = self.dataSource[btn.tag]; - self.avPlayer.url = [NSURL URLWithString:model.videoUrl]; - self.avPlayer.monitor = btn.superview; - [self.avPlayer play]; - [btn removeFromSuperview]; -} -- (void)playAudioAction:(UIButton *)btn { - NSString *myBundlePath = [[NSBundle mainBundle] pathForResource:@"Resources" ofType:@"bundle"]; - NSBundle *myBundle = [NSBundle bundleWithPath:myBundlePath]; - NSString *audioPath = [myBundle pathForResource:@"The love of one's life" ofType:@"mp3" inDirectory:@"Audio"]; - NSURL *bgsoundUrl = [NSURL fileURLWithPath:audioPath]; - self.avPlayer.url = bgsoundUrl; - self.avPlayer.monitor = nil; - [self.avPlayer play]; - [self rotateAnimate:btn.superview]; - [btn removeFromSuperview]; -} --(void)rotateAnimate:(UIView *)view{ - //0.5秒旋转50度 - [UIView animateWithDuration:0.5 delay:0.0 options:UIViewAnimationOptionCurveLinear animations:^{ - view.transform = CGAffineTransformRotate(view.transform, 50); - } completion:^(BOOL finished) { - [self rotateAnimate:view]; - }]; -} - - - -#pragma mark - WKNavigationDelegate -// 根据WebView对于即将跳转的HTTP请求头信息和相关信息来决定是否跳转 -- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { - decisionHandler(WKNavigationActionPolicyAllow); -} -// 根据客户端收到的服务器响应头以及response相关信息来决定是否可以继续响应 -- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler{ - //允许跳转 - decisionHandler(WKNavigationResponsePolicyAllow); -} -// 页面加载完成之后调用 -- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation { - //根据服务器下发的标签相关的数据,用原生组件展示,这里原生组件的创建要注意按需加载和复用,类似于tableView,否则对内存还是有不小的消耗的。目前还没做处理 - int i = 0; - for (SLWebNativeModel *model in self.dataSource) { - NSString *jsString = [NSString stringWithFormat:@"getElementFrame('%@')",model.tagID]; - [_webView evaluateJavaScript:jsString completionHandler:^(id _Nullable data, NSError * _Nullable error) { - //获取标签位置坐标 - NSDictionary *frameDict = (NSDictionary *)data; - CGRect frame = CGRectMake( - [frameDict[@"x"] floatValue], [frameDict[@"y"] floatValue], [frameDict[@"width"] floatValue], [frameDict[@"height"] floatValue]); - if ([model.type isEqualToString:@"image"]) { - //图片 - YYAnimatedImageView *imageView = [[YYAnimatedImageView alloc] init]; - imageView.frame = frame; - imageView.tag = i; - [imageView yy_setImageWithURL:[NSURL URLWithString:model.imgUrl] placeholder:nil]; - [self.webView.scrollView addSubview:imageView]; - }else if ([model.type isEqualToString:@"video"]) { - //视频 - YYAnimatedImageView *imageView = [[YYAnimatedImageView alloc] init]; - imageView.frame = frame; - [imageView yy_setImageWithURL:[NSURL URLWithString:model.imgUrl ] placeholder:nil]; - [self.webView.scrollView addSubview:imageView]; - UIButton *playBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 80, 80)]; - playBtn.center = CGPointMake(frame.size.width/2.0, frame.size.height/2.0); - [playBtn setImage:[UIImage imageNamed:@"play"] forState:UIControlStateNormal]; - [playBtn addTarget:self action:@selector(playVideoAction:) forControlEvents:UIControlEventTouchUpInside]; - playBtn.tag = i; - imageView.userInteractionEnabled = YES; - [imageView addSubview:playBtn]; - }else if ([model.type isEqualToString:@"audio"]) { - //音频 - YYAnimatedImageView *imageView = [[YYAnimatedImageView alloc] init]; - imageView.frame = frame; - imageView.layer.cornerRadius = frame.size.height/2.0; - imageView.layer.masksToBounds = YES; - [imageView yy_setImageWithURL:[NSURL URLWithString:model.imgUrl ] placeholder:nil]; - [self.webView.scrollView addSubview:imageView]; - UIButton *playBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; - playBtn.center = CGPointMake(frame.size.width/2.0, frame.size.height/2.0); - [playBtn setImage:[UIImage imageNamed:@"play"] forState:UIControlStateNormal]; - [playBtn addTarget:self action:@selector(playAudioAction:) forControlEvents:UIControlEventTouchUpInside]; - playBtn.tag = i; - imageView.userInteractionEnabled = YES; - [imageView addSubview:playBtn]; - } - // NSLog(@" %@",data) - }]; - i++; - } - -} -//进程被终止时调用 -- (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView{ - -} - -#pragma mark - WKUIDelegate -/** - * web界面中有弹出警告框时调用 - * - * @param webView 实现该代理的webview - * @param message 警告框中的内容 - * @param completionHandler 警告框消失调用 - */ -- (void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler { - UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"HTML的弹出框" message:message?:@"" preferredStyle:UIAlertControllerStyleAlert]; - [alertController addAction:([UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - completionHandler(); - }])]; - [self presentViewController:alertController animated:YES completion:nil]; -} - -@end diff --git a/iOS_Tips/DarkMode/WKWebView/SLWebViewController.h b/iOS_Tips/DarkMode/WKWebView/SLWebViewController.h index a52fdd57..cebe5dda 100644 --- a/iOS_Tips/DarkMode/WKWebView/SLWebViewController.h +++ b/iOS_Tips/DarkMode/WKWebView/SLWebViewController.h @@ -14,7 +14,10 @@ NS_ASSUME_NONNULL_BEGIN /// https://github.com/ChenYilong/ParseSourceCodeStudy/blob/master/02_Parse%E7%9A%84%E7%BD%91%E7%BB%9C%E7%BC%93%E5%AD%98%E4%B8%8E%E7%A6%BB%E7%BA%BF%E5%AD%98%E5%82%A8/iOS%E7%BD%91%E7%BB%9C%E7%BC%93%E5%AD%98%E6%89%AB%E7%9B%B2%E7%AF%87.md /// https://dequan1331.github.io/index.html ///关于WKWebView的使用可以看我之前的总结: https://github.com/wsl2ls/WKWebView -@interface SLWebViewController : UIViewController +@interface SLWebViewController : SLViewController + +///打开的web地址 默认:https://www.jianshu.com/p/5cf0d241ae12 +@property (nonatomic, strong) NSString *urlString; @end diff --git a/iOS_Tips/DarkMode/WKWebView/SLWebViewController.m b/iOS_Tips/DarkMode/WKWebView/SLWebViewController.m index 73e1fd9f..a8499e5c 100644 --- a/iOS_Tips/DarkMode/WKWebView/SLWebViewController.m +++ b/iOS_Tips/DarkMode/WKWebView/SLWebViewController.m @@ -9,7 +9,6 @@ #import "SLWebViewController.h" #import #import "WKWebView+SLExtension.h" -#import "SLUrlProtocol.h" #import "SLUrlProtocolAddCookie.h" ///关于WKWebView的其他更多使用可以看我之前的总结: https://github.com/wsl2ls/WKWebView @@ -23,7 +22,6 @@ @interface SLWebViewController () @end -static NSString *KwebUrl = @"https://www.jianshu.com/p/5cf0d241ae12"; @implementation SLWebViewController #pragma mark - Override - (void)viewDidLoad { @@ -39,12 +37,10 @@ - (void)dealloc { [self removeKVO]; [WKWebView sl_unregisterSchemeForSupportHttpProtocol]; [NSURLProtocol registerClass:[NSURLProtocol class]]; - NSLog(@"%@释放了",NSStringFromClass(self.class)); } #pragma mark - UI - (void)setupUI { - self.view.backgroundColor = UIColor.whiteColor; UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithTitle:@"上一步" style:UIBarButtonItemStyleDone target:self action:@selector(goBackAction:)]; UIBarButtonItem *forwardItem = [[UIBarButtonItem alloc] initWithTitle:@"下一步" style:UIBarButtonItemStyleDone target:self action:@selector(goForwardAction:)]; @@ -57,7 +53,7 @@ - (void)setupUI { [self.view addSubview:self.webView]; - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:KwebUrl]]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:self.urlString]]; //设置上一次的请求时间 [request setValue:[SLMethod userDefaultsObjectForKey:@"localLastModified"] forHTTPHeaderField:@"If-Modified-Since"]; [_webView loadRequest:request]; @@ -84,6 +80,12 @@ - (UIProgressView *)progressView { } return _progressView; } +- (NSString *)urlString { + if (!_urlString) { + _urlString = @"https://www.jianshu.com/p/5cf0d241ae12"; + } + return _urlString; +} #pragma mark - Look Here ///关于WKWebView的那些坑: https://mp.weixin.qq.com/s/rhYKLIbXOsUJC_n6dt9UfA? @@ -183,7 +185,7 @@ - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigati } // 根据客户端受到的服务器响应头以及response相关信息来决定是否可以跳转 - (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler{ - if ([navigationResponse.response isKindOfClass:[NSHTTPURLResponse class]] && [navigationResponse.response.URL.absoluteString isEqualToString:KwebUrl]) { + if ([navigationResponse.response isKindOfClass:[NSHTTPURLResponse class]] && [navigationResponse.response.URL.absoluteString isEqualToString:self.urlString]) { NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)navigationResponse.response; if (httpResponse.statusCode == 304) { //自上次请求后,文件还没有修改变化 diff --git a/iOS_Tips/DarkMode/WKWebView/SLWebViewListController.m b/iOS_Tips/DarkMode/WKWebView/SLWebViewListController.m index 98a52df4..4a4b7b90 100644 --- a/iOS_Tips/DarkMode/WKWebView/SLWebViewListController.m +++ b/iOS_Tips/DarkMode/WKWebView/SLWebViewListController.m @@ -38,7 +38,6 @@ - (void)viewWillAppear:(BOOL)animated { - (BOOL)prefersStatusBarHidden { return NO; } - #pragma mark - UI - (void)setupUI { self.navigationItem.title = @"WKWebView"; @@ -54,9 +53,9 @@ - (void)getData { @" WKWebView + UITableView(方案3)(推荐)", @" WKWebView + UITableView(方案4)(推荐) ", @" WKWebView离线缓存", - @" WKWebView渲染的部分HTML元素替换为用原生组件显示(doing)", + @" WKWebView渲染的部分HTML元素替换为用原生组件显示", @" UIScrollView的实现原理", - @" UITableView的原理 (doing)"]]; + @" UITableView的原理"]]; [self.subTitles addObjectsFromArray:@[@" WKWebView的使用、JS和OC的交互、网页内容加载进度条的实现、NSNSURLProtocol拦截、Cookies丢失、设置UserAgent", @" tableView.tableHeaderView = webView 撑开webView ", @" [webView.scrollView addSubview:tableView] + 占位Div ", @@ -76,6 +75,7 @@ - (void)getData { [SLTableViewController class]]]; [self.tableView reloadData]; } + #pragma mark - Getter - (UITableView *)tableView { if (_tableView == nil) { @@ -86,8 +86,6 @@ - (UITableView *)tableView { } return _tableView; } - -#pragma mark - Getter - (NSMutableArray *)titles { if (_titles == nil) { _titles = [NSMutableArray array]; diff --git a/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheManager.h b/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheManager.h index d60eafa2..e5db1297 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheManager.h +++ b/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheManager.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign) NSUInteger cacheTime; /// 磁盘路径 默认 NSCachesDirectory @property (nonatomic, copy) NSString *diskPath; -/// 缓存文件夹 默认 @"Url" +/// 缓存文件夹 默认 @"com.wsl2ls.webCache" @property (nonatomic, copy) NSString *cacheFolder; /// 子路径 默认 @"UrlCacheDownload" @property (nonatomic, copy) NSString *subDirectory; diff --git a/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheManager.m b/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheManager.m index 0082d6b4..91262fd5 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheManager.m +++ b/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheManager.m @@ -163,7 +163,7 @@ - (BOOL)writeCacheData:(NSCachedURLResponse *)cachedURLResponse withRequest:(NSU NSDate *date = [NSDate date]; NSDictionary *info = @{@"time" : [NSString stringWithFormat:@"%f",[date timeIntervalSince1970]], @"MIMEType" : cachedURLResponse.response.MIMEType, - @"textEncodingName" : cachedURLResponse.response.textEncodingName}; + @"textEncodingName" : cachedURLResponse.response.textEncodingName == nil ? @"": cachedURLResponse.response.textEncodingName}; //写入磁盘 BOOL result1 = [info writeToFile:[self filePathFromRequest:request isInfo:YES] atomically:YES]; @@ -300,7 +300,7 @@ - (NSString *)diskPath { } - (NSString *)cacheFolder { if (!_cacheFolder) { - _cacheFolder = @"Url"; + _cacheFolder = @"com.wsl2ls.webCache"; } return _cacheFolder; } diff --git a/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheViewController.h b/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheViewController.h index 13aab741..5542f0d2 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheViewController.h +++ b/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheViewController.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN /// WKWebView 缓存实现 -@interface SLWebCacheViewController : UIViewController +@interface SLWebCacheViewController : SLViewController @end diff --git a/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheViewController.m b/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheViewController.m index 1cf5fbdb..bc4e58ee 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheViewController.m +++ b/iOS_Tips/DarkMode/WKWebView/WebCache/SLWebCacheViewController.m @@ -10,7 +10,10 @@ #import #import "SLWebCacheManager.h" -//实现原理参考 戴明大神:https://github.com/ming1016/STMURLCache +/* + https://zhuanlan.zhihu.com/p/148931732 WKWebView离线化方案——实现Service Worker API + https://github.com/ming1016/STMURLCache 戴明大神 + */ @interface SLWebCacheViewController () @property (nonatomic, strong) WKWebView * webView; @@ -37,7 +40,6 @@ - (void)dealloc { [self removeKVO]; //关闭缓存 [[SLWebCacheManager shareInstance] closeCache]; - NSLog(@"%@释放了",NSStringFromClass(self.class)); } #pragma mark - UI diff --git a/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureBrowseController.h b/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureBrowseController.h new file mode 100644 index 00000000..c054d022 --- /dev/null +++ b/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureBrowseController.h @@ -0,0 +1,24 @@ +// +// SLPictureBrowseController.h +// TELiveClass +// +// Created by wsl on 2020/2/28. +// Copyright © 2020 offcn_c. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol SLPictureAnimationViewDelegate +//用于转场的动画视图 +- (UIView *)animationViewOfPictureTransition:(NSIndexPath *)indexPath; +@end + +/// 图集浏览控制器 +@interface SLPictureBrowseController : UIViewController +@property (nonatomic, strong) NSMutableArray *imagesArray; +@property (nonatomic, strong) NSIndexPath *indexPath; //数据来源索引 +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureBrowseController.m b/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureBrowseController.m new file mode 100644 index 00000000..1ca831d7 --- /dev/null +++ b/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureBrowseController.m @@ -0,0 +1,494 @@ +// +// SLPictureBrowseController.m +// TELiveClass +// +// Created by wsl on 2020/2/28. +// Copyright © 2020 offcn_c. All rights reserved. +// + +#import "SLPictureBrowseController.h" +#import + +/// 图片缩放视图 +@interface SLPictureZoomView : UIScrollView +@property (nonatomic, strong) YYAnimatedImageView *imageView; +@property (nonatomic, strong) UIActivityIndicatorView *indicatorView; //下载指示器 +@property (nonatomic, assign) CGSize imageNormalSize; //图片原尺寸 +@end +@implementation SLPictureZoomView + +#pragma mark - Override +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self setupUI]; + } + return self; +} + +#pragma mark - UI +- (void)setupUI { + self.delegate = self; + if (@available(iOS 11.0, *)) { + self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + } + self.minimumZoomScale = 1.0; + self.maximumZoomScale = 2.0; + self.clipsToBounds = NO; + [self addSubview:self.imageView]; +} + +#pragma mark - Getter +- (YYAnimatedImageView *)imageView { + if (!_imageView) { + _imageView = [[YYAnimatedImageView alloc] init]; + _imageView.userInteractionEnabled = YES; + } + return _imageView; +} +- (UIActivityIndicatorView *)indicatorView { + if (!_indicatorView) { + _indicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; + _indicatorView.frame = CGRectMake(0, 0, 30, 30); + _indicatorView.center = CGPointMake([UIScreen mainScreen].bounds.size.width/2.0, [UIScreen mainScreen].bounds.size.height/2.0); + } + return _indicatorView; +} +- (CGSize)imageNormalSize { + if (_imageNormalSize.width == 0) { + _imageNormalSize = CGSizeMake(self.frame.size.width, self.frame.size.height); + } + return _imageNormalSize; +} + +#pragma mark - HelpMethods +- (void)setImageUrl:(NSURL *)url { + + [[YYImageCache sharedCache] getImageForKey:[url absoluteString] withType:YYImageCacheTypeAll withBlock:^(UIImage * _Nullable image, YYImageCacheType type) { + if (!image) { + [self.indicatorView startAnimating]; + [self addSubview:self.indicatorView]; + }else { + [self.indicatorView stopAnimating]; + [self.indicatorView removeFromSuperview]; + } + }]; + + __weak typeof(self) weakSelf = self; + [self.imageView yy_setImageWithURL:url placeholder:nil options:YYWebImageOptionShowNetworkActivity completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) { + [weakSelf.indicatorView stopAnimating]; + [weakSelf.indicatorView removeFromSuperview]; + if (image == nil) { + return ; + } + weakSelf.imageNormalSize = CGSizeMake([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*image.size.height/image.size.width); + weakSelf.imageView.frame = CGRectMake(0, 0, weakSelf.imageNormalSize.width, weakSelf.imageNormalSize.height); + weakSelf.contentSize = weakSelf.imageNormalSize; + if (weakSelf.imageNormalSize.height <= [UIScreen mainScreen].bounds.size.height) { + weakSelf.imageView.center = CGPointMake([UIScreen mainScreen].bounds.size.width/2.0, [UIScreen mainScreen].bounds.size.height/2.0); + } + }]; +} + +#pragma mark - UIScrollViewDelegate +//返回缩放的视图 +- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { + return self.imageView; +} +//缩放过程中 +- (void)scrollViewDidZoom:(UIScrollView *)scrollView { + CGFloat imageSclaeW = scrollView.zoomScale * self.imageNormalSize.width; + CGFloat imageSclaeH = scrollView.zoomScale * self.imageNormalSize.height; + CGFloat imageX = 0; + CGFloat imageY = 0; + if (imageSclaeW < self.frame.size.width) { + imageX = (self.frame.size.width - imageSclaeW)/2.0; + } + if (imageSclaeH < self.frame.size.height) { + imageY = (self.frame.size.height - imageSclaeH)/2.0; + } + self.imageView.frame = CGRectMake(imageX, imageY, imageSclaeW, imageSclaeH); +} + +@end + + +#define KSLPictureBrowseSpace 8 // 浏览的图片间隔1/2 +/// 图片浏览单元 +@interface SLPictureBrowsingCell: UICollectionViewCell +@property (nonatomic, strong) SLPictureZoomView *zoomView; +@end +@implementation SLPictureBrowsingCell + +#pragma mark - Override +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self setupUI]; + } + return self; +} + +#pragma mark - UI +- (void)setupUI { + [self.contentView addSubview:self.zoomView]; + [self.zoomView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.contentView.mas_left).offset(KSLPictureBrowseSpace); + make.top.bottom.mas_equalTo(self.contentView); + make.right.mas_equalTo(self.contentView).offset(-KSLPictureBrowseSpace); + }]; + //解决 self.pictureZoomView 和UICollectionView 手势冲突 + self.zoomView.userInteractionEnabled = NO; + [self.contentView addGestureRecognizer:self.zoomView.panGestureRecognizer]; + [self.contentView addGestureRecognizer:self.zoomView.pinchGestureRecognizer]; +} + +#pragma mark - Getter +- (SLPictureZoomView *)zoomView { + if (!_zoomView) { + _zoomView = [[SLPictureZoomView alloc] init]; + _zoomView.backgroundColor = [UIColor clearColor]; + } + return _zoomView; +} +@end + +#import +#import +#import "SLPictureTransitionAnimation.h" + +/// 图集浏览控制器 +@interface SLPictureBrowseController (){ + UIViewController *_fromViewController; +} +@property (nonatomic, strong) UICollectionView *collectionView; +@property (nonatomic, strong) UIPageControl *pageControl; +@property (nonatomic, strong) UIButton *saveButton; +@property (nonatomic, strong) SLPictureTransitionAnimation *transitionAnimation; //转场动画 +@property (nonatomic, assign) NSInteger currentPage; //图片当前页码 +@end + +@implementation SLPictureBrowseController + +#pragma mark - Override +- (id)init { + self = [super init]; + if (self) { + self.transitionAnimation = [[SLPictureTransitionAnimation alloc] init]; + self.transitionAnimation.transitionType = SLTransitionTypePresent; + self.transitioningDelegate = self; //设置了这个属性之后,在present转场动画处理时,转场前的视图fromVC的view一直都在管理转场动画视图的容器containerView中,会被转场后,后加入到containerView中视图toVC的View遮住,类似于入栈出栈的原理;如果没有设置的话,present转场时,fromVC.view就会先出栈从containerView移除,然后toVC.View入栈,那之后再进行disMiss转场返回时,需要重新把fromVC.view加入containerView中。 + //在push转场动画处理时,设置这个属性是没有效果的,也就是没用的。 + self.modalPresentationStyle = UIModalPresentationOverFullScreen; + } + return self; +} +- (void)viewDidLoad { + [super viewDidLoad]; + [self setupUI]; +} +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; +} +- (void)dealloc { +} +- (void)viewSafeAreaInsetsDidChange { + [super viewSafeAreaInsetsDidChange]; +} + +#pragma mark - UI +- (void)setupUI { + self.view.backgroundColor = [UIColor blackColor]; + self.view.clipsToBounds = YES; + [self.view addSubview:self.collectionView]; + [self.view addSubview:self.pageControl]; + [self.view addSubview:self.saveButton]; + [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(0); + make.bottom.mas_equalTo(0); + make.left.mas_equalTo(-KSLPictureBrowseSpace); + make.right.mas_equalTo(KSLPictureBrowseSpace); + }]; + [self.pageControl mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.view); + make.top.mas_equalTo(self.view).offset(SL_TopSafeAreaHeight); + }]; + if (self.imagesArray.count > 1) { + self.pageControl.numberOfPages = self.imagesArray.count; + self.pageControl.currentPage = self.currentPage; + self.pageControl.hidden = NO; + }else { + self.pageControl.hidden = YES; + } + if(self.imagesArray.count == 1) self.collectionView.scrollEnabled = NO; + self.collectionView.contentSize = CGSizeMake(self.imagesArray.count * (self.view.frame.size.width + 2 * KSLPictureBrowseSpace), self.view.frame.size.height); + self.collectionView.contentOffset = CGPointMake(self.currentPage * (self.view.frame.size.width + 2 * KSLPictureBrowseSpace), 0); + [self.saveButton mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.view); + make.bottom.mas_equalTo(-25-SL_BottomSafeAreaHeight); + make.size.mas_equalTo(CGSizeMake(120, 38)); + }]; + + //添加拖拽手势 拖拽图片退出图集浏览界面 + self.view.userInteractionEnabled = YES; + UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panPicture:)]; + [self.view addGestureRecognizer:pan]; + //单击手势 退出浏览 + UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTap:)]; + singleTap.numberOfTouchesRequired = 1; + singleTap.numberOfTapsRequired = 1; + [self.view addGestureRecognizer:singleTap]; + //双击手势放大 + UITapGestureRecognizer *doubleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(doubleTap:)]; + doubleTap.numberOfTouchesRequired = 1; + doubleTap.numberOfTapsRequired = 2; + [self.view addGestureRecognizer:doubleTap]; + [singleTap requireGestureRecognizerToFail:doubleTap]; +} + +#pragma mark - Getter +- (UICollectionView *)collectionView { + if (!_collectionView) { + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; + _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + if (@available(iOS 11.0, *)) { + _collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + } + _collectionView.backgroundColor = [UIColor clearColor]; + _collectionView.delegate = self; + _collectionView.dataSource = self; + _collectionView.pagingEnabled = YES; + _collectionView.allowsSelection = NO; + [_collectionView registerClass:[SLPictureBrowsingCell class] forCellWithReuseIdentifier:@"SLPictureBrowsingCell"]; + } + return _collectionView; +} +- (UIPageControl *)pageControl { + if (!_pageControl) { + _pageControl = [[UIPageControl alloc] init]; + _pageControl.pageIndicatorTintColor = [UIColor grayColor]; + _pageControl.currentPageIndicatorTintColor = [UIColor whiteColor]; + } + return _pageControl; +} +- (UIButton *)saveButton { + if (!_saveButton) { + _saveButton = [[UIButton alloc] init]; + [_saveButton setTitle:@"保存" forState:UIControlStateNormal]; + [_saveButton setTitleColor:SL_UIColorFromHex(0xffffff,1.0) forState:UIControlStateNormal]; + _saveButton.titleLabel.font = [UIFont systemFontOfSize:14]; + [_saveButton setImage:[UIImage imageNamed:@"message_img_download"] forState:UIControlStateNormal]; + _saveButton.backgroundColor = SL_UIColorFromHex(0x393939,1.0); + _saveButton.layer.masksToBounds = YES; + _saveButton.layer.cornerRadius = 4; + [_saveButton addTarget:self action:@selector(saveButtonAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _saveButton; +} + +#pragma mark - HelpMethods +//返回当前页面用于转场动画的视图 +- (UIView *)currentAnimatonView { + SLPictureBrowsingCell *cell = [self.collectionView visibleCells].firstObject; + if (cell == nil) { + cell = [[SLPictureBrowsingCell alloc] initWithFrame: CGRectMake(0,0, self.view.frame.size.width, self.view.frame.size.height)]; + NSURL *imgUrl = self.imagesArray[self.currentPage]; + [cell.zoomView setImageUrl:imgUrl]; + UIView *tempView = cell.zoomView.imageView; + return tempView; + }else { + UIView *imageView = cell.zoomView.imageView; + UIView *tempView = [imageView snapshotViewAfterScreenUpdates:YES]; + tempView.frame = [imageView convertRect:imageView.bounds toView:self.view]; + return tempView; + } +} + +#pragma mark - EventsHandle +//拖拽即将推出图片浏览模式 +- (void)panPicture:(UIPanGestureRecognizer *)pan { + SLPictureBrowsingCell *cell = [self.collectionView visibleCells].firstObject; + SLPictureZoomView *zoomView = cell.zoomView; + CGPoint translation = [pan translationInView:cell]; + zoomView.center = CGPointMake(zoomView.center.x+translation.x, zoomView.center.y+translation.y); + [pan setTranslation:CGPointZero inView:cell]; + //滑动的距离百分比 + CGFloat percentComplete = 0; + percentComplete = (zoomView.center.y - [UIScreen mainScreen].bounds.size.height/2.0)/([UIScreen mainScreen].bounds.size.height/2.0); + percentComplete = fabs(percentComplete); + switch (pan.state) { + case UIGestureRecognizerStateBegan: + self.saveButton.hidden = YES; + break; + case UIGestureRecognizerStateChanged: + if (zoomView.center.y > [UIScreen mainScreen].bounds.size.height/2.0 && percentComplete > 0.01 && percentComplete < 1.0) { + self.view.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:1 - percentComplete]; + zoomView.transform = CGAffineTransformMakeScale(1 - percentComplete/2.0, 1 - percentComplete/2.0); + } + break; + case UIGestureRecognizerStateEnded: + if (percentComplete >= 0.5 && zoomView.center.y > [UIScreen mainScreen].bounds.size.height/2.0) { + [self dismissViewControllerAnimated:YES completion:nil]; + }else { + self.view.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:1]; + [UIView animateWithDuration:0.3 animations:^{ + zoomView.center = CGPointMake(([UIScreen mainScreen].bounds.size.width+KSLPictureBrowseSpace * 2)/2.0, [UIScreen mainScreen].bounds.size.height/2.0); + zoomView.transform = CGAffineTransformMakeScale(1, 1); + } completion:^(BOOL finished) { + self.saveButton.hidden = NO; + }]; + } + break; + default: + break; + } + +} +//单击退出出图片浏览模式 +- (void)singleTap:(UITapGestureRecognizer *)singleTap { + [self dismissViewControllerAnimated:YES completion:nil]; +} +//双击放大点击点 +- (void)doubleTap:(UITapGestureRecognizer *)doubleTap { + SLPictureBrowsingCell *cell = [self.collectionView visibleCells].firstObject; + SLPictureZoomView *zoomView = cell.zoomView; + //获得触摸点在imageView上的位置 + CGPoint tapPosionOfPicture = [doubleTap locationInView:zoomView.imageView]; + //获得触摸点在zoomView上的位置 + CGPoint tapPosionOfScreen = [doubleTap locationInView:zoomView]; + [UIView animateWithDuration:0.3 animations:^{ + if(zoomView.zoomScale != 1) { + zoomView.zoomScale = 1; + [zoomView scrollViewDidZoom:zoomView]; + zoomView.contentOffset = CGPointZero; + }else { + //获得点击的图片位置放大后的坐标 相对于ImageView + CGPoint newTapPosionOfPicture = CGPointMake(tapPosionOfPicture.x*zoomView.maximumZoomScale, tapPosionOfPicture.y*zoomView.maximumZoomScale); + zoomView.zoomScale = zoomView.maximumZoomScale; + [zoomView scrollViewDidZoom:zoomView]; + + if (newTapPosionOfPicture.y < zoomView.frame.size.height || zoomView.imageView.frame.size.height < zoomView.frame.size.height) { + // 放大后对应的点击点在图片上的位置 处在前一屏当中 + zoomView.contentOffset = CGPointMake(newTapPosionOfPicture.x - tapPosionOfScreen.x, 0); + } else { // 点击点在图片上的位置超过一屏时 + if (newTapPosionOfPicture.y > zoomView.imageView.frame.size.height - zoomView.frame.size.height){ + // 点击点在图片最底部一屏中 + zoomView.contentOffset = CGPointMake(newTapPosionOfPicture.x - tapPosionOfScreen.x, zoomView.imageView.frame.size.height - zoomView.frame.size.height); + }else{ + //点击点在图片中间层 + zoomView.contentOffset = CGPointMake(newTapPosionOfPicture.x - tapPosionOfScreen.x, newTapPosionOfPicture.y - tapPosionOfScreen.y); + } + } + } + } completion:^(BOOL finished) { + + }]; +} +//保存 +- (void)saveButtonAction:(UIButton *)btn { + PHAuthorizationStatus status = [PHPhotoLibrary authorizationStatus]; + if (status == PHAuthorizationStatusNotDetermined) { // 用户还没有做出选择 + // 弹框请求用户授权 + [PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) { + if (status == PHAuthorizationStatusAuthorized) { + // 用户第一次同意了访问相册权限 + [self saveImageToPhotosAlbum]; + } + }]; + return; + }else if (status == PHAuthorizationStatusRestricted || status == PHAuthorizationStatusDenied) { + // [self showOnlyTextWithHint:@"App需要经过您的同意,才能保存图片到相册"]; + return; + } + [self saveImageToPhotosAlbum]; +} +//保存图片到相册 +- (void)saveImageToPhotosAlbum { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + NSURL *url = self.imagesArray[self.currentPage]; + [[YYImageCache sharedCache] getImageDataForKey:[url absoluteString] withBlock:^(NSData * _Nullable imageData) { + if (imageData) { + ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; + [library writeImageDataToSavedPhotosAlbum:imageData metadata:nil completionBlock:^(NSURL *assetURL, NSError *error) { + dispatch_async(dispatch_get_main_queue(), ^{ + if (error) { + // [self showOnlyTextWithHint:@"保存失败"]; + }else { + // [self showOnlyTextWithHint:@"保存成功"]; + } + }); + }]; + } + + }]; + + }); +} + +#pragma mark - UIScrollViewDelegate +- (void)scrollViewDidScroll:(UIScrollView *)scrollView { + //四舍五入 + self.currentPage = roundf(scrollView.contentOffset.x/(self.view.frame.size.width + 2 * KSLPictureBrowseSpace)); + self.pageControl.currentPage = self.currentPage; +} +- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { + self.currentPage = scrollView.contentOffset.x / scrollView.frame.size.width; + self.pageControl.currentPage = self.currentPage; +} + +#pragma mark - UICollectionViewDelegate, UICollectionViewDataSource +- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { + return 1; +} +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return self.imagesArray.count; +} +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(nonnull NSIndexPath *)indexPath { + SLPictureBrowsingCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"SLPictureBrowsingCell" forIndexPath:indexPath]; + NSURL *imgUrl = self.imagesArray[indexPath.row]; + [cell.zoomView setImageUrl:imgUrl]; + return cell; +} +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { +} + +#pragma mark - UICollectionViewDelegateFlowLayout +- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { + return CGSizeMake([UIScreen mainScreen].bounds.size.width + 2 * KSLPictureBrowseSpace, self.collectionView.frame.size.height); +} +- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section { + return 0; +} +- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section { + return UIEdgeInsetsMake(0, 0, 0, 0); +} + +#pragma mark - UIViewControllerTransitioningDelegate +// 自定义转场动画 +//返回一个处理presente动画过渡的对象 +- (id )animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source { + _fromViewController = source; + self.transitionAnimation.transitionType = SLTransitionTypePresent; + if([source conformsToProtocol:@protocol(SLPictureAnimationViewDelegate)]) { + if ([source respondsToSelector:@selector(animationViewOfPictureTransition:)]) { + self.transitionAnimation.fromAnimatonView = [source performSelector:@selector(animationViewOfPictureTransition:) withObject:self.indexPath]; + } + } + self.transitionAnimation.toAnimatonView = [self currentAnimatonView]; + return self.transitionAnimation; +} +//返回一个处理dismiss动画过渡的对象 +- (id )animationControllerForDismissedController:(UIViewController *)dismissed { + self.transitionAnimation.transitionType = SLTransitionTypeDissmiss; + if([_fromViewController conformsToProtocol:@protocol(SLPictureAnimationViewDelegate)]) { + if ([_fromViewController respondsToSelector:@selector(animationViewOfPictureTransition:)]) { + self.transitionAnimation.toAnimatonView = [_fromViewController performSelector:@selector(animationViewOfPictureTransition:) withObject:self.indexPath]; + } + } + self.transitionAnimation.fromAnimatonView = [self currentAnimatonView];; + return self.transitionAnimation; +} + +@end diff --git a/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureTransitionAnimation.h b/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureTransitionAnimation.h new file mode 100644 index 00000000..b9f67fb8 --- /dev/null +++ b/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureTransitionAnimation.h @@ -0,0 +1,30 @@ +// +// SLPictureTransitionAnimation.h +// TELiveClass +// +// Created by wsl on 2020/2/28. +// Copyright © 2020 offcn_c. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +//定义枚举 转场类型 +typedef enum : NSUInteger { + SLTransitionTypePush, + SLTransitionTypePop, + SLTransitionTypePresent, + SLTransitionTypeDissmiss +} SLTransitionType; + +/// 图片浏览转场动画 +@interface SLPictureTransitionAnimation : NSObject +@property (nonatomic, assign) SLTransitionType transitionType; +@property (nonatomic, strong) UIView *toAnimatonView; //动画前的视图 +@property (nonatomic, strong) UIView *fromAnimatonView; //动画后的视图 +//@property (nonatomic, assign) CGRect animatonRect; +//@property (nonatomic, strong) UIView *animatonView; +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureTransitionAnimation.m b/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureTransitionAnimation.m new file mode 100644 index 00000000..dc38fe0b --- /dev/null +++ b/iOS_Tips/DarkMode/WKWebView/WebNative/SLPictureTransitionAnimation.m @@ -0,0 +1,95 @@ +// +// SLPictureTransitionAnimation.m +// TELiveClass +// +// Created by wsl on 2020/2/28. +// Copyright © 2020 offcn_c. All rights reserved. +// + +#import "SLPictureTransitionAnimation.h" + +@interface SLPictureTransitionAnimation () +@end + +@implementation SLPictureTransitionAnimation + +#pragma mark - UIViewControllerAnimatedTransitioning +//返回动画时间 +- (NSTimeInterval)transitionDuration:(nullable id )transitionContext { + return 0.3; +} +//所有的过渡动画事务都在这个代理方法里面完成 +- (void)animateTransition:(id )transitionContext { + switch (self.transitionType) { + case SLTransitionTypePush: + [self pushAnimation:transitionContext]; + break; + case SLTransitionTypePop: + [self popAnimation:transitionContext]; + break; + case SLTransitionTypePresent: + [self presentAnimation:transitionContext]; + break; + case SLTransitionTypeDissmiss: + [self dissmissAnimation:transitionContext]; + break; + } +} + +#pragma mark - Push/Pop +- (void)pushAnimation:(id )transitionContext { + [transitionContext completeTransition:YES]; +} +- (void)popAnimation:(id )transitionContext { + [transitionContext completeTransition:YES]; +} + +#pragma mark - Present/Dissmiss +- (void)presentAnimation:(id )transitionContext { + //转场后视图控制器上的视图view + UIView *toView = [transitionContext viewForKey: UITransitionContextToViewKey]; + toView.hidden = true; + //这里有个重要的概念containerView,如果要对视图做转场动画,视图就必须要加入containerView中才能进行,可以理解containerView管理着所有做转场动画的视图 + UIView *containerView = transitionContext.containerView; + //黑色背景视图 + UIView *bgView = [[UIView alloc] initWithFrame: CGRectMake(0,0, containerView.frame.size.width, containerView.frame.size.height)]; + bgView.backgroundColor = [UIColor blackColor]; + [containerView addSubview:toView]; + [containerView addSubview:bgView]; + [containerView addSubview:self.fromAnimatonView]; + //动画 + [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ + if(!CGRectEqualToRect(self.toAnimatonView.frame, CGRectZero)) { + self.fromAnimatonView.frame = self.toAnimatonView.frame; + self.fromAnimatonView.layer.contentsRect = self.toAnimatonView.layer.contentsRect; + } + } completion:^(BOOL finished) { + toView.hidden = NO; + [bgView removeFromSuperview]; + [self.fromAnimatonView removeFromSuperview]; + [transitionContext completeTransition:YES]; + }]; +} +- (void)dissmissAnimation:(id )transitionContext { + //转场前视图控制器上的视图view + UIView *fromView = [transitionContext viewForKey:UITransitionContextFromViewKey]; + fromView.hidden = YES; + UIView *containerView = transitionContext.containerView; + //黑色背景视图 + UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake( 0,0, containerView.frame.size.width, containerView.frame.size.height)]; + bgView.backgroundColor = fromView.backgroundColor; + [containerView addSubview:bgView]; + [containerView addSubview:self.fromAnimatonView]; + //动画 + [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ + self.fromAnimatonView.frame = self.toAnimatonView.frame; + self.fromAnimatonView.layer.contentsRect = self.toAnimatonView.layer.contentsRect; + bgView.alpha = 0; + } completion:^(BOOL finished) { + [bgView removeFromSuperview]; + [self.fromAnimatonView removeFromSuperview]; + [transitionContext completeTransition:YES]; + }]; +} + +@end diff --git a/iOS_Tips/DarkMode/WKWebView/WebNative/SLReusableManager.h b/iOS_Tips/DarkMode/WKWebView/WebNative/SLReusableManager.h new file mode 100644 index 00000000..d0f4ee5b --- /dev/null +++ b/iOS_Tips/DarkMode/WKWebView/WebNative/SLReusableManager.h @@ -0,0 +1,50 @@ +// +// SLReusableManager.h +// DarkMode +// +// Created by wsl on 2020/6/14. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface SLReusableCell : UIView +@end + +@class SLReusableManager; +@protocol SLReusableDataSource +@required +///行数 +- (NSInteger)numberOfRowsInReusableManager:(SLReusableManager *)reusableManager; +///行位置 +- (CGRect)reusableManager:(SLReusableManager *)reusableManager frameForRowAtIndex:(NSInteger)index; +///行内容 +- (SLReusableCell *)reusableManager:(SLReusableManager *)reusableManager cellForRowAtIndex:(NSInteger)index; +@end +@protocol SLReusableDelegate +///选中行 +- (void)reusableManager:(SLReusableManager *)reusableManager didSelectRowAtIndex:(NSInteger)index; +@end + +@interface SLReusableManager : NSObject +///事件代理 +@property (nonatomic, weak) iddelegate; +///数据源代理 +@property (nonatomic, weak) iddataSource; +/// 父视图 +@property (nonatomic, weak) UIScrollView *scrollView; + +///刷新数据 +- (void)reloadData; +///注册样式 +- (void)registerClass:(Class)class forCellReuseIdentifier:(NSString *)cellID; +///根据cellID从复用池reusablePool取可重用的view,如果没有,重新创建一个新对象返回 +- (SLReusableCell *)dequeueReusableCellWithIdentifier:(nonnull NSString *)cellID index:(NSInteger)index; +///获取索引为index的cell,如果第index的cell不在可见范围内,返回nil +- (SLReusableCell *)cellForRowAtIndex:(NSInteger)index; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/WKWebView/WebNative/SLReusableManager.m b/iOS_Tips/DarkMode/WKWebView/WebNative/SLReusableManager.m new file mode 100644 index 00000000..5962dd7b --- /dev/null +++ b/iOS_Tips/DarkMode/WKWebView/WebNative/SLReusableManager.m @@ -0,0 +1,266 @@ +// +// SLReusableManager.m +// DarkMode +// +// Created by wsl on 2020/6/14. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLReusableManager.h" + +@interface SLReusableCell () +@property (nonatomic, copy) NSString *cellID; +@property (nonatomic, assign) NSInteger index; +@end +@implementation SLReusableCell +@end + +///复用管理 +@interface SLReusableManager () + +///复用池 +@property (nonatomic, strong) NSMutableDictionary *> *reusablePool; +///注册的类 +@property (nonatomic, strong) NSMutableDictionary *registerClasses; +/// 每一行的坐标位置 +@property (nonatomic, strong) NSMutableArray *frameArray; +/// 当前可见的cells +@property (nonatomic, strong) NSMutableArray *visibleCells; +///记录最后一次的偏移量,用来判断滑动方向 +@property (nonatomic, assign) CGFloat lastContentOffsetY; +///顶部即将展示的索引 +@property (nonatomic, assign) NSInteger willDisplayIndexTop; +///底部即将展示的索引 +@property (nonatomic, assign) NSInteger willDisplayIndexBottom; + +@end +@implementation SLReusableManager + +#pragma mark - Override +- (void)dealloc { + [self removeKVO]; +} +#pragma mark - Getter +- (NSMutableDictionary *)reusablePool { + if (!_reusablePool) { + _reusablePool = [NSMutableDictionary dictionary]; + } + return _reusablePool;; +} +- (NSMutableDictionary *)registerClasses { + if (!_registerClasses) { + _registerClasses = [NSMutableDictionary dictionary]; + } + return _registerClasses; +} +- (NSMutableArray *)frameArray { + if (!_frameArray) { + _frameArray = [NSMutableArray array]; + } + return _frameArray; +} +- (NSMutableArray *)visibleCells { + if (!_visibleCells) { + _visibleCells = [NSMutableArray array]; + } + return _visibleCells;; +} + +#pragma mark - Setter +- (void)setScrollView:(UIScrollView *)scrollView { + _scrollView =scrollView; + [self addKVO]; +} + +#pragma mark - KVO +- (void)addKVO { + [self.scrollView addObserver:self + forKeyPath:@"contentOffset" + options:NSKeyValueObservingOptionNew + context:nil]; +} +- (void)removeKVO{ + [self.scrollView removeObserver:self forKeyPath:@"contentOffset"]; +} +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context{ + if(object == self.scrollView && [keyPath isEqualToString:@"contentOffset"]) { + if(self.scrollView.contentOffset.y > self.lastContentOffsetY) { + [self willDisplayCellWithDirection:NO]; + [self willDisappearCellWithDirection:YES]; + }else { + [self willDisplayCellWithDirection:YES]; + [self willDisappearCellWithDirection:NO]; + } + self.lastContentOffsetY = self.scrollView.contentOffset.y; + } +} + +#pragma mark - Public +///刷新数据 +- (void)reloadData { + //清空布局信息 + [self.frameArray removeAllObjects]; + for (UIView *subView in self.scrollView.subviews) { + if ([subView isKindOfClass:[SLReusableCell class]]) { + [subView removeFromSuperview]; + } + } + [self.visibleCells removeAllObjects]; + + self.willDisplayIndexTop = -1; + //数据源个数 + NSInteger count = [self.dataSource numberOfRowsInReusableManager:self]; + self.willDisplayIndexBottom = count; + + CGFloat y = 0; + //获取每一行的布局信息 + for (int i = 0; i < count; i++) { + CGRect rect = [self.dataSource reusableManager:self frameForRowAtIndex:i]; + [self.frameArray addObject:[NSValue valueWithCGRect:rect]]; + + if (rect.origin.y + rect.size.height < self.scrollView.contentOffset.y) { + self.willDisplayIndexTop = i; + } + + //按需加载 只加载坐标位置是在当前窗口显示的视图 + if (rect.origin.y + rect.size.height >= self.scrollView.contentOffset.y && rect.origin.y <= self.scrollView.contentOffset.y + self.scrollView.sl_height) { + SLReusableCell *cell = [self.dataSource reusableManager:self cellForRowAtIndex:i]; + cell.frame = rect; + [self.scrollView addSubview:cell]; + [self.visibleCells addObject:cell]; + } + + if (rect.origin.y > self.scrollView.contentOffset.y + self.scrollView.sl_height && self.willDisplayIndexBottom == count) { + self.willDisplayIndexBottom = i; + } + + //下一行的起始纵坐标 + y += rect.size.height; + + //最后 确定了内容大小contentSize + if (i == count - 1) { + self.scrollView.contentSize = CGSizeMake(self.scrollView.sl_width, y); + } + } +} +///注册样式 +- (void)registerClass:(Class)class forCellReuseIdentifier:(NSString *)cellID { + self.reusablePool[cellID] = [NSHashTable weakObjectsHashTable]; + self.registerClasses[cellID] = class; +} +///根据cellID从复用池reusablePool取可重用的view,如果没有,重新创建一个新对象返回 +- (SLReusableCell *)dequeueReusableCellWithIdentifier:(nonnull NSString *)cellID index:(NSInteger)index{ + NSHashTable *hashTable = self.reusablePool[cellID]; + SLReusableCell *cell = hashTable.allObjects.firstObject; + if (cell == nil) { + //复用池reusablePool没有可重用的,就重新创建一个新对象返回 + cell = [[self.registerClasses[cellID] alloc] init]; + cell.cellID = cellID; + CGRect rect = [self.dataSource reusableManager:self frameForRowAtIndex:index]; + cell.frame = rect; + cell.userInteractionEnabled = YES; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didSelectedAction:)]; + [cell addGestureRecognizer:tap]; + }else { + //从缓冲池中取出可重用的cell + [hashTable removeObject:cell]; + } + cell.index = index; + return cell; +} +///获取索引为index的cell,如果第index的cell不在可见范围内,返回nil +- (SLReusableCell *)cellForRowAtIndex:(NSInteger)index { + for (SLReusableCell *cell in self.visibleCells) { + if (cell.index == index) { + return cell; + } + } + return nil; +} + +#pragma mark - Help Methods +///当前可见cell的索引 其实绘制cell的时候就可以先保存可见的索引,不用每次遍历查询 +- (NSArray *)indexForVisibleRows { + NSMutableArray *indexs = [NSMutableArray array]; + for (NSInteger i = self.willDisplayIndexTop+1; i < self.willDisplayIndexBottom; i++) { + [indexs addObject:@(i)]; + } + return indexs; +} +///即将显示的cell,显示时创建或从缓存池中取出调整坐标位置 top:YES上/NO下 +- (void)willDisplayCellWithDirection:(BOOL)top { + if(top) { + if (_willDisplayIndexTop < 0) return; + CGRect rect = [self.frameArray[self.willDisplayIndexTop] CGRectValue]; + //按需加载 只加载坐标位置是在当前窗口显示的视图 + if (rect.origin.y + rect.size.height >= self.scrollView.contentOffset.y && rect.origin.y <= self.scrollView.contentOffset.y + self.scrollView.sl_height) { + NSLog(@"上 第 %ld 个cell显示",self.willDisplayIndexTop); + SLReusableCell *cell = [self.dataSource reusableManager:self cellForRowAtIndex:self.willDisplayIndexTop]; + cell.frame = rect; + [self.scrollView addSubview:cell]; + self.willDisplayIndexTop -=1; + [self.visibleCells insertObject:cell atIndex:0]; + } + }else { + NSInteger count = [self.dataSource numberOfRowsInReusableManager:self]; + if (_willDisplayIndexBottom >= count) return; + CGRect rect = [self.frameArray[self.willDisplayIndexBottom] CGRectValue]; + //按需加载 只加载坐标位置是在当前窗口显示的视图 + if (rect.origin.y + rect.size.height >= self.scrollView.contentOffset.y && rect.origin.y <= self.scrollView.contentOffset.y + self.scrollView.sl_height) { + NSLog(@"下 第 %ld 个cell显示",self.willDisplayIndexBottom); + SLReusableCell *cell = [self.dataSource reusableManager:self cellForRowAtIndex:self.willDisplayIndexBottom]; + cell.frame = rect; + [self.scrollView addSubview:cell]; + self.willDisplayIndexBottom +=1; + [self.visibleCells addObject:cell]; + } + } +} +//即将消失的cell,在消失时放入缓冲池里,并且重置视图cell的内容 top:YES上/NO下 +- (void)willDisappearCellWithDirection:(BOOL)top { + if(top) { + if (self.willDisplayIndexTop+1 >= self.frameArray.count) return; + CGRect rect = [self.frameArray[self.willDisplayIndexTop+1] CGRectValue]; + if (rect.origin.y + rect.size.height < self.scrollView.contentOffset.y) { + self.willDisplayIndexTop = self.willDisplayIndexTop+1; + NSLog(@"上 第 %ld 个cell消失",self.willDisplayIndexTop); + SLReusableCell *cell = self.visibleCells.firstObject; + + //进入缓冲池后,要清空重置cell上的内容,防止下一个取出时显示之前的内容,我这里重置时用了自己的默认logo,你可以自己重绘默认时的cell内容 +// for (UIView *subView in cell.subviews) { +// subView.layer.contents = (__bridge id)[UIImage imageNamed:@"wsl"].CGImage; +// } +// cell.layer.contents = (__bridge id)[UIImage imageNamed:@"wsl"].CGImage; + + NSHashTable * hashTable= self.reusablePool[cell.cellID]; + [hashTable addObject:cell]; + [self.visibleCells removeObjectAtIndex:0]; + } + }else { + if (self.willDisplayIndexBottom-1 < 0) return; + CGRect rect = [self.frameArray[self.willDisplayIndexBottom-1] CGRectValue]; + if (rect.origin.y > self.scrollView.contentOffset.y + self.scrollView.sl_height) { + self.willDisplayIndexBottom = self.willDisplayIndexBottom-1; + NSLog(@"下 第 %ld 个cell消失",self.willDisplayIndexBottom); + SLReusableCell *cell = self.visibleCells.lastObject; + + //进入缓冲池后,要清空重置cell上的内容,防止下一个取出时显示之前的内容,我这里重置时用了自己的默认logo,你可以自己重绘默认时的cell内容 +// for (UIView *subView in cell.subviews) { +// subView.layer.contents = (__bridge id)[UIImage imageNamed:@"wsl"].CGImage; +// } +// cell.layer.contents = (__bridge id)[UIImage imageNamed:@"wsl"].CGImage; + + NSHashTable * hashTable= self.reusablePool[cell.cellID]; + [hashTable addObject:cell]; + [self.visibleCells removeLastObject]; + } + } +} + +#pragma mark - Events Handle +- (void)didSelectedAction:(UITapGestureRecognizer *)tap { + SLReusableCell *cell = (SLReusableCell *)tap.view; + [self.delegate reusableManager:self didSelectRowAtIndex:cell.index]; +} +@end + diff --git a/iOS_Tips/DarkMode/WKWebView/SLWebNativeViewController.h b/iOS_Tips/DarkMode/WKWebView/WebNative/SLWebNativeViewController.h similarity index 84% rename from iOS_Tips/DarkMode/WKWebView/SLWebNativeViewController.h rename to iOS_Tips/DarkMode/WKWebView/WebNative/SLWebNativeViewController.h index 32309c03..b2994f49 100644 --- a/iOS_Tips/DarkMode/WKWebView/SLWebNativeViewController.h +++ b/iOS_Tips/DarkMode/WKWebView/WebNative/SLWebNativeViewController.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN /// WKWebView渲染的部分HTML元素替换为用原生组件显示 -@interface SLWebNativeViewController : UIViewController +@interface SLWebNativeViewController : SLViewController @end diff --git a/iOS_Tips/DarkMode/WKWebView/WebNative/SLWebNativeViewController.m b/iOS_Tips/DarkMode/WKWebView/WebNative/SLWebNativeViewController.m new file mode 100644 index 00000000..89617fff --- /dev/null +++ b/iOS_Tips/DarkMode/WKWebView/WebNative/SLWebNativeViewController.m @@ -0,0 +1,333 @@ +// +// SLWebNativeViewController.m +// DarkMode +// +// Created by wsl on 2020/6/8. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLWebNativeViewController.h" +#import +#import "YYImage.h" +#import +#import "SLAvPlayer.h" +#import +#import "SLReusableManager.h" +#import "SLPictureBrowseController.h" + +@interface SLWebNativeModel : NSObject +@property (nonatomic, copy) NSString *tagID; //标签ID +@property (nonatomic, copy) NSString *type; //元素类型 +@property (nonatomic, copy) NSString *imgUrl; //图片地址 +@property (nonatomic, copy) NSString *videoUrl; //视频地址 +@property (nonatomic, copy) NSString *audioUrl; //音频地址 +@property (nonatomic, assign) CGFloat width; //该标签元素内容宽 +@property (nonatomic, assign) CGFloat height; //该标签元素内容高 +@end +@implementation SLWebNativeModel +@end + + +@interface SLWebNativeCell : SLReusableCell +@property (nonatomic, strong) YYAnimatedImageView *imageView; +@property (nonatomic, assign) CGSize imageViewSize; +@property (nonatomic, strong) UIImageView *playIcon; +@end +@implementation SLWebNativeCell +- (instancetype)init { + self = [super init]; + if (self) { + [self setupUI]; + } + return self; +} +- (void)setupUI { + _imageView = [[YYAnimatedImageView alloc] init]; + [self addSubview:_imageView]; + [_imageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.left.right.bottom.mas_equalTo(0); + }]; + + _playIcon = [[UIImageView alloc] init]; + _playIcon.image = [UIImage imageNamed:@"play"]; + _playIcon.hidden = YES; + [_imageView addSubview:_playIcon]; + [_playIcon mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(80, 80)); + make.centerX.mas_equalTo(_imageView.mas_centerX); + make.centerY.mas_equalTo(_imageView.mas_centerY); + }]; +} + +- (void)updateDataWith:(SLWebNativeModel *)model { + _imageView.layer.contentsRect = CGRectMake(0, 0, 1, 1); + __weak typeof(self) weakSelf = self; + [self.imageView yy_setImageWithURL:[NSURL URLWithString:model.imgUrl] placeholder:nil options:YYWebImageOptionShowNetworkActivity completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) { + if(error) return ; + if (image.size.width > image.size.height) { + //宽图 + CGFloat width = weakSelf.imageViewSize.height*image.size.width/image.size.height; + if (width > weakSelf.imageViewSize.width) { + CGFloat proportion = weakSelf.imageViewSize.width/width; + weakSelf.imageView.layer.contentsRect = CGRectMake((1 - proportion)/2, 0, proportion, 1); + } + }else if (image.size.width < image.size.height) { + //长图 + CGFloat height = weakSelf.imageViewSize.width*image.size.height/image.size.width; + if (height > weakSelf.imageViewSize.height) { + CGFloat proportion = weakSelf.imageViewSize.height/height; + weakSelf.imageView.layer.contentsRect = CGRectMake(0,(1 - proportion)/2, 1, proportion); + } + } + }]; + + if ([model.type isEqualToString:@"image"]) { + //图片 + _playIcon.hidden = YES; + }else if ([model.type isEqualToString:@"video"]) { + //视频 + _playIcon.hidden = NO; + [_playIcon mas_updateConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(60, 60)); + }]; + }else if ([model.type isEqualToString:@"audio"]) { + //音频 + _playIcon.hidden = NO; + [_playIcon mas_updateConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(40, 40)); + }]; + } +} +@end + +/* + HTML中部分非文本元素,替换为用native组件来实现展示,来达到个性化自定义、灵活、提高渲染效率、简化web和OC交互的处理流程。 + 本示例 仅以用native组件替换HTML中的img、video、audio 内容来做展示,当然你也可以替换HTML中其它的标签元素。 + 注意:1.用native组件替换时,我们也需要进行一些native组件复用、按需加载的优化处理,类似于tableView的机制。 + 2.html界面调整时,要去重新调用JS方法获取原生标签的位置并更新native组件的位置。 + 3.如果仅需要处理HTML的图片元素,也可以不用原生组件imageView展示,原生下载处理图片,然后通过oc调用JS设置图片 + */ +@interface SLWebNativeViewController () + +@property (nonatomic, strong) dispatch_semaphore_t semaphore; +@property (nonatomic, strong) WKWebView * webView; +/// 网页加载进度视图 +@property (nonatomic, strong) UIProgressView * progressView; +/// WKWebView 内容的高度 +@property (nonatomic, assign) CGFloat webContentHeight; +/// 原生组件所需的HTML中元素的数据 +@property (nonatomic, strong) NSMutableArray *dataSource; + +///复用管理 +@property (nonatomic, strong) SLReusableManager *reusableManager; +/// 每一行的坐标位置 +@property (nonatomic, strong) NSMutableArray *frameArray; + +@end + +@implementation SLWebNativeViewController + +#pragma mark - Override +- (void)viewDidLoad { + [super viewDidLoad]; + [self getData]; + [self setupUI]; + [self addKVO]; +} +- (void)viewWillDisappear:(BOOL)animated { + [super viewWillDisappear:animated]; + [self.progressView removeFromSuperview]; +} +- (void)dealloc { + [self removeKVO]; +} + +#pragma mark - UI +- (void)setupUI { + self.navigationItem.title = @"Html非文本元素替换为native组件展示"; + [self.view addSubview:self.webView]; + + _semaphore = dispatch_semaphore_create(1); + NSString *path = [[NSBundle mainBundle] pathForResource:@"WebNative.html" ofType:nil]; + NSString *htmlString = [[NSString alloc]initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; + [_webView loadHTMLString:htmlString baseURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]]]; +} + +#pragma mark - Data +/// 获取原生组件所需的HTML中元素的数据 +- (void)getData { + [self.dataSource removeAllObjects]; + NSData *contentData = [[NSFileManager defaultManager] contentsAtPath:[[NSBundle mainBundle] pathForResource:@"WebNativeJson" ofType:@"txt"]]; + NSDictionary * dataDict = [NSJSONSerialization JSONObjectWithData:contentData options:kNilOptions error:nil]; + for (NSDictionary *dict in dataDict[@"dataList"]) { + SLWebNativeModel *model = [SLWebNativeModel yy_modelWithDictionary:dict]; + [self.dataSource addObject:model]; + } +} + +#pragma mark - Getter +- (WKWebView *)webView { + if(_webView == nil){ + //创建网页配置 + WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init]; + _webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, SL_kScreenWidth, SL_kScreenHeight) configuration:config]; + _webView.navigationDelegate = self; + _webView.UIDelegate = self; + } + return _webView; +} +- (UIProgressView *)progressView { + if (!_progressView){ + _progressView = [[UIProgressView alloc] initWithFrame:CGRectMake(0, 0, SL_kScreenWidth, 2)]; + _progressView.tintColor = [UIColor blueColor]; + _progressView.trackTintColor = [UIColor clearColor]; + } + if (_progressView.superview == nil) { + [self.navigationController.navigationBar addSubview:_progressView]; + } + return _progressView; +} +- (NSMutableArray *)dataSource { + if (!_dataSource) { + _dataSource = [NSMutableArray array]; + } + return _dataSource; +} +- (SLReusableManager *)reusableManager { + if (!_reusableManager) { + _reusableManager = [[SLReusableManager alloc] init]; + _reusableManager.delegate = self; + _reusableManager.dataSource = self; + _reusableManager.scrollView = self.webView.scrollView; + [_reusableManager registerClass:[SLWebNativeCell class] forCellReuseIdentifier:@"cellID"]; + } + return _reusableManager; +} +- (NSMutableArray *)frameArray { + if (!_frameArray) { + _frameArray = [NSMutableArray array]; + } + return _frameArray; +} + +#pragma mark - KVO +///添加键值对监听 +- (void)addKVO { + //监听网页加载进度 + [self.webView addObserver:self + forKeyPath:NSStringFromSelector(@selector(estimatedProgress)) + options:NSKeyValueObservingOptionNew + context:nil]; + //监听网页内容高度 + [self.webView.scrollView addObserver:self + forKeyPath:@"contentSize" + options:NSKeyValueObservingOptionNew + context:nil]; +} +///移除监听 +- (void)removeKVO { + //移除观察者 + [_webView removeObserver:self + forKeyPath:NSStringFromSelector(@selector(estimatedProgress))]; + [_webView.scrollView removeObserver:self + forKeyPath:NSStringFromSelector(@selector(contentSize))]; +} +//kvo监听 必须实现此方法 +-(void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(id)object + change:(NSDictionary *)change + context:(void *)context{ + + if ([keyPath isEqualToString:NSStringFromSelector(@selector(estimatedProgress))] + && object == _webView) { + // NSLog(@"网页加载进度 = %f",_webView.estimatedProgress); + self.progressView.progress = _webView.estimatedProgress; + if (_webView.estimatedProgress >= 1.0f) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + self.progressView.progress = 0; + }); + } + }else if ([keyPath isEqualToString:NSStringFromSelector(@selector(contentSize))] + && object == _webView.scrollView) { + if (_webContentHeight == _webView.scrollView.contentSize.height) { + }else { + _webContentHeight = _webView.scrollView.contentSize.height; + } + } +} + +#pragma mark - WKNavigationDelegate +// 页面加载完成之后调用 +- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation { + [self.frameArray removeAllObjects]; + //根据服务器下发的标签相关的数据,用原生组件展示,这里原生组件的创建要注意按需加载和复用,类似于tableView,否则对内存还是有不小的消耗的。 + int i = 0; + SL_WeakSelf; + for (SLWebNativeModel *model in self.dataSource) { + NSString *jsString = [NSString stringWithFormat:@"getElementFrame('%@',%f, %f)",model.tagID,model.width,model.height]; + [_webView evaluateJavaScript:jsString completionHandler:^(id _Nullable data, NSError * _Nullable error) { + dispatch_semaphore_wait(self.semaphore, DISPATCH_TIME_FOREVER); + //获取标签位置坐标 + NSDictionary *frameDict = (NSDictionary *)data; + CGRect frame = CGRectMake( + [frameDict[@"x"] floatValue], [frameDict[@"y"] floatValue], [frameDict[@"width"] floatValue], [frameDict[@"height"] floatValue]); + if(!CGRectEqualToRect(frame, CGRectZero)) { + [weakSelf.frameArray addObject:[NSValue valueWithCGRect:frame]]; + } + dispatch_semaphore_signal(weakSelf.semaphore); + if (i == weakSelf.dataSource.count - 1) { + [weakSelf.reusableManager reloadData]; + } + }]; + i++; + } +} + +#pragma mark - SLReusableDataSource +- (NSInteger)numberOfRowsInReusableManager:(SLReusableManager *)reusableManager { + return self.frameArray.count; +} +- (CGRect)reusableManager:(SLReusableManager *)reusableManager frameForRowAtIndex:(NSInteger)index { + CGRect rect = [self.frameArray[index] CGRectValue]; + return rect; +} +- (SLReusableCell *)reusableManager:(SLReusableManager *)reusableManager cellForRowAtIndex:(NSInteger)index { + SLWebNativeCell *cell = (SLWebNativeCell *)[reusableManager dequeueReusableCellWithIdentifier:@"cellID" index:index]; + SLWebNativeModel *model = self.dataSource[index]; + cell.imageViewSize = [self.frameArray[index] CGRectValue].size; + [cell updateDataWith:model]; + return cell; +} + +#pragma mark - SLReusableDelegate +- (void)reusableManager:(SLReusableManager *)reusableManager didSelectRowAtIndex:(NSInteger)index { + SLWebNativeModel *model = self.dataSource[index]; + if ([model.type isEqualToString:@"image"]) { + //图片 + NSLog(@"点击了 %ld 图片", index); + SLPictureBrowseController *pictureBrowseController = [[SLPictureBrowseController alloc] init]; + pictureBrowseController.imagesArray = [NSMutableArray arrayWithArray:@[[NSURL URLWithString:model.imgUrl]]]; + pictureBrowseController.indexPath = [NSIndexPath indexPathForRow:index inSection:0]; + [self presentViewController:pictureBrowseController animated:YES completion:nil]; + + }else if ([model.type isEqualToString:@"video"]) { + //视频 + NSLog(@"点击了 %ld 视频", index); + }else if ([model.type isEqualToString:@"audio"]) { + //音频 + NSLog(@"点击了 %ld 音频", index); + } +} + +#pragma mark - SLPictureAnimationViewDelegate +//用于转场的动画视图 +- (UIView *)animationViewOfPictureTransition:(NSIndexPath *)indexPath { + SLWebNativeCell *imageCell = (SLWebNativeCell *)[self.reusableManager cellForRowAtIndex:indexPath.row]; + UIImageView *tempView = [UIImageView new]; + tempView.image = imageCell.imageView.image; + tempView.layer.contentsRect = imageCell.imageView.layer.contentsRect; + tempView.frame = [imageCell.imageView convertRect:imageCell.imageView.bounds toView:self.view]; + return tempView; +} + +@end diff --git a/iOS_Tips/DarkMode/WKWebView/WebNative.html b/iOS_Tips/DarkMode/WKWebView/WebNative/WebNative.html similarity index 56% rename from iOS_Tips/DarkMode/WKWebView/WebNative.html rename to iOS_Tips/DarkMode/WKWebView/WebNative/WebNative.html index bf4c34a3..769701bb 100755 --- a/iOS_Tips/DarkMode/WKWebView/WebNative.html +++ b/iOS_Tips/DarkMode/WKWebView/WebNative/WebNative.html @@ -47,37 +47,49 @@

Welcome To You

掘金

-
原生组件UIImageView
+
原生组件UIImageView
-
原生组件UIImageView
+
原生组件UIImageView
-
原生组件UIImageView
+
原生组件UIImageView
-
原生组件UIImageView
+
原生组件UIImageView
-
原生组件UIImageView
+
原生组件UIImageView
-
原生组件UIImageView
+
原生组件UIImageView
-
原生组件UIImageView
+
原生组件UIImageView
-
原生组件UIImageView
+
原生组件UIImageView
-
原生组件AVPlayer播放视频
-
+
原生组件UIImageView
+ +
+
原生组件UIImageView
+
+
+
原生组件UIImageView
+
- -
原生组件AVPlayer播放音频
+
原生组件UIImageView
+
+
+
原生组件AVPlayer播放视频
+
+ +
原生组件AVPlayer播放音频
+

以上图片来源于网络

@@ -85,19 +97,19 @@

Welcome To You

diff --git a/iOS_Tips/DarkMode/WKWebView/WebNativeJson.txt b/iOS_Tips/DarkMode/WKWebView/WebNative/WebNativeJson.txt similarity index 76% rename from iOS_Tips/DarkMode/WKWebView/WebNativeJson.txt rename to iOS_Tips/DarkMode/WKWebView/WebNative/WebNativeJson.txt index b434c6ad..131bd25d 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebNativeJson.txt +++ b/iOS_Tips/DarkMode/WKWebView/WebNative/WebNativeJson.txt @@ -40,7 +40,7 @@ "type": "image", "imgUrl": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1590574444194&di=3f1d5730bc757a866ebba2aef6248367&imgtype=0&src=http%3A%2F%2Fhiphotos.baidu.com%2F_pennsylvania%2Fpic%2Fitem%2Ff939292bf63db47f1f3089ad.jpg", "width": "320", - "height": "240" + "height": "300" }, { "tagID": "image7", @@ -54,7 +54,35 @@ "type": "image", "imgUrl": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1590574473190&di=a6d3a0e1cf189e5222d4fb8d21ee0475&imgtype=0&src=http%3A%2F%2Fupload.mnw.cn%2F2016%2F0414%2F1460606040792.jpg", "width": "320", - "height": "240" + "height": "320" + }, + { + "tagID": "image9", + "type": "image", + "imgUrl": "http://img.mp.itc.cn/upload/20170427/b78c6b85d3a1491fa6f5d3b671429d99_th.gif", + "width": "320", + "height": "320" + }, + { + "tagID": "image10", + "type": "image", + "imgUrl": "http://b-ssl.duitang.com/uploads/blog/201401/08/20140108182739_kFHxN.gif", + "width": "320", + "height": "320" + }, + { + "tagID": "image11", + "type": "image", + "imgUrl": "http://b-ssl.duitang.com/uploads/item/201601/15/20160115140217_HeJAm.jpeg", + "width": "320", + "height": "320" + }, + { + "tagID": "image12", + "type": "image", + "imgUrl": "http://www.3dmgame.com/uploads/allimg/180409/369_180409203945_1.jpg", + "width": "320", + "height": "320" }, { "tagID": "video1", @@ -74,3 +102,5 @@ } ] } + + diff --git a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLScrollViewController.m b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLScrollViewController.m index d6474521..84174e41 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLScrollViewController.m +++ b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLScrollViewController.m @@ -18,7 +18,8 @@ @interface SLScrollView : UIView fabs(velocity.x); } @end diff --git a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController.h b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController.h index 9f95fc1a..b64bf137 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController.h +++ b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN 方案1:WebView作为TableView的Header, 撑开webView,显示渲染全部内容,当内容过多时,比如大量图片时,容易造成内存暴涨(不建议使用) 参考: https://www.jianshu.com/p/42858f95ab43、https://dequan1331.github.io/hybrid-page-kit.html、https://www.jianshu.com/p/3721d736cf68 */ -@interface SLWebTableViewController : UIViewController +@interface SLWebTableViewController : SLViewController @end diff --git a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController.m b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController.m index ecfc77dc..aa0f1aae 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController.m +++ b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController.m @@ -33,7 +33,6 @@ - (void)viewWillDisappear:(BOOL)animated { } - (void)dealloc { [self removeKVO]; - NSLog(@"%@释放了",NSStringFromClass(self.class)); } #pragma mark - SetupUI diff --git a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController2.h b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController2.h index 663bfb89..4517aa9f 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController2.h +++ b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController2.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN 方案2:将tableView加到WKWebView.scrollView上, WKWebView加载的HTML最后留一个空白占位div,用于确定tableView的位置,在监听到webView.scrollView.contentSize变化后,不断调整tableView的位置,同时将该div的尺寸设置为tableView的尺寸。禁用tableView和webView.scrollVie的scrollEnabled = NO,通过添加pan手势,手动调整contentOffset。tableView的最大高度为屏幕高度,当内容不足一屏时,高度为内容高度。 参考: https://www.jianshu.com/p/42858f95ab43、https://dequan1331.github.io/hybrid-page-kit.html、https://www.jianshu.com/p/3721d736cf68 */ -@interface SLWebTableViewController2 : UIViewController +@interface SLWebTableViewController2 : SLViewController @end diff --git a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController2.m b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController2.m index ad194ee5..ebfadada 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController2.m +++ b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController2.m @@ -48,7 +48,6 @@ - (void)viewWillDisappear:(BOOL)animated { } - (void)dealloc { [self removeKVO]; - NSLog(@"%@释放了",NSStringFromClass(self.class)); } // 滚动中单击可以停止滚动 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { diff --git a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController3.h b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController3.h index 4701d52f..0deb903a 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController3.h +++ b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController3.h @@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN WKWebView + UITableView 方案3:(推荐) WKWebView作为TableView的Header, 但不撑开webView。禁用tableView和webView.scrollVie的scrollEnabled = NO,通过添加pan手势,手动调整contentOffset。WebView的最大高度为屏幕高度,当内容不足一屏时,高度为内容高度。和方案2类似,但是不需要插入占位Div。 */ -@interface SLWebTableViewController3 : UIViewController +@interface SLWebTableViewController3 : SLViewController @end diff --git a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController3.m b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController3.m index 02e2eddd..9f120ddd 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController3.m +++ b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController3.m @@ -51,7 +51,6 @@ - (void)viewWillDisappear:(BOOL)animated { } - (void)dealloc { [self removeKVO]; - NSLog(@"%@释放了",NSStringFromClass(self.class)); } // 滚动中单击可以停止滚动 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { diff --git a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController4.h b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController4.h index fda2af04..a4a4c86a 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController4.h +++ b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController4.h @@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN WKWebView + UITableView 方案4:(推荐)[UIScrollView addSubView: WKWebView & UITableView]; UIScrollView.contenSize = WKWebView.contenSize + UITableView.contenSize; WKWebView和UITableView的最大高度为一屏高,并禁用scrollEnabled=NO,然后根据UIScrollView的滑动偏移量调整WKWebView和UITableView的展示区域contenOffset */ -@interface SLWebTableViewController4 : UIViewController +@interface SLWebTableViewController4 : SLViewController @end diff --git a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController4.m b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController4.m index 44572758..eaedc1da 100644 --- a/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController4.m +++ b/iOS_Tips/DarkMode/WKWebView/WebTableView/SLWebTableViewController4.m @@ -42,7 +42,6 @@ - (void)viewWillDisappear:(BOOL)animated { } - (void)dealloc { [self removeKVO]; - NSLog(@"%@释放了",NSStringFromClass(self.class)); } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/QiCallTraceCore.c b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/QiCallTraceCore.c new file mode 100644 index 00000000..25c2660b --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/QiCallTraceCore.c @@ -0,0 +1,464 @@ +// +// QiCallTraceCore.c +// Qi_ObjcMsgHook +// +// Created by liusiqi on 2019/11/20. +// Copyright © 2019 QiShare. All rights reserved. +// + +#include "QiCallTraceCore.h" + +#ifdef __aarch64__ + +#pragma mark - fishhook +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * A structure representing a particular intended rebinding from a symbol + * name to its replacement + */ +struct rebinding { + const char *name; + void *replacement; + void **replaced; +}; + +/* + * For each rebinding in rebindings, rebinds references to external, indirect + * symbols with the specified name to instead point at replacement for each + * image in the calling process as well as for all future images that are loaded + * by the process. If rebind_functions is called more than once, the symbols to + * rebind are added to the existing list of rebindings, and if a given symbol + * is rebound more than once, the later rebinding will take precedence. + */ +static int fish_rebind_symbols(struct rebinding rebindings[], size_t rebindings_nel); + + +#ifdef __LP64__ +typedef struct mach_header_64 mach_header_t; +typedef struct segment_command_64 segment_command_t; +typedef struct section_64 section_t; +typedef struct nlist_64 nlist_t; +#define LC_SEGMENT_ARCH_DEPENDENT LC_SEGMENT_64 +#else +typedef struct mach_header mach_header_t; +typedef struct segment_command segment_command_t; +typedef struct section section_t; +typedef struct nlist nlist_t; +#define LC_SEGMENT_ARCH_DEPENDENT LC_SEGMENT +#endif + +#ifndef SEG_DATA_CONST +#define SEG_DATA_CONST "__DATA_CONST" +#endif + +struct rebindings_entry { + struct rebinding *rebindings; + size_t rebindings_nel; + struct rebindings_entry *next; +}; + +static struct rebindings_entry *_rebindings_head; + +static int prepend_rebindings(struct rebindings_entry **rebindings_head, + struct rebinding rebindings[], + size_t nel) { + struct rebindings_entry *new_entry = malloc(sizeof(struct rebindings_entry)); + if (!new_entry) { + return -1; + } + new_entry->rebindings = malloc(sizeof(struct rebinding) * nel); + if (!new_entry->rebindings) { + free(new_entry); + return -1; + } + memcpy(new_entry->rebindings, rebindings, sizeof(struct rebinding) * nel); + new_entry->rebindings_nel = nel; + new_entry->next = *rebindings_head; + *rebindings_head = new_entry; + return 0; +} + +static void perform_rebinding_with_section(struct rebindings_entry *rebindings, + section_t *section, + intptr_t slide, + nlist_t *symtab, + char *strtab, + uint32_t *indirect_symtab) { + uint32_t *indirect_symbol_indices = indirect_symtab + section->reserved1; + void **indirect_symbol_bindings = (void **)((uintptr_t)slide + section->addr); + for (uint i = 0; i < section->size / sizeof(void *); i++) { + uint32_t symtab_index = indirect_symbol_indices[i]; + if (symtab_index == INDIRECT_SYMBOL_ABS || symtab_index == INDIRECT_SYMBOL_LOCAL || + symtab_index == (INDIRECT_SYMBOL_LOCAL | INDIRECT_SYMBOL_ABS)) { + continue; + } + uint32_t strtab_offset = symtab[symtab_index].n_un.n_strx; + char *symbol_name = strtab + strtab_offset; + if (strnlen(symbol_name, 2) < 2) { + continue; + } + struct rebindings_entry *cur = rebindings; + while (cur) { + for (uint j = 0; j < cur->rebindings_nel; j++) { + if (strcmp(&symbol_name[1], cur->rebindings[j].name) == 0) { + if (cur->rebindings[j].replaced != NULL && + indirect_symbol_bindings[i] != cur->rebindings[j].replacement) { + *(cur->rebindings[j].replaced) = indirect_symbol_bindings[i]; + } + indirect_symbol_bindings[i] = cur->rebindings[j].replacement; + goto symbol_loop; + } + } + cur = cur->next; + } + symbol_loop:; + } +} + +static void rebind_symbols_for_image(struct rebindings_entry *rebindings, + const struct mach_header *header, + intptr_t slide) { + Dl_info info; + if (dladdr(header, &info) == 0) { + return; + } + + segment_command_t *cur_seg_cmd; + segment_command_t *linkedit_segment = NULL; + struct symtab_command* symtab_cmd = NULL; + struct dysymtab_command* dysymtab_cmd = NULL; + + uintptr_t cur = (uintptr_t)header + sizeof(mach_header_t); + for (uint i = 0; i < header->ncmds; i++, cur += cur_seg_cmd->cmdsize) { + cur_seg_cmd = (segment_command_t *)cur; + if (cur_seg_cmd->cmd == LC_SEGMENT_ARCH_DEPENDENT) { + if (strcmp(cur_seg_cmd->segname, SEG_LINKEDIT) == 0) { + linkedit_segment = cur_seg_cmd; + } + } else if (cur_seg_cmd->cmd == LC_SYMTAB) { + symtab_cmd = (struct symtab_command*)cur_seg_cmd; + } else if (cur_seg_cmd->cmd == LC_DYSYMTAB) { + dysymtab_cmd = (struct dysymtab_command*)cur_seg_cmd; + } + } + + if (!symtab_cmd || !dysymtab_cmd || !linkedit_segment || + !dysymtab_cmd->nindirectsyms) { + return; + } + + // Find base symbol/string table addresses + uintptr_t linkedit_base = (uintptr_t)slide + linkedit_segment->vmaddr - linkedit_segment->fileoff; + nlist_t *symtab = (nlist_t *)(linkedit_base + symtab_cmd->symoff); + char *strtab = (char *)(linkedit_base + symtab_cmd->stroff); + + // Get indirect symbol table (array of uint32_t indices into symbol table) + uint32_t *indirect_symtab = (uint32_t *)(linkedit_base + dysymtab_cmd->indirectsymoff); + + cur = (uintptr_t)header + sizeof(mach_header_t); + for (uint i = 0; i < header->ncmds; i++, cur += cur_seg_cmd->cmdsize) { + cur_seg_cmd = (segment_command_t *)cur; + if (cur_seg_cmd->cmd == LC_SEGMENT_ARCH_DEPENDENT) { + if (strcmp(cur_seg_cmd->segname, SEG_DATA) != 0 && + strcmp(cur_seg_cmd->segname, SEG_DATA_CONST) != 0) { + continue; + } + for (uint j = 0; j < cur_seg_cmd->nsects; j++) { + section_t *sect = + (section_t *)(cur + sizeof(segment_command_t)) + j; + if ((sect->flags & SECTION_TYPE) == S_LAZY_SYMBOL_POINTERS) { + perform_rebinding_with_section(rebindings, sect, slide, symtab, strtab, indirect_symtab); + } + if ((sect->flags & SECTION_TYPE) == S_NON_LAZY_SYMBOL_POINTERS) { + perform_rebinding_with_section(rebindings, sect, slide, symtab, strtab, indirect_symtab); + } + } + } + } +} + +static void _rebind_symbols_for_image(const struct mach_header *header, + intptr_t slide) { + rebind_symbols_for_image(_rebindings_head, header, slide); +} + +static int fish_rebind_symbols(struct rebinding rebindings[], size_t rebindings_nel) { + int retval = prepend_rebindings(&_rebindings_head, rebindings, rebindings_nel); + if (retval < 0) { + return retval; + } + // If this was the first call, register callback for image additions (which is also invoked for + // existing images, otherwise, just run on existing images + //首先是遍历 dyld 里的所有的 image,取出 image header 和 slide。注意第一次调用时主要注册 callback + if (!_rebindings_head->next) { + _dyld_register_func_for_add_image(_rebind_symbols_for_image); + } else { + uint32_t c = _dyld_image_count(); + for (uint32_t i = 0; i < c; i++) { + _rebind_symbols_for_image(_dyld_get_image_header(i), _dyld_get_image_vmaddr_slide(i)); + } + } + return retval; +} + + +#pragma mark - Record + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static bool _call_record_enabled = true; +static uint64_t _min_time_cost = 1000; //us +static int _max_call_depth = 3; +static pthread_key_t _thread_key; +__unused static id (*orig_objc_msgSend)(id, SEL, ...); + +static qiCallRecord *_qiCallRecords; +//static int otp_record_num; +//static int otp_record_alloc; +static int _qiRecordNum; +static int _qiRecordAlloc; + +typedef struct { + id self; //通过 object_getClass 能够得到 Class 再通过 NSStringFromClass 能够得到类名 + Class cls; + SEL cmd; //通过 NSStringFromSelector 方法能够得到方法名 + uint64_t time; //us + uintptr_t lr; // link register +} thread_call_record; + +typedef struct { + thread_call_record *stack; + int allocated_length; + int index; + bool is_main_thread; +} thread_call_stack; + +static inline thread_call_stack * get_thread_call_stack() { + thread_call_stack *cs = (thread_call_stack *)pthread_getspecific(_thread_key); + if (cs == NULL) { + cs = (thread_call_stack *)malloc(sizeof(thread_call_stack)); + cs->stack = (thread_call_record *)calloc(128, sizeof(thread_call_record)); + cs->allocated_length = 64; + cs->index = -1; + cs->is_main_thread = pthread_main_np(); + pthread_setspecific(_thread_key, cs); + } + return cs; +} + +static void release_thread_call_stack(void *ptr) { + thread_call_stack *cs = (thread_call_stack *)ptr; + if (!cs) return; + if (cs->stack) free(cs->stack); + free(cs); +} + +static inline void push_call_record(id _self, Class _cls, SEL _cmd, uintptr_t lr) { + thread_call_stack *cs = get_thread_call_stack(); + if (cs) { + int nextIndex = (++cs->index); + if (nextIndex >= cs->allocated_length) { + cs->allocated_length += 64; + cs->stack = (thread_call_record *)realloc(cs->stack, cs->allocated_length * sizeof(thread_call_record)); + } + thread_call_record *newRecord = &cs->stack[nextIndex]; + newRecord->self = _self; + newRecord->cls = _cls; + newRecord->cmd = _cmd; + newRecord->lr = lr; + if (cs->is_main_thread && _call_record_enabled) { + struct timeval now; + gettimeofday(&now, NULL); + newRecord->time = (now.tv_sec % 100) * 1000000 + now.tv_usec; + } + } +} + +static inline uintptr_t pop_call_record() { + thread_call_stack *cs = get_thread_call_stack(); + int curIndex = cs->index; + int nextIndex = cs->index--; + thread_call_record *pRecord = &cs->stack[nextIndex]; + + if (cs->is_main_thread && _call_record_enabled) { + struct timeval now; + gettimeofday(&now, NULL); + uint64_t time = (now.tv_sec % 100) * 1000000 + now.tv_usec; + if (time < pRecord->time) { + time += 100 * 1000000; + } + uint64_t cost = time - pRecord->time; + if (cost > _min_time_cost && cs->index < _max_call_depth) { + if (!_qiCallRecords) { + _qiRecordAlloc = 1024; + _qiCallRecords = malloc(sizeof(qiCallRecord) * _qiRecordAlloc); + } + _qiRecordNum++; + if (_qiRecordNum >= _qiRecordAlloc) { + _qiRecordAlloc += 1024; + _qiCallRecords = realloc(_qiCallRecords, sizeof(qiCallRecord) * _qiRecordAlloc); + } + qiCallRecord *log = &_qiCallRecords[_qiRecordNum - 1]; + log->cls = pRecord->cls; + log->depth = curIndex; + log->sel = pRecord->cmd; + log->time = cost; + } + } + return pRecord->lr; +} + +void before_objc_msgSend(id self, SEL _cmd, uintptr_t lr) { + push_call_record(self, object_getClass(self), _cmd, lr); +} + +uintptr_t after_objc_msgSend() { + return pop_call_record(); +} + + +//replacement objc_msgSend (arm64) +// https://blog.nelhage.com/2010/10/amd64-and-va_arg/ +// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapcs64.pdf +// https://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html +#define call(b, value) \ +__asm volatile ("stp x8, x9, [sp, #-16]!\n"); \ +__asm volatile ("mov x12, %0\n" :: "r"(value)); \ +__asm volatile ("ldp x8, x9, [sp], #16\n"); \ +__asm volatile (#b " x12\n"); + +#define save() \ +__asm volatile ( \ +"stp x8, x9, [sp, #-16]!\n" \ +"stp x6, x7, [sp, #-16]!\n" \ +"stp x4, x5, [sp, #-16]!\n" \ +"stp x2, x3, [sp, #-16]!\n" \ +"stp x0, x1, [sp, #-16]!\n"); + +#define load() \ +__asm volatile ( \ +"ldp x0, x1, [sp], #16\n" \ +"ldp x2, x3, [sp], #16\n" \ +"ldp x4, x5, [sp], #16\n" \ +"ldp x6, x7, [sp], #16\n" \ +"ldp x8, x9, [sp], #16\n" ); + +#define link(b, value) \ +__asm volatile ("stp x8, lr, [sp, #-16]!\n"); \ +__asm volatile ("sub sp, sp, #16\n"); \ +call(b, value); \ +__asm volatile ("add sp, sp, #16\n"); \ +__asm volatile ("ldp x8, lr, [sp], #16\n"); + +#define ret() __asm volatile ("ret\n"); + +__attribute__((__naked__)) +static void hook_Objc_msgSend() { + // Save parameters. + save() + + __asm volatile ("mov x2, lr\n"); + __asm volatile ("mov x3, x4\n"); + + // Call our before_objc_msgSend. + call(blr, &before_objc_msgSend) + + // Load parameters. + load() + + // Call through to the original objc_msgSend. + call(blr, orig_objc_msgSend) + + // Save original objc_msgSend return value. + save() + + // Call our after_objc_msgSend. + call(blr, &after_objc_msgSend) + + // restore lr + __asm volatile ("mov lr, x0\n"); + + // Load original objc_msgSend return value. + load() + + // return + ret() +} + + +#pragma mark public + +void qiCallTraceStart() { + _call_record_enabled = true; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + pthread_key_create(&_thread_key, &release_thread_call_stack); + fish_rebind_symbols((struct rebinding[6]){ + {"objc_msgSend", (void *)hook_Objc_msgSend, (void **)&orig_objc_msgSend}, + }, 1); + }); +} + +void qiCallTraceStop() { + _call_record_enabled = false; +} + +void qiCallConfigMinTime(uint64_t us) { + _min_time_cost = us; +} +void qiCallConfigMaxDepth(int depth) { + _max_call_depth = depth; +} + +qiCallRecord *qiGetCallRecords(int *num) { + if (num) { + *num = _qiRecordNum; + } + return _qiCallRecords; +} + +void qiClearCallRecords() { + if (_qiCallRecords) { + free(_qiCallRecords); + _qiCallRecords = NULL; + } + _qiRecordNum = 0; +} + +#else + +void qiCallTraceStart() {} +void qiCallTraceStop() {} +void qiCallConfigMinTime(uint64_t us) { +} +void qiCallConfigMaxDepth(int depth) { +} +qiCallRecord *qiGetCallRecords(int *num) { + if (num) { + *num = 0; + } + return NULL; +} +void qiClearCallRecords() {} + +#endif diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/QiCallTraceCore.h b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/QiCallTraceCore.h new file mode 100644 index 00000000..cd47140c --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/QiCallTraceCore.h @@ -0,0 +1,36 @@ +// +// QiCallTraceCore.h +// Qi_ObjcMsgHook +// +// Created by liusiqi on 2019/11/20. +// Copyright © 2019 QiShare. All rights reserved. +// + +#ifndef QiCallTraceCore_h +#define QiCallTraceCore_h + +#include +#include + + +/* + 函数调用耗时监测 来源:https://www.jianshu.com/p/bc1c000afdba + */ + +typedef struct { + __unsafe_unretained Class cls; + SEL sel; + uint64_t time; // us (1/1000 ms) + int depth; +} qiCallRecord; + +extern void qiCallTraceStart(void); +extern void qiCallTraceStop(void); + +extern void qiCallConfigMinTime(uint64_t us); //default 1000 +extern void qiCallConfigMaxDepth(int depth); //default 3 + +extern qiCallRecord *qiGetCallRecords(int *num); +extern void qiClearCallRecords(void); + +#endif /* QiCallTraceCore_h */ diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMCpu.h b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMCpu.h new file mode 100644 index 00000000..8271561d --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMCpu.h @@ -0,0 +1,23 @@ +// +// SLAPMCpu.h +// DarkMode +// +// Created by wsl on 2020/7/13. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +///CPU占有率监听 +@interface SLAPMCpu : NSObject +///返回GPU使用情况 占有率 ++ (double)getCpuUsage; +/// 返回CPU使用情况 占有率 +/// @param max 设定CPU使用率最大边界值 +/// @param callback 超出边界后的回调方法 返回此时的堆栈信息 ++ (double)getCpuUsageWithMax:(float)max outOfBoundsCallback:(void(^)(NSString *string))callback; +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMCpu.m b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMCpu.m new file mode 100644 index 00000000..37f7e51e --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMCpu.m @@ -0,0 +1,79 @@ +// +// SLAPMCpu.m +// DarkMode +// +// Created by wsl on 2020/7/13. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLAPMCpu.h" + +#include + +#import "BSBacktraceLogger.h" + +@implementation SLAPMCpu + +//struct thread_basic_info { +// time_value_t user_time; /* user run time(用户运行时长) */ +// time_value_t system_time; /* system run time(系统运行时长) */ +// integer_t cpu_usage; /* scaled cpu usage percentage(CPU使用率,上限1000) */ +// policy_t policy; /* scheduling policy in effect(有效调度策略) */ +// integer_t run_state; /* run state (运行状态,见下) */ +// integer_t flags; /* various flags (各种各样的标记) */ +// integer_t suspend_count; /* suspend count for thread(线程挂起次数) */ +// integer_t sleep_time; /* number of seconds that thread has been sleeping(休眠时间) */ +//}; +#pragma mark - CPU占有率 ++ (double)getCpuUsage { + kern_return_t kr; + thread_array_t threadList; // 保存当前Mach task的线程列表 + mach_msg_type_number_t threadCount; // 保存当前Mach task的线程个数 + thread_info_data_t threadInfo; // 保存单个线程的信息列表 + mach_msg_type_number_t threadInfoCount; // 保存当前线程的信息列表大小 + thread_basic_info_t threadBasicInfo; // 线程的基本信息 + + // 通过“task_threads”API调用获取指定 task 的线程列表 + // mach_task_self_,表示获取当前的 Mach task + kr = task_threads(mach_task_self(), &threadList, &threadCount); + if (kr != KERN_SUCCESS) { + return -1; + } + double cpuUsage = 0; + for (int i = 0; i < threadCount; i++) { + threadInfoCount = THREAD_INFO_MAX; + // 通过“thread_info”API调用来查询指定线程的信息 + // flavor参数传的是THREAD_BASIC_INFO,使用这个类型会返回线程的基本信息, + // 定义在 thread_basic_info_t 结构体,包含了用户和系统的运行时间、运行状态和调度优先级等 + kr = thread_info(threadList[i], THREAD_BASIC_INFO, (thread_info_t)threadInfo, &threadInfoCount); + if (kr != KERN_SUCCESS) { + return -1; + } + + threadBasicInfo = (thread_basic_info_t)threadInfo; + if (!(threadBasicInfo->flags & TH_FLAGS_IDLE)) { + cpuUsage += threadBasicInfo->cpu_usage; + } + } + + // 回收内存,防止内存泄漏 + vm_deallocate(mach_task_self(), (vm_offset_t)threadList, threadCount * sizeof(thread_t)); + + float cpu = cpuUsage / (double)TH_USAGE_SCALE * 100.0; + return cpu; +} + +/// 返回GPU使用情况 占有率 +/// @param max 设定GPU使用率最大边界值 +/// @param callback 超出边界后的回调方法 返回此时的堆栈信息 ++ (double)getCpuUsageWithMax:(float)max outOfBoundsCallback:(void(^)(NSString *string))callback { + float cpu= [SLAPMCpu getCpuUsage]; + if (cpu/100.0 >= max) { + NSString *callbackString = [BSBacktraceLogger bs_backtraceOfAllThread]; + callback(callbackString); + } + return cpu; +} + + +@end diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMFluency.h b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMFluency.h new file mode 100644 index 00000000..b130bb2b --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMFluency.h @@ -0,0 +1,43 @@ +// +// SLAPMFluency.h +// DarkMode +// +// Created by wsl on 2020/7/14. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class SLAPMFluency; +@protocol SLAPMFluencyDelegate +///卡顿监控回调 当callStack不为nil时,表示发生卡顿并捕捉到卡顿时的调用栈;type == SLAPMFluencyTypeRunloop时,fps为0 +- (void)APMFluency:(SLAPMFluency *)fluency didChangedFps:(float)fps callStackOfStuck:(nullable NSString *)callStack; +@end + +/// 卡顿监测策略/类型 +typedef NS_ENUM(NSInteger, SLAPMFluencyType) { + /* 建议 Runloop,不消耗额外的CPU资源,可以获取卡顿时的调用堆栈 */ + SLAPMFluencyTypeRunloop = 0, + /*FPS 无法获取卡顿时的调用堆栈,消耗CPU资源,不利于CPU使用率的监控,但可以作为衡量卡顿程度的指数*/ + SLAPMFluencyTypeFps = 1, + /*所有策略*/ + SLAPMFluencyTypeAll = 2 +}; + +///流畅度监听 是否卡顿 +@interface SLAPMFluency : NSObject + +@property (nonatomic, weak) id delegate; +///卡顿监测策略/类型 默认建议 SLAPMFluencyTypeRunloop +@property (nonatomic, assign) SLAPMFluencyType type; + ++ (instancetype)sharedInstance; +///开始监听 +- (void)startMonitorFluency; +///结束监听 +- (void)stopMonitorFluency; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMFluency.m b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMFluency.m new file mode 100644 index 00000000..1a112fed --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMFluency.m @@ -0,0 +1,300 @@ +// +// SLAPMFluency.m +// DarkMode +// +// Created by wsl on 2020/7/14. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLAPMFluency.h" +#import "SLProxy.h" + +#import "BSBacktraceLogger.h" + +/// 利用runloop 检测主线程每次执行消息循环的时间,当这一时间大于阈值时,就记为发生一次卡顿。 +@interface SLAPMRunLoop : NSObject +{ + int _timeoutCount; // 耗时次数 + CFRunLoopObserverRef _observer; // 观察者 + dispatch_semaphore_t _semaphore; // 信号 + CFRunLoopActivity _activity; // 状态 +} +///卡顿时的调用堆栈信息 +@property (nonatomic, copy) NSString *callStack; +@property (nonatomic, copy) void (^showStuckInfo)(NSString *callStack); +@end + +@implementation SLAPMRunLoop + +#pragma mark - Public +// 开始监听 +- (void)startRunning { + if (_observer) { + return; + } + + // 创建信号 + _semaphore = dispatch_semaphore_create(0); + NSLog(@"dispatch_semaphore_create:%@",getCurTime()); + + // 注册RunLoop状态观察 + CFRunLoopObserverContext context = {0,(__bridge void*)self,NULL,NULL}; + //创建Run loop observer对象 + //第一个参数用于分配observer对象的内存 + //第二个参数用以设置observer所要关注的事件,详见回调函数myRunLoopObserver中注释 + //第三个参数用于标识该observer是在第一次进入run loop时执行还是每次进入run loop处理时均执行 + //第四个参数用于设置该observer的优先级 + //第五个参数用于设置该observer的回调函数 + //第六个参数用于设置该observer的运行环境 + _observer = CFRunLoopObserverCreate(kCFAllocatorDefault, + kCFRunLoopAllActivities, + YES, + 0, + &runLoopObserverCallBack, + &context); + CFRunLoopAddObserver(CFRunLoopGetMain(), _observer, kCFRunLoopCommonModes); + + // 在子线程监控时长 + dispatch_async(dispatch_get_global_queue(0, 0), ^{ + while (YES) { // 有信号的话 就查询当前runloop的状态 + + // 假定连续5次超时50ms认为卡顿(当然也包含了单次超时250ms) + // 因为下面 runloop 状态改变回调方法runLoopObserverCallBack中会将信号量递增 1,所以每次 runloop 状态改变后,下面的语句都会执行一次 + // 当其返回0时表示在timeout之前,该函数所处的线程被成功唤醒。当其返回不为0时,表示timeout发生。 + long st = dispatch_semaphore_wait(self->_semaphore, dispatch_time(DISPATCH_TIME_NOW, 50*NSEC_PER_MSEC)); + + if (st != 0) { // 信号量超时了 - 即 runloop 的状态长时间没有发生变更,长期处于某一个状态下 + if (!self->_observer) { + self->_timeoutCount = 0; + self->_semaphore = 0; + self->_activity = 0; + return; + } + + // kCFRunLoopBeforeSources - 即将处理source kCFRunLoopAfterWaiting - 刚从休眠中唤醒 + // 获取kCFRunLoopBeforeSources到kCFRunLoopBeforeWaiting再到kCFRunLoopAfterWaiting的状态就可以知道是否有卡顿的情况。 + // kCFRunLoopBeforeSources:停留在这个状态,表示在做很多事情 + if (self->_activity == kCFRunLoopBeforeSources || self->_activity == kCFRunLoopAfterWaiting) { // 发生卡顿,记录卡顿次数 + if (++self->_timeoutCount < 5) { + continue; // 不足 5 次,直接 continue 当次循环,不将timeoutCount置为0 + } + + // 收集此时卡顿的调用堆栈 + NSString *callStack = [BSBacktraceLogger bs_backtraceOfMainThread]; + self.callStack = callStack; + if(self.showStuckInfo) { + self.showStuckInfo(callStack); + } + // NSLog(@" 卡顿了 \n %@", callStack); + } + } + self->_timeoutCount = 0; + } + }); +} + +// 停止监听 +- (void)stopRunning { + if (!_observer) { + return; + } + // 移除观察并释放资源 + CFRunLoopRemoveObserver(CFRunLoopGetMain(), _observer, kCFRunLoopCommonModes); + CFRelease(_observer); + _observer = NULL; +} + +#pragma mark - runloop observer callback +///runloop状态改变回调 就记录一下 +static void runLoopObserverCallBack(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info) { + + SLAPMRunLoop *monitor = (__bridge SLAPMRunLoop*)info; + // 记录状态值 + monitor->_activity = activity; + + // 发送信号 + dispatch_semaphore_t semaphore = monitor->_semaphore; + // 当返回值为0时表示当前并没有线程等待其处理的信号量,其处理的信号量的值加1即可。当返回值不为0时,表示其当前有(一个或多个)线程等待其处理的信号量,并且该函数唤醒了一个等待的线程(当线程有优先级时,唤醒优先级最高的线程;否则随机唤醒) + long st = dispatch_semaphore_signal(semaphore); + // NSLog(@"dispatch_semaphore_signal:st=%ld,time:%@",st,getCurTime()); + + // if (activity == kCFRunLoopEntry) { + // NSLog(@"runLoopObserverCallBack - %@",@"即将进入RunLoop"); + // } else if (activity == kCFRunLoopBeforeTimers) { + // NSLog(@"runLoopObserverCallBack - %@",@"即将处理Timer"); + // } else if (activity == kCFRunLoopBeforeSources) { + // NSLog(@"runLoopObserverCallBack - %@",@"即将处理Source"); + // } else if (activity == kCFRunLoopBeforeWaiting) { + // NSLog(@"runLoopObserverCallBack - %@",@"即将进入休眠"); + // } else if (activity == kCFRunLoopAfterWaiting) { + // NSLog(@"runLoopObserverCallBack - %@",@"刚从休眠中唤醒"); + // } else if (activity == kCFRunLoopExit) { + // NSLog(@"runLoopObserverCallBack - %@",@"即将退出RunLoop"); + // } else if (activity == kCFRunLoopAllActivities) { + // NSLog(@"runLoopObserverCallBack - %@",@"kCFRunLoopAllActivities"); + // } +} + +#pragma mark - private function +NSString * getCurTime(void) { + NSDateFormatter *format = [[NSDateFormatter alloc] init]; + [format setDateFormat:@"YYYY/MM/dd hh:mm:ss:SSS"]; + NSString *curTime = [format stringFromDate:[NSDate date]]; + return curTime; +} + +@end + +///监测帧频,抖动比较大,无法获取卡顿时的调用栈,所以结合runloop检测主线程消息循环执行的时间来作为卡顿的衡量指标 +@interface SLAPMFps : NSObject +{ + NSTimeInterval _lastTime; //上次屏幕刷新时间 + int _count; //FPS +} +@property (nonatomic, strong) CADisplayLink *displayLink; +@property (nonatomic, assign) float fps; +@property (nonatomic, copy) void (^fpsChanged)(float fps); +@end +@implementation SLAPMFps + +#pragma mark - Public +///开始 +- (void)play { + [self.displayLink setPaused:NO]; +} +///暂停 +- (void)paused { + [self.displayLink setPaused:YES]; +} +///销毁 +- (void)invalidate { + [self paused]; + [self.displayLink invalidate]; + self.displayLink = nil; +} + +#pragma mark - Getter +- (CADisplayLink *)displayLink { + if (!_displayLink) { + _displayLink = [CADisplayLink displayLinkWithTarget:[SLProxy proxyWithTarget:self] selector:@selector(displayLinkTick:)]; + [_displayLink setPaused:YES]; + [_displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; + } + return _displayLink; +} + +//这个方法的执行频率跟当前屏幕的刷新频率是一样的,屏幕每渲染刷新一次,就执行一次,那么1秒的时长执行刷新的次数就是当前的FPS值 +- (void)displayLinkTick:(CADisplayLink *)link{ + // duration 是只读的, 表示屏幕刷新的间隔 = 1/fps + // timestamp 是只读的, 表示上次屏幕渲染的时间点 + // frameInterval 是表示定时器被触发的间隔, 默认值是1, 就是表示跟屏幕的刷新频率一致。 + // NSLog(@"timestamp= %f duration= %f frameInterval= %f",link.timestamp, link.duration, frameInterval); + + //初始化屏幕渲染的时间 + if (_lastTime == 0) { + _lastTime = link.timestamp; + return; + } + //刷新次数累加 + _count++; + //刚刚屏幕渲染的时间与最开始幕渲染的时间差 + NSTimeInterval interval = link.timestamp - _lastTime; + if (interval < 1) { + //不足1秒,继续统计刷新次数 + return; + } + //刷新频率 + float fps = _count / interval; + _fps = fps; + + //1秒之后,初始化时间和次数,重新开始监测 + _lastTime = link.timestamp; + _count = 0; + + if (self.fpsChanged) { + self.fpsChanged(fps); + } +} +@end + + +@interface SLAPMFluency () +@property (nonatomic, strong) SLAPMFps *fps; +@property (nonatomic, strong) SLAPMRunLoop *runLoop; +@end + +@implementation SLAPMFluency +#pragma mark - Override +/// 重写allocWithZone方法,保证alloc或者init创建的实例不会产生新实例,因为该类覆盖了allocWithZone方法,所以只能通过其父类分配内存,即[super allocWithZone] ++ (instancetype)allocWithZone:(struct _NSZone *)zone { + return [self sharedInstance]; +} +/// 重写copyWithZone方法,保证复制返回的是同一份实例 +- (nonnull id)copyWithZone:(nullable NSZone *)zone { + return [SLAPMFluency sharedInstance]; +} + +#pragma mark - Public ++ (instancetype)sharedInstance { + static SLAPMFluency *luency = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + luency = [[super allocWithZone:NULL] init]; + luency.type = SLAPMFluencyTypeRunloop; + }); + return luency; +} + +///开始监听 +- (void)startMonitorFluency { + __weak typeof(self) weakSelf = self; + if (self.type == SLAPMFluencyTypeRunloop) { + [self.runLoop startRunning]; + //防止跟 self.fps.fpsChanged的回调重复执行 + self.runLoop.showStuckInfo = ^(NSString *callStack) { + if ([weakSelf.delegate respondsToSelector:@selector(APMFluency:didChangedFps:callStackOfStuck:)]) { + [weakSelf.delegate APMFluency:weakSelf didChangedFps:weakSelf.fps.fps callStackOfStuck:callStack]; + } + }; + + }else if (self.type == SLAPMFluencyTypeFps) { + [self.fps play]; + self.fps.fpsChanged = ^(float fps) { + if ([weakSelf.delegate respondsToSelector:@selector(APMFluency:didChangedFps:callStackOfStuck:)]) { + [weakSelf.delegate APMFluency:weakSelf didChangedFps:fps callStackOfStuck:[weakSelf.runLoop.callStack copy]]; + weakSelf.runLoop.callStack = nil; + } + }; + }else if (self.type == SLAPMFluencyTypeAll) { + [self.fps play]; + [self.runLoop startRunning]; + self.fps.fpsChanged = ^(float fps) { + if ([weakSelf.delegate respondsToSelector:@selector(APMFluency:didChangedFps:callStackOfStuck:)]) { + [weakSelf.delegate APMFluency:weakSelf didChangedFps:fps callStackOfStuck:[weakSelf.runLoop.callStack copy]]; + weakSelf.runLoop.callStack = nil; + } + }; + } + +} +///结束监听 +- (void)stopMonitorFluency { + [self.fps paused]; + [self.runLoop stopRunning]; +} + +#pragma mark - Getter +- (SLAPMFps *)fps { + if (!_fps) { + _fps = [[SLAPMFps alloc] init]; + } + return _fps; +} +- (SLAPMRunLoop *)runLoop { + if (!_runLoop) { + _runLoop = [[SLAPMRunLoop alloc] init]; + } + return _runLoop;; +} + +@end diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMLoadTime.h b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMLoadTime.h new file mode 100644 index 00000000..335530cc --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMLoadTime.h @@ -0,0 +1,14 @@ +// +// SLAPMLoadTime.h +// DarkMode +// +// Created by wsl on 2020/8/4. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +///监测+load方法耗时 引自: https://www.jianshu.com/p/c14987eee107、https://www.cnblogs.com/feng9exe/p/12487662.html +@interface SLAPMLoadTime : NSObject + +@end diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMLoadTime.m b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMLoadTime.m new file mode 100644 index 00000000..020953ec --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMLoadTime.m @@ -0,0 +1,102 @@ +// +// SLAPMLoadTime.m +// DarkMode +// +// Created by wsl on 2020/8/4. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLAPMLoadTime.h" +#import +#import +#import +#include +#include +#include +#include + + +#define TIMESTAMP_NUMBER(interval) [NSNumber numberWithLongLong:interval*1000*1000] + +unsigned int count; +const char **classes; + +static NSMutableArray *_loadInfoArray; + +@implementation SLAPMLoadTime ++ (void)load { + + _loadInfoArray = [[NSMutableArray alloc] init]; + + CFAbsoluteTime time1 =CFAbsoluteTimeGetCurrent(); + +// [深入iOS系统底层之程序映像](https://www.jianshu.com/p/3b83193ff851) + + int imageCount = (int)_dyld_image_count(); + + for(int iImg = 0; iImg < imageCount; iImg++) { + + const char* path = _dyld_get_image_name((unsigned)iImg); + NSString *imagePath = [NSString stringWithUTF8String:path]; +// NSLog(@"映像 %@",imagePath); + + NSBundle* mainBundle = [NSBundle mainBundle]; + NSString* bundlePath = [mainBundle bundlePath]; + + if ([imagePath containsString:bundlePath] && ![imagePath containsString:@".dylib"]) { + classes = objc_copyClassNamesForImage(path, &count); + + for (int i = 0; i < count; i++) { + NSString *className = [NSString stringWithCString:classes[i] encoding:NSUTF8StringEncoding]; + if (![className isEqualToString:@""] && className) { + Class class = object_getClass(NSClassFromString(className)); + + SEL originalSelector = @selector(load); + SEL swizzledSelector = @selector(LDAPM_Load); + + Method originalMethod = class_getClassMethod(class, originalSelector); + Method swizzledMethod = class_getClassMethod([SLAPMLoadTime class], swizzledSelector); + + BOOL hasMethod = class_addMethod(class, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod)); + + if (!hasMethod) { + BOOL didAddMethod = class_addMethod(class, + swizzledSelector, + method_getImplementation(swizzledMethod), + method_getTypeEncoding(swizzledMethod)); + + if (didAddMethod) { + swizzledMethod = class_getClassMethod(class, swizzledSelector); + + method_exchangeImplementations(originalMethod, swizzledMethod); + } + } + + } + } + } + } + + CFAbsoluteTime time2 =CFAbsoluteTimeGetCurrent(); + + NSLog(@"Hook Time:%f",(time2 - time1) * 1000); +} + ++ (void)LDAPM_Load { + + CFAbsoluteTime start =CFAbsoluteTimeGetCurrent(); + + [self LDAPM_Load]; + + CFAbsoluteTime end =CFAbsoluteTimeGetCurrent(); + // 时间精度 us + NSDictionary *infoDic = @{@"st":TIMESTAMP_NUMBER(start), + @"et":TIMESTAMP_NUMBER(end), + @"name":NSStringFromClass([self class]) + }; + + [_loadInfoArray addObject:infoDic]; + NSLog(@"loadTime %@",infoDic.description); +} + +@end diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMManager.h b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMManager.h new file mode 100644 index 00000000..f4951887 --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMManager.h @@ -0,0 +1,53 @@ +// +// SLAPMManager.h +// DarkMode +// +// Created by wsl on 2020/7/13. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// app性能监控策略/类型 +typedef NS_ENUM(NSInteger, SLAPMType) { + /*无*/ + SLAPMTypeNone = 0, + /*CPU占用率*/ + SLAPMTypeCpu = 1 << 0, + /*内存使用情况*/ + SLAPMTypeMemory = 1 << 1, + /*流畅度、卡顿*/ + SLAPMTypeFluency = 1 << 2, + /*iOS Crash防护模块*/ + SLAPMTypeCrash = 1 << 3, + /*线程数量监控,防止线程爆炸*/ + SLAPMTypeThreadCount = 1 << 4, + /*网络监控*/ + SLAPMTypeNetwork = 1 << 5, + /*VC启动耗时监测*/ + SLAPMTypeVCTime = 1 << 6, + /*所有策略*/ + SLAPMTypeAll = 1 << 7 +}; + + +/// APM 管理者 +@interface SLAPMManager : NSObject + +///是否正在监控 +@property (nonatomic, assign) BOOL isMonitoring; +///app性能监控策略/类型 默认SLAPMTypeAll +@property (nonatomic, assign) SLAPMType type; + ++ (instancetype)manager; + +///开始监控 +- (void)startMonitoring; +///结束监控 +- (void)stopMonitoring; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMManager.m b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMManager.m new file mode 100644 index 00000000..3aacf02f --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMManager.m @@ -0,0 +1,117 @@ +// +// SLAPMManager.m +// DarkMode +// +// Created by wsl on 2020/7/13. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLAPMManager.h" +#import "SLTimer.h" + +#import "SLAPMCpu.h" +#import "SLAPMMemoryDisk.h" +#import "SLAPMFluency.h" +#import "SLCrashProtector.h" +#import "SLAPMThreadCount.h" +#import "SLAPMURLProtocol.h" + +@interface SLAPMManager () +///任务名称 +@property (nonatomic, copy) NSString *taskName; + +@end + +@implementation SLAPMManager + +#pragma mark - Override +/// 重写allocWithZone方法,保证alloc或者init创建的实例不会产生新实例,因为该类覆盖了allocWithZone方法,所以只能通过其父类分配内存,即[super allocWithZone] ++ (instancetype)allocWithZone:(struct _NSZone *)zone { + return [self manager]; +} +/// 重写copyWithZone方法,保证复制返回的是同一份实例 +- (nonnull id)copyWithZone:(nullable NSZone *)zone { + return [SLAPMManager manager]; +} + +#pragma mark - Public ++ (instancetype)manager { + static SLAPMManager *manager = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + manager = [[super allocWithZone:NULL] init]; + manager.type = SLAPMTypeAll; + }); + return manager; +} +///开始监控 +- (void)startMonitoring { + if (_isMonitoring) return; + _isMonitoring = YES; + + if ((self.type & SLAPMTypeCpu) == SLAPMTypeCpu || (self.type & SLAPMTypeMemory) == SLAPMTypeMemory || self.type == SLAPMTypeAll) { + _taskName = [SLTimer execTask:self selector:@selector(monitoring) start:0.5 interval:1.0/60 repeats:YES async:YES]; + } + + if ((self.type & SLAPMTypeCpu) == SLAPMTypeCrash || self.type == SLAPMTypeAll) { + [SLCrashHandler defaultCrashHandler].delegate = self; + } + + if ((self.type & SLAPMTypeFluency) == SLAPMTypeFluency || self.type == SLAPMTypeAll) { + [SLAPMFluency sharedInstance].delegate = self; + [[SLAPMFluency sharedInstance] startMonitorFluency]; + } + + if ((self.type & SLAPMTypeThreadCount) == SLAPMTypeThreadCount || self.type == SLAPMTypeAll) { + [SLAPMThreadCount startMonitorThreadCount]; + } + + if ((self.type & SLAPMTypeNetwork) == SLAPMTypeNetwork || self.type == SLAPMTypeAll) { + [SLAPMURLProtocol startMonitorNetwork]; + } + +} +///结束监控 +- (void)stopMonitoring { + if (!_isMonitoring) return; + _isMonitoring = NO; + + [SLTimer cancelTask:_taskName]; + [SLAPMFluency sharedInstance].delegate = nil; + [[SLAPMFluency sharedInstance] stopMonitorFluency]; + [SLAPMThreadCount stopMonitorThreadCount]; + [SLAPMURLProtocol stopMonitorNetwork]; +} + +#pragma mark - Monitoring +///监控中 +- (void)monitoring { + + if ((self.type & SLAPMTypeCpu) == SLAPMTypeCpu || self.type == SLAPMTypeAll) { + float CPU = [SLAPMCpu getCpuUsage]; + NSLog(@" CPU使用率:%.2f%%",CPU); + } + + if ((self.type & SLAPMTypeMemory) == SLAPMTypeMemory || self.type == SLAPMTypeAll) { + double useMemory = [SLAPMMemoryDisk getAppUsageMemory]; + double freeMemory = [SLAPMMemoryDisk getFreeMemory]; + double totalMemory = [SLAPMMemoryDisk getTotalMemory]; + NSLog(@" Memory占用:%.1fM 空闲:%.1fM 总共:%.1fM",useMemory, freeMemory, totalMemory); + } + +} + +#pragma mark - Fluency/卡顿监测 +///卡顿监控回调 当callStack不为nil时,表示发生卡顿并捕捉到卡顿时的调用栈 +- (void)APMFluency:(SLAPMFluency *)fluency didChangedFps:(float)fps callStackOfStuck:(nullable NSString *)callStack { + NSLog(@" 卡顿监测  fps:%f \n %@", fps, callStack == nil ? @"流畅":[NSString stringWithFormat:@"卡住了 %@",callStack]); +} + +#pragma mark - SLCrashHandlerDelegate +///异常捕获回调 提供给外界实现自定义处理 ,日志上报等 +- (void)crashHandlerDidOutputCrashError:(SLCrashError *)crashError { + NSString *errorInfo = [NSString stringWithFormat:@" 错误描述:%@ \n 调用栈:%@" ,crashError.errorDesc, crashError.callStackSymbol]; + NSLog(@"%@",errorInfo); +} + +@end diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMMemoryDisk.h b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMMemoryDisk.h new file mode 100644 index 00000000..67f7f2bd --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMMemoryDisk.h @@ -0,0 +1,32 @@ +// +// SLAPMMemoryDisk.h +// DarkMode +// +// Created by wsl on 2020/7/18. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// 内存磁盘容量监控 +@interface SLAPMMemoryDisk : NSObject + +///当前应用的内存占用情况,和Xcode数值相近 单位MB ++ (double)getAppUsageMemory; +///剩余空闲内存 单位MB ++ (double)getFreeMemory; +/// 总共的内存大小 单位MB ++ (double)getTotalMemory; + +///filePath目录下的文件 占用的磁盘大小 单位MB 默认沙盒Caches目录 此句代码不要频繁定时执行,比较耗内存 ++ (double)getFileUsageDisk:(NSString *)filePath; +///剩余空闲的磁盘容量 单位G ++ (double)getFreeDisk; +///总磁盘容量 单位G ++ (double)getTotalDisk; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMMemoryDisk.m b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMMemoryDisk.m new file mode 100644 index 00000000..f07432bb --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMMemoryDisk.m @@ -0,0 +1,81 @@ +// +// SLAPMMemoryDisk.m +// DarkMode +// +// Created by wsl on 2020/7/18. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLAPMMemoryDisk.h" +#include + +@implementation SLAPMMemoryDisk + + +#pragma mark - Memory / Disk +///当前应用的内存占用情况,和Xcode数值相近 单位MB ++ (double)getAppUsageMemory { + task_vm_info_data_t vmInfo; + mach_msg_type_number_t count = TASK_VM_INFO_COUNT; + if(task_info(mach_task_self(), TASK_VM_INFO, (task_info_t) &vmInfo, &count) == KERN_SUCCESS) { + return (double)vmInfo.phys_footprint / (1024 * 1024); + } else { + return -1.0; + } +} +///剩余空闲内存 单位MB ++ (double)getFreeMemory{ + mach_port_t host_port = mach_host_self(); + mach_msg_type_number_t host_size = sizeof(vm_statistics_data_t) / sizeof(integer_t); + vm_size_t page_size; + vm_statistics_data_t vm_stat; + kern_return_t kern; + + kern = host_page_size(host_port, &page_size); + if (kern != KERN_SUCCESS) return -1; + kern = host_statistics(host_port, HOST_VM_INFO, (host_info_t)&vm_stat, &host_size); + if (kern != KERN_SUCCESS) return -1; + return vm_stat.free_count * page_size / (1024 * 1024); +} +/// 总共的内存大小 单位MB ++ (double)getTotalMemory { + int64_t mem = [[NSProcessInfo processInfo] physicalMemory]; + if (mem < -1) mem = -1; + return mem / (1024 * 1024); +} + +///filePath目录下的文件 占用的磁盘大小 单位MB 默认沙盒Caches目录 ++ (double)getFileUsageDisk:(NSString *)filePath { + if (filePath.length == 0) filePath = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).lastObject; + ///定时执行时,此句代码会导致内存不断增长?0.1M 合理安排执行时机 + NSArray *filesArray = [[NSFileManager defaultManager] subpathsOfDirectoryAtPath:filePath error:nil] ; + NSEnumerator *filesEnumerator = [filesArray objectEnumerator]; + filesArray = nil; + + NSString *fileName; + unsigned long long int fileSize = 0; + while (fileName = [filesEnumerator nextObject]) { + @autoreleasepool { + //单个文件大小 + NSDictionary *fileDic = [[NSFileManager defaultManager] attributesOfItemAtPath:[filePath stringByAppendingPathComponent:fileName] error:nil]; + fileSize += [fileDic fileSize]; + } + } + filesEnumerator = nil; + return fileSize / (1024*1024); +} +///剩余空闲的磁盘容量 单位G ++ (double)getFreeDisk { + NSDictionary *fattributes = [[NSFileManager defaultManager] attributesOfFileSystemForPath:NSHomeDirectory() error:nil]; + NSNumber *freeSize = [fattributes objectForKey:NSFileSystemFreeSize]; + return [freeSize integerValue] / (1024*1024*1024); +} +///总磁盘容量 单位G ++ (double)getTotalDisk { + NSDictionary *fattributes = [[NSFileManager defaultManager] attributesOfFileSystemForPath:NSHomeDirectory() error:nil]; + NSNumber *totalSize = [fattributes objectForKey:NSFileSystemSize]; + return [totalSize integerValue] / (1024*1024*1024); +} + + +@end diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMThreadCount.h b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMThreadCount.h new file mode 100644 index 00000000..a3739c22 --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMThreadCount.h @@ -0,0 +1,23 @@ +// +// SLAPMThreadCount.h +// DarkMode +// +// Created by wsl on 2020/7/23. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +///监控线程数量 来源:https://juejin.im/post/5e92a113e51d4547134bdadb +@interface SLAPMThreadCount : NSObject + +///开始监听 ++ (void)startMonitorThreadCount; +///结束监听 ++ (void)stopMonitorThreadCount; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMThreadCount.m b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMThreadCount.m new file mode 100644 index 00000000..17ae5d8a --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMThreadCount.m @@ -0,0 +1,143 @@ +// +// SLAPMThreadCount.m +// DarkMode +// +// Created by wsl on 2020/7/23. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLAPMThreadCount.h" +#include +#include +#import "SLTimer.h" + +#import "BSBacktraceLogger.h" + +#ifndef kk_dispatch_main_async_safe +#define kk_dispatch_main_async_safe(block)\ +if (dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL) == dispatch_queue_get_label(dispatch_get_main_queue())) {\ +block();\ +} else {\ +dispatch_async(dispatch_get_main_queue(), block);\ +} +#endif + +static pthread_introspection_hook_t old_pthread_introspection_hook_t = NULL; //hook前原来的函数指针 +static int threadCount = 0; //线程数量 +#define KK_THRESHOLD 40 //线程总数量阈值 +static const int threadIncreaseThreshold = 10; //线程1秒内的增量阈值 + +//线程数量超过40,就会弹窗警告,并且控制台打印所有线程的堆栈;之后阈值每增加5条(45、50、55...)同样警告+打印堆栈;如果线程数量再次少于40条,阈值恢复到40 +static int maxThreadCountThreshold = KK_THRESHOLD; +static dispatch_semaphore_t global_semaphore; //信号量 保证线程安全 +static int threadCountIncrease = 0; //线程增长数量 +static bool isMonitor = false; //是否正在监测 +static NSString *taskName; //任务ID + +@implementation SLAPMThreadCount + +///调用startMonitor函数,开始监控线程数量。在这个函数里用global_semaphore来保证,task_threads获取的线程数量,到hook完成,线程数量不会变化(加解锁之间,没有线程新建跟销毁)。 ++ (void)startMonitorThreadCount { + if (isMonitor) return; + global_semaphore = dispatch_semaphore_create(1); + dispatch_semaphore_wait(global_semaphore, DISPATCH_TIME_FOREVER); + mach_msg_type_number_t count; + thread_act_array_t threads; + //获取线程数量 + task_threads(mach_task_self(), &threads, &count); + //加解锁之间,保证线程的数量不变 + threadCount = count; + /* + 看这个函数名,很像我们平时hook函数一样的。 + 返回值是上面声明的old_pthread_introspection_hook_t函数指针:返回原线程生命周期函数。 + 参数也是函数指针:传入的是我们自定义的线程生命周期函数 + */ + old_pthread_introspection_hook_t = pthread_introspection_hook_install(kk_pthread_introspection_hook_t); + dispatch_semaphore_signal(global_semaphore); + + isMonitor = true; + + //判断是否在主线程 + kk_dispatch_main_async_safe(^{ + taskName = [SLTimer execTask:self selector:@selector(clearThreadCountIncrease) start:0 interval:1.0 repeats:YES async:NO]; + }); +} +//定时器每一秒都将线程增长数置0 ++ (void)clearThreadCountIncrease +{ + threadCountIncrease = 0; +} +///结束监听 ++ (void)stopMonitorThreadCount { + if (!global_semaphore || !taskName) { + return; + } + dispatch_semaphore_wait(global_semaphore, DISPATCH_TIME_FOREVER); + pthread_introspection_hook_t lastHook = pthread_introspection_hook_install(old_pthread_introspection_hook_t); + isMonitor = NO; + [SLTimer cancelTask:taskName]; + dispatch_semaphore_signal(global_semaphore); +} + +/** + 定义函数指针:pthread_introspection_hook_t + event : 线程处于的生命周期(下面枚举了线程的4个生命周期) + thread :线程 + addr :线程栈内存基址 + size :线程栈内存可用大小 + enum { + PTHREAD_INTROSPECTION_THREAD_CREATE = 1, //创建线程 + PTHREAD_INTROSPECTION_THREAD_START, // 线程开始运行 + PTHREAD_INTROSPECTION_THREAD_TERMINATE, //线程运行终止 + PTHREAD_INTROSPECTION_THREAD_DESTROY, //销毁线程 + }; + */ +void kk_pthread_introspection_hook_t(unsigned int event, + pthread_t thread, void *addr, size_t size) +{ + if (old_pthread_introspection_hook_t) { + //执行原来的线程生命周期函数 + old_pthread_introspection_hook_t(event, thread, addr, size); + } + + dispatch_semaphore_wait(global_semaphore, DISPATCH_TIME_FOREVER); + if (event == PTHREAD_INTROSPECTION_THREAD_CREATE) { + //创建线程 + threadCount = threadCount + 1; //线程总量加1 + if (isMonitor && (threadCount > maxThreadCountThreshold)) { + //如果线程总数大于监测的阈值,阈值+5;发出警告⚠️ + maxThreadCountThreshold += 5; + kk_Alert_Log_CallStack(false, 0); + } + threadCountIncrease = threadCountIncrease + 1; + if (isMonitor && (threadCountIncrease > threadIncreaseThreshold)) { + //如果线程在1秒内的增长数超过了阈值,发出警告⚠️ + kk_Alert_Log_CallStack(true, threadCountIncrease); + } + } + else if (event == PTHREAD_INTROSPECTION_THREAD_DESTROY){ + //销毁线程 + threadCount = threadCount - 1; //线程总量-1 + if (threadCount < KK_THRESHOLD) { + //如果线程数量再次少于40条,阈值恢复到40 + maxThreadCountThreshold = KK_THRESHOLD; + } + if (threadCountIncrease > 0) { + //线程增量-1 + threadCountIncrease = threadCountIncrease - 1; + } + } + dispatch_semaphore_signal(global_semaphore); +} + +///发出警告 输出调用堆栈 +void kk_Alert_Log_CallStack(bool isIncreaseLog, int num) +{ + if (isIncreaseLog) { + NSLog(@"⚠️ 1秒钟开启了 %d 条线程!", num); + } + NSLog(@"⚠️ 线程监听:%@",[BSBacktraceLogger bs_backtraceOfAllThread]); +} + +@end + diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMURLProtocol.h b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMURLProtocol.h new file mode 100644 index 00000000..3a94f668 --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMURLProtocol.h @@ -0,0 +1,23 @@ +// +// SLAPMURLProtocol.h +// DarkMode +// +// Created by wsl on 2020/8/3. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +///网络监控 TCP 建立连接时间 、DNS 时间、 SSL时间、首包时间、响应时间 、流量 +@interface SLAPMURLProtocol : NSURLProtocol + +///开始监听网络 ++ (void)startMonitorNetwork; +///结束监听网络 ++ (void)stopMonitorNetwork; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMURLProtocol.m b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMURLProtocol.m new file mode 100644 index 00000000..ffa38742 --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLAPMURLProtocol.m @@ -0,0 +1,226 @@ +// +// SLAPMURLProtocol.m +// DarkMode +// +// Created by wsl on 2020/8/3. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLAPMURLProtocol.h" + +///计算请求报文的大小 即上行流量 +@interface NSURLRequest (SLDataLength) +@end +@implementation NSURLRequest (SLDataLength) +- (NSUInteger)sl_getLineLength { + NSString *lineStr = [NSString stringWithFormat:@"%@ %@ %@\n", self.HTTPMethod, self.URL.path, @"HTTP/1.1"]; + NSData *lineData = [lineStr dataUsingEncoding:NSUTF8StringEncoding]; + return lineData.length; +} +- (NSUInteger)sl_getHeadersLengthWithCookie { + NSUInteger headersLength = 0; + + NSDictionary *headerFields = self.allHTTPHeaderFields; + NSDictionary *cookiesHeader = [self sl_getCookies]; + + // 添加 cookie 信息 + if (cookiesHeader.count) { + NSMutableDictionary *headerFieldsWithCookies = [NSMutableDictionary dictionaryWithDictionary:headerFields]; + [headerFieldsWithCookies addEntriesFromDictionary:cookiesHeader]; + headerFields = [headerFieldsWithCookies copy]; + } + // NSLog(@"%@", headerFields); + NSString *headerStr = @""; + + for (NSString *key in headerFields.allKeys) { + headerStr = [headerStr stringByAppendingString:key]; + headerStr = [headerStr stringByAppendingString:@": "]; + if ([headerFields objectForKey:key]) { + headerStr = [headerStr stringByAppendingString:headerFields[key]]; + } + headerStr = [headerStr stringByAppendingString:@"\n"]; + } + NSData *headerData = [headerStr dataUsingEncoding:NSUTF8StringEncoding]; + headersLength = headerData.length; + return headersLength; +} +- (NSDictionary *)sl_getCookies { + NSDictionary *cookiesHeader; + NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + NSArray *cookies = [cookieStorage cookiesForURL:self.URL]; + if (cookies.count) { + cookiesHeader = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies]; + } + return cookiesHeader; +} +- (NSUInteger)sl_getBodyLength { + NSDictionary *headerFields = self.allHTTPHeaderFields; + NSUInteger bodyLength = [self.HTTPBody length]; + if ([headerFields objectForKey:@"Content-Encoding"]) { + NSData *bodyData; + if (self.HTTPBody == nil) { + uint8_t d[1024] = {0}; + NSInputStream *stream = self.HTTPBodyStream; + NSMutableData *data = [[NSMutableData alloc] init]; + [stream open]; + while ([stream hasBytesAvailable]) { + NSInteger len = [stream read:d maxLength:1024]; + if (len > 0 && stream.streamError == nil) { + [data appendBytes:(void *)d length:len]; + } + } + bodyData = [data copy]; + [stream close]; + } else { + bodyData = self.HTTPBody; + } + bodyLength = bodyData.length; + } + return bodyLength; +} +@end + + +//为了避免 canInitWithRequest 和 canonicalRequestForRequest 出现死循环 +static NSString * const SLHTTPHandledIdentifier = @"SLHTTPHandledIdentifier"; +@interface SLAPMURLProtocol () + +@property (nonatomic, strong) NSURLSession *session; //会话 +@property (nonatomic, strong) NSURLSessionDataTask *dataTask; + +@property (nonatomic, strong) NSURLResponse *response; //响应头 +@property (nonatomic, strong) NSMutableData *data; //返回的数据 + +@end + +@implementation SLAPMURLProtocol + +#pragma mark - Public +///开始监听网络 ++ (void)startMonitorNetwork { + [NSURLProtocol registerClass:[SLAPMURLProtocol class]]; +} +///结束监听网络 ++ (void)stopMonitorNetwork { + [NSURLProtocol unregisterClass:[SLAPMURLProtocol class]]; +} + +#pragma mark - Override ++ (BOOL)canInitWithRequest:(NSURLRequest *)request { + if (![request.URL.scheme isEqualToString:@"http"] && + ![request.URL.scheme isEqualToString:@"https"]) { + return NO; + } + //拦截过的请求不再拦截 + if ([NSURLProtocol propertyForKey:SLHTTPHandledIdentifier inRequest:request] ) { + return NO; + } + return YES; +} ++ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request { + //标示该request已经处理过了,防止无限循环 + NSMutableURLRequest *mutableReqeust = [request mutableCopy]; + [NSURLProtocol setProperty:@YES + forKey:SLHTTPHandledIdentifier + inRequest:mutableReqeust]; + return [mutableReqeust copy]; +} +- (void)startLoading { + NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; + NSOperationQueue *sessionDelegateQueue = [[NSOperationQueue alloc] init]; + sessionDelegateQueue.maxConcurrentOperationCount = 1; + sessionDelegateQueue.name = @"com.wsl2ls.APMURLProtocol.queue"; + _session = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:sessionDelegateQueue]; + _dataTask = [_session dataTaskWithRequest:self.request]; + [_dataTask resume]; +} +- (void)stopLoading { + [_dataTask cancel]; + _dataTask = nil; + [_session invalidateAndCancel]; + _session = nil; + + //接收流量 不包括响应头NSURLResponse + NSLog(@"接收流量大小:%.2fM",self.data.length/(1024.0*1024.0)); + + NSUInteger sendLength = [self.request sl_getLineLength] + [self.request sl_getBodyLength] + [self.request sl_getHeadersLengthWithCookie]; + NSLog(@"发送流量大小:%ldB",sendLength); +} + +#pragma mark - Getter +- (NSMutableData *)data { + if (!_data) { + _data = [NSMutableData data]; + } + return _data; +} + +#pragma mark - NSURLSessionDataDelegate +//接收到返回的响应信息时(还未开始下载), 执行的代理方法 +- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveResponse:(NSURLResponse *)response completionHandler:(void (^)(NSURLSessionResponseDisposition))completionHandler { + [[self client] URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageAllowed]; + completionHandler(NSURLSessionResponseAllow); + self.response = response; +} +//接收到服务器返回的数据 调用多次,数据是分批返回的 +- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask + didReceiveData:(NSData *)data { + [self.data appendData:data]; + [self.client URLProtocol:self didLoadData:data]; +} + +#pragma mark - NSURLSessionTaskDelegate +///告诉代理会话已收集完任务的度量 实现对网络请求中 DNS 查询/TCP 建立连接/TLS 握手/请求响应等各环节时间的统计 +- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didFinishCollectingMetrics:(NSURLSessionTaskMetrics *)metrics API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)) { + + //数组包含了在执行任务时产生的每个请求/响应事务中收集的指标。 + NSArray *array = metrics.transactionMetrics; + //任务从创建到完成花费的总时间,任务的创建时间是任务被实例化时的时间;任务完成时间是任务的内部状态将要变为完成的时间。 + NSDateInterval *taskInterval = metrics.taskInterval; + NSLog(@"请求时长:%f",taskInterval.duration); + + for (NSURLSessionTaskTransactionMetrics*transactionMetrics in array) { + NSLog(@"请求开始:%@",transactionMetrics.fetchStartDate); + NSLog(@"请求完成:%@",transactionMetrics.responseEndDate); + NSLog(@"请求协议:%@",transactionMetrics.networkProtocolName); + NSLog(@"DNS 解析开始时间:%@",transactionMetrics.domainLookupStartDate); + NSLog(@"DNS 解析完成时间:%@",transactionMetrics.domainLookupEndDate); + NSLog(@"客户端与服务器开始建立 TCP 连接的时间:%@",transactionMetrics.connectStartDate); + NSLog(@"HTTPS 的 TLS 握手开始时间:%@",transactionMetrics.secureConnectionStartDate); + NSLog(@"HTTPS 的 TLS 握手结束时间:%@",transactionMetrics.secureConnectionEndDate); + NSLog(@"客户端与服务器建立 TCP 连接完成时间:%@",transactionMetrics.connectEndDate); + + NSLog(@"开始传输 HTTP请求header 第一个字节的时间:%@",transactionMetrics.requestStartDate); + NSLog(@"HTTP请求最后一个字节传输完成的时间:%@",transactionMetrics.requestEndDate); + NSLog(@"客户端从服务器接收到响应的第一个字节的时间:%@",transactionMetrics.responseStartDate); + NSLog(@"客户端从服务器接收到最后一个字节的时间:%@",transactionMetrics.responseEndDate); + } +} + +- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task + didSendBodyData:(int64_t)bytesSent + totalBytesSent:(int64_t)totalBytesSent +totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend { + + +} + + +//请求结束或者是失败的时候调用 +- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error { + if (!error) { + [self.client URLProtocolDidFinishLoading:self]; + } else if ([error.domain isEqualToString:NSURLErrorDomain] && error.code == NSURLErrorCancelled) { + } else { + [self.client URLProtocol:self didFailWithError:error]; + } +} +//告诉代理,远程服务器请求了HTTP重定向 +- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLRequest * _Nullable))completionHandler { + if (response != nil){ + self.response = response; + [[self client] URLProtocol:self wasRedirectedToRequest:request redirectResponse:response]; + } +} + +@end diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLSystemAppInfo.h b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLSystemAppInfo.h new file mode 100644 index 00000000..cbb31b7f --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLSystemAppInfo.h @@ -0,0 +1,68 @@ +// +// SLSystemAppInfo.h +// DarkMode +// +// Created by wsl on 2020/8/4. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +typedef NS_ENUM(NSInteger, SLAuthorizationStatus) { + SLAuthorizationStatusUnknow = -1, //未知的 + SLAuthorizationStatusNotDetermined = 0, //用户还没有选择过(第一次) 这时会自动出现系统询问授权弹窗,之后不会 + SLAuthorizationStatusRestricted, //家长控制,限制用户授权的权限 + SLAuthorizationStatusDenied, //用户拒绝授权 + SLAuthorizationStatusAuthorized, //已授权 + SLAuthorizationStatusAuthorizedAlways, //始终都授权,比如定位,蓝牙 + SLAuthorizationStatusAuthorizedWhenInUse, //仅当应用使用时授权 比如定位 + SLAuthorizationStatusProvisional, //临时授权,用完一次即权利解除,下次再申请 + SLAuthorizationStatusUnsupported, //该硬件不支持授权的功能,比如蓝牙、FaceID、摄像头,设备可能不支持 + SLAuthorizationStatusOff //请求授权的功能处于关闭状态,比如蓝牙 +}; + +NS_ASSUME_NONNULL_BEGIN + +///包含系统、应用、隐私权限的信息 +@interface SLSystemAppInfo : NSObject + ++ (instancetype)manager; ++ (void)test; + +#pragma mark - System Info +///获取手机型号 iPhone 8... ++ (NSString *)iphoneType; +///获取手机系统版本 13.4 ++ (NSString *)systemVersion; +///获取设备类型 iPhone/iPad/iPod touch ++ (NSString *)deviceModel; +///根据地区语言返回设备类型字符串 (国际化区域名称) ++(NSString *)localDeviceModel; +///操作系统名称 iOS ++ (NSString *)systemName; +///获取用户手机别名 用户定义的名称 通用-关于本机-名称 wsl的iphone ++ (NSString *)userPhoneName; +///设备唯一标识的字母数字字符串 但如果用户重新安装,那么这个 UUID 就会发生变化。 C5668446-C443-4898-A213-209AECE3626C ++ (NSString *)uuidString; +///是否是iPhoneX系列/刘海屏 ++ (BOOL)isIPhoneXSeries; +/// 获取电话运营商信息 ++ (NSString *)telephonyInfo; +/// 获取网络类型 ++(NSString*)networkType; +///获取设备当前网络IP地址 ++ (NSString *)getIPAddress:(BOOL)preferIPv4; + +#pragma mark - App Info +///获取APP名字 SLTips ++ (NSString *)appName; +///获取APP bundle id com.wsl2ls.tips ++ (NSString *)appBundleId; +///获取当前App版本号 1.1.0 ++ (NSString *)appVersion; +///获取当前App编译版本号 1 ++ (NSString *)appBuild; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLSystemAppInfo.m b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLSystemAppInfo.m new file mode 100644 index 00000000..974e58fc --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/SLSystemAppInfo.m @@ -0,0 +1,598 @@ +// +// SLSystemAppInfo.m +// DarkMode +// +// Created by wsl on 2020/8/4. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLSystemAppInfo.h" +#import "sys/utsname.h" +#import +#import +#import +#include +#include +#include +#import +#import +#import +#import +#import +#import +#import + + +#define SL_IOS_CELLULAR @"pdp_ip0" +#define SL_IOS_WIFI @"en0" +//#define IOS_VPN @"utun0" +#define SL_IP_ADDR_IPv4 @"ipv4" +#define SL_IP_ADDR_IPv6 @"ipv6" + +@interface SLSystemAppInfo () +@end +@implementation SLSystemAppInfo + ++ (void)test { + + [self iphoneType]; + [self systemVersion]; + [self deviceModel]; + [self userPhoneName]; + [self systemName]; + [self uuidString]; + [self localDeviceModel]; + [self telephonyInfo]; + [self networkType]; + [self getIPAddress:YES]; + + [self appBundleId]; + [self appVersion]; + [self appBuild]; + [self appName]; + + [self checkPushAuthorization]; + [self checkPhotoLibraryAuthorization:nil]; + [self checkLocationAuthorization]; + [self checkCameraAuthorization:nil]; + [self checkMicrophoneAuthorization:nil]; + +} + +#pragma mark - Override +/// 重写allocWithZone方法,保证alloc或者init创建的实例不会产生新实例,因为该类覆盖了allocWithZone方法,所以只能通过其父类分配内存,即[super allocWithZone] ++ (instancetype)allocWithZone:(struct _NSZone *)zone { + return [self manager]; +} +/// 重写copyWithZone方法,保证复制返回的是同一份实例 +- (nonnull id)copyWithZone:(nullable NSZone *)zone { + return [SLSystemAppInfo manager]; +} + +#pragma mark - Public ++ (instancetype)manager { + static SLSystemAppInfo *manager = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + manager = [[super allocWithZone:NULL] init]; + }); + return manager; +} + +#pragma mark - System Info + +///获取手机型号 iPhone 8... ++ (NSString *)iphoneType{ + struct utsname systemInfo; + uname(&systemInfo); + NSString *deviceString = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; + NSDictionary *dict = @{@"iPhone1,1":@"iPhone 1G", + @"iPhone1,2":@"iPhone 3G", + @"iPhone2,1":@"iPhone 3GS", + @"iPhone3,1":@"iPhone 4", + @"iPhone3,2":@"iPhone 4", + @"iPhone4,1":@"iPhone 4S", + @"iPhone5,1":@"iPhone 5", + @"iPhone5,2":@"iPhone 5", + @"iPhone5,3":@"iPhone 5C", + @"iPhone5,4":@"iPhone 5C", + @"iPhone6,1":@"iPhone 5S", + @"iPhone6,2":@"iPhone 5S", + @"iPhone7,1":@"iPhone 6 Plus", + @"iPhone7,2":@"iPhone 6", + @"iPhone8,1":@"iPhone 6S", + @"iPhone8,2":@"iPhone 6S Plus", + @"iPhone8,4":@"iPhone SE", + @"iPhone9,1":@"iPhone 7", + @"iPhone9,3":@"iPhone 7", + @"iPhone9,2":@"iPhone 7 Plus", + @"iPhone9,4":@"iPhone 7 Plus", + @"iPhone10,1":@"iPhone 8", + @"iPhone10.4":@"iPhone 8", + @"iPhone10,2":@"iPhone 8 Plus", + @"iPhone10,5":@"iPhone 8 Plus", + @"iPhone10,3":@"iPhone X", + @"iPhone10,6":@"iPhone X", + @"iPhone11,8":@"iPhone XR", + @"iPhone11,2":@"iPhone XS", + @"iPhone11,4":@"iPhone XS Max", + @"iPhone11,6":@"iPhone XS Max", + @"iPhone12,1":@"iPhone 11", + @"iPhone12,3":@"iPhone 11 Pro", + @"iPhone12,5":@"iPhone 11 Pro Max", + @"i386":@"Simulator", + @"x86_64":@"Simulator" + }; + return dict[deviceString] == nil ? deviceString : dict[deviceString]; +} +///获取手机系统版本 13.4 ++ (NSString *)systemVersion { + NSString *systemVersion = [[UIDevice currentDevice] systemVersion]; + return systemVersion; +} +///获取设备类型 iPhone/iPad/iPod touch ++ (NSString *)deviceModel { + NSString* deviceModel = [[UIDevice currentDevice] model]; + return deviceModel; +} +///根据地区语言返回设备类型字符串 (国际化区域名称) ++(NSString *)localDeviceModel { + NSString* localizedModel = [[UIDevice currentDevice] localizedModel]; + return localizedModel;; +} +///操作系统名称 iOS ++ (NSString *)systemName { + NSString* systemName = [[UIDevice currentDevice] systemName]; + return systemName; +} +///获取用户手机别名 用户定义的名称 通用-关于本机-名称 wsl的iphone ++ (NSString *)userPhoneName { + NSString* userPhoneName = [[UIDevice currentDevice] name]; + return userPhoneName; +} +///设备唯一标识的字母数字字符串,但如果用户重新安装,那么这个 UUID 就会发生变化。 C5668446-C443-4898-A213-209AECE3626C ++ (NSString *)uuidString { + NSString *UUIDString = [[UIDevice currentDevice] identifierForVendor].UUIDString; + return UUIDString; +} +///是否是iPhoneX系列/刘海屏 ++ (BOOL)isIPhoneXSeries{ + BOOL iPhoneXSeries = NO; + if (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPhone) { + return iPhoneXSeries; + } + if (@available(iOS 11.0, *)) { + UIWindow *mainWindow = [self getKeyWindow]; + if (mainWindow.safeAreaInsets.bottom > 0.0) { + iPhoneXSeries = YES; + } + } + return iPhoneXSeries; +} ++ (UIWindow *)getKeyWindow{ + UIWindow *keyWindow = nil; + if ([[UIApplication sharedApplication].delegate respondsToSelector:@selector(window)]) { + keyWindow = [[UIApplication sharedApplication].delegate window]; + }else{ + NSArray *windows = [UIApplication sharedApplication].windows; + for (UIWindow *window in windows) { + if (!window.hidden) { + keyWindow = window; + break; + } + } + } + return keyWindow; +} +/// 获取电话运营商信息 ++ (NSString *)telephonyInfo { + CTTelephonyNetworkInfo *info = [[CTTelephonyNetworkInfo alloc] init]; + CTCarrier *carrier = [info subscriberCellularProvider]; + NSString *mCarrier = [NSString stringWithFormat:@"%@",[carrier carrierName]]; + return mCarrier; +} +/// 获取网络类型 ++(NSString*)networkType { + /** + CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyGPRS __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); + CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyEdge __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); + CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyWCDMA __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); + CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyHSDPA __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); + CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyHSUPA __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); + CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyCDMA1x __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); + CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyCDMAEVDORev0 __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); + CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyCDMAEVDORevA __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); + CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyCDMAEVDORevB __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); + CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyeHRPD __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); + CORETELEPHONY_EXTERN NSString * const CTRadioAccessTechnologyLTE __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0); + **/ + // + CTTelephonyNetworkInfo* info=[[CTTelephonyNetworkInfo alloc] init]; + if (@available(iOS 12.0, *)) { + NSDictionary *dict= info.serviceCurrentRadioAccessTechnology; + // NSLog(@"%@",dict); + } else { + } + NSString *networkType = info.currentRadioAccessTechnology; + return networkType; +} +///获取设备当前网络IP地址 ++ (NSString *)getIPAddress:(BOOL)preferIPv4 { + NSArray *searchArray = preferIPv4 ? + @[ /*IOS_VPN @"/" SL_IP_ADDR_IPv4, IOS_VPN @"/" SL_IP_ADDR_IPv6,*/ SL_IOS_WIFI @"/" SL_IP_ADDR_IPv4, SL_IOS_WIFI @"/" SL_IP_ADDR_IPv6, SL_IOS_CELLULAR @"/" SL_IP_ADDR_IPv4, SL_IOS_CELLULAR @"/" SL_IP_ADDR_IPv6 ] : + @[ /*IOS_VPN @"/" SL_IP_ADDR_IPv6, IOS_VPN @"/" SL_IP_ADDR_IPv4,*/ SL_IOS_WIFI @"/" SL_IP_ADDR_IPv6, SL_IOS_WIFI @"/" SL_IP_ADDR_IPv4, SL_IOS_CELLULAR @"/" SL_IP_ADDR_IPv6, SL_IOS_CELLULAR @"/" SL_IP_ADDR_IPv4 ] ; + + NSDictionary *addresses = [[self class] getIPAddresses]; + __block NSString *address; + [searchArray enumerateObjectsUsingBlock:^(NSString *key, NSUInteger idx, BOOL *stop) + { + address = addresses[key]; + if(address) *stop = YES; + } ]; + return address ? address : @"0.0.0.0"; +} +//获取所有相关IP信息 ++ (NSDictionary *)getIPAddresses { + NSMutableDictionary *addresses = [NSMutableDictionary dictionaryWithCapacity:8]; + + // retrieve the current interfaces - returns 0 on success + struct ifaddrs *interfaces; + if(!getifaddrs(&interfaces)) { + // Loop through linked list of interfaces + struct ifaddrs *interface; + for(interface=interfaces; interface; interface=interface->ifa_next) { + if(!(interface->ifa_flags & IFF_UP) /* || (interface->ifa_flags & IFF_LOOPBACK) */ ) { + continue; // deeply nested code harder to read + } + const struct sockaddr_in *addr = (const struct sockaddr_in*)interface->ifa_addr; + char addrBuf[ MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) ]; + if(addr && (addr->sin_family==AF_INET || addr->sin_family==AF_INET6)) { + NSString *name = [NSString stringWithUTF8String:interface->ifa_name]; + NSString *type; + if(addr->sin_family == AF_INET) { + if(inet_ntop(AF_INET, &addr->sin_addr, addrBuf, INET_ADDRSTRLEN)) { + type = SL_IP_ADDR_IPv4; + } + } else { + const struct sockaddr_in6 *addr6 = (const struct sockaddr_in6*)interface->ifa_addr; + if(inet_ntop(AF_INET6, &addr6->sin6_addr, addrBuf, INET6_ADDRSTRLEN)) { + type = SL_IP_ADDR_IPv6; + } + } + if(type) { + NSString *key = [NSString stringWithFormat:@"%@/%@", name, type]; + addresses[key] = [NSString stringWithUTF8String:addrBuf]; + } + } + } + // Free memory + freeifaddrs(interfaces); + } + return [addresses count] ? addresses : nil; +} + + + +#pragma mark - App Info +///获取APP名字 SLTips ++ (NSString *)appName { + NSString *appCurName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"]; + if (!appCurName) { + appCurName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"]; + } + return appCurName; +} +///获取APP bundle id com.wsl2ls.tips ++ (NSString *)appBundleId { + NSString *appBundleId = [[NSBundle mainBundle] bundleIdentifier]; + return appBundleId; +} +///获取当前App版本号 1.1.0 ++ (NSString *)appVersion { + NSString *appCurVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; + return appCurVersion; +} +///获取当前App编译版本号 1 ++ (NSString *)appBuild { + NSString *appBuildVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]; + return appBuildVersion; +} + +#pragma mark - 隐私权限 +/*资料:https://www.jianshu.com/p/5f05bc8395f1 */ + +///检测推送通知权限 ++ (SLAuthorizationStatus)checkPushAuthorization { + __block SLAuthorizationStatus authorizationStatus = SLAuthorizationStatusUnknow; +#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0 + if ([[UIApplication sharedApplication] currentUserNotificationSettings].types == UIUserNotificationTypeNone) { + authorizationStatus = SLAuthorizationStatusDenied; + return authorizationStatus; + }else { + authorizationStatus = SLAuthorizationStatusAuthorized; + return authorizationStatus; + } +#else + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + [[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) { + UNAuthorizationStatus pushAuthorizationStatus = settings.authorizationStatus; + switch (pushAuthorizationStatus) { + case UNAuthorizationStatusNotDetermined: + authorizationStatus = SLAuthorizationStatusNotDetermined; + break; + case UNAuthorizationStatusDenied: + authorizationStatus = SLAuthorizationStatusDenied; + break; + case UNAuthorizationStatusAuthorized: + authorizationStatus = SLAuthorizationStatusAuthorized; + break; + case UNAuthorizationStatusProvisional: + ///临时授权,用完权利解除,下次再申请 + authorizationStatus = SLAuthorizationStatusProvisional; + break; + default: + authorizationStatus = SLAuthorizationStatusUnknow; + break; + } + dispatch_semaphore_signal(semaphore); + }]; + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); +#endif + return authorizationStatus; +} + +///检查相册访问权限 handler 用户授权结果的回调 ++ (SLAuthorizationStatus)checkPhotoLibraryAuthorization:(void(^)(SLAuthorizationStatus status))handler { + __block SLAuthorizationStatus authorizationStatus = SLAuthorizationStatusUnknow; +#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_0 //iOS 8.0以下使用AssetsLibrary.framework + ALAuthorizationStatus status = [ALAssetsLibrary authorizationStatus]; + authorizationStatus = (SLAuthorizationStatus)status; +#else //iOS 8.0以上使用Photos.framework + PHAuthorizationStatus current = [PHPhotoLibrary authorizationStatus]; + authorizationStatus = (SLAuthorizationStatus)current; + //用户还没有做出过是否授权的选择时 + if (current == PHAuthorizationStatusNotDetermined) { + //只有第一次请求授权时才会自动出现系统弹窗,之后再请求授权时也不会弹出系统询问弹窗 + [PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) { + dispatch_async(dispatch_get_main_queue(), ^{ + if (handler) { + authorizationStatus = (SLAuthorizationStatus)status; + handler(authorizationStatus); + } + }); + }]; + } +#endif + if (handler) { + handler(authorizationStatus); + } + return authorizationStatus; +} + +///检查定位权限 ++ (SLAuthorizationStatus)checkLocationAuthorization { + SLAuthorizationStatus authorizationStatus = SLAuthorizationStatusUnknow; + //定位服务是否可用 + if ([CLLocationManager locationServicesEnabled]) { + CLAuthorizationStatus state = [CLLocationManager authorizationStatus]; + if (state == kCLAuthorizationStatusNotDetermined) { + authorizationStatus = SLAuthorizationStatusNotDetermined; + }else if(state == kCLAuthorizationStatusRestricted){ + authorizationStatus = SLAuthorizationStatusRestricted; + }else if(state == kCLAuthorizationStatusDenied){ + authorizationStatus = SLAuthorizationStatusDenied; + }else if(state == kCLAuthorizationStatusAuthorizedAlways){ + authorizationStatus = SLAuthorizationStatusAuthorizedAlways; + }else if(state == kCLAuthorizationStatusAuthorizedWhenInUse){ + authorizationStatus = SLAuthorizationStatusAuthorizedWhenInUse; + } + }else{ + //定位服务不可用 + authorizationStatus = SLAuthorizationStatusUnsupported; + } + return authorizationStatus; +} + +///检查相机/摄像头权限 ++ (SLAuthorizationStatus)checkCameraAuthorization:(void(^)(SLAuthorizationStatus status))handler { + __block SLAuthorizationStatus authorizationStatus = SLAuthorizationStatusUnknow; + NSString *mediaType = AVMediaTypeVideo;//读取媒体类型 + AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType];//读取设备授权状态 + authorizationStatus = (SLAuthorizationStatus)authStatus; + if (authStatus == AVAuthorizationStatusNotDetermined) { + [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) { + if (granted) { + authorizationStatus = SLAuthorizationStatusAuthorized; + }else{ + authorizationStatus = SLAuthorizationStatusDenied; + } + if (handler) { + handler(authorizationStatus); + } + }]; + } + if (handler) { + handler(authorizationStatus); + } + return authorizationStatus; +} + +///检查话筒/麦克风权限 ++ (SLAuthorizationStatus)checkMicrophoneAuthorization:(void(^)(SLAuthorizationStatus status))handler { + __block SLAuthorizationStatus authorizationStatus = SLAuthorizationStatusUnknow; + NSString *mediaType = AVMediaTypeAudio;//读取媒体类型 + AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType];//读取设备授权状态 + authorizationStatus = (SLAuthorizationStatus)authStatus; + if (authStatus == AVAuthorizationStatusNotDetermined) { + [[AVAudioSession sharedInstance] requestRecordPermission:^(BOOL granted) { + if (granted) { + authorizationStatus = SLAuthorizationStatusAuthorized; + } else { + authorizationStatus = SLAuthorizationStatusDenied; + } + if (handler) { + handler(authorizationStatus); + } + }]; + } + if (handler) { + handler(authorizationStatus); + } + return authorizationStatus; +} + +///检测通讯录权限 ++ (SLAuthorizationStatus)checkContactsAuthorization:(void(^)(SLAuthorizationStatus status))handler { + __block SLAuthorizationStatus authorizationStatus = SLAuthorizationStatusUnknow; + if (@available(iOS 9.0, *)) {//iOS9.0之后 + CNAuthorizationStatus authStatus = [CNContactStore authorizationStatusForEntityType:CNEntityTypeContacts]; + authorizationStatus = (SLAuthorizationStatus)authStatus; + if (authStatus == CNAuthorizationStatusNotDetermined) { + CNContactStore *contactStore = [[CNContactStore alloc] init]; + [contactStore requestAccessForEntityType:CNEntityTypeContacts completionHandler:^(BOOL granted, NSError *error) { + if (!error){ + if (granted) { + authorizationStatus = SLAuthorizationStatusAuthorized; + } else { + authorizationStatus = SLAuthorizationStatusDenied; + } + if (handler) { + handler(authorizationStatus); + } + } + + }]; + } + }else{//iOS9.0之前 + ABAuthorizationStatus authorStatus = ABAddressBookGetAuthorizationStatus(); + authorizationStatus = (SLAuthorizationStatus)authorStatus; + } + if (handler) { + handler(authorizationStatus); + } + return authorizationStatus; +} + +///检测日历权限 ++ (SLAuthorizationStatus)checkCalendarAuthorization:(void(^)(SLAuthorizationStatus status))handler { + __block SLAuthorizationStatus authorizationStatus = SLAuthorizationStatusUnknow; + EKAuthorizationStatus status = [EKEventStore authorizationStatusForEntityType:EKEntityTypeEvent]; + authorizationStatus = (SLAuthorizationStatus)status; + if (status == EKAuthorizationStatusNotDetermined) { + EKEventStore *store = [[EKEventStore alloc] init]; + [store requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) { + if (error) {} else { + if (granted) { + authorizationStatus = SLAuthorizationStatusAuthorized; + } else { + authorizationStatus = SLAuthorizationStatusDenied; + } + if (handler) { + handler(authorizationStatus); + } + } + }]; + } + if (handler) { + handler(authorizationStatus); + } + return authorizationStatus; +} + +///检测提醒事项权限 ++ (SLAuthorizationStatus)checkRemindAuthorization:(void(^)(SLAuthorizationStatus status))handler { + __block SLAuthorizationStatus authorizationStatus = SLAuthorizationStatusUnknow; + EKAuthorizationStatus status = [EKEventStore authorizationStatusForEntityType:EKEntityTypeReminder]; + authorizationStatus = (SLAuthorizationStatus)status; + if (status == EKAuthorizationStatusNotDetermined) { + EKEventStore *store = [[EKEventStore alloc] init]; + [store requestAccessToEntityType:EKEntityTypeReminder completion:^(BOOL granted, NSError * _Nullable error) { + if (!error){ + if (granted) { + authorizationStatus = SLAuthorizationStatusAuthorized; + } else { + authorizationStatus = SLAuthorizationStatusDenied; + } + if (handler) { + handler(authorizationStatus); + } + } + }]; + } + if (handler) { + handler(authorizationStatus); + } + return authorizationStatus; +} + +///检测蓝牙权限 +- (void)checkBluetoothAuthorization { + if (@available(iOS 13.1, *)) { + CBManagerAuthorization authorization = [CBManager authorization]; + SLAuthorizationStatus authorizationStatus = SLAuthorizationStatusUnknow; + if (authorization == CBManagerAuthorizationAllowedAlways) { + authorizationStatus = SLAuthorizationStatusAuthorizedAlways; + }else { + authorizationStatus = (SLAuthorizationStatus)authorization; + } + } else { + CBCentralManager *bluetoothManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil]; + } +} +///CBCentralManagerDelegate +- (void)centralManagerDidUpdateState:(CBCentralManager *)central { + SLAuthorizationStatus authorizationStatus = SLAuthorizationStatusUnknow; + CBManagerState state = central.state; + if (state == CBManagerStateResetting) { + //重置或重新连接 + authorizationStatus = SLAuthorizationStatusUnknow; + } else if (state == CBManagerStateUnsupported) { + //不支持蓝牙功能 + authorizationStatus = SLAuthorizationStatusUnsupported; + } else if (state == CBManagerStateUnauthorized) { + //拒绝授权 + authorizationStatus = SLAuthorizationStatusDenied; + } else if (state == CBManagerStatePoweredOff) { + //蓝牙处于关闭状态 + authorizationStatus = SLAuthorizationStatusOff; + } else if (state == CBManagerStatePoweredOn) { + //已授权 + authorizationStatus = SLAuthorizationStatusAuthorized; + } +} + +///请求FaceID权限 ++ (void)checkFaceIDAuthorization { + __block SLAuthorizationStatus authorizationStatus = SLAuthorizationStatusUnknow; + if (@available(iOS 11.0, *)) { + LAContext *authenticationContext = [[LAContext alloc]init]; + NSError *error = nil; + ///是否能验证人脸数据 + BOOL canEvaluatePolicy = [authenticationContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]; + if (canEvaluatePolicy) { + if (authenticationContext.biometryType == LABiometryTypeFaceID) { + //验证当前人脸数据 + [authenticationContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:@"开始验证" reply:^(BOOL success, NSError * _Nullable error) { + if (!error) { + if (success) { + //验证通过 + }else { + //验证失败 + } + } + }]; + } + }else { + if (error.code == -8) { + NSLog(@"错误次数太多,被锁定"); + }else{ + NSLog(@"没有设置人脸数据,请前往设置"); + } + } + }else { + authorizationStatus = SLAuthorizationStatusUnsupported; + } + +} + +@end diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/UIViewController+SLAPMVCTime.h b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/UIViewController+SLAPMVCTime.h new file mode 100644 index 00000000..ea3e7117 --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/UIViewController+SLAPMVCTime.h @@ -0,0 +1,18 @@ +// +// UIViewController+SLAPMVCTime.h +// DarkMode +// +// Created by wsl on 2020/8/4. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +///ViewController启动耗时监测 -loadView --> -viewDidAppear +@interface UIViewController (SLAPMVCTime) + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/UIViewController+SLAPMVCTime.m b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/UIViewController+SLAPMVCTime.m new file mode 100644 index 00000000..a198b185 --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/APMMonitor/UIViewController+SLAPMVCTime.m @@ -0,0 +1,163 @@ +// +// UIViewController+SLAPMVCTime.m +// DarkMode +// +// Created by wsl on 2020/8/4. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "UIViewController+SLAPMVCTime.h" +#import + +static char const kSLFakeKVORemoverKey; //关联的对象Key +static char const kSLVCBeginDateKey; //vc开始加载时间的key + +static NSString *const kSLFakeKeyPath = @"SL_FakeKeyPath"; //假冒的被观察属性key + +///冒充KVO观察者,是为了生成观察目标的KVO子类 +@interface SLFakeKVOObserver : NSObject +@end +@implementation SLFakeKVOObserver ++ (instancetype)shared { + static id sharedInstance; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedInstance = [[self alloc] init]; + }); + return sharedInstance; +} +@end +///负责移除冒充的KVO观察者 +@interface SLFakeKVORemover : NSObject +@property (nonatomic, weak) id target; //被观察的目标 +@end +@implementation SLFakeKVORemover +- (void)dealloc { + [_target removeObserver:[SLFakeKVOObserver shared] forKeyPath:kSLFakeKeyPath]; +} +@end + +@implementation UIViewController (SLAPMVCTime) + ++ (void)load { + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + Class class = [UIViewController class]; + if (![NSStringFromClass(class) hasPrefix:@"SL"]) { + //仅仅测自己创建的VC + return; + } + ///hook vc的初始化方法 + [self swizzleMethodInClass:class originalMethod:@selector(initWithNibName:bundle:) swizzledSelector:@selector(apm_initWithNibName:bundle:)]; + [self swizzleMethodInClass:class originalMethod:@selector(initWithCoder:) swizzledSelector:@selector(apm_initWithCoder:)]; + }); +} +- (instancetype)apm_initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil { + [self createAndHookKVOClass]; + [self apm_initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + return self; +} +- (nullable instancetype)apm_initWithCoder:(NSCoder *)aDecoder { + [self createAndHookKVOClass]; + [self apm_initWithCoder:aDecoder]; + return self; +} +///创建vc的KVO子类并hook子类的相关方法 +- (void)createAndHookKVOClass { + //设置KVO,会触发runtime来创建VC的KVO子类 + [self addObserver:[SLFakeKVOObserver shared] forKeyPath:kSLFakeKeyPath options:NSKeyValueObservingOptionNew context:nil]; + + //保存观察目标VC,当VC实例释放时,移除KVO + SLFakeKVORemover *remover = [[SLFakeKVORemover alloc] init]; + remover.target = self; + objc_setAssociatedObject(self, &kSLFakeKVORemoverKey, remover, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + + //获取VC的KVO子类 NSKVONotifying_ViewController + Class kvoClass = object_getClass(self); + + //判断当前的IMP和我们的IMP在之前是否已hook + IMP currentViewDidLoadImp = class_getMethodImplementation(kvoClass, @selector(viewDidLoad)); + if (currentViewDidLoadImp == (IMP)apm_viewDidLoad) { + return; + } + + //KVO子类的父类,即当前类,原来的类 + Class originCls = class_getSuperclass(kvoClass); + + // 获取原来实现的encoding + const char *originLoadViewEncoding = method_getTypeEncoding(class_getInstanceMethod(originCls, @selector(loadView))); + const char *originViewDidLoadEncoding = method_getTypeEncoding(class_getInstanceMethod(originCls, @selector(viewDidLoad))); + const char *originViewWillAppearEncoding = method_getTypeEncoding(class_getInstanceMethod(originCls, @selector(viewWillAppear:))); + const char *originViewDidAppearEncoding = method_getTypeEncoding(class_getInstanceMethod(originCls, @selector(viewDidAppear:))); + + // 添加方法,因为生成的KVO子类本身并没有实现loadView等方法,如果已实现了会添加失败。 + class_addMethod(kvoClass, @selector(loadView), (IMP)apm_loadView, originLoadViewEncoding); + class_addMethod(kvoClass, @selector(viewDidLoad), (IMP)apm_viewDidLoad, originViewDidLoadEncoding); + class_addMethod(kvoClass, @selector(viewWillAppear:), (IMP)apm_viewWillAppear, originViewWillAppearEncoding); + class_addMethod(kvoClass, @selector(viewDidAppear:), (IMP)apm_viewDidAppear, originViewDidAppearEncoding); +} +///方法实现交换 ++ (void)swizzleMethodInClass:(Class) class originalMethod:(SEL)originalSelector swizzledSelector:(SEL)swizzledSelector { + Method originalMethod = class_getInstanceMethod(class, originalSelector); + Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); + BOOL didAddMethod = class_addMethod(class, + originalSelector, + method_getImplementation(swizzledMethod), + method_getTypeEncoding(swizzledMethod)); + + if (didAddMethod) { + class_replaceMethod(class, + swizzledSelector, + method_getImplementation(originalMethod), + method_getTypeEncoding(originalMethod)); + } else { + method_exchangeImplementations(originalMethod, swizzledMethod); + } +} + +#pragma mark - IMP of Hook +static void apm_loadView(UIViewController *kvo_self, SEL _sel) { + IMP origin_imp = apm_originalMethodImplementation(kvo_self, _sel); + void (*func)(UIViewController *, SEL) = (void (*)(UIViewController *, SEL))origin_imp; + + //记录开始加载的时间 + objc_setAssociatedObject(kvo_self, &kSLVCBeginDateKey, [NSDate date], OBJC_ASSOCIATION_RETAIN_NONATOMIC); + + //执行原来origin_cls的方法实现 + func(kvo_self, _sel); +} +static void apm_viewDidLoad(UIViewController *kvo_self, SEL _sel) { + IMP origin_imp = apm_originalMethodImplementation(kvo_self, _sel); + void (*func)(UIViewController *, SEL) = (void (*)(UIViewController *, SEL))origin_imp; + func(kvo_self, _sel); +} +static void apm_viewWillAppear(UIViewController *kvo_self, SEL _sel, BOOL animated) { + IMP origin_imp = apm_originalMethodImplementation(kvo_self, _sel); + void (*func)(UIViewController *, SEL, BOOL) = (void (*)(UIViewController *, SEL, BOOL))origin_imp; + func(kvo_self, _sel, animated); +} +static void apm_viewDidAppear(UIViewController *kvo_self, SEL _sel, BOOL animated) { + IMP origin_imp = apm_originalMethodImplementation(kvo_self, _sel); + void (*func)(UIViewController *, SEL, BOOL) = (void (*)(UIViewController *, SEL, BOOL))origin_imp; + func(kvo_self, _sel, animated); + + NSDate *beginDate = objc_getAssociatedObject(kvo_self, &kSLVCBeginDateKey); + if (beginDate) { + //计算方法耗时 + NSTimeInterval duration = -[beginDate timeIntervalSinceNow]; + NSLog(@"VC: %@ -loadView --> -viewDidAppear 用时: %f", [kvo_self class], duration); + } + //重置记录的开始时间 + objc_setAssociatedObject(kvo_self, &kSLVCBeginDateKey, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +///返回原方法的IMP实现 +static IMP apm_originalMethodImplementation(UIViewController *kvo_self, SEL _sel) { + Class kvo_cls = object_getClass(kvo_self); + Class origin_cls = class_getSuperclass(kvo_cls); + IMP origin_imp = method_getImplementation(class_getInstanceMethod(origin_cls, _sel)); + assert(origin_imp != NULL); + return origin_imp; +} + +@end diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/SLAPMViewController.h b/iOS_Tips/DarkMode/WorkIssues/APM/SLAPMViewController.h new file mode 100644 index 00000000..21c3dec2 --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/SLAPMViewController.h @@ -0,0 +1,18 @@ +// +// SLAPMViewController.h +// DarkMode +// +// Created by wsl on 2020/7/13. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +///iOS APM应用性能监控管理 +@interface SLAPMViewController : SLViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/DarkMode/WorkIssues/APM/SLAPMViewController.m b/iOS_Tips/DarkMode/WorkIssues/APM/SLAPMViewController.m new file mode 100644 index 00000000..0478ea16 --- /dev/null +++ b/iOS_Tips/DarkMode/WorkIssues/APM/SLAPMViewController.m @@ -0,0 +1,84 @@ +// +// SLAPMViewController.m +// DarkMode +// +// Created by wsl on 2020/7/13. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLAPMViewController.h" +#import "SLAPMManager.h" + +#import "SLSystemAppInfo.h" + +/* + 参考资料: + https://www.jianshu.com/p/95df83780c8f + https://www.jianshu.com/p/8123fc17fe0e + https://juejin.im/post/5e92a113e51d4547134bdadb + */ + +@interface SLAPMViewController () +@end + +@implementation SLAPMViewController + +#pragma mark - Override +- (void)viewDidLoad { + [super viewDidLoad]; + self.view.backgroundColor = [UIColor whiteColor]; + self.navigationItem.title = @"APM监控"; + [self setupNavigationBar]; + [SLAPMManager manager].type = SLAPMTypeNetwork; + +} +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; +} +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; +} + +#pragma mark - UI +- (void)setupNavigationBar { + self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:([SLAPMManager manager].isMonitoring ? @"停止监控":@"开始监控") style:UIBarButtonItemStyleDone target:self action:@selector(changeMonitorState)]; +} + +#pragma mark - Help Methods +///测试卡顿/流畅度 +- (void)testFluency { + //耗时任务 + // sleep(1); + dispatch_async(dispatch_get_global_queue(0, 0), ^{ + sleep(1); + }); +} +///测试网络监控 +- (void)testNetworkMonitor { + UIImageView *imageView = [[UIImageView alloc] init]; + imageView.contentMode = UIViewContentModeScaleAspectFit; + [self.view addSubview:imageView]; + [imageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.left.right.bottom.mas_equalTo(0); + }]; + + dispatch_async(dispatch_get_global_queue(0, 0), ^{ + UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://b-ssl.duitang.com/uploads/item/201507/13/20150713182820_5mHce.jpeg"]]]; + dispatch_async(dispatch_get_main_queue(), ^{ + imageView.image = image; + }); + }); +} + +#pragma mark - Events Handle +///改变监听状态 +- (void)changeMonitorState{ + if ([SLAPMManager manager].isMonitoring) { + [[SLAPMManager manager] stopMonitoring]; + }else { + [[SLAPMManager manager] startMonitoring]; + } + [self setupNavigationBar]; +} + +@end diff --git a/iOS_Tips/DarkMode/WorkIssues/SLWorkIssuesViewController.m b/iOS_Tips/DarkMode/WorkIssues/SLWorkIssuesViewController.m index e864f3ed..36910a88 100644 --- a/iOS_Tips/DarkMode/WorkIssues/SLWorkIssuesViewController.m +++ b/iOS_Tips/DarkMode/WorkIssues/SLWorkIssuesViewController.m @@ -8,9 +8,15 @@ #import "SLWorkIssuesViewController.h" #import "SLMenuViewController.h" +#import "SLWebViewController.h" +#import "SLBinaryResetViewController.h" +#import "SLAPMViewController.h" +#import "SLUnusedResourceViewController.h" +#import "SLScrollviewNesteVC.h" @interface SLWorkIssuesViewController () -@property (nonatomic, strong) NSMutableArray *dataSource; +@property (nonatomic, strong) NSMutableArray *titlesArray; +@property (nonatomic, strong) NSMutableArray *urlArray; @property (nonatomic, strong) NSMutableArray *classArray; @end @@ -39,20 +45,52 @@ - (void)setupUI { #pragma mark - Data - (void)getData { - [self.dataSource addObjectsFromArray:@[ + [self.titlesArray addObjectsFromArray:@[ @"键盘和UIMenuController不能同时存在的问题", - @"全屏侧滑手势/UIScrollView/UISlider间滑动手势冲突"]]; + @"全屏侧滑手势/UIScrollView/UISlider间滑动手势冲突", + @"UITableView/UICollectionView获取特定位置的cell", + @"UIScrollView视觉差动画", + @"iOS 传感器集锦", + @"iOS 自定义转场动画", + @"二进制重排优化启动时间", + @"iOS APM应用性能监控管理(doing)", + @"ipa瘦身之扫描无用资源", + @"多个UIScrollView嵌套"]]; + [self.urlArray addObjectsFromArray:@[@"", + @"https://juejin.im/post/5c0e1e73f265da616413d828", + @"https://juejin.im/post/5c0e1df95188250d2722a3bc", + @"https://juejin.im/post/5c088b45f265da610e7fe156", + @"https://juejin.im/post/5c088a1051882517165dd15d", + @"https://juejin.im/post/5c088ba36fb9a049fb43737b", + @"二进制重排", + @"APM", + @"ipa瘦身", + @"UIScrollView嵌套"]]; [self.classArray addObjectsFromArray:@[[SLMenuViewController class], - [UIViewController class]]]; + [SLWebViewController class], + [SLWebViewController class], + [SLWebViewController class], + [SLWebViewController class], + [SLWebViewController class], + [SLBinaryResetViewController class], + [SLAPMViewController class], + [SLUnusedResourceViewController class], + [SLScrollviewNesteVC class]]]; [self.tableView reloadData]; } #pragma mark - Getter -- (NSMutableArray *)dataSource { - if (_dataSource == nil) { - _dataSource = [NSMutableArray array]; +- (NSMutableArray *)titlesArray { + if (_titlesArray == nil) { + _titlesArray = [NSMutableArray array]; } - return _dataSource; + return _titlesArray; +} +- (NSMutableArray *)urlArray { + if (!_urlArray) { + _urlArray = [NSMutableArray array]; + } + return _urlArray;; } - (NSMutableArray *)classArray { if (_classArray == nil) { @@ -63,24 +101,26 @@ - (NSMutableArray *)classArray { #pragma mark - UITableViewDelegate, UITableViewDataSource - (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return self.dataSource.count; + return self.titlesArray.count; } - (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cellID" forIndexPath:indexPath]; cell.textLabel.numberOfLines = 0; - cell.textLabel.text = [NSString stringWithFormat:@"%ld、%@",(long)indexPath.row + 1,self.dataSource[indexPath.row]]; + cell.textLabel.text = [NSString stringWithFormat:@"%ld、%@",(long)indexPath.row,self.titlesArray[indexPath.row]]; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:NO]; UIViewController *nextVc = [[self.classArray[indexPath.row] alloc] init]; + NSString *urlString = self.urlArray[indexPath.row]; + nextVc.navigationItem.title = self.titlesArray[indexPath.row]; switch (indexPath.row) { - case 1: - [SLAlertView showAlertViewWithText:@"全屏侧滑手势/UIScrollView/UISlider间滑动手势冲突: https://github.com/wsl2ls/WSLTransferAnimation" delayHid:2]; - break; default: + if (urlString.length > 0 && [urlString hasPrefix:@"http"]) { + ((SLWebViewController *)nextVc).urlString = urlString; + } [self.navigationController pushViewController:nextVc animated:YES]; break; - } } +} @end diff --git "a/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLMenuView.h" "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLMenuView.h" new file mode 100644 index 00000000..0e9ea39a --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLMenuView.h" @@ -0,0 +1,25 @@ +// +// SLMenuView.h +// DarkMode +// +// Created by wsl on 2020/9/3. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class SLMenuView; +@protocol SLMenuViewDelegate +- (void)menuView:(SLMenuView *)menuView didSelectItemAtIndex:(NSInteger)index; +@end + +@interface SLMenuView : UIView +@property (nonatomic, weak) iddelegate; +@property (nonatomic, strong) NSArray *titles; +@property (nonatomic, assign) NSInteger currentPage; + +@end + +NS_ASSUME_NONNULL_END diff --git "a/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLMenuView.m" "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLMenuView.m" new file mode 100644 index 00000000..c240c29e --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLMenuView.m" @@ -0,0 +1,137 @@ +// +// SLMenuView.m +// DarkMode +// +// Created by wsl on 2020/9/3. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLMenuView.h" + + +@interface SLMenuViewCell : UICollectionViewCell +@property (nonatomic, strong) UILabel *titleLabel; +@end +@implementation SLMenuViewCell +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self setupUI]; + } + return self; +} +- (void)setupUI { + [self.contentView addSubview:self.titleLabel]; + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.contentView); + }]; +} +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.textAlignment = NSTextAlignmentCenter; + } + return _titleLabel; +} +@end + +@interface SLMenuView () +@property (nonatomic, strong) UICollectionView *collectionView; +@property (nonatomic, strong) UIView *indicatorView; +@end +@implementation SLMenuView + +#pragma mark - Override +- (void)didMoveToSuperview { + if (self.superview) { + [self setupUI]; + } +} +- (void)didMoveToWindow { + if (self.superview) { + [self setupUI]; + } +} +- (void)layoutSubviews { + self.collectionView.frame = self.bounds; + NSInteger count = self.titles.count == 0 ? 1 : self.titles.count; + self.indicatorView.frame = CGRectMake(_currentPage*self.bounds.size.width/count, self.bounds.size.height-2, self.bounds.size.width/count, 2); +} + +#pragma mark - UI +- (void)setupUI { + [self addSubview:self.collectionView]; + [self addSubview:self.indicatorView]; +} + +#pragma mark - Getter +- (UICollectionView *)collectionView { + if (_collectionView == nil) { + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; + _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + _collectionView.backgroundColor = [UIColor clearColor]; + _collectionView.delegate = self; + _collectionView.dataSource = self; + _collectionView.showsHorizontalScrollIndicator = NO; + [_collectionView registerClass:[SLMenuViewCell class] forCellWithReuseIdentifier:@"ItemId"]; + } + return _collectionView; +} +- (UIView *)indicatorView { + if (!_indicatorView) { + _indicatorView = [[UIView alloc] init]; + _indicatorView.backgroundColor = [UIColor colorWithRed:11/255.0 green:112/255.0 blue:230/255.0 alpha:1.0]; + } + return _indicatorView; +} + +#pragma mark - Setter +- (void)setCurrentPage:(NSInteger)currentPage { + _currentPage = currentPage; + NSInteger count = self.titles.count == 0 ? 1 : self.titles.count; + self.indicatorView.frame = CGRectMake(_currentPage*self.bounds.size.width/count, self.bounds.size.height-2, self.bounds.size.width/count, 2); + [self.collectionView reloadData]; +} + +#pragma mark - UICollectionViewDelegate, UICollectionViewDataSource +- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { + return 1; +} +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return self.titles.count; +} +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + SLMenuViewCell * item = [collectionView dequeueReusableCellWithReuseIdentifier:@"ItemId" forIndexPath:indexPath]; + item.titleLabel.text = self.titles[indexPath.row]; + if (indexPath.row == self.currentPage) { + item.titleLabel.font = [UIFont boldSystemFontOfSize:18]; + item.titleLabel.textColor = [UIColor colorWithRed:11/255.0 green:112/255.0 blue:230/255.0 alpha:1.0]; + }else { + item.titleLabel.font = [UIFont systemFontOfSize:15]; + item.titleLabel.textColor = [UIColor blackColor]; + } + return item; +} +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + [collectionView deselectItemAtIndexPath:indexPath animated:NO]; + [self.delegate menuView:self didSelectItemAtIndex:indexPath.row]; +} + +#pragma mark - UICollectionViewDelegateFlowLayout +- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { + return CGSizeMake(self.bounds.size.width/self.titles.count, self.bounds.size.height); +} +//列间距 +- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section { + return 0; +} +//行间距 +- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section { + return 0; +} +- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section { + return UIEdgeInsetsMake(0, 0, 0, 0); +} + +@end diff --git "a/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLPanTableView.h" "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLPanTableView.h" new file mode 100644 index 00000000..94a9c149 --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLPanTableView.h" @@ -0,0 +1,17 @@ +// +// SLPanTableView.h +// DarkMode +// +// Created by wsl on 2020/9/8. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +///此类主要用于TableView的滑动手势向下层传递 +@interface SLPanTableView : UITableView +@end + +NS_ASSUME_NONNULL_END diff --git "a/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLPanTableView.m" "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLPanTableView.m" new file mode 100644 index 00000000..919c7534 --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLPanTableView.m" @@ -0,0 +1,16 @@ +// +// SLPanTableView.m +// DarkMode +// +// Created by wsl on 2020/9/8. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLPanTableView.h" + +@implementation SLPanTableView +//是否允许多个手势识别器共同识别,一个控件的手势识别后是否阻断手势识别继续向下传播,默认返回NO,上层对象识别后则不再继续传播;如果为YES,响应者链上层对象触发手势识别后,如果下层对象也添加了手势并成功识别也会继续执行。 +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { + return [gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] && [otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]]; +} +@end diff --git "a/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewJianShu.h" "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewJianShu.h" new file mode 100644 index 00000000..f046e1fb --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewJianShu.h" @@ -0,0 +1,17 @@ +// +// SLScrollViewJianShu.h +// DarkMode +// +// Created by wsl on 2020/9/15. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface SLScrollViewJianShu : UIViewController + +@end + +NS_ASSUME_NONNULL_END diff --git "a/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewJianShu.m" "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewJianShu.m" new file mode 100644 index 00000000..b94ff87d --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewJianShu.m" @@ -0,0 +1,302 @@ +// +// SLScrollViewJianShu.m +// DarkMode +// +// Created by wsl on 2020/9/15. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLScrollViewJianShu.h" +#import "SLMenuView.h" +#import +#import "SLPanTableView.h" + +///mainScrollView头部高度 +static CGFloat mainScrollViewHeadHeight = 250; +///选项卡/菜单栏高度 +static CGFloat tabHeight = 50; + +@interface SLScrollViewJianShu () + + +@property (nonatomic, strong) UIView *navigationView; +@property (nonatomic, strong) UIScrollView *mainScrollView; +@property (nonatomic, strong) UIImageView *headView; +@property (nonatomic, assign) BOOL isTopHovering; //正在顶部悬停 + +@property (nonatomic, strong) UIView *containerView; +@property (nonatomic, strong) SLMenuView *menuView; +@property (nonatomic, strong) UIScrollView *tabScrollView; + +//默认 20 +@property (nonatomic, assign) NSInteger dataCount; +//滑动到当前子列表时的偏移量,主要处理顶部未悬停且子列表未置顶偏移量不为0时的情况 +@property (nonatomic, assign) CGPoint lastContentOffset; +@end + +@implementation SLScrollViewJianShu + +#pragma mark - Override +- (void)viewDidLoad { + [super viewDidLoad]; + self.view.backgroundColor = [UIColor whiteColor]; + [self setupUI]; + [self getData]; +} +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + self.navigationController.navigationBar.hidden = YES; +} +- (void)viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; + self.navigationController.navigationBar.hidden = NO; +} + +#pragma mark - UI +- (void)setupUI { + + [self.view addSubview:self.mainScrollView]; + + [self.mainScrollView addSubview:self.headView]; + self.headView.frame = CGRectMake(0, 0, 100, 100); + self.headView.center = CGPointMake(SL_kScreenWidth/2.0, mainScrollViewHeadHeight/2.0); + + self.containerView.frame = CGRectMake(0, mainScrollViewHeadHeight, SL_kScreenWidth, SL_kScreenHeight-SL_TopNavigationBarHeight); + [self.mainScrollView addSubview:self.containerView]; + self.mainScrollView.contentSize = CGSizeMake(SL_kScreenWidth, mainScrollViewHeadHeight+self.containerView.sl_height); + + [self.containerView addSubview:self.menuView]; + [self.menuView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_equalTo(0); + make.height.mas_equalTo(tabHeight); + }]; + self.menuView.titles = @[@"你好",@"我好",@"大家好"]; + self.menuView.currentPage = 0; + + [self.containerView addSubview:self.tabScrollView]; + [self.tabScrollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.mas_equalTo(self.containerView); + make.top.mas_equalTo(tabHeight); + }]; + [self.containerView layoutIfNeeded]; + self.tabScrollView.contentSize = CGSizeMake(SL_kScreenWidth*self.menuView.titles.count,self.tabScrollView.frame.size.height); + + for (int i = 0; i < self.menuView.titles.count; i++) { + SLPanTableView *tableView = [self subTableView]; + tableView.tag = 10+i; + tableView.frame = CGRectMake(i*self.tabScrollView.sl_width, 0, self.tabScrollView.sl_width, self.tabScrollView.sl_height); + [self.tabScrollView addSubview:tableView]; + } + + [self.view addSubview:self.navigationView]; +} + +#pragma mark - Data +- (void)getData { + self.dataCount = 20; + [[self currentSubListTabView].mj_header beginRefreshing]; +} + +#pragma mark - Getter +- (UIView *)navigationView { + if (!_navigationView) { + _navigationView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,SL_kScreenWidth , SL_TopNavigationBarHeight)]; + _navigationView.backgroundColor = [UIColor clearColor]; + UIButton *nav_return_white = [[UIButton alloc] init]; + [nav_return_white setImage:[UIImage imageNamed:@"nav_return_white"] forState:UIControlStateNormal]; + [nav_return_white addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside]; + [_navigationView addSubview:nav_return_white]; + [nav_return_white mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(10); + make.size.mas_equalTo(CGSizeMake(15, 20)); + make.bottom.mas_equalTo(-10); + }]; + } + return _navigationView; +} +- (UIScrollView *)mainScrollView { + if (!_mainScrollView) { + _mainScrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds]; + _mainScrollView.delegate = self; + _mainScrollView.bounces = YES; + _mainScrollView.showsVerticalScrollIndicator = NO; + _mainScrollView.backgroundColor = [UIColor colorWithRed:11/255.0 green:112/255.0 blue:230/255.0 alpha:1.0]; + if (@available(iOS 11.0, *)) { + _mainScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + } + } + return _mainScrollView; +} +- (UIImageView *)headView { + if (!_headView) { + _headView = [[UIImageView alloc] init]; + _headView.image = [UIImage imageNamed:@"wsl"]; + _headView.contentMode = UIViewContentModeScaleAspectFit; + _headView.layer.cornerRadius = 50; + _headView.clipsToBounds = YES; + } + return _headView; +} +- (UIView *)containerView { + if (!_containerView) { + _containerView = [[UIView alloc] init]; + _containerView.backgroundColor = [UIColor redColor]; + } + return _containerView; +} +- (SLMenuView *)menuView { + if (!_menuView) { + _menuView = [[SLMenuView alloc] init]; + _menuView.backgroundColor = [UIColor colorWithRed:248/255.0 green:248/255.0 blue:248/255.0 alpha:1.0]; + _menuView.delegate = self; + _menuView.layer.borderWidth = 1.0; + _menuView.layer.borderColor = [UIColor colorWithRed:228/255.0 green:228/255.0 blue:228/255.0 alpha:1.0].CGColor; + } + return _menuView; +} +- (UIScrollView *)tabScrollView { + if (!_tabScrollView) { + _tabScrollView = [[UIScrollView alloc] init]; + _tabScrollView.backgroundColor = [UIColor blueColor]; + _tabScrollView.pagingEnabled = YES; + _tabScrollView.delegate = self; + _tabScrollView.bounces = NO; + if (@available(iOS 11.0, *)) { + _tabScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + } + } + return _tabScrollView; +} +- (SLPanTableView *)subTableView { + SLPanTableView *tableView = [[SLPanTableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; + tableView.delegate = self; + tableView.dataSource = self; + tableView.estimatedRowHeight = 0; + if (@available(iOS 11.0, *)) { + tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + } + [tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cellId"]; + SL_WeakSelf; + tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + weakSelf.dataCount = 20; + [tableView reloadData]; + [tableView.mj_header endRefreshing]; + }); + }]; + tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + weakSelf.dataCount += 20; + [tableView reloadData]; + [tableView.mj_footer endRefreshing]; + }); + }]; + return tableView; +} + +#pragma mark - EventsHandle +- (void)back { + [self.navigationController popViewControllerAnimated:YES]; +} + +#pragma mark - HelpMethods +///当前子列表 +- (SLPanTableView *)currentSubListTabView { + return [self.tabScrollView viewWithTag:10+self.menuView.currentPage]; +} + +#pragma mark - UITableViewDelegate,UITableViewDataSource +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.dataCount; +} +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + return 88; +} +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { + return 0.1; +} +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + return nil; +} +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { + return 0.1; +} +- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { + return nil; +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cellId" forIndexPath:indexPath]; + cell.textLabel.text = [NSString stringWithFormat:@"%ld",indexPath.row]; + return cell; +} +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [tableView deselectRowAtIndexPath:indexPath animated:YES]; +} + +#pragma mark - SLMenuViewDelegate +- (void)menuView:(SLMenuView *)menuView didSelectItemAtIndex:(NSInteger)index { + [self.tabScrollView setContentOffset:CGPointMake(index* self.tabScrollView.sl_width, 0) animated:YES]; +} + +#pragma mark - UIScrollViewDelegate +- (void)scrollViewDidScroll:(UIScrollView *)scrollView { + + if (scrollView == self.tabScrollView) return; + + if (scrollView == self.mainScrollView) { + if (self.mainScrollView.contentOffset.y >= mainScrollViewHeadHeight-SL_TopNavigationBarHeight || _isTopHovering) { + //滑到顶部悬停 + _isTopHovering = YES; + self.mainScrollView.contentOffset = CGPointMake(0, mainScrollViewHeadHeight-SL_TopNavigationBarHeight); + } + if(_isTopHovering) { + self.navigationController.navigationBar.hidden = NO; + }else { + self.navigationController.navigationBar.hidden = YES; + } + + if (self.mainScrollView.contentOffset.y <= 0 ) { + //头部放大 + self.headView.transform = CGAffineTransformMakeScale(fabs(self.mainScrollView.contentOffset.y)/self.headView.sl_height+1, fabs(self.mainScrollView.contentOffset.y)/self.headView.sl_height+1); + } + } + + //子列表 + if (scrollView.superview == self.tabScrollView) { + if((!_isTopHovering && self.mainScrollView.contentOffset.y > 0) || (self.mainScrollView.contentOffset.y < 0 ) ) { + //如果主mainScrollView还未到顶部悬停,则选项子列表subTableView偏移量保持不变 + if (scrollView.contentOffset.y < 0) { + self.lastContentOffset = CGPointZero; + } + scrollView.contentOffset = self.lastContentOffset; + } + if(_isTopHovering && scrollView.contentOffset.y > 0) { + //如果主mainScrollView在顶部悬停,而此时选项子列表subTableView还未到顶部,则保持mainScrollView继续悬停 + self.mainScrollView.contentOffset = CGPointMake(0, mainScrollViewHeadHeight-SL_TopNavigationBarHeight); + } + if (scrollView.contentOffset.y < 0) { + //如果subTableView滑动到了顶部,即将取消顶部悬停 + _isTopHovering = NO; + } + } +} +- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { + if (scrollView == self.tabScrollView) { + self.menuView.currentPage = roundf(self.tabScrollView.contentOffset.x/self.tabScrollView.sl_width); + self.lastContentOffset = [self currentSubListTabView].contentOffset; + } +} +- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView { + if (scrollView == self.tabScrollView) { + self.menuView.currentPage = roundf(self.tabScrollView.contentOffset.x/self.tabScrollView.sl_width); + self.lastContentOffset = [self currentSubListTabView].contentOffset; + } +} + +@end diff --git "a/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewJuejin.h" "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewJuejin.h" new file mode 100644 index 00000000..88bffbe2 --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewJuejin.h" @@ -0,0 +1,18 @@ +// +// SLScrollViewJuejin.h +// DarkMode +// +// Created by wsl on 2020/9/8. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +///掘金APP个人中心页的ScrollView嵌套样式 +@interface SLScrollViewJuejin : UIViewController + +@end + +NS_ASSUME_NONNULL_END diff --git "a/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewJuejin.m" "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewJuejin.m" new file mode 100644 index 00000000..18bb53ad --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewJuejin.m" @@ -0,0 +1,298 @@ +// +// SLScrollViewJuejin.m +// DarkMode +// +// Created by wsl on 2020/9/8. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLScrollViewJuejin.h" +#import "SLMenuView.h" +#import +#import "SLPanTableView.h" + +///mainScrollView头部高度 +static CGFloat mainScrollViewHeadHeight = 250; +///选项卡/菜单栏高度 +static CGFloat tabHeight = 50; + +@interface SLScrollViewJuejin () + +@property (nonatomic, strong) UIView *navigationView; +@property (nonatomic, strong) UIScrollView *mainScrollView; +@property (nonatomic, strong) UIImageView *headView; +@property (nonatomic, assign) BOOL isTopHovering; //正在顶部悬停 + +@property (nonatomic, strong) UIView *containerView; +@property (nonatomic, strong) SLMenuView *menuView; +@property (nonatomic, strong) UIScrollView *tabScrollView; + +//默认 20 +@property (nonatomic, assign) NSInteger dataCount; +//滑动到当前子列表时的偏移量,主要处理顶部未悬停且子列表未置顶偏移量不为0时的情况 +@property (nonatomic, assign) CGPoint lastContentOffset; + +@end + +@implementation SLScrollViewJuejin + +#pragma mark - Override +- (void)viewDidLoad { + [super viewDidLoad]; + self.view.backgroundColor = [UIColor whiteColor]; + [self setupUI]; + [self getData]; +} +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + self.navigationController.navigationBar.hidden = YES; +} +- (void)viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; + self.navigationController.navigationBar.hidden = NO; +} + +#pragma mark - UI +- (void)setupUI { + + [self.view addSubview:self.mainScrollView]; + + [self.mainScrollView addSubview:self.headView]; + self.headView.frame = CGRectMake(0, 0, 100, 100); + self.headView.center = CGPointMake(SL_kScreenWidth/2.0, mainScrollViewHeadHeight/2.0); + + self.containerView.frame = CGRectMake(0, mainScrollViewHeadHeight, SL_kScreenWidth, SL_kScreenHeight-SL_TopNavigationBarHeight); + [self.mainScrollView addSubview:self.containerView]; + self.mainScrollView.contentSize = CGSizeMake(SL_kScreenWidth, mainScrollViewHeadHeight+self.containerView.sl_height); + + [self.containerView addSubview:self.menuView]; + [self.menuView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_equalTo(0); + make.height.mas_equalTo(tabHeight); + }]; + self.menuView.titles = @[@"你好",@"我好",@"大家好"]; + self.menuView.currentPage = 0; + + [self.containerView addSubview:self.tabScrollView]; + [self.tabScrollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.mas_equalTo(self.containerView); + make.top.mas_equalTo(tabHeight); + }]; + [self.containerView layoutIfNeeded]; + self.tabScrollView.contentSize = CGSizeMake(SL_kScreenWidth*self.menuView.titles.count,self.tabScrollView.frame.size.height); + + for (int i = 0; i < self.menuView.titles.count; i++) { + SLPanTableView *tableView = [self subTableView]; + tableView.tag = 10+i; + tableView.frame = CGRectMake(i*self.tabScrollView.sl_width, 0, self.tabScrollView.sl_width, self.tabScrollView.sl_height); + [self.tabScrollView addSubview:tableView]; + } + + [self.view addSubview:self.navigationView]; +} + +#pragma mark - Data +- (void)getData { + self.dataCount = 20; + [[self currentSubListTabView].mj_header beginRefreshing]; +} + +#pragma mark - Getter +- (UIView *)navigationView { + if (!_navigationView) { + _navigationView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,SL_kScreenWidth , SL_TopNavigationBarHeight)]; + _navigationView.backgroundColor = [UIColor clearColor]; + UIButton *nav_return_white = [[UIButton alloc] init]; + [nav_return_white setImage:[UIImage imageNamed:@"nav_return_white"] forState:UIControlStateNormal]; + [nav_return_white addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside]; + [_navigationView addSubview:nav_return_white]; + [nav_return_white mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(10); + make.size.mas_equalTo(CGSizeMake(15, 20)); + make.bottom.mas_equalTo(-10); + }]; + } + return _navigationView; +} +- (UIScrollView *)mainScrollView { + if (!_mainScrollView) { + _mainScrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds]; + _mainScrollView.delegate = self; + _mainScrollView.bounces = NO; + _mainScrollView.showsVerticalScrollIndicator = NO; + _mainScrollView.backgroundColor = [UIColor colorWithRed:11/255.0 green:112/255.0 blue:230/255.0 alpha:1.0]; + if (@available(iOS 11.0, *)) { + _mainScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + } + } + return _mainScrollView; +} +- (UIImageView *)headView { + if (!_headView) { + _headView = [[UIImageView alloc] init]; + _headView.image = [UIImage imageNamed:@"wsl"]; + _headView.contentMode = UIViewContentModeScaleAspectFit; + _headView.layer.cornerRadius = 50; + _headView.clipsToBounds = YES; + } + return _headView; +} +- (UIView *)containerView { + if (!_containerView) { + _containerView = [[UIView alloc] init]; + _containerView.backgroundColor = [UIColor redColor]; + } + return _containerView; +} +- (SLMenuView *)menuView { + if (!_menuView) { + _menuView = [[SLMenuView alloc] init]; + _menuView.backgroundColor = [UIColor colorWithRed:248/255.0 green:248/255.0 blue:248/255.0 alpha:1.0]; + _menuView.delegate = self; + _menuView.layer.borderWidth = 1.0; + _menuView.layer.borderColor = [UIColor colorWithRed:228/255.0 green:228/255.0 blue:228/255.0 alpha:1.0].CGColor; + } + return _menuView; +} +- (UIScrollView *)tabScrollView { + if (!_tabScrollView) { + _tabScrollView = [[UIScrollView alloc] init]; + _tabScrollView.backgroundColor = [UIColor blueColor]; + _tabScrollView.pagingEnabled = YES; + _tabScrollView.delegate = self; + _tabScrollView.bounces = NO; + if (@available(iOS 11.0, *)) { + _tabScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + } + } + return _tabScrollView; +} +- (SLPanTableView *)subTableView { + SLPanTableView *tableView = [[SLPanTableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; + tableView.delegate = self; + tableView.dataSource = self; + tableView.estimatedRowHeight = 0; + if (@available(iOS 11.0, *)) { + tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + } + [tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cellId"]; + SL_WeakSelf; + tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + weakSelf.dataCount = 20; + [tableView reloadData]; + [tableView.mj_header endRefreshing]; + }); + }]; + tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + weakSelf.dataCount += 20; + [tableView reloadData]; + [tableView.mj_footer endRefreshing]; + }); + }]; + return tableView; +} + +#pragma mark - EventsHandle +- (void)back { + [self.navigationController popViewControllerAnimated:YES]; +} + +#pragma mark - HelpMethods +///当前子列表 +- (SLPanTableView *)currentSubListTabView { + return [self.tabScrollView viewWithTag:10+self.menuView.currentPage]; +} + +#pragma mark - UITableViewDelegate,UITableViewDataSource +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.dataCount; +} +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + return 88; +} +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { + return 0.1; +} +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + return nil; +} +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { + return 0.1; +} +- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { + return nil; +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cellId" forIndexPath:indexPath]; + cell.textLabel.text = [NSString stringWithFormat:@"%ld",indexPath.row]; + return cell; +} +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [tableView deselectRowAtIndexPath:indexPath animated:YES]; +} + +#pragma mark - SLMenuViewDelegate +- (void)menuView:(SLMenuView *)menuView didSelectItemAtIndex:(NSInteger)index { + [self.tabScrollView setContentOffset:CGPointMake(index* self.tabScrollView.sl_width, 0) animated:YES]; +} + +#pragma mark - UIScrollViewDelegate +- (void)scrollViewDidScroll:(UIScrollView *)scrollView { + + if (scrollView == self.tabScrollView) return; + + if (scrollView == self.mainScrollView) { + if (self.mainScrollView.contentOffset.y >= mainScrollViewHeadHeight-SL_TopNavigationBarHeight || _isTopHovering) { + //滑到顶部悬停 + _isTopHovering = YES; + self.mainScrollView.contentOffset = CGPointMake(0, mainScrollViewHeadHeight-SL_TopNavigationBarHeight); + } + if(_isTopHovering) { + self.navigationController.navigationBar.hidden = NO; + }else { + self.navigationController.navigationBar.hidden = YES; + } + } + + //子列表 + if (scrollView.superview == self.tabScrollView) { + if(!_isTopHovering && self.mainScrollView.contentOffset.y > 0) { + //如果主mainScrollView还未到顶部悬停,则选项子列表subTableView偏移量保持不变 + if (scrollView.contentOffset.y < 0) { + self.lastContentOffset = CGPointZero; + } + scrollView.contentOffset = self.lastContentOffset; + } + if(_isTopHovering && scrollView.contentOffset.y > 0) { + //如果主mainScrollView在顶部悬停,而此时选项子列表subTableView还未到顶部,则保持mainScrollView继续悬停 + self.mainScrollView.contentOffset = CGPointMake(0, mainScrollViewHeadHeight-SL_TopNavigationBarHeight); + } + if (scrollView.contentOffset.y < 0) { + //如果subTableView滑动到了顶部,即将取消顶部悬停 + _isTopHovering = NO; + } + } +} +- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { + if (scrollView == self.tabScrollView) { + self.menuView.currentPage = roundf(self.tabScrollView.contentOffset.x/self.tabScrollView.sl_width); + self.lastContentOffset = [self currentSubListTabView].contentOffset; + } +} +- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView { + if (scrollView == self.tabScrollView) { + self.menuView.currentPage = roundf(self.tabScrollView.contentOffset.x/self.tabScrollView.sl_width); + self.lastContentOffset = [self currentSubListTabView].contentOffset; + } +} + +@end + diff --git "a/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewWeibo.h" "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewWeibo.h" new file mode 100644 index 00000000..20a7330e --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewWeibo.h" @@ -0,0 +1,18 @@ +// +// SLScrollViewWeibo.h +// DarkMode +// +// Created by wsl on 2020/9/8. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +///微博发现页ScrollView嵌套样式 +@interface SLScrollViewWeibo : UIViewController + +@end + +NS_ASSUME_NONNULL_END diff --git "a/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewWeibo.m" "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewWeibo.m" new file mode 100644 index 00000000..5261431c --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollViewWeibo.m" @@ -0,0 +1,299 @@ +// +// SLScrollViewWeibo.m +// DarkMode +// +// Created by wsl on 2020/9/8. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLScrollViewWeibo.h" +#import "SLMenuView.h" +#import +#import "SLPanTableView.h" + +///mainScrollView头部高度 +static CGFloat mainScrollViewHeadHeight = 250; +///选项卡/菜单栏高度 +static CGFloat tabHeight = 64; + +@interface SLScrollViewWeibo () + +@property (nonatomic, strong) UIView *navigationView; +@property (nonatomic, strong) UIScrollView *mainScrollView; +@property (nonatomic, strong) UIImageView *headView; +@property (nonatomic, assign) BOOL isTopHovering; //正在顶部悬停 + +@property (nonatomic, strong) UIView *containerView; +@property (nonatomic, strong) SLMenuView *menuView; +@property (nonatomic, strong) UIScrollView *tabScrollView; + +@property (nonatomic, assign) NSInteger dataCount; //默认 20 + +@end + +@implementation SLScrollViewWeibo + +#pragma mark - Override +- (void)viewDidLoad { + [super viewDidLoad]; + self.view.backgroundColor = [UIColor whiteColor]; + [self getData]; + [self setupUI]; +} +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + self.navigationController.navigationBar.hidden = YES; +} +- (void)viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; + self.navigationController.navigationBar.hidden = NO; +} + +#pragma mark - UI +- (void)setupUI { + + [self.view addSubview:self.mainScrollView]; + + [self.mainScrollView addSubview:self.headView]; + self.headView.frame = CGRectMake(0, 0, 100, 100); + self.headView.center = CGPointMake(SL_kScreenWidth/2.0, mainScrollViewHeadHeight/2.0); + + self.containerView.frame = CGRectMake(0, mainScrollViewHeadHeight, SL_kScreenWidth, SL_kScreenHeight); + [self.mainScrollView addSubview:self.containerView]; + self.mainScrollView.contentSize = CGSizeMake(SL_kScreenWidth, mainScrollViewHeadHeight+self.containerView.sl_height); + + [self.containerView addSubview:self.menuView]; + [self.menuView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_equalTo(0); + make.height.mas_equalTo(tabHeight); + }]; + self.menuView.titles = @[@"你好",@"我好",@"大家好"]; + self.menuView.currentPage = 0; + + [self.containerView addSubview:self.tabScrollView]; + [self.tabScrollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.mas_equalTo(self.containerView); + make.top.mas_equalTo(tabHeight); + }]; + [self.containerView layoutIfNeeded]; + self.tabScrollView.contentSize = CGSizeMake(SL_kScreenWidth*self.menuView.titles.count,self.tabScrollView.frame.size.height); + + for (int i = 0; i < self.menuView.titles.count; i++) { + UITableView *tableView = [self subTableView]; + tableView.tag = 10+i; + tableView.scrollEnabled = NO; + tableView.frame = CGRectMake(i*self.tabScrollView.sl_width, 0, self.tabScrollView.sl_width, self.tabScrollView.sl_height); + [self.tabScrollView addSubview:tableView]; + } + + [self.view addSubview:self.navigationView]; +} + +#pragma mark - Data +- (void)getData { + self.dataCount = 20; +} + +#pragma mark - Getter +- (UIView *)navigationView { + if (!_navigationView) { + _navigationView = [[UIView alloc] initWithFrame:CGRectMake(10,0,15 , SL_TopNavigationBarHeight)]; + _navigationView.backgroundColor = [UIColor clearColor]; + UIButton *nav_return_white = [[UIButton alloc] init]; + [nav_return_white setImage:[UIImage imageNamed:@"nav_return_white"] forState:UIControlStateNormal]; + [nav_return_white addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside]; + [_navigationView addSubview:nav_return_white]; + [nav_return_white mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(0); + make.size.mas_equalTo(CGSizeMake(15, 20)); + make.bottom.mas_equalTo(-20); + }]; + } + return _navigationView; +} +- (UIScrollView *)mainScrollView { + if (!_mainScrollView) { + _mainScrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds]; + _mainScrollView.delegate = self; + _mainScrollView.showsVerticalScrollIndicator = NO; + _mainScrollView.backgroundColor = [UIColor colorWithRed:11/255.0 green:112/255.0 blue:230/255.0 alpha:1.0]; + if (@available(iOS 11.0, *)) { + _mainScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + } + SL_WeakSelf + _mainScrollView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + weakSelf.dataCount = 20; + [weakSelf.mainScrollView.mj_header endRefreshing]; + }); + }]; + } + return _mainScrollView; +} +- (UIImageView *)headView { + if (!_headView) { + _headView = [[UIImageView alloc] init]; + _headView.image = [UIImage imageNamed:@"wsl"]; + _headView.contentMode = UIViewContentModeScaleAspectFit; + _headView.layer.cornerRadius = 50; + _headView.clipsToBounds = YES; + } + return _headView; +} +- (UIView *)containerView { + if (!_containerView) { + _containerView = [[UIView alloc] init]; + _containerView.backgroundColor = [UIColor redColor]; + } + return _containerView; +} +- (SLMenuView *)menuView { + if (!_menuView) { + _menuView = [[SLMenuView alloc] init]; + _menuView.backgroundColor = [UIColor orangeColor]; + _menuView.delegate = self; + _menuView.layer.borderWidth = 1.0; + _menuView.layer.borderColor = [UIColor colorWithRed:228/255.0 green:228/255.0 blue:228/255.0 alpha:1.0].CGColor; + } + return _menuView; +} +- (UIScrollView *)tabScrollView { + if (!_tabScrollView) { + _tabScrollView = [[UIScrollView alloc] init]; + _tabScrollView.backgroundColor = [UIColor blueColor]; + _tabScrollView.pagingEnabled = YES; + _tabScrollView.delegate = self; + _tabScrollView.bounces = NO; + if (@available(iOS 11.0, *)) { + _tabScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + } + } + return _tabScrollView; +} +- (UITableView *)subTableView { + UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; + tableView.delegate = self; + tableView.dataSource = self; + tableView.estimatedRowHeight = 0; + if (@available(iOS 11.0, *)) { + tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } else { + } + [tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cellId"]; + SL_WeakSelf; + tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + weakSelf.dataCount = 20; + [tableView reloadData]; + [tableView.mj_header endRefreshing]; + }); + }]; + tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + weakSelf.dataCount += 20; + [tableView reloadData]; + [tableView.mj_footer endRefreshing]; + }); + }]; + return tableView; +} + +#pragma mark - EventsHandle +- (void)back { + if (self.isTopHovering) { + [self.mainScrollView setContentOffset:CGPointZero animated:YES]; + }else { + [self.navigationController popViewControllerAnimated:YES]; + } +} + +#pragma mark - HelpMethods +///当前子列表 +- (SLPanTableView *)currentSubListTabView { + return [self.tabScrollView viewWithTag:10+self.menuView.currentPage]; +} + +#pragma mark - UITableViewDelegate,UITableViewDataSource +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.dataCount; +} +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + return 88; +} +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { + return 0.1; +} +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + return nil; +} +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { + return 0.1; +} +- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { + return nil; +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cellId" forIndexPath:indexPath]; + cell.textLabel.text = [NSString stringWithFormat:@"%ld",indexPath.row]; + return cell; +} +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [tableView deselectRowAtIndexPath:indexPath animated:YES]; +} + +#pragma mark - SLMenuViewDelegate +- (void)menuView:(SLMenuView *)menuView didSelectItemAtIndex:(NSInteger)index { + [self.tabScrollView setContentOffset:CGPointMake(index* self.tabScrollView.sl_width, 0) animated:YES]; +} + +#pragma mark - UIScrollViewDelegate +- (void)scrollViewDidScroll:(UIScrollView *)scrollView { + + if (scrollView == self.tabScrollView) return; + + if (scrollView == self.mainScrollView) { + if (self.mainScrollView.contentOffset.y >= mainScrollViewHeadHeight && !_isTopHovering) { + //滑到顶部悬停 + _isTopHovering = YES; + self.mainScrollView.scrollEnabled = NO; + self.mainScrollView.bounces = NO; + self.mainScrollView.contentOffset = CGPointMake(0, mainScrollViewHeadHeight); + for (int i = 0; i < self.menuView.titles.count; i++) { + UIView *subView = [self.tabScrollView viewWithTag:10+i]; + if ([subView isKindOfClass:[UITableView class]]) { + [(UITableView *)subView setScrollEnabled:YES]; + } + } + } + } +} +- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { + if (scrollView == self.tabScrollView) { + self.menuView.currentPage = roundf(self.tabScrollView.contentOffset.x/self.tabScrollView.sl_width); + } +} +- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView { + if (scrollView == self.tabScrollView) { + self.menuView.currentPage = roundf(self.tabScrollView.contentOffset.x/self.tabScrollView.sl_width); + } + + if (scrollView == self.mainScrollView && self.mainScrollView.contentOffset.y != mainScrollViewHeadHeight) { + _isTopHovering = NO; + self.mainScrollView.scrollEnabled = YES; + self.mainScrollView.bounces = YES; + for (int i = 0; i < self.menuView.titles.count; i++) { + UIView *subView = [self.tabScrollView viewWithTag:10+i]; + if ([subView isKindOfClass:[UITableView class]]) { + [(UITableView *)subView setScrollEnabled:NO]; + [(UITableView *)subView setContentOffset:CGPointZero]; + } + } + } +} + +@end diff --git "a/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollviewNesteVC.h" "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollviewNesteVC.h" new file mode 100644 index 00000000..4491ab4a --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollviewNesteVC.h" @@ -0,0 +1,18 @@ +// +// SLScrollviewNesteVC.h +// DarkMode +// +// Created by wsl on 2020/9/2. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +///多个ScrollView/TableView/CollectionView嵌套 +@interface SLScrollviewNesteVC : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git "a/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollviewNesteVC.m" "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollviewNesteVC.m" new file mode 100644 index 00000000..8b9b7807 --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/ScrollView\345\265\214\345\245\227/SLScrollviewNesteVC.m" @@ -0,0 +1,84 @@ +// +// SLScrollviewNesteVC.m +// DarkMode +// +// Created by wsl on 2020/9/2. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLScrollviewNesteVC.h" +#import "SLScrollViewJuejin.h" +#import "SLScrollViewWeibo.h" +#import "SLScrollViewJianShu.h" + +@interface SLScrollviewNesteVC () +@property (nonatomic, strong) NSMutableArray *titlesArray; +@property (nonatomic, strong) NSMutableArray *classArray; +@end + +@implementation SLScrollviewNesteVC + +- (void)viewDidLoad { + [super viewDidLoad]; + [self setupUI]; + [self getData]; +} +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + self.navigationController.navigationBar.hidden = NO; +} +- (BOOL)prefersStatusBarHidden { + return NO; +} + +#pragma mark - UI +- (void)setupUI { + self.navigationController.navigationBar.translucent = YES; + self.tableView.estimatedRowHeight = 1; + [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cellID"]; +} + +#pragma mark - Data +- (void)getData { + [self.titlesArray addObjectsFromArray:@[ + @"掘金APP个人中心页样式", + @"微博发现页ScrollView嵌套样式", + @"简书APP个人中心页样式"]]; + [self.classArray addObjectsFromArray:@[[SLScrollViewJuejin class], + [SLScrollViewWeibo class], + [SLScrollViewJianShu class]]]; + [self.tableView reloadData]; +} + +#pragma mark - Getter +- (NSMutableArray *)titlesArray { + if (_titlesArray == nil) { + _titlesArray = [NSMutableArray array]; + } + return _titlesArray; +} +- (NSMutableArray *)classArray { + if (_classArray == nil) { + _classArray = [NSMutableArray array]; + } + return _classArray; +} + +#pragma mark - UITableViewDelegate, UITableViewDataSource +- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.titlesArray.count; +} +- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { + UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cellID" forIndexPath:indexPath]; + cell.textLabel.numberOfLines = 0; + cell.textLabel.text = [NSString stringWithFormat:@"%ld、%@",(long)indexPath.row,self.titlesArray[indexPath.row]]; + return cell; +} +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [tableView deselectRowAtIndexPath:indexPath animated:NO]; + UIViewController *nextVc = [[self.classArray[indexPath.row] alloc] init]; + nextVc.navigationItem.title = self.titlesArray[indexPath.row]; + [self.navigationController pushViewController:nextVc animated:YES]; +} + +@end diff --git "a/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/Order File.png" "b/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/Order File.png" new file mode 100644 index 00000000..d183b372 Binary files /dev/null and "b/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/Order File.png" differ diff --git "a/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/Other c Flags.png" "b/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/Other c Flags.png" new file mode 100644 index 00000000..2e1273d0 Binary files /dev/null and "b/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/Other c Flags.png" differ diff --git "a/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/SLBinaryResetViewController.h" "b/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/SLBinaryResetViewController.h" new file mode 100644 index 00000000..23c47e97 --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/SLBinaryResetViewController.h" @@ -0,0 +1,20 @@ +// +// SLBinaryResetViewController.h +// DarkMode +// +// Created by wsl on 2020/7/6. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +//参考:https://juejin.cn/post/6844904130406793224 +// https://github.com/rhythmkay/PGOAnalyzer +///二进制重排优化启动时间 +@interface SLBinaryResetViewController : SLViewController + +@end + +NS_ASSUME_NONNULL_END diff --git "a/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/SLBinaryResetViewController.m" "b/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/SLBinaryResetViewController.m" new file mode 100644 index 00000000..5893b7e9 --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/SLBinaryResetViewController.m" @@ -0,0 +1,136 @@ +// +// SLBinaryResetViewController.m +// DarkMode +// +// Created by wsl on 2020/7/6. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLBinaryResetViewController.h" +#import +#import + +static BOOL isBecomeActive = NO; //是否启动完成,即首页渲染完毕 +@interface SLBinaryResetViewController () +@property (nonatomic, strong) UITextView *textView; +@end + +@implementation SLBinaryResetViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + self.view.backgroundColor = UIColor.whiteColor; + self.navigationItem.title = @"二进制重排优化启动时间"; + self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"生成Order文件" style:UIBarButtonItemStyleDone target:self action:@selector(getOrderFile)]; + self.textView = [[UITextView alloc] initWithFrame:self.view.bounds]; + self.textView.editable = NO; + [self.view addSubview:self.textView]; +} +///获取启动加载时执行的排序后的所有函数符号,得到顺序执行的函数符号后,这些配置和clang插桩代码就可以删除了(除了Order File配置) +- (void)getOrderFile{ + NSMutableArray * symbolNames = [NSMutableArray array]; + while (YES) { + //offsetof 就是针对某个结构体找到某个属性相对这个结构体的偏移量 + //出队,依次取出启动时执行的方法 + SLSymbolNode *node = OSAtomicDequeue(&symbolList, offsetof(SLSymbolNode, next)); + if (node == NULL) { + break; + } + Dl_info info; + dladdr(node->pc, &info); + //根据内存地址获取函数名称 + NSString * name = @(info.dli_sname); + BOOL isObjc = [name hasPrefix:@"+["] || [name hasPrefix:@"-["]; + NSString * symbolName = isObjc ? name: [@"_" stringByAppendingString:name]; + [symbolNames addObject:symbolName]; + // NSLog(@"%@",symbolName); + } + //取反 + NSEnumerator * emt = [symbolNames reverseObjectEnumerator]; + //去重 + NSMutableArray *funcs = [NSMutableArray arrayWithCapacity:symbolNames.count]; + NSString * name; + while (name = [emt nextObject]) { + if (![funcs containsObject:name]) { + [funcs addObject:name]; + } + } + //干掉自己! + [funcs removeObject:[NSString stringWithFormat:@"%s",__FUNCTION__]]; + //将数组变成字符串 + NSString * funcStr = [funcs componentsJoinedByString:@"\n"]; + //写入 + NSString * filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"wsl.order"]; + NSData * fileContents = [funcStr dataUsingEncoding:NSUTF8StringEncoding]; + BOOL result = [[NSFileManager defaultManager] createFileAtPath:filePath contents:fileContents attributes:nil]; + if (result) { + NSLog(@"二进制重排后的函数执行序列文件Order:%@",filePath); + }else{ + NSLog(@"文件写入出错"); + } + + self.textView.text = funcStr; +} + + +//原子队列 存储启动时加载的所有函数方法 +static OSQueueHead symbolList = OS_ATOMIC_QUEUE_INIT; +//定义符号结构体 +typedef struct { + void *pc; + void *next; +}SLSymbolNode; + +/* + 所有处理完之后,最后需要Write Link Map File改为NO,把Other C Flags/Other Swift Flags的配置删除掉。 + 因为这个配置会在我们代码中自动插入跳转执行 __sanitizer_cov_trace_pc_guard。重排完就不需要了,需要去除掉。 + 同时把ViewController中的 __sanitizer_cov_trace_pc_guard也要去除掉。 + */ +/// clang插桩代码 +void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, + uint32_t *stop) { + static uint64_t N; // Counter for the guards. + if (start == stop || *start) return; // Initialize only once. + // printf("INIT: %p %p\n", start, stop); + for (uint32_t *x = start; x < stop; x++) + *x = ++N; // Guards should start from 1. +} + +/* + 静态插桩,相当于此函数在编译时插在了每一个函数体里,这个函数会捕获到所有程序运行过程中执行的方法。 + 我们只需要捕获应用启动时执行的方法就行,把启动过程中执行的函数地址存储在symbolList中。 + */ +static void*previousPc; +void __sanitizer_cov_trace_pc_guard(uint32_t *guard) { + // if (!*guard) return; // Duplicate the guard check. + /* 精确定位 哪里开始 到哪里结束! 在这里面做判断写条件!*/ + if(isBecomeActive) { + //如果启动完成,后序的函数执行顺序完全取决于用户的操作,就不需要捕获了,只要捕获启动时首页渲染完毕时即可 + return; + } + + //它的作用其实就是去读取 x30寄存器 中所存储的要返回时下一条指令的地址. 所以他名称叫做 __builtin_return_address . 换句话说 , 这个地址就是我当前这个函数执行完毕后 , 要返回到哪里去的函数地址 . + void *PC = __builtin_return_address(0); + + SLSymbolNode *node = malloc(sizeof(SLSymbolNode)); + *node = (SLSymbolNode){PC,NULL}; + + //防止循环引用,故在此过滤 + if (previousPc == PC) { return; } + previousPc = PC; + + Dl_info info; + dladdr(node->pc, &info); + //根据内存地址获取函数名称 + NSString * name = @(info.dli_sname); + //首页渲染完毕,即-[SceneDelegate sceneDidBecomeActive:]执行完毕后 + if ([name isEqualToString:@"-[SceneDelegate sceneDidBecomeActive:]"]) { + isBecomeActive = YES; + } + + //入队 + // offsetof 用在这里是为了入队添加下一个节点找到 前一个节点next指针的位置 + OSAtomicEnqueue(&symbolList, node, offsetof(SLSymbolNode, next)); +} + +@end diff --git "a/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/Write Link Map File.png" "b/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/Write Link Map File.png" new file mode 100644 index 00000000..b5560a02 Binary files /dev/null and "b/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/Write Link Map File.png" differ diff --git "a/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/wsl.order" "b/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/wsl.order" new file mode 100644 index 00000000..3ff2cdf2 --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/\344\272\214\350\277\233\345\210\266\351\207\215\346\216\222/wsl.order" @@ -0,0 +1,66 @@ ++[BSBacktraceLogger load] ++[SLZombieSafeFree load] ++[NSString(SLCrashProtector) load] +___34+[NSString(SLCrashProtector) load]_block_invoke +_SL_ExchangeInstanceMethod ++[NSArray(SLCrashProtector) load] +___33+[NSArray(SLCrashProtector) load]_block_invoke ++[NSMutableDictionary(SLCrashProtector) load] +___45+[NSMutableDictionary(SLCrashProtector) load]_block_invoke ++[NSDictionary(SLCrashProtector) load] +___38+[NSDictionary(SLCrashProtector) load]_block_invoke ++[NSMutableArray(SLCrashProtector) load] +___40+[NSMutableArray(SLCrashProtector) load]_block_invoke ++[NSObject(SLCrashProtector) load] +___34+[NSObject(SLCrashProtector) load]_block_invoke ++[NSObject(SLCrashProtector) unrecognizedSelectorCrashProtector] +_SL_ExchangeClassMethod ++[NSObject(SLCrashProtector) KVOCrashProtector] ++[NSObject(SLCrashProtector) KVCCrashProtector] ++[NSMutableString(SLCrashProtector) load] +___41+[NSMutableString(SLCrashProtector) load]_block_invoke ++[UINavigationController(SLMLeakFinder) load] +___45+[UINavigationController(SLMLeakFinder) load]_block_invoke ++[UIViewController(SLMLeakFinder) load] +___39+[UIViewController(SLMLeakFinder) load]_block_invoke +_main +-[NSObject(SLCrashProtector) sl_KVODealloc] +-[NSMutableDictionary(SLCrashProtector) sl_setObject:forKey:] +-[NSMutableArray(SLCrashProtector) sl_mObjectAtIndex:] +-[NSMutableDictionary(SLCrashProtector) sl_removeObjectForKey:] +-[NSMutableArray(SLCrashProtector) sl_initWithObjects:count:] +-[NSMutableArray(SLCrashProtector) sl_replaceObjectAtIndex:withObject:] +-[NSArray(SLCrashProtector) sl_singleObjectAtIndex:] +-[NSArray(SLCrashProtector) sl_objectAtIndex:] +-[NSMutableDictionary(SLCrashProtector) sl_initWithObjects:forKeys:count:] +-[NSDictionary(SLCrashProtector) sl_initWithObjects:forKeys:] +-[NSMutableArray(SLCrashProtector) sl_removeObjectsInRange:] +-[NSObject(SLCrashProtector) sl_addObserver:forKeyPath:options:context:] +_IsSystemClass +-[NSString(SLCrashProtector) sl_characterAtIndex:] +-[NSMutableArray(SLCrashProtector) sl_mObjectAtIndexedSubscript:] +-[AppDelegate application:didFinishLaunchingWithOptions:] +_SLSetUncaughtExceptionHandler +-[NSMutableDictionary(SLCrashProtector) sl_setObject:forKeyedSubscript:] +-[NSArray(SLCrashProtector) sl_objectAtIndexedSubscript:] +-[NSObject(SLCrashProtector) sl_setValue:forKey:] +-[SceneDelegate window] +-[SceneDelegate setWindow:] +-[SceneDelegate scene:willConnectToSession:options:] +-[SLNavigationController viewDidLoad] +-[ViewController prefersStatusBarHidden] +-[SceneDelegate sceneWillEnterForeground:] +-[NSObject(SLCrashProtector) sl_forwardingTargetForSelector:] +-[NSObject(SLCrashProtector) isOverideForwardingMethods:] +-[ViewController setTableView:] +-[ViewController viewDidLoad] +-[ViewController setupUI] +-[NSString(SLCrashProtector) sl_substringWithRange:] +-[ViewController tableView] +-[ViewController getData] +-[ViewController dataSource] +-[ViewController classArray] +-[ViewController tableView:numberOfRowsInSection:] +-[ViewController viewWillAppear:] +-[ViewController tableView:cellForRowAtIndexPath:] +-[SceneDelegate sceneDidBecomeActive:] diff --git "a/iOS_Tips/DarkMode/WorkIssues/\345\267\262\346\265\217\350\247\210.md" "b/iOS_Tips/DarkMode/WorkIssues/\345\267\262\346\265\217\350\247\210.md" new file mode 100644 index 00000000..1c9e121b --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/\345\267\262\346\265\217\350\247\210.md" @@ -0,0 +1,68 @@ + + +## 已浏览 + +* 1、[iOS插件化架构探索](https://mp.weixin.qq.com/s/QJ9YHX-Uy6lDIhJe_5wPGw) +* 2、[WKWebview秒开实践分享及问题解决方案](https://juejin.im/post/6887161842406260744) +* 3、[iOS基础](https://juejin.im/user/4371313963043661/posts) +* 4、[【性能优化】今日头条iOS客户端启动速度优化](https://www.jianshu.com/p/7096478ccbe7) +* 5、 [iOS为什么必须在主线程操作UI?](https://juejin.im/post/6844903763011076110) +* 6、[iOS Rendering 渲染全解析(长文干货)](https://juejin.im/post/6844904162765832206#heading-18) +* 7、[iOS面试指南(2020年6月)参考答案](https://mp.weixin.qq.com/s/n8d0WSQs0n0SlmxqdUU-jg) +* 8、[关于iOS离屏渲染的深入研究](https://zhuanlan.zhihu.com/p/72653360) +* 9、[如何通过静态分析提高iOS代码质量](https://juejin.im/post/6844904164552605709#heading-10) +* 10、[OC项目转Swift指南](https://juejin.im/post/6844904078166720520) +* 11、[iOS蓝牙知识快速入门(详尽版)](https://juejin.im/post/6844903824847536135) +* 12、[译】更好的了解Xcode构建系统](https://juejin.im/post/6844904200887861262) +* 13、[iOS组件化方案的几种实现](https://www.jianshu.com/p/2a7e2aa0748b) +* 14、[分析MVC, MVP, MVVM 和 VIPER](https://blog.csdn.net/weixin_40200876/article/details/87635190) +* 15、[RAC相关](https://www.jianshu.com/p/cd4031fbf8ff) +* 16、[synchronized的内部实现原理](http://yulingtianxia.com/blog/2015/11/01/More-than-you-want-to-know-about-synchronized/) +* 17、[轻量级低风险 iOS 热更新方案](https://mp.weixin.qq.com/s/2re_s3NmOvE9RXlbGQqGDA) +* 18、[iOS大解密:玄之又玄的KVO](https://mp.weixin.qq.com/s/0Yfb-FYorH5GZ3ZB6bMCUQ) +* 19、[iOS AOP框架Aspects实现原理](https://www.jianshu.com/p/2345cc034d6b) +* 20、[FBRetainCycleDetector不能扫描__block变量的问题分析和解决方案](https://developer.aliyun.com/article/66857) +* 21、[iOS 任务调度器:为 CPU 和内存减负](https://www.jianshu.com/p/f2a610c77d26) +* 22、[iOS学习之深入理解程序编译过程](https://juejin.im/post/6844903535050489869) +* 23、[计算机那些事(8)——图形图像渲染原理](http://chuquan.me/2018/08/26/graphics-rending-principle-gpu/) +* 24、[iOS 图像渲染过程解析](https://www.jianshu.com/p/6b9a5f16644b) +* 25、[iOS面试题-Swift篇](https://blog.csdn.net/olsQ93038o99S/article/details/107031322?utm_medium=distribute.pc_relevant.none-task-blog-title-6&spm=1001.2101.3001.4242) +* 26、[解决「HTTPDNS + HTTPS」的证书校验问题](https://kangzubin.com/httpdns-https/) +* 27、[从SIL看Swift函数派发机制](https://mp.weixin.qq.com/s/KvwFyc1X_anTt-DTw86u7Q) +* 28、[iOS 锁的简单实现与总结](https://www.jianshu.com/p/a33959324cc7?from=singlemessage) +* 29、[引用计数带来的一次讨论](https://www.jianshu.com/p/e3690f3e4675) +* 30、[小程序「同层渲染」那些事(keng)?](https://juejin.cn/post/6881502813105422349) +* 31、[深入理解JavaScriptCore](https://mp.weixin.qq.com/s/H5wBNAm93uPJDvCQCg0_cg9) +* 32、[iOS WKWebView 同步返回值给 JS](https://mp.weixin.qq.com/s/kKdNG40qbMHigwZIsJRyQQ) +* 33、[Hybrid 实战:如何完整下载一个 wap 页面](https://mp.weixin.qq.com/s/rR4lT0iPSStoHk2Kar8i9A) +* 34、[UIView 动画降帧探究](https://mp.weixin.qq.com/s/EcVrrT1M4mI4f4d2b3qV0Q) +* 35、[iOS AOP 方案的对比与思考](https://juejin.cn/post/6898192050512986126) +* 36、[如何对 iOS 启动阶段耗时进行分析](https://www.jianshu.com/p/c0c4f19d317f) +* 37、[UIView 的渲染过程](https://www.jianshu.com/p/365cf516dbcb) +* 38、[IOS UIView开始深入 绘制像素到屏幕上](https://www.cnblogs.com/alunchen/p/5614355.html) +* 39、[iOS深思篇 | 启动时间的度量和优化](https://www.cnblogs.com/feng9exe/p/12487662.html) +* 40、[Hook load方法耗时](https://github.com/tripleCC/Laboratory/tree/master/HookLoadMethods) +* 41、[__attribute__ 机制使用](https://www.jianshu.com/p/e2dfccc32c80) +* 42、[iOS中 性能优化之浅谈load与initialize](https://blog.csdn.net/Lea__DongYang/article/details/79702537) +* 43、[#iOS性能优化](https://mp.weixin.qq.com/mp/appmsgalbum?action=getalbum&__biz=MzI2NTAxMzg2MA==&scene=1&album_id=1569172435344637952&count=3#wechat_redirect) +* 44、[监控所有的OC方法耗时](https://juejin.cn/post/6844903875804135431) +* 45、[深入剖析iOS动态链接库](https://www.jianshu.com/p/1de663f64c05) +* 46、[【IOS开发高级系列】dyld专题](https://www.jianshu.com/p/5f337da8fbef) +* 47、[iOS图片加载速度极限优化—FastImageCache解析](https://note.youdao.com/ynoteshare1/index.html?id=c66e46ed804849833a3189952afcf2c0&type=note) +* 48、[深入iOS系统底层之程序映像](https://www.jianshu.com/p/3b83193ff851) +* 49、[深入iOS系统底层之crash解决方法](https://www.jianshu.com/p/cf0945f9c1f8) +* 50、[深入iOS系统底层之CPU寄存器](https://www.jianshu.com/p/6d7a57794122) +* 51、[漫谈iOS Crash收集框架](http://www.cocoachina.com/articles/12301) +* 52、[iOS crash log手动解析](https://www.jianshu.com/p/98038765743b) +* 53、[iOS Crash分析必备:符号化系统库方法](https://www.jianshu.com/p/f9eeeecff8d8) +* 54、[使用symbolicatecrash解析了一个crash log](https://www.jianshu.com/p/0a1c029e910f) +* 55、[如何符号化Objective-C调用栈](https://www.jianshu.com/p/3e5097a9be46) +* 56、[移动端监控体系之技术原理剖析](https://www.jianshu.com/p/8123fc17fe0e) +* 57、[iOS无埋点数据SDK实践之路](https://www.jianshu.com/p/69ce01e15042) +* 58、[APM系列(二):电量消耗速率监控](https://kyson.cn/index.php/archives/150/) +* 59、[有赞webview加速平台探索与建设(一)](https://tech.youzan.com/youzan-webview-goldwing-one/) +* 60、[iOS 网络基础和网络优化](https://juejin.cn/post/6868945803856052231) +* 61、[llvm 编译器高级用法:第三方库插桩](https://mp.weixin.qq.com/s/RKg8f6B2jSNuFEImtMnq2Q) +* 62、[iOS 性能监控:Runloop 卡顿监控的坑](https://mp.weixin.qq.com/s/vMRQ0VuHLxpaY9oCNd5G8w) +* 63、[iOS链接原理解析与应用实践](https://mp.weixin.qq.com/s/_3WXnDolNICs2euoJph44A) +* 64、[iOS开发--我与面试官有个约会](https://juejin.cn/post/6908303868086452237) diff --git "a/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/SLResourceInfo.h" "b/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/SLResourceInfo.h" new file mode 100644 index 00000000..a241dc59 --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/SLResourceInfo.h" @@ -0,0 +1,28 @@ +// +// SLResourceInfo.h +// DarkMode +// +// Created by wsl on 2020/8/21. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface SLResourceInfo : NSObject + +///文件路径 +@property (nonatomic, copy) NSString *fileName; +///文件路径 +@property (nonatomic, copy) NSString *filePath; +///文件大小 +@property (nonatomic, assign) CGFloat fileSize; +/// 是否为文件夹 +@property (nonatomic, assign) BOOL isFolder; +/// 文件类型 +@property (nonatomic, copy) NSString *fileType; + +@end + +NS_ASSUME_NONNULL_END diff --git "a/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/SLResourceInfo.m" "b/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/SLResourceInfo.m" new file mode 100644 index 00000000..4aa0107c --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/SLResourceInfo.m" @@ -0,0 +1,13 @@ +// +// SLResourceInfo.m +// DarkMode +// +// Created by wsl on 2020/8/21. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLResourceInfo.h" + +@implementation SLResourceInfo + +@end diff --git "a/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/SLUnusedResourceViewController.h" "b/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/SLUnusedResourceViewController.h" new file mode 100644 index 00000000..b51c88bf --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/SLUnusedResourceViewController.h" @@ -0,0 +1,18 @@ +// +// SLUnusedResourceViewController.h +// DarkMode +// +// Created by wsl on 2020/8/20. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +///扫描项目无用的图片、类等文件资源, 此示例主要针对于此项目中的图片资源,其他类型资源实现原理相同 +@interface SLUnusedResourceViewController : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git "a/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/SLUnusedResourceViewController.m" "b/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/SLUnusedResourceViewController.m" new file mode 100644 index 00000000..339fc0ee --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/SLUnusedResourceViewController.m" @@ -0,0 +1,185 @@ +// +// SLUnusedResourceViewController.m +// DarkMode +// +// Created by wsl on 2020/8/20. +// Copyright © 2020 https://github.com/wsl2ls ----- . All rights reserved. +// + +#import "SLUnusedResourceViewController.h" +#import "SLResourceInfo.h" + +/* 资料: + https://www.jianshu.com/p/cef2f6becbe6 + https://github.com/tinymind/LSUnusedResources + 正则表达式入门:http://www.regexlab.com/zh/regref.htm + 正则表达式在线工具: https://tool.oschina.net/regex/ + */ +@interface SLUnusedResourceViewController () +@property (nonatomic, strong) NSMutableArray *dataSource; +@end + +@implementation SLUnusedResourceViewController + +#pragma mark - Override +- (void)viewDidLoad { + [super viewDidLoad]; + self.view.backgroundColor = [UIColor whiteColor]; + [self setupUI]; + [self getUnusedResourceData]; +} + +#pragma mark - UI +- (void)setupUI { + self.navigationController.navigationBar.translucent = YES; + self.tableView.estimatedRowHeight = 1; + self.navigationItem.title = @"正在扫描无用图片..."; +} + +#pragma mark - Data +///获取没有用的图片信息 +- (void)getUnusedResourceData { + + //文件目录路径 + NSString *folderPath = @"/Users/wsl/GitHub/iOS_Tips/iOS_Tips/DarkMode"; + + NSString *imgTypes = @"jpeg|jpg|png|gif|imageset"; + NSString *imgExpression = [NSString stringWithFormat:@"([a-zA-Z0-9_-]*)(@[23]x)?\\.(%@)",imgTypes]; + NSMutableArray *imgResources = [self searchAllUnderFolderPath:folderPath fileTypes:imgTypes regularExpression:imgExpression]; + + NSString *fileTypes = @"h|m$|swift|xib|storyboard|plist"; + NSString *fileExpression = [NSString stringWithFormat:@"([a-zA-Z0-9_-]*)(\\.)(%@)",fileTypes]; + NSMutableArray *files = [self searchAllUnderFolderPath:folderPath fileTypes:fileTypes regularExpression:fileExpression]; + + NSMutableArray *unusedImgs = [NSMutableArray array]; + dispatch_async(dispatch_get_global_queue(0, 0), ^{ + for (SLResourceInfo *imgInfo in imgResources) { + //其他文件中是否使用了该图片 + BOOL isUsed = NO; + for (SLResourceInfo *fileInfo in files) { + //文件内容 + NSString *content = [NSString stringWithContentsOfFile:fileInfo.filePath encoding:NSUTF8StringEncoding error:nil]; + if (content == nil) continue; + + /* + 文件类型、语法、用法等不同,匹配规则就不同,依项目情况而定 + @"@\"%@\"" 例 @"wsl" + @"@\"(%@)(\.(jpeg|jpg|png|gif))?\"" 例 @"wsl.png" + @"imageNamed:@\"(.+)\""; + @"(imageNamed|contentOfFile):@\"(.*)\"" + + @"image name=\"(.+?)\"" xib格式(.xib .storyboard) + (stickers_%d) + */ + //去掉.png等后缀 + NSString *imgName = [imgInfo.fileName stringByReplacingOccurrencesOfString:imgInfo.fileType withString:@""]; + NSRange range = [imgName rangeOfString:@"@"]; + if (range.length) { + //去掉 @2x @3x + imgName = [imgName stringByReplacingOccurrencesOfString:[imgName substringFromIndex:range.location] withString:@""]; + } + //匹配规则 + // NSString *regularExpStr = [NSString stringWithFormat:@"@\"(%@)\"",imgName]; + NSString *regularExpStr = [NSString stringWithFormat:@"@\"(%@)\"",imgName]; + NSRegularExpression *regularExp = [[NSRegularExpression alloc] initWithPattern:regularExpStr options:NSRegularExpressionCaseInsensitive error:nil]; + NSArray *resultArr = [regularExp matchesInString:content options:NSMatchingReportProgress range:NSMakeRange(0, content.length)]; + if(resultArr.count > 0){ + // 取出匹配出来的字符串 + NSString *subStr = [content substringWithRange:resultArr.firstObject.range]; + // NSLog(@"%@",subStr); + isUsed = YES; + break; + } + } + //没有使用过,加入无用待处理数组 + if (!isUsed) [unusedImgs addObject:imgInfo]; + } + + for (SLResourceInfo *unusedImg in unusedImgs) { + // NSLog(@"⚠️ 没用 %@", unusedImg.fileName); + } + + self.dataSource = unusedImgs; + SL_DISPATCH_ON_MAIN_THREAD(^{ + self.navigationItem.title = @"ipa瘦身之扫描无用资源"; + [self.tableView reloadData]; + }); + + }); + +} + +#pragma mark - Getter +- (NSMutableArray *)dataSource { + if (!_dataSource) { + _dataSource = [NSMutableArray array]; + } + return _dataSource;; +} + +#pragma mark - HelpMethods + +/// 在searchPath路径下搜索所有suffixs类型的文件 +/// @param searchPath 搜索路径 +/// @param suffixs 文件后缀/格式 多种格式用|隔开即可 例如@"jpeg|jpg|png|gif|imageset" +/// @param expression 正则表达式/匹配规则 +- (NSMutableArray *)searchAllUnderFolderPath:(NSString *)searchPath fileTypes:(NSString *)suffixs regularExpression:(NSString *)expression { + NSArray *filesArray = [[NSFileManager defaultManager] subpathsOfDirectoryAtPath:searchPath error:nil] ; + NSEnumerator *filesEnumerator = [filesArray objectEnumerator]; + filesArray = nil; + NSMutableArray *resourceInfos = [NSMutableArray array]; + //相对于searchPath的子路径 + NSString *subPath; + while (subPath = [filesEnumerator nextObject]) { + @autoreleasepool { + //匹配对象 + NSString *fileName = subPath.lastPathComponent; + + //匹配规则 + NSString *regularExpStr = expression; + NSRegularExpression *regularExp = [[NSRegularExpression alloc] initWithPattern:regularExpStr options:NSRegularExpressionCaseInsensitive error:nil]; + NSArray *resultArr = [regularExp matchesInString:fileName options:NSMatchingReportProgress range:NSMakeRange(0, fileName.length)]; + if(resultArr.count == 0) continue; + //取出匹配出来的字符串 + // NSString *subStr = [fileName substringWithRange:resultArr.firstObject.range]; + // NSLog(@"%@",subStr); + + //全路径 + NSString *fullPath = [searchPath stringByAppendingPathComponent:subPath]; + //文件属性信息 + NSDictionary *fileDic = [[NSFileManager defaultManager] attributesOfItemAtPath:fullPath error:nil]; + + SLResourceInfo *info = [[SLResourceInfo alloc] init]; + info.filePath = fullPath; + info.fileSize = [fileDic fileSize]; + info.isFolder = [[fileDic fileType] isEqualToString:@"NSFileTypeDirectory"] ? YES : NO; + info.fileName = fileName; + info.fileType = [fileName substringFromIndex:[fileName rangeOfString:@"."].location]; + [resourceInfos addObject:info]; + } + } + return resourceInfos; +} + + +#pragma mark - EventsHandle + + +#pragma mark - UITableViewDelegate, UITableViewDataSource +- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.dataSource.count; +} +- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { + UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cellID"]; + if(!cell) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cellID"]; + } + SLResourceInfo *info = self.dataSource[indexPath.row]; + cell.imageView.image = [UIImage imageWithContentsOfFile:info.filePath]; + cell.textLabel.text = info.fileName; + return cell; +} +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { +} + +@end diff --git "a/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/unused.png" "b/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/unused.png" new file mode 100644 index 00000000..6bbf7c21 Binary files /dev/null and "b/iOS_Tips/DarkMode/WorkIssues/\346\237\245\346\211\276\351\241\271\347\233\256\346\227\240\347\224\250\350\265\204\346\272\220/unused.png" differ diff --git "a/iOS_Tips/DarkMode/WorkIssues/\347\254\224\350\256\260.md" "b/iOS_Tips/DarkMode/WorkIssues/\347\254\224\350\256\260.md" new file mode 100644 index 00000000..fb81affb --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/\347\254\224\350\256\260.md" @@ -0,0 +1,204 @@ + + ## 一、性能优化 + +* 1.0、APM性能监控 + +> CPU占用率、内存/磁盘使用率、卡顿监控定位、Crash防护、线程数量监控、网络监控(TCP 建立连接时间 、DNS 时间、 SSL时间、首包时间、响应时间 、流量)、ViewController启动耗时监测 、load方法耗时、方法耗时监控...... + +* 1.1、内存优化 + +> 合理的线程分配、使用正确的API、延时加载、按需加载/复用、处理内存警告、自动释放池@autoreleasepool、图片降采样/分片加载、NSCache、避免循环引用导致的内存泄漏 + +* 1.2、卡顿优化 + +> 优化业务流程、 预处理、 缓存/空间换时间、避免圆角/阴影/光栅化/透明造成的离屏渲染、异步解码/异步绘制、合并图层、图像字节对齐 + +* 1.3、 安装包瘦身 + +> 去掉无用/重复资源、压缩资源、矢量图/图片格式、编译选项优化、可执行文件瘦身、如果不支持32位以及 iOS8 就去掉 armv7 、xcassets管理常用的、较小的图图片、大图放在 Bundle 内管理、静态库瘦身 + +* 1.4、启动时间优化 + +> 合并减少动态库和类、尽量不要用C++虚函数(创建虚函数表有开销),、二进制重排/减少缺页中断、load 的方法处理和耗时监听、异步延时加载、业务流程优化、rootViewController的加载 + +* 1.5、编译时间优化 + +> + +* 1.6、网络优化 + +> 合并多个请求、304缓存 + +* 1.7、健壮性/稳定性 + +> 启动连续闪退保护、Crash防护、Crash分析 + +* 1.8、安全性 + +> 代码混淆 + +> * 资料 + +> [iOS-Performance-Optimization](https://github.com/skyming/iOS-Performance-Optimization) +> [深入剖析 iOS 性能优化-戴明](https://ming1016.github.io/2017/06/20/deeply-ios-performance-optimization/#more) +> [DoraemonKit](https://github.com/didi/DoraemonKit/blob/master/README_CN.md) +> [乐少](https://www.jianshu.com/u/9c51a213b02e) +> [iOS 性能监控(三)—— 方法耗时监控](https://www.jianshu.com/p/bc1c000afdba) +> [iOS crash 日志堆栈解析](https://juejin.im/post/6844903598011187213) +> [iOS崩溃crash大解析](https://www.jianshu.com/p/1b804426d212) +> [iOS实录14:浅谈iOS Crash(一)](https://www.jianshu.com/p/3261493e6d9e) +> [iOS Memory 内存详解 (长文)](https://juejin.im/post/6844903902169710600) +> [iOS 性能优化调试专题](https://www.jianshu.com/c/fcb00b489a85) +> [iOS Memory Deep Dive](https://www.jianshu.com/p/dad9f27e412e) +> [iOS性能优化系列篇之“列表流畅度优化”](https://juejin.im/post/6844903656769208334) +> [iOS瘦身之道](https://juejin.im/post/6844903845340921869) +> [iOS应用瘦身总结](https://juejin.im/post/6844903849732341774) +> [如何使用 Clang Plugin 找到项目中的无用代码](https://blog.gocy.tech/2017/09/12/DetectingUselessCodeWithClang-p1/) +> [基于clang插件的一种iOS包大小瘦身方案](https://mp.weixin.qq.com/s?__biz=MzUxMzcxMzE5Ng==&mid=2247488360&idx=1&sn=94fba30a87d0f9bc0b9ff94d3fed3386&source=41#wechat_redirect) +> [iOS 启动速度优化和安装包优化简单总结](https://juejin.im/post/6844903821387235341) +> [iOS代码瘦身实践:删除无用的类](https://juejin.im/post/6844903921169727496) +> [优化 App 的启动时间](http://yulingtianxia.com/blog/2016/10/30/Optimizing-App-Startup-Time/) +> [AppStartTime](https://github.com/JunyiXie/AppStartTime) +> [iOS App 启动性能优化](https://mp.weixin.qq.com/s/Kf3EbDIUuf0aWVT-UCEmbA) +> [iOS一次立竿见影的启动时间优化](https://juejin.im/post/6844903525172903944) +> [iOS Dynamic Framework 对App启动时间影响实测](https://www.jianshu.com/p/3263009e9228) +> [iOS优化篇之App启动时间优化](https://juejin.im/post/6861917375382929415) +> [iOS如何提高10倍以上编译速度](https://juejin.im/post/6844904169124397070) +> [为什么 Debug Information Format 改为 DWARF 可以提高编译速度?](https://zhuanlan.zhihu.com/p/112764192) +> [移动 APP 网络优化概述](http://blog.cnbang.net/tech/3531/) +> [二进制重排-编译插桩与动态trace结合](https://github.com/rhythmkay/PGOAnalyzer) +> [关于WKWebView 秒开方案](https://www.jianshu.com/p/74fad07ec640) +> [如何自建 Crash 平台](https://www.xuyanlan.com/2019/02/20/iOS-crash-report/) +> [iOS客户端稳定性体系](https://778477.github.io/2018/02/23/2018-02-23-iOS客户端稳定性体系/) +> [iOS 包瘦身浅析](https://github.com/778477/iOS-LinkMapAnalyzer) +> [iOS 崩溃排查技巧:如何获取系统库源码](https://mp.weixin.qq.com/s/YjJo-FB9weGgxEaOfCwBvg) +> [iOS 性能优化:优化 App 启动速度](https://mp.weixin.qq.com/s/h3vB_zEJBAHCfGmD5EkMcw) +> [iOS 性能优化:使用 MetricKit 2.0 收集数据](https://mp.weixin.qq.com/s/cbP0QlxVlr5oeTrf6yYfFw) +> [iOS性能优化实践:头条抖音如何实现OOM崩溃率下降50%+](https://mp.weixin.qq.com/s/4-4M9E8NziAgshlwB7Sc6g) +> [抖音品质建设 - iOS启动优化《原理篇》](https://mp.weixin.qq.com/s/3-Sbqe9gxdV6eI1f435BDg) +> [iOS Rendering 渲染全解析(长文干货)](https://juejin.im/post/6844904162765832206) +> [再谈 iOS App Crash 防护](https://mp.weixin.qq.com/s/l5S_g1PBCiwm4KDtqNFb-A) +> [iOS 网络优化: 使你的 App 网络交互更流畅](https://mp.weixin.qq.com/s/YLvpYBwaz8L6fnmzL78Mfg) +> [GoldHouse-for-iOS](https://github.com/BiBoyang/GoldHouse-for-iOS) +> [卡顿率降低50%!京东商城APP卡顿监控及优化实践](https://mp.weixin.qq.com/s/aJeAUAjcKOMvznDMGj2UUA) +> [【性能优化】今日头条iOS客户端启动速度优化](https://www.jianshu.com/p/7096478ccbe7) +> [iOS 崩溃排查入门:总览](https://ai-chan.top/2020/10/02/iOS-crash/) +> [卡顿率降低50%!京东商城APP卡顿监控及优化实践](https://mp.weixin.qq.com/s/aJeAUAjcKOMvznDMGj2UUA) + +## 二、数据结构与算法 + +* 1、 [LeetcodeTop](https://github.com/afatcoder/LeetcodeTop) +* 2、[小浩算法](https://www.geekxh.com) +* 3、[labuladong的算法小抄](https://labuladong.gitbook.io/algo/) + +## 三、面试题相关 + +* 1、[iOS-InterviewQuestion-collection](https://github.com/liberalisman/iOS-InterviewQuestion-collection) +* 2、[阿里、字节 一套高效的iOS面试题解答](https://github.com/colourful987/bytedance-alibaba-interview) +* 3、[2019年iOS面试反思总结](https://juejin.im/post/6844903942644563982) +* 4、[IOS面试考察(九):性能优化相关问题](https://juejin.im/post/6844904131941892110#heading-50) +* 5、[Theendisthebegi ](https://www.jianshu.com/u/b836babfef41) +* 6、[analyze](https://github.com/draveness/analyze) +* 7、[iOS 方案之本之使用汇编可以 Hook objc_msgSend](https://zhuanlan.zhihu.com/c_1221108308322443264) +* 8、[iOS Rendering 渲染全解析(长文干货)](https://juejin.im/post/6844904162765832206) +* 9、[iOS | 面试知识整理 - OC基础 (二)](https://juejin.im/post/6844903945052110856) +* 10、[各种精选面试题](https://github.com/iOShuyang/Book-Recommended-Interview) +* 11、[iOS | 面试知识整理 - Swift 基础(九)](https://juejin.im/post/6844903955156336654) +* 12、[iOSDevLevelingUp](https://github.com/ShannonChenCHN/iOSDevLevelingUp) +* 13、[iOS 基础](https://juejin.im/user/940837683069549/posts) +* 14、[深入理解RunLoop](https://blog.ibireme.com/2015/05/18/runloop/) +* 15、[BoyangBlog](https://github.com/BiBoyang/BoyangBlog.git) +* 16、[阿里、字节:一套高效的iOS面试题](https://juejin.im/post/6844904064937902094) +* 17、[《招聘一个靠谱的 iOS》](https://github.com/ChenYilong/iOSInterviewQuestions) +* 18、[聚焦于iOS开发面试题和开发笔记](https://github.com/DevDragonLi/iOSInterviewsAndDevNotes) + +## 四、逆向与安全 + +* 1、 [趣探 Mach-O](https://juejin.im/post/5a0c5c5e51882555cc416602) +* 2、 [iOS程序员的自我修养 - 编译、链接、装载](https://juejin.im/post/5d5273b1f265da03f233c2d6) +* 3、[[iOS翻译]编译器](https://juejin.im/post/6854573220612931592) +* 4、[Injection:iOS热重载背后的黑魔法](https://mp.weixin.qq.com/s/hFnHdOP6pmIwzZck-zXE8g) +* 5、[高效逆向 - 为任意iOS App生成符号表](https://github.com/imoldman/DSYMCreator) +* 6、[iOS LLVM-Clang 浅谈](https://www.jianshu.com/p/7ceca351a045) +* 7、[iOSer逆向](https://iosre.com) +* 8、[fishhook 原理探究](https://mp.weixin.qq.com/s/uP3PASr7IoOMCQ-yy4RanA) +* 9、[Mach-O文件](https://www.jianshu.com/p/7c87e115492d)、[深入iOS系统底层之程序映像](https://www.jianshu.com/p/3b83193ff851) +* 10、[深入iOS底层系列](https://www.jianshu.com/nb/21164557) +* 11、[iOS App 安全加固方案调研](https://mp.weixin.qq.com/s?__biz=MzI2NzI4MTEwNA==&mid=2247485642&idx=1&sn=dce8e7581d94c8d8d2b79366f6223161&chksm=ea807f75ddf7f663daf6776b0f5a98aeea2e735e08c3a5268fd00f45b5a893d0e8dbac03b0f8&mpshare=1&scene=23&srcid=%23rd) + +## 五、音视频 + +* 1、[(强烈推荐)移动端音视频从零到上手](https://juejin.im/post/6844903889007820813) +* 2、[移动开发者的必知音视频基础知识](https://juejin.im/post/6844904039503626247) +* 3、[GoPlay是一款基于FFmpeg/OpenGLES2.0的iOS播放器](https://github.com/letqingbin/GoPlay) +* 4、[CainCamera](https://github.com/CainKernel/blog) +* 5、[Android 音视频开发学习思路](https://www.cnblogs.com/renhui/p/7452572.html) +* 6、[loyinglin](https://github.com/loyinglin) +* 7、[CC老师](https://www.jianshu.com/u/1b4c832fb2ca) + +## 六、跨平台/热更新 + +* 1、DSBridge /JSBridge /JSPatch/ +* 2、[写给自己看系列之WebViewJavascriptBridge源码分析](https://juejin.im/post/6844904097192247303) +* 3、[OCRunner:完全体的iOS热修复方案](https://silverfruity.github.io/2020/09/04/OCRunner/) +* 4、[DynamicOC](https://github.com/letqingbin/DynamicOC) +* 5、[js-native 通信的 6 种方式](https://mp.weixin.qq.com/s/_Xo6O3NoE1z9AIMJm_uSsA) +* 6、[美团外卖客户端容器化架构的演进](https://mp.weixin.qq.com/s/kW5wu7GM7pMRRvN-dQvE2g) +* 7、[SYWebViewBridge](https://mp.weixin.qq.com/s/JDCyWg1AYemxbnFbvY5E9w) +* 8、[JSPatch-实现原理详解](https://github.com/bang590/JSPatch/wiki/JSPatch-实现原理详解) +* 9、[WKWebview秒开实践分享及问题解决方案](https://juejin.im/post/6887161842406260744) +* 10、[轻量级低风险 iOS 热更新方案](https://mp.weixin.qq.com/s/2re_s3NmOvE9RXlbGQqGDA) +* 11、[有赞webview加速平台探索与建设(一)](https://tech.youzan.com/youzan-webview-goldwing-one/) +* 12、[ReactNative iOS 框架源码解析](https://juejin.cn/post/6844904190385487886) +* 13、[写一个易于维护使用方便性能可靠的Hybrid框架](https://juejin.cn/post/6844903733583675406) +* 14、[今日头条品质优化 - 图文详情页秒开实践](https://mp.weixin.qq.com/s/Xqr6rQBbx7XPoBESEFuXJw) + +## 七、Shell脚本 + +* 1、[Shell脚本编程30分钟入门](https://github.com/qinjx/30min_guides/blob/master/shell.md) + + +## 八、网络 + +* 1、[TCP序列号和确认号详解](https://blog.csdn.net/fujibao/article/details/80857180) +* 2、[探索现代的移动网络](https://mp.weixin.qq.com/s/ds6QkVrBwcurxp3RkvZe8Q) + +## 九、效率 + +* 1、[iOS教你如何像RN一样实时编译](https://juejin.im/post/6850037272415813645) +* 2、[Injection:iOS热重载背后的黑魔法](https://mp.weixin.qq.com/s/hFnHdOP6pmIwzZck-zXE8g) +* 3、[iOS开发老司机的神兵利器-效率工具](https://juejin.im/post/6844904205640007687) +* 4、[Xcode配置文件xcconfig](https://juejin.im/post/6844903766282469390) + + +## 十、架构/设计模式 + +* 1、[IOS设计模式探索(大话设计模式)](https://github.com/huang303513/Design-Pattern-For-iOS.git) +* 2、[面向对象设计的设计原则和设计模式](https://github.com/knightsj/object-oriented-design) +* 3、[iOS VIPER架构实践(一):从MVC到MVVM到VIPER](https://juejin.cn/post/6844903491941433351) +* 4、[浅谈 MVC、MVP 和 MVVM 架构模式](https://draveness.me/mvx/) +* 5、[iOS MVC、MVVM、MVP架构模式浅浅析](https://juejin.cn/post/6844903798591193095) + +## 十一、优秀三方源码解析 + +* 1、[优秀的三方源码](https://github.com/iOShuyang/Book-Recommend-Github) +* 2、[波儿菜](https://juejin.im/user/2735240659351112) +* 3、[写给自己看系列之WebViewJavascriptBridge源码分析](https://juejin.im/post/6844904097192247303) +* 4、[JSBridge 实现原理解析](https://github.com/mcuking/blog/issues/39) +* 5、[MLeaksFinder]() +* 6、[JSPatch]() +* 7、[Fishook]() +* 8、[Aspect]() +* 9、[YYCache 源码解析(一):使用方法,架构与内存缓存的设计](https://mp.weixin.qq.com/s/tTAKHNiCVJ64738VIA__ZA) + + +## 其它 + +* 1、[CocoaPods 都做了什么?](https://www.jianshu.com/p/84936d9344ff) +* 2、[1. 版本管理工具及 Ruby 工具链环境](https://mp.weixin.qq.com/s/s2yJEb2P0_Kk-rIpYBi_9A) +* 3、[2. 整体把握 CocoaPods 核心组件](https://looseyi.github.io/post/sourcecode-cocoapods/02-cocoapods-corecomponents/) +* 4、[OCLint 实现 Code Review - 给你的代码提提质量](https://juejin.im/post/6844903853775650830) +* 5、[(译)开源软件架构之 LLVM(The Architecture of Open Source Applications LLVM)](https://juejin.im/post/6844904034134917134) +* 6、[你真的会用 CocoaPods 吗?](https://juejin.im/post/6844903506734759949) +* 7、[你知道 Git 是如何做版本控制的吗?](https://juejin.im/post/6844903967525208078) +* 8、[如何有效地进行代码 Review?](https://mp.weixin.qq.com/s/uFivYfX53s5zAe6hacznlg) diff --git "a/iOS_Tips/DarkMode/WorkIssues/\351\235\242\350\257\225\351\242\230.md" "b/iOS_Tips/DarkMode/WorkIssues/\351\235\242\350\257\225\351\242\230.md" new file mode 100644 index 00000000..e0298525 --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/\351\235\242\350\257\225\351\242\230.md" @@ -0,0 +1,162 @@ + + +## 面试题 + + +### iOS + +* 1、 [iOS为什么必须在主线程操作UI?](https://778477.github.io/2017/06/19/2017-06-19-为什么iOS更新UI操作必须在主线程/) +* 2、[Swift和OC的方法调用流程区别](https://kemchenj.github.io/2017-01-09/) +* 3、[iOS性能优化实践:头条抖音如何实现OOM崩溃率下降50%+](https://mp.weixin.qq.com/s/4-4M9E8NziAgshlwB7Sc6g) +* 4、[GCD](https://looseyi.github.io/post/notes/01-gcd/) +* 5、[runloop](https://blog.ibireme.com/2015/05/18/runloop/) +* 6、[Weak的实现原理](https://www.jianshu.com/p/f331bd5ce8f8) +* 7、[Block](https://www.jianshu.com/p/93813c293266) +* 8、[AutoreleasePool](https://www.jianshu.com/p/32265cbb2a26) +* 9、[编译过程](https://juejin.im/post/6844904040841641998) +* 10、[启动过程](https://www.jianshu.com/p/7096478ccbe7) +* 11、[设计一个线程池](https://www.jianshu.com/p/5bb4123e415c)、[iOS 任务调度器:为 CPU和内存减负](https://www.jianshu.com/p/f2a610c77d26) +* 12、[线程怎么保活](https://www.jianshu.com/p/2ffa6678f83d) +* 13、[内存满了之后如何处理](https://juejin.im/post/6844903550187733000) +* 14、[如何使用 Runtime 给现有的类添加 weak 属性](https://github.com/ChenYilong/iOSInterviewQuestions) +* 15、[加载一个图片经历那些过程](https://www.jianshu.com/p/72dd074728d8) +* 16、[Performselector方法里到底干了啥](https://www.jianshu.com/p/ac14e03d9345) +* 17、[C++虚函数我们一般哪里有用到啊,还有它开销了什么东西?为啥减少使用能优化启动速度?](https://www.dazhuanlan.com/2019/12/09/5dedcdb02c287/) +* 18、[内存缓存优化](https://www.jianshu.com/p/f7376a321c2e) +* 19、[autoreleasepool什么时候释放](https://www.jianshu.com/p/50bdd8438857) +* 20、[响应链机制](https://www.jianshu.com/p/2e074db792ba) +* 21、[instrment的Time profilter实现原理原理]() +* 22、[多线程之栅栏函数](https://zhuanlan.zhihu.com/p/142368783) +* 23、[iOS 图像渲染过程、离屏渲染](https://juejin.im/post/6844904162765832206#heading-18) +* 24、[iOS 架构模式--浅析MVC, MVP, MVVM 和 VIPER](https://zhangferry.com/2019/11/22/ios_architecture_patterns/) +* 25、[iOS面试备战-多线程](https://juejin.im/post/6854573211011514382) +* 26、[设计模式](https://www.jianshu.com/p/e5c69c7b8c00) +* 27、[组件化](https://www.jianshu.com/p/40060fa2a564) +* 28、[组件化采坑](https://juejin.im/post/6844903731738345479) +* 29、[md5实现原理](https://www.jianshu.com/p/82729c87ef68) +* 30、[NSTimer不准时](https://www.jianshu.com/p/d5845842b7d3) +* 31、[WKWebVie与JS通信的几种方式]() +* 32、[什么是泛型?Swift的字符串string与OC的NSString差别?对于Swift协议的理解?]() +* 33、[APP启动时长监控]() +* 34、[https相关](https://mp.weixin.qq.com/s/LV3cFpQtMUntMg6zn-01pQ) +* 35、[设计一个网络框架]() +* 36、[网络最大并发数]() +* 37、[分类和扩展区别](https://www.jianshu.com/p/ba35a975af9a) +* 38、[load和initializet](https://www.jianshu.com/p/c52d0b6ee5e9) +* 39、[UIView的绘制过程](https://www.jianshu.com/p/a81d48e0e44a) +* 40、[layoutSubviews什么时候执行](https://www.jianshu.com/p/a2acc4c7dc4b) +* 41、[iOS-UIView异步绘制](https://www.jianshu.com/p/1c1b3f7cf087) +* 42、[静态库和动态库的区别?怎么判断一个库是动态库还是静态库](https://www.jianshu.com/p/5069778e421a) +* 43、[AutoLayout的原理](https://www.jianshu.com/p/c6541ff0bdafv) +* 44、[iOS的Category添加 weak 属性](https://blog.csdn.net/devday/article/details/71130115) +* 45、[Runloop](https://www.jianshu.com/p/fcb271f69038) +* 46、[Runtime](https://www.jianshu.com/p/6ebda3cd8052) +* 47、[WKWebView 那些坑](https://zhuanlan.zhihu.com/p/24990222) +* 48、[NSString为用Copy和Strong有什么区别]() +* 49、[isKindOf和isMemberOf的区别,底层实现](https://www.jianshu.com/p/abad3809c7c1) +* 50、[多线程-现有10个上传任务,最大并发数是3,每完成一个任务要告诉用户此时剩余的任务数]() +* 51、[自己实现isEqual方法(hash算法](https://www.jianshu.com/p/915356e280fc) +* 52、[透彻理解block中weakSelf和strongSelf](https://www.jianshu.com/p/ae4f84e289b9) +* 53、[ios实现读写锁](https://blog.csdn.net/u014600626/article/details/102884794) +* 54、[UIView Animation的Block谁持有](http://saitjr.com/ios/ios-from-memory-leak-to-uiview-animation.html) +* 55、[watchdog 机制](https://juejin.cn/post/6844903683021340679) +* 56、[什么是依赖注入?](https://www.jianshu.com/p/0d72a945f2dd) +* 57、[ARC的原理,引用计数是怎么管理的,weak 关键字的原理](https://www.jianshu.com/p/e3690f3e4675) +* 58、[autoReleasePool的原理 autoReleasePool 的哨兵、自己创建的 @autoReleasePool是怎样运行的,什么对象是autoRelease的](https://www.jianshu.com/p/77eb9e0bcd70) +* 59、[RunLoop与AutoReleasepool的关系学习](https://www.jianshu.com/p/ae8a310457d7) +* 60、[子线程默认不会开启 Runloop,那出现 Autorelease 对象如何处理?不手动处 理会内存泄漏吗?](https://zhuanlan.zhihu.com/p/26796146) +* 61、[Atomic为什么不安全,怎么实现一个安全的存取](https://www.jianshu.com/p/f7411c90a68a)、[iOS中如何设计多线程的读写安全](https://tech.souyunku.com/?p=31631) +* 62、[什么是@synchronized](https://blog.csdn.net/qq_28551705/article/details/86094764) +* 63、[线程和进程的区别](https://www.jianshu.com/p/68b274548069) +* 64、[对于大图片加载引起的oom问题,怎么处理](https://www.jianshu.com/p/52e3535dd37c) +* 65、[Crash堆栈和符号的对应解析符号化](https://www.jianshu.com/p/29051908c74b) +* 66、[IPA包签名原理](https://juejin.cn/post/6844903744233013262) +* 67、[load的详细过程](https://blog.csdn.net/Lea__DongYang/article/details/79702537) +* 68、[卡顿监测原理](https://www.jianshu.com/p/8123fc17fe0e) +* 69、[组件化过程中的坑](https://www.jianshu.com/p/a869650dd3b6) +* 70、[Mach-O文件](https://www.jianshu.com/p/7c87e115492d)、[深入iOS系统底层之程序映像](https://www.jianshu.com/p/3b83193ff851) +* 71、[深入理解Tagged Pointer](https://www.jianshu.com/p/c9089494fb6c) +* 72、[iOS 的渲染机制以及 UIView 的自动布局流程](https://www.dazhuanlan.com/2020/01/31/5e33cdfb28a2a/) +* 73、[MD5(哈希/摘要算法)、AES和DES(对称加密)、RSA(非对称加密)](https://blog.csdn.net/seoyundu/article/details/88112861) +* 74、[pod install和pod update的区别](https://blog.csdn.net/jhope/article/details/81535586) +* 75、[跨平台框架原理]() +* 76、[NSString的内部原理、taggedPointString](https://www.jianshu.com/p/627815e1996b) +* 77、[Mian函数启动前的流程,是谁加载的动态库(dyld),runtime在何时加载](https://www.jianshu.com/p/5efe327ac7ea) +* 78、[解释一下段⻚式的内存管理,段⻚式虚拟内存的含义是什么,怎么进行换⻚](https://blog.csdn.net/low5252/article/details/106075945) +* 79、[KVO存在哪些⻛险](https://www.cnblogs.com/wengzilin/p/4346775.html) +* 80、[大批量数据写入数据库怎么做](分表并发写入) +* 81、[从点击屏幕开始,runloop怎么进行工作的](https://www.colabug.com/2017/1225/2102566/) +* 82、[编译过程](https://blog.csdn.net/vincentiss/article/details/54617915) +* 83、[MVVM、MVC、MVP的区别]() +* 84、[iOS内存管理(MRC、ARC)深入浅出](https://www.jianshu.com/p/4f49c5c81021) +* 85、[APNS](https://www.jianshu.com/p/032bfc949917) +* 86、[AFN的二次封装]() +* 87、[聊聊CoreData、FMDB](https://www.jianshu.com/p/5a085a4fe2d7) +* 88、[多线程相关](https://www.cnblogs.com/orang123/p/12434774.html) +* 89、[http的header有什么字段?](https://blog.csdn.net/u013252047/article/details/80116742) +* 90、[TimeProfile的详细使用]() +* 91、[卡顿的形成原因?什么是离屏渲染?]() +* 92、[Rac、SDWebImage、YYKit、AFN的原理]() +* 93、[Js与na交互的原理]() +* 94、[设计一个下载/断点续传框架]() +* 95、[NSCopy/NSCoder](https://blog.csdn.net/u014205968/article/details/78260402) +* 96、[进程间通信的几种方式](https://www.jianshu.com/p/c60f4f3cc3d2) +* 97、[引用计数为0时,内存会立即释放吗?内存是什么时候释放的?]() +* 98、[iOS 底层 - dealloc 的底层实现](https://www.jianshu.com/p/5aee2e571f6b) +* 99、[git merge/rebase](https://blog.csdn.net/kuangdacaikuang/article/details/79619828) +* 100、[响应链的应用]() +* 101、[GCD Block会捕获self吗?]() +* 102、[Bounds和Frame的区别,改变Frame的Size会改变Bounds的size吗](https://blog.csdn.net/weixin_33920401/article/details/88027725) +* 103、[Swift和OC的区别?类和结构体的区别?]() +* 104、[pod install和pod pdate的区别](https://blog.csdn.net/u013538542/article/details/107932186) +* 105、[哈希冲突问题的解决办法]() + + +### 网络 + +* 1、[http1.0->1.1->2.2->3区别](https://www.cnblogs.com/riwang/p/12370785.html) +* 2、[HTTP1.1身份认证-摘要认证](https://blog.csdn.net/zhongshanxian/article/details/81294829) +* 3、[聊聊DNS劫持](https://www.jianshu.com/p/63a94cb46cd2) +* 4、[如何保障客户端与服务器交互中的数据安全](https://netsecurity.51cto.com/art/202002/610473.htm) +* 5、[iOS面试备战-网络篇](https://juejin.im/post/6844904202523639822#comment) +* 6、[在浏览器输入url后发生了什么](https://www.jianshu.com/p/7eea6fbc5fcd) +* 7、[TCP三次握手、四次挥手、https加密原理](https://www.cnblogs.com/imstudy/p/10669631.html) +* 8、[为什么TCP4次挥手时等待为2MSL?](https://www.zhihu.com/question/67013338) +* 9、[DNS的搜索过程](https://juejin.cn/post/6884183177926033416) +* 10、[tcp,为什么4次断开,tcp的拥塞机制,为什么这么设计]() +* 11、[TCP/UDP](https://juejin.cn/post/6844903889146216456) +* 12、[图解 | 什么是HTTP简史](https://mp.weixin.qq.com/s/LV3cFpQtMUntMg6zn-01pQ) +* 13、[Charles抓包原理](https://www.jianshu.com/p/f6f6a21e17c0) +* 14、[DNS的查找过程,什么是DNS劫持](https://juejin.cn/post/6884183177926033416) +* 15、[Get和Post](https://juejin.cn/post/6844904004707696648) +* 16、[http的响应状态码](https://juejin.cn/post/6844903940832641037) +* 17、[https抓包过程](https://www.jianshu.com/p/7a88617ce80b) + +### 算法 + +* 1、[最大子序和](https://leetcode-cn.com/problems/maximum-subarray/) +* 2、[最大子矩阵](https://leetcode-cn.com/problems/max-submatrix-lcci/) +* 3、[乘积最大子数组](https://leetcode-cn.com/problems/maximum-product-subarray/) +* 4、[爬楼梯]() +* 5、[快速排序]() +* 6、[整数反转]() +* 7、[链表反转]() +* 8、[链表是否循环]() +* 9、[两个有序数组合并]() +* 10、[删除链表的倒数第N个节点](https://leetcode-cn.com/problems/lian-biao-zhong-dao-shu-di-kge-jie-dian-lcof/) +* 11、[一个纯数字的字符串,调整顺序使之奇偶排列 “17485” ———>”14785 “]() +* 12、[实现一个LRU算法 不使用数组]() +* 13、[两个view的第一个公共父视图]() +* 14、[两个有序数组的中位数](https://leetcode-cn.com/problems/median-of-two-sorted-arrays/) +* 15、[字符串的全排列](https://leetcode-cn.com/problems/zi-fu-chuan-de-pai-lie-lcof//) +* 16、[二叉树的层级打印 计算层高](https://leetcode-cn.com/problems/cong-shang-dao-xia-da-yin-er-cha-shu-lcof/) +* 17、[用字符串实现大数加法]() +* 18、[二叉树 红黑树 二叉树的应用,以及数据库的数据结构以及优化]() +* 19、[找出无序数组中所有3个数字加起来是0 的数字(先排序,再双指针)]() +* 20、[最长回文子串]() +* 21、[找出无序数组中所有3个数字加起来是0 的数字]() +* 22、[8000W个字符串,每个长度在100以内,要求找到频率最高的前1000个](https://leetcode-cn.com/problems/top-k-frequent-elements) +* 23、[利用栈结构实现队列结构](https://www.cnblogs.com/lisen10/p/10892546.html) +* 24、[验证是否是对称二叉树](https://leetcode-cn.com/problems/dui-cheng-de-er-cha-shu-lcof/) +* 25、[统计所有小于非负整数 n 的质数的数量](https://leetcode-cn.com/problems/count-primes/) +* 26、[硬币。给定数量不限的硬币,币值为25分、10分、5分和1分,编写代码计算n分有几种表示法。](https://leetcode-cn.com/problems/coin-lcci/) diff --git "a/iOS_Tips/DarkMode/WorkIssues/\351\253\230\350\264\250\351\207\217\346\212\200\346\234\257\345\215\232\345\256\242.md" "b/iOS_Tips/DarkMode/WorkIssues/\351\253\230\350\264\250\351\207\217\346\212\200\346\234\257\345\215\232\345\256\242.md" new file mode 100644 index 00000000..b20f8a19 --- /dev/null +++ "b/iOS_Tips/DarkMode/WorkIssues/\351\253\230\350\264\250\351\207\217\346\212\200\346\234\257\345\215\232\345\256\242.md" @@ -0,0 +1,128 @@ + +## 高质量技术博客 + +* 1、[WeRead团队博客](https://wereadteam.github.io/) +* 2、[美团技术团队](https://tech.meituan.com/) +* 3、[Lyman's Blog](http://www.lymanli.com) +* 4、[sunnyxx孙源](http://blog.sunnyxx.com) +* 5、[波儿菜](https://www.jianshu.com/u/a89bf7b8bdd8) +* 6、[张不坏的博客](https://zhangbuhuai.com) +* 7、[微博@iOS程序犭袁](https://github.com/ChenYilong) +* 8、[小东邪](https://juejin.im/user/58ec343861ff4b00691b4f26) +* 9、[onevcat](https://onevcat.com/#blog) +* 10、[戴铭](https://www.jianshu.com/u/9a4903d7e3d1) +* 11、[casatwy](https://casatwy.com) +* 12、[bang](http://blog.cnbang.net) +* 13、[杭州小刘](https://github.com/FantasticLBP/knowledge-kit/blob/master/SUMMARY.md) +* 14、[收納箱](https://juejin.im/user/5ea7963b5188256da0323498) +* 15、[齐舞647](https://juejin.im/user/5979852b5188253df6575210/posts) +* 16、[性能优化](https://github.com/skyming/iOS-Performance-Optimization) +* 17、[阿里、字节 一套高效的iOS面试题解答](https://github.com/colourful987/bytedance-alibaba-interview) +* 18、[面试题、基础知识点](https://github.com/liberalisman/iOS-InterviewQuestion-collection) +* 19、[音视频笔记-雷霄骅](https://blog.csdn.net/leixiaohua1020) +* 20、[乐少joy0304](https://github.com/joy0304/Joy-Blog) +* 21、[maniac_kk](https://juejin.im/user/5aaf755cf265da23870ea3cf/posts) +* 22、[阿里巴巴淘系技术](https://juejin.im/user/5e8558f3518825738f2b1327) +* 23、[欧阳大哥2013](https://juejin.im/user/593fb40eda2f6000673bdc61) +* 24、[Wangkai](https://juejin.im/user/5bf20f696fb9a049fb4340b0) +* 25、[maniac_kk](https://juejin.im/user/5aaf755cf265da23870ea3cf/posts) +* 27、[汇总各大互联网公司容易考察的高频leetcode题🔥](https://github.com/afatcoder/LeetcodeTop) +* 28、[玉令天下-杨萧玉](http://yulingtianxia.com) +* 29、[唐巧](http://blog.devtang.com) +* 30、[Lision](https://juejin.im/user/2189882891443278) +* 31、[小鱼周凌宇](https://juejin.im/post/6844903616696844302) +* 32、[satanwoo](http://satanwoo.github.io/) +* 33、[景铭巴巴](https://www.jianshu.com/u/c3c893a27097) +* 34、[punmy](https://punmy.cn/) +* 35、[LearnOpengl](https://learnopengl-cn.github.io) +* 36、[everettjf](https://everettjf.github.io/) +* 37、[HybridPageKit](https://dequan1331.github.io/index.html) +* 38、[纳兰若水](https://www.xuyanlan.com/archives/) +* 39、[知识小集](https://juejin.im/user/1327865776308782) +* 40、[Cyandev](https://juejin.im/user/3298190611199415) +* 41、[RickeyBoy](https://juejin.im/user/2928754706626136) +* 42、[落影loyinglin](https://github.com/loyinglin) +* 43、[阿毛的蛋疼地](https://xiangwangfeng.com/) +* 44、[与佳期](gonghonglou.com) +* 45、[RoyCao](https://juejin.im/user/4019470241649550) +* 46、[gocy](https://blog.gocy.tech/) +* 47、[戴铭的博客](https://ming1016.github.io) +* 48、[iDog的精神时光屋](https://bigporo.github.io) +* 49、[Draveness](https://draveness.me/) +* 50、[NewPan](https://juejin.im/user/2506542239987454) +* 51、[没故事的卓同学 ](https://juejin.im/user/1926000099460664) +* 52、[薛定諤](https://juejin.im/user/325111170210045) +* 53、[Mr_Coder](https://juejin.im/user/3544481220795998) +* 54、[冬瓜逛逼乎](https://www.zhihu.com/people/desgard-duan) +* 55、[bestswifter](https://github.com/bestswifter) +* 56、[SilverFruity](https://silverfruity.github.io/) +* 57、[孤单的衬衣](https://juejin.im/user/2735240661962638) +* 58、[ShannonChenCHN](https://github.com/ShannonChenCHN) +* 59、[木子Lision](https://github.com/Lision) +* 60、[letqingbin](https://github.com/letqingbin) +* 61、[CainCamera](https://github.com/CainKernel/blog) +* 62、[行走少年郎](https://juejin.im/user/2488950054725101/posts) +* 63、[翻译、开发心得或学习笔记](https://github.com/nixzhu/dev-blog) +* 64、[778477](https://778477.github.io) +* 65、[ibireme-YYKit作者](https://blog.ibireme.com) +* 66、[mcuking](https://github.com/mcuking/blog) +* 67、[冬瓜争做全栈瓜](https://www.desgard.com) +* 68、[iOS一叶](https://juejin.im/user/1899557248829438) +* 69、[土土Edmond木](https://looseyi.github.io) +* 70、[iOSer逆向](https://iosre.com) +* 71、[GoldHouse-for-iOS](https://github.com/BiBoyang/GoldHouse-for-iOS) +* 72、[折腾范儿の味精](http://awhisper.github.io) +* 73、[zhangferry](https://juejin.im/user/2242659450368119) +* 74、[酷酷的哀殿](https://ai-chan.top/) +* 75、[陈满iOS](https://juejin.cn/user/3245414055161870) +* 76、[黑超熊猫zuik](https://juejin.cn/user/2594503170727399) +* 77、[卖萌凉](https://www.jianshu.com/u/5e309e5486c6) +* 78、[有赞技术团队](https://tech.youzan.com) +* 79、[Lewis](https://juejin.cn/user/3913917125896477) +* 80、[无夜之星辰 ](https://www.jianshu.com/u/4212f351f6b5) + + +## 高质量微信公众号 + +* 1、[一瓜技术](公众号:tech_gua) +* 2、[奔跑的程序猿iOSer](公众号:iOS2679114653) +* 3、[知识小集](公众号:zsxjtip) +* 4、[小浩算法](公众号:xuesuanfa) +* 5、[素燕](公众号:gh_a97f4df5b7b9) +* 6、[iOSTips](公众号:iostips) +* 7、[字节流动](公众号:google_developer) +* 8、[有赞coder](公众号:youzan_coder) +* 9、[58技术](公众号:architects_58) +* 10、[音视频开发进阶](公众号:glumes_blog) +* 11、[五分钟学算法](公众号:CXYxiaowu) +* 12、[iOS成长之路](公众号:gh_fa77b2df3538) +* 13、[京东零售技术](公众号:jd-sys) +* 14、[携程技术](公众号:ctriptech) +* 15、[字节跳动技术团队](公众号:toutiaotechblog) +* 16、[老司机技术周报](公众号:LSJCoding) +* 17、[淘系技术](公众号:AlibabaMTT) +* 18、[我是程序员小贱](公众号:Lanj1995Q) +* 19、[腾讯技术工程](公众号:Tencent_TEG) +* 20、[搜狐技术产品](公众号:sohu-tech) +* 21、[百度APP技术](公众号:gh_59f5931152fe) + +## 书籍 + +* 1、[iOS全埋点解决方案-神策数据](电子书) +* 2、[跟戴铭学iOS编程:理顺核心知识点 - 戴铭](电子书) +* 3、[程序员的自我修养:链接、装载与库](电子书) +* 4、[iOS动画学习手册2.0](电子书) +* 5、[Objective-C高级编程 iOS与OS X多线程和内存管理](电子书) +* 6、[App架构师实践指南](电子书) +* 7、[OpenGL ES 3.0编程指南 ](电子书) +* 8、[音视频开发进阶指南:基于Android与iOS平台的实践 ](电子书) +* 9、[AVFoundation开发秘籍 ](电子书) +* 10、[计算机网络 ](电子书) +* 11、[计算机操作系统 ](电子书) +* 12、[数据结构与算法 ](电子书) +* 13、[编译原理 ](电子书) + +## 找工作内推 + +* [2020:iOS 靠谱内推专题](https://www.yuque.com/iosalliance/article/bhutav) +* [谁在招人?](https://github.com/ruanyf/weekly/issues/1315) diff --git a/iOS_Tips/Podfile b/iOS_Tips/Podfile index b30ba260..75bcda8a 100644 --- a/iOS_Tips/Podfile +++ b/iOS_Tips/Podfile @@ -1,6 +1,8 @@ source 'https://github.com/CocoaPods/Specs.git' +#source 'https://gitee.com/mirrors/CocoaPods-Specs.git' platform :ios,’10.0’ target "DarkMode" do + pod 'GPUImage' #pod 'MLeaksFinder' pod 'MBProgressHUD' @@ -8,4 +10,6 @@ pod 'Masonry' pod 'YYImage' pod 'YYWebImage' pod 'YYModel' +pod 'YYModel' +pod 'MJRefresh' end diff --git a/iOS_Tips/Podfile.lock b/iOS_Tips/Podfile.lock deleted file mode 100644 index 3be33660..00000000 --- a/iOS_Tips/Podfile.lock +++ /dev/null @@ -1,43 +0,0 @@ -PODS: - - GPUImage (0.1.7) - - Masonry (1.1.0) - - MBProgressHUD (1.1.0) - - YYCache (1.0.4) - - YYImage (1.0.4): - - YYImage/Core (= 1.0.4) - - YYImage/Core (1.0.4) - - YYModel (1.0.4) - - YYWebImage (1.0.5): - - YYCache - - YYImage - -DEPENDENCIES: - - GPUImage - - Masonry - - MBProgressHUD - - YYImage - - YYModel - - YYWebImage - -SPEC REPOS: - https://github.com/CocoaPods/Specs.git: - - GPUImage - - Masonry - - MBProgressHUD - - YYCache - - YYImage - - YYModel - - YYWebImage - -SPEC CHECKSUMS: - GPUImage: 733a5f0fab92df9de1c37ba9df520a833ccb406d - Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 - MBProgressHUD: e7baa36a220447d8aeb12769bf0585582f3866d9 - YYCache: 8105b6638f5e849296c71f331ff83891a4942952 - YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54 - YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30 - YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928 - -PODFILE CHECKSUM: b400933f5b26aee061a3055185a9866897951c9e - -COCOAPODS: 1.9.1 diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Associations/FBAssociationManager.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Associations/FBAssociationManager.h deleted file mode 100644 index d2b91335..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Associations/FBAssociationManager.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -/** - FBAssociationManager is a tracker of object associations. For given object it can return all objects that - are being retained by this object with objc_setAssociatedObject & retain policy. - */ -@interface FBAssociationManager : NSObject - -/** - Start tracking associations. It will use fishhook to swizzle C methods: - objc_(set/remove)AssociatedObject and inject some tracker code. - */ -+ (void)hook; - -/** - Stop tracking associations, fishhooks. - */ -+ (void)unhook; - -/** - For given object return all objects that are retained by it using associated objects. - - @return NSArray of objects associated with given object - */ -+ (nullable NSArray *)associationsForObject:(nullable id)object; - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Associations/FBAssociationManager.mm b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Associations/FBAssociationManager.mm deleted file mode 100644 index c0e0e402..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Associations/FBAssociationManager.mm +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#if __has_feature(objc_arc) -#error This file must be compiled with MRR. Use -fno-objc-arc flag. -#endif - -#import -#import -#import -#import -#import -#import -#import - -#import "FBAssociationManager+Internal.h" -#import "FBRetainCycleDetector.h" - -#import "fishhook.h" - -#if _INTERNAL_RCD_ENABLED - -namespace FB { namespace AssociationManager { - using ObjectAssociationSet = std::unordered_set; - using AssociationMap = std::unordered_map; - - static auto _associationMap = new AssociationMap(); - static auto _associationMutex = new std::mutex; - - static std::mutex *hookMutex(new std::mutex); - static bool hookTaken = false; - - void _threadUnsafeResetAssociationAtKey(id object, void *key) { - auto i = _associationMap->find(object); - - if (i == _associationMap->end()) { - return; - } - - auto *refs = i->second; - auto j = refs->find(key); - if (j != refs->end()) { - refs->erase(j); - } - } - - void _threadUnsafeSetStrongAssociation(id object, void *key, id value) { - if (value) { - auto i = _associationMap->find(object); - ObjectAssociationSet *refs; - if (i != _associationMap->end()) { - refs = i->second; - } else { - refs = new ObjectAssociationSet; - (*_associationMap)[object] = refs; - } - refs->insert(key); - } else { - _threadUnsafeResetAssociationAtKey(object, key); - } - } - - void _threadUnsafeRemoveAssociations(id object) { - if (_associationMap->size() == 0 ){ - return; - } - - auto i = _associationMap->find(object); - if (i == _associationMap->end()) { - return; - } - - auto *refs = i->second; - delete refs; - _associationMap->erase(i); - } - - NSArray *associations(id object) { - std::lock_guard l(*_associationMutex); - if (_associationMap->size() == 0 ){ - return nil; - } - - auto i = _associationMap->find(object); - if (i == _associationMap->end()) { - return nil; - } - - auto *refs = i->second; - - NSMutableArray *array = [NSMutableArray array]; - for (auto &key: *refs) { - id value = objc_getAssociatedObject(object, key); - if (value) { - [array addObject:value]; - } - } - - return array; - } - - static void (*fb_orig_objc_setAssociatedObject)(id object, void *key, id value, objc_AssociationPolicy policy); - static void (*fb_orig_objc_removeAssociatedObjects)(id object); - - static void fb_objc_setAssociatedObject(id object, void *key, id value, objc_AssociationPolicy policy) { - { - std::lock_guard l(*_associationMutex); - // Track strong references only - if (policy == OBJC_ASSOCIATION_RETAIN || - policy == OBJC_ASSOCIATION_RETAIN_NONATOMIC) { - _threadUnsafeSetStrongAssociation(object, key, value); - } else { - // We can change the policy, we need to clear out the key - _threadUnsafeResetAssociationAtKey(object, key); - } - } - - /** - We are doing that behind the lock. Otherwise it could deadlock. - The reason for that is when objc calls up _object_set_associative_reference, when we nil out - a reference for some object, it will also release this value, which could cause it to dealloc. - This is done inside _object_set_associative_reference without lock. Otherwise it would deadlock, - since the object that is released, could also clean up some associated objects. - - If we would keep a lock during that, we would fall for that deadlock. - - Unfortunately this also means the association manager can be not a 100% accurate, since there - can technically be a race condition between setting values on the same object and same key from - different threads. (One thread sets value, other nil, we are missing this value) - */ - fb_orig_objc_setAssociatedObject(object, key, value, policy); - } - - static void fb_objc_removeAssociatedObjects(id object) { - { - std::lock_guard l(*_associationMutex); - _threadUnsafeRemoveAssociations(object); - } - - fb_orig_objc_removeAssociatedObjects(object); - } - - static void cleanUp() { - std::lock_guard l(*_associationMutex); - _associationMap->clear(); - } - -} } - -#endif - -@implementation FBAssociationManager - -+ (void)hook -{ -#if _INTERNAL_RCD_ENABLED - std::lock_guard l(*FB::AssociationManager::hookMutex); - rcd_rebind_symbols((struct rcd_rebinding[2]){ - { - "objc_setAssociatedObject", - (void *)FB::AssociationManager::fb_objc_setAssociatedObject, - (void **)&FB::AssociationManager::fb_orig_objc_setAssociatedObject - }, - { - "objc_removeAssociatedObjects", - (void *)FB::AssociationManager::fb_objc_removeAssociatedObjects, - (void **)&FB::AssociationManager::fb_orig_objc_removeAssociatedObjects - }}, 2); - FB::AssociationManager::hookTaken = true; -#endif //_INTERNAL_RCD_ENABLED -} - -+ (void)unhook -{ -#if _INTERNAL_RCD_ENABLED - std::lock_guard l(*FB::AssociationManager::hookMutex); - if (FB::AssociationManager::hookTaken) { - rcd_rebind_symbols((struct rcd_rebinding[2]){ - { - "objc_setAssociatedObject", - (void *)FB::AssociationManager::fb_orig_objc_setAssociatedObject, - }, - { - "objc_removeAssociatedObjects", - (void *)FB::AssociationManager::fb_orig_objc_removeAssociatedObjects, - }}, 2); - FB::AssociationManager::cleanUp(); - } -#endif //_INTERNAL_RCD_ENABLED -} - -+ (NSArray *)associationsForObject:(id)object -{ -#if _INTERNAL_RCD_ENABLED - return FB::AssociationManager::associations(object); -#else - return nil; -#endif //_INTERNAL_RCD_ENABLED -} - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Associations/Internal/FBAssociationManager+Internal.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Associations/Internal/FBAssociationManager+Internal.h deleted file mode 100644 index 220be959..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Associations/Internal/FBAssociationManager+Internal.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBAssociationManager.h" -#import "FBRetainCycleDetector.h" - -#if _INTERNAL_RCD_ENABLED - -namespace FB { namespace AssociationManager { - - void _threadUnsafeResetAssociationAtKey(id object, void *key); - void _threadUnsafeSetStrongAssociation(id object, void *key, id value); - void _threadUnsafeRemoveAssociations(id object); - - NSArray *associations(id object); - -} } - -#endif diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBNodeEnumerator.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBNodeEnumerator.h deleted file mode 100644 index ecf15478..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBNodeEnumerator.h +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -@class FBObjectiveCGraphElement; - -/** - FBNodeEnumerator wraps any object graph element (FBObjectiveCGraphElement) and lets you enumerate over its - retained references - */ -@interface FBNodeEnumerator : NSEnumerator - -/** - Designated initializer - */ -- (nonnull instancetype)initWithObject:(nonnull FBObjectiveCGraphElement *)object; - -- (nullable FBNodeEnumerator *)nextObject; - -@property (nonatomic, strong, readonly, nonnull) FBObjectiveCGraphElement *object; - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBNodeEnumerator.mm b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBNodeEnumerator.mm deleted file mode 100644 index de38173e..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBNodeEnumerator.mm +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBNodeEnumerator.h" - -#import "FBObjectiveCGraphElement.h" - -@implementation FBNodeEnumerator -{ - NSSet *_retainedObjectsSnapshot; - NSEnumerator *_enumerator; -} - -- (instancetype)initWithObject:(FBObjectiveCGraphElement *)object -{ - if (self = [super init]) { - _object = object; - } - - return self; -} - -- (FBNodeEnumerator *)nextObject -{ - if (!_object) { - return nil; - } else if (!_retainedObjectsSnapshot) { - _retainedObjectsSnapshot = [_object allRetainedObjects]; - _enumerator = [_retainedObjectsSnapshot objectEnumerator]; - } - - FBObjectiveCGraphElement *next = [_enumerator nextObject]; - - if (next) { - return [[FBNodeEnumerator alloc] initWithObject:next]; - } - - return nil; -} - -- (BOOL)isEqual:(id)object -{ - if ([object isKindOfClass:[FBNodeEnumerator class]]) { - FBNodeEnumerator *enumerator = (FBNodeEnumerator *)object; - return [self.object isEqual:enumerator.object]; - } - - return NO; -} - -- (NSUInteger)hash -{ - return [self.object hash]; -} - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBRetainCycleDetector+Internal.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBRetainCycleDetector+Internal.h deleted file mode 100644 index 62c21f7f..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBRetainCycleDetector+Internal.h +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBRetainCycleDetector.h" - -@interface FBRetainCycleDetector () - -// Unit tests -- (NSArray *)_shiftToUnifiedCycle:(NSArray *)array; - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBRetainCycleDetector.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBRetainCycleDetector.h deleted file mode 100644 index f86992c0..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBRetainCycleDetector.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -//! Project version number for FBRetainCycleDetector. -FOUNDATION_EXPORT double FBRetainCycleDetectorVersionNumber; - -//! Project version string for FBRetainCycleDetector. -FOUNDATION_EXPORT const unsigned char FBRetainCycleDetectorVersionString[]; - -#import "FBAssociationManager.h" -#import "FBObjectiveCBlock.h" -#import "FBObjectiveCGraphElement.h" -#import "FBObjectiveCNSCFTimer.h" -#import "FBObjectiveCObject.h" -#import "FBObjectGraphConfiguration.h" -#import "FBStandardGraphEdgeFilters.h" - -/** - Retain Cycle Detector is enabled by default in DEBUG builds, but you can also force it in other builds by - uncommenting the line below. Beware, Retain Cycle Detector uses some private APIs that shouldn't be compiled in - production builds. - */ -//#define RETAIN_CYCLE_DETECTOR_ENABLED 1 - -/** - FBRetainCycleDetector - - The main class responsible for detecting retain cycles. - - Be cautious, the class is NOT thread safe. - - The process of detecting retain cycles is relatively slow and consumes a lot of CPU. - */ - -@interface FBRetainCycleDetector : NSObject - -/** - Designated initializer - - @param configuration Configuration for detector. Can include specific filters and options. - @see FBRetainCycleDetectorConfiguration - */ -- (nonnull instancetype)initWithConfiguration:(nonnull FBObjectGraphConfiguration *)configuration NS_DESIGNATED_INITIALIZER; - -/** - Adds candidate you are interested in getting retain cycles from. - - @param candidate Any Objective-C object you want to verify for cycles. - */ -- (void)addCandidate:(nonnull id)candidate; - -/** - Searches for all retain cycles for all candidates the detector has been - provided with. - - @return NSSet with retain cycles. An element of this array will be - an array representing retain cycle. That array will hold elements - of type FBObjectiveCGraphElement. - - @discussion For given candidate, the detector will go through all object graph rooted in this candidate and return - ALL retain cycles that this candidate references. It will also take care of removing duplicates. It will not look for - cycles longer than 10 elements. If you want to look for longer ones use findRetainCyclesWithMaxCycleLenght: - */ -- (nonnull NSSet *> *)findRetainCycles; - -- (nonnull NSSet *> *)findRetainCyclesWithMaxCycleLength:(NSUInteger)length; - -/** - This macro is used across FBRetainCycleDetector to compile out sensitive code. - If you do not define it anywhere, Retain Cycle Detector will be available in DEBUG builds. - */ -#ifdef RETAIN_CYCLE_DETECTOR_ENABLED -#define _INTERNAL_RCD_ENABLED RETAIN_CYCLE_DETECTOR_ENABLED -#else -#define _INTERNAL_RCD_ENABLED DEBUG -#endif - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBRetainCycleDetector.mm b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBRetainCycleDetector.mm deleted file mode 100644 index b3409434..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBRetainCycleDetector.mm +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import -#import -#import - -#import "FBNodeEnumerator.h" -#import "FBObjectiveCGraphElement.h" -#import "FBObjectiveCObject.h" -#import "FBRetainCycleDetector+Internal.h" -#import "FBRetainCycleUtils.h" -#import "FBStandardGraphEdgeFilters.h" - -static const NSUInteger kFBRetainCycleDetectorDefaultStackDepth = 10; - -@implementation FBRetainCycleDetector -{ - NSMutableArray *_candidates; - FBObjectGraphConfiguration *_configuration; - NSMutableSet *_objectSet; -} - -- (instancetype)initWithConfiguration:(FBObjectGraphConfiguration *)configuration -{ - if (self = [super init]) { - _configuration = configuration; - _candidates = [NSMutableArray new]; - _objectSet = [NSMutableSet new]; - } - - return self; -} - -- (instancetype)init -{ - return [self initWithConfiguration: - [[FBObjectGraphConfiguration alloc] initWithFilterBlocks:FBGetStandardGraphEdgeFilters() - shouldInspectTimers:YES]]; -} - -- (void)addCandidate:(id)candidate -{ - FBObjectiveCGraphElement *graphElement = FBWrapObjectGraphElement(nil, candidate, _configuration); - if (graphElement) { - [_candidates addObject:graphElement]; - } -} - -- (NSSet *> *)findRetainCycles -{ - return [self findRetainCyclesWithMaxCycleLength:kFBRetainCycleDetectorDefaultStackDepth]; -} - -- (NSSet *> *)findRetainCyclesWithMaxCycleLength:(NSUInteger)length -{ - NSMutableSet *> *allRetainCycles = [NSMutableSet new]; - for (FBObjectiveCGraphElement *graphElement in _candidates) { - NSSet *> *retainCycles = [self _findRetainCyclesInObject:graphElement - stackDepth:length]; - [allRetainCycles unionSet:retainCycles]; - } - [_candidates removeAllObjects]; - [_objectSet removeAllObjects]; - - // Filter cycles that have been broken down since we found them. - // These are false-positive that were picked-up and are transient cycles. - NSMutableSet *> *brokenCycles = [NSMutableSet set]; - for (NSArray *itemCycle in allRetainCycles) { - for (FBObjectiveCGraphElement *element in itemCycle) { - if (element.object == nil) { - // At least one element of the cycle has been removed, thus breaking - // the cycle. - [brokenCycles addObject:itemCycle]; - break; - } - } - } - [allRetainCycles minusSet:brokenCycles]; - - return allRetainCycles; -} - -- (NSSet *> *)_findRetainCyclesInObject:(FBObjectiveCGraphElement *)graphElement - stackDepth:(NSUInteger)stackDepth -{ - NSMutableSet *> *retainCycles = [NSMutableSet new]; - FBNodeEnumerator *wrappedObject = [[FBNodeEnumerator alloc] initWithObject:graphElement]; - - // We will be doing DFS over graph of objects - - // Stack will keep current path in the graph - NSMutableArray *stack = [NSMutableArray new]; - - // To make the search non-linear we will also keep - // a set of previously visited nodes. - NSMutableSet *objectsOnPath = [NSMutableSet new]; - - // Let's start with the root - [stack addObject:wrappedObject]; - - while ([stack count] > 0) { - // Algorithm creates many short-living objects. It can contribute to few - // hundred megabytes memory jumps if not handled correctly, therefore - // we're gonna drain the objects with our autoreleasepool. - @autoreleasepool { - // Take topmost node in stack and mark it as visited - FBNodeEnumerator *top = [stack lastObject]; - - // We don't want to retraverse the same subtree - if (![objectsOnPath containsObject:top]) { - if ([_objectSet containsObject:@([top.object objectAddress])]) { - [stack removeLastObject]; - continue; - } - // Add the object address to the set as an NSNumber to avoid - // unnecessarily retaining the object - [_objectSet addObject:@([top.object objectAddress])]; - } - - [objectsOnPath addObject:top]; - - // Take next adjecent node to that child. Wrapper object can - // persist iteration state. If we see that node again, it will - // give us new adjacent node unless it runs out of them - FBNodeEnumerator *firstAdjacent = [top nextObject]; - if (firstAdjacent) { - // Current node still has some adjacent not-visited nodes - - BOOL shouldPushToStack = NO; - - // Check if child was already seen in that path - if ([objectsOnPath containsObject:firstAdjacent]) { - // We have caught a retain cycle - - // Ignore the first element which is equal to firstAdjacent, use firstAdjacent - // we're doing that because firstAdjacent has set all contexts, while its - // first occurence could be a root without any context - NSUInteger index = [stack indexOfObject:firstAdjacent]; - NSInteger length = [stack count] - index; - - if (index == NSNotFound) { - // Object got deallocated between checking if it exists and grabbing its index - shouldPushToStack = YES; - } else { - NSRange cycleRange = NSMakeRange(index, length); - NSMutableArray *cycle = [[stack subarrayWithRange:cycleRange] mutableCopy]; - [cycle replaceObjectAtIndex:0 withObject:firstAdjacent]; - - // 1. Unwrap the cycle - // 2. Shift to lowest address (if we omit that, and the cycle is created by same class, - // we might have duplicates) - // 3. Shift by class (lexicographically) - - [retainCycles addObject:[self _shiftToUnifiedCycle:[self _unwrapCycle:cycle]]]; - } - } else { - // Node is clear to check, add it to stack and continue - shouldPushToStack = YES; - } - - if (shouldPushToStack) { - if ([stack count] < stackDepth) { - [stack addObject:firstAdjacent]; - } - } - } else { - // Node has no more adjacent nodes, it itself is done, move on - [stack removeLastObject]; - [objectsOnPath removeObject:top]; - } - } - } - return retainCycles; -} - -// Turn all enumerators into object graph elements -- (NSArray *)_unwrapCycle:(NSArray *)cycle -{ - NSMutableArray *unwrappedArray = [NSMutableArray new]; - for (FBNodeEnumerator *wrapped in cycle) { - [unwrappedArray addObject:wrapped.object]; - } - - return unwrappedArray; -} - -// We do that so two cycles can be recognized as duplicates -- (NSArray *)_shiftToUnifiedCycle:(NSArray *)array -{ - return [self _shiftToLowestLexicographically:[self _shiftBufferToLowestAddress:array]]; -} - -- (NSArray *)_extractClassNamesFromGraphObjects:(NSArray *)array -{ - NSMutableArray *arrayOfClassNames = [NSMutableArray new]; - - for (FBObjectiveCGraphElement *obj in array) { - [arrayOfClassNames addObject:[obj classNameOrNull]]; - } - - return arrayOfClassNames; -} - -/** - The problem this circular shift solves is when we have few retain cycles for different runs that - are technically the same cycle shifted. Object instances are different so if objects A and B - create cycle, but on one run the address of A is lower than B, and on second B is lower than A, - we will get a duplicate we have to get rid off. - - For that not to happen we use the circular shift that is smallest lexicographically when - looking at class names. - - The version of this algorithm is pretty inefficient. It just compares given shifts and - tries to find the smallest one. Doing something faster here is premature optimisation though - since the retain cycles are usually arrays of length not bigger than 10 and there is not a lot - of them (like 100 per run tops). - - If that ever occurs to be a problem for future reference use lexicographically minimal - string rotation algorithm variation. - */ -- (NSArray *)_shiftToLowestLexicographically:(NSArray *)array -{ - NSArray *arrayOfClassNames = [self _extractClassNamesFromGraphObjects:array]; - - NSArray *copiedArray = [arrayOfClassNames arrayByAddingObjectsFromArray:arrayOfClassNames]; - NSUInteger originalLength = [arrayOfClassNames count]; - - NSArray *currentMinimalArray = arrayOfClassNames; - NSUInteger minimumIndex = 0; - - for (NSUInteger i = 0; i < originalLength; ++i) { - NSArray *nextSubarray = [copiedArray subarrayWithRange:NSMakeRange(i, originalLength)]; - if ([self _compareStringArray:currentMinimalArray - withArray:nextSubarray] == NSOrderedDescending) { - currentMinimalArray = nextSubarray; - minimumIndex = i; - } - } - - NSRange minimumArrayRange = NSMakeRange(minimumIndex, - [array count] - minimumIndex); - NSMutableArray *minimumArray = [[array subarrayWithRange:minimumArrayRange] mutableCopy]; - [minimumArray addObjectsFromArray:[array subarrayWithRange:NSMakeRange(0, minimumIndex)]]; - return minimumArray; -} - -- (NSComparisonResult)_compareStringArray:(NSArray *)a1 - withArray:(NSArray *)a2 -{ - // a1 and a2 should be the same length - for (NSUInteger i = 0; i < [a1 count]; ++i) { - NSString *s1 = a1[i]; - NSString *s2 = a2[i]; - - NSComparisonResult comparision = [s1 compare:s2]; - if (comparision != NSOrderedSame) { - return comparision; - } - } - - return NSOrderedSame; -} - -- (NSArray *)_shiftBufferToLowestAddress:(NSArray *)cycle -{ - NSUInteger idx = 0, lowestAddressIndex = 0; - size_t lowestAddress = NSUIntegerMax; - for (FBObjectiveCGraphElement *obj in cycle) { - if ([obj objectAddress] < lowestAddress) { - lowestAddress = [obj objectAddress]; - lowestAddressIndex = idx; - } - - idx++; - } - - if (lowestAddressIndex == 0) { - return cycle; - } - - NSRange cycleRange = NSMakeRange(lowestAddressIndex, [cycle count] - lowestAddressIndex); - NSMutableArray *array = [[cycle subarrayWithRange:cycleRange] mutableCopy]; - [array addObjectsFromArray:[cycle subarrayWithRange:NSMakeRange(0, lowestAddressIndex)]]; - return array; -} - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/FBRetainCycleUtils.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/FBRetainCycleUtils.h deleted file mode 100644 index 763a7b25..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/FBRetainCycleUtils.h +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -@class FBObjectGraphConfiguration; -@class FBObjectiveCGraphElement; - -#ifdef __cplusplus -extern "C" { -#endif - -/** - Wrapper functions, for given object they will categorize it and create proper Graph Element subclass instance - for it. - */ -FBObjectiveCGraphElement *_Nullable FBWrapObjectGraphElementWithContext(FBObjectiveCGraphElement *_Nullable sourceElement, - id _Nullable object, - FBObjectGraphConfiguration *_Nullable configuration, - NSArray *_Nullable namePath); -FBObjectiveCGraphElement *_Nullable FBWrapObjectGraphElement(FBObjectiveCGraphElement *_Nullable sourceElement, - id _Nullable object, - FBObjectGraphConfiguration *_Nullable configuration); - -#ifdef __cplusplus -} -#endif diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/FBRetainCycleUtils.m b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/FBRetainCycleUtils.m deleted file mode 100644 index 959a1532..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/FBRetainCycleUtils.m +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBRetainCycleUtils.h" - -#import - -#import "FBBlockStrongLayout.h" -#import "FBClassStrongLayout.h" -#import "FBObjectiveCBlock.h" -#import "FBObjectiveCGraphElement.h" -#import "FBObjectiveCNSCFTimer.h" -#import "FBObjectiveCObject.h" -#import "FBObjectGraphConfiguration.h" - -static BOOL _ShouldBreakGraphEdge(FBObjectGraphConfiguration *configuration, - FBObjectiveCGraphElement *fromObject, - NSString *byIvar, - Class toObjectOfClass) { - for (FBGraphEdgeFilterBlock filterBlock in configuration.filterBlocks) { - if (filterBlock(fromObject, byIvar, toObjectOfClass) == FBGraphEdgeInvalid) { - return YES; - } - } - - return NO; -} - -FBObjectiveCGraphElement *FBWrapObjectGraphElementWithContext(FBObjectiveCGraphElement *sourceElement, - id object, - FBObjectGraphConfiguration *configuration, - NSArray *namePath) { - if (_ShouldBreakGraphEdge(configuration, sourceElement, [namePath firstObject], object_getClass(object))) { - return nil; - } - FBObjectiveCGraphElement *newElement; - if (FBObjectIsBlock((__bridge void *)object)) { - newElement = [[FBObjectiveCBlock alloc] initWithObject:object - configuration:configuration - namePath:namePath]; - } else { - if ([object_getClass(object) isSubclassOfClass:[NSTimer class]] && - configuration.shouldInspectTimers) { - newElement = [[FBObjectiveCNSCFTimer alloc] initWithObject:object - configuration:configuration - namePath:namePath]; - } else { - newElement = [[FBObjectiveCObject alloc] initWithObject:object - configuration:configuration - namePath:namePath]; - } - } - return (configuration && configuration.transformerBlock) ? configuration.transformerBlock(newElement) : newElement; -} - -FBObjectiveCGraphElement *FBWrapObjectGraphElement(FBObjectiveCGraphElement *sourceElement, - id object, - FBObjectGraphConfiguration *configuration) { - return FBWrapObjectGraphElementWithContext(sourceElement, object, configuration, nil); -} diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Filtering/FBStandardGraphEdgeFilters.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Filtering/FBStandardGraphEdgeFilters.h deleted file mode 100644 index 3773466e..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Filtering/FBStandardGraphEdgeFilters.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "FBObjectGraphConfiguration.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - Standard filters mostly filters excluding some UIKit references we have caught during testing on some apps. - */ -NSArray *_Nonnull FBGetStandardGraphEdgeFilters(); - -/** - Helper functions for some typical patterns. - */ -FBGraphEdgeFilterBlock _Nonnull FBFilterBlockWithObjectIvarRelation(Class _Nonnull aCls, - NSString *_Nonnull ivarName); -FBGraphEdgeFilterBlock _Nonnull FBFilterBlockWithObjectToManyIvarsRelation(Class _Nonnull aCls, - NSSet *_Nonnull ivarNames); -FBGraphEdgeFilterBlock _Nonnull FBFilterBlockWithObjectIvarObjectRelation(Class _Nonnull fromClass, - NSString *_Nonnull ivarName, - Class _Nonnull toClass); - -#ifdef __cplusplus -} -#endif diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Filtering/FBStandardGraphEdgeFilters.mm b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Filtering/FBStandardGraphEdgeFilters.mm deleted file mode 100644 index 0a88d907..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Filtering/FBStandardGraphEdgeFilters.mm +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBStandardGraphEdgeFilters.h" - -#import - -#import - -#import "FBObjectiveCGraphElement.h" -#import "FBRetainCycleDetector.h" - -FBGraphEdgeFilterBlock FBFilterBlockWithObjectIvarRelation(Class aCls, NSString *ivarName) { - return FBFilterBlockWithObjectToManyIvarsRelation(aCls, [NSSet setWithObject:ivarName]); -} - -FBGraphEdgeFilterBlock FBFilterBlockWithObjectToManyIvarsRelation(Class aCls, - NSSet *ivarNames) { - return ^(FBObjectiveCGraphElement *fromObject, - NSString *byIvar, - Class toObjectOfClass){ - if (aCls && - [[fromObject objectClass] isSubclassOfClass:aCls]) { - // If graph element holds metadata about an ivar, it will be held in the name path, as early as possible - if ([ivarNames containsObject:byIvar]) { - return FBGraphEdgeInvalid; - } - } - return FBGraphEdgeValid; - }; -} - -FBGraphEdgeFilterBlock FBFilterBlockWithObjectIvarObjectRelation(Class fromClass, NSString *ivarName, Class toClass) { - return ^(FBObjectiveCGraphElement *fromObject, - NSString *byIvar, - Class toObjectOfClass) { - if (toClass && - [toObjectOfClass isSubclassOfClass:toClass]) { - return FBFilterBlockWithObjectIvarRelation(fromClass, ivarName)(fromObject, byIvar, toObjectOfClass); - } - return FBGraphEdgeValid; - }; -} - -NSArray *FBGetStandardGraphEdgeFilters() { -#if _INTERNAL_RCD_ENABLED - static Class heldActionClass; - static Class transitionContextClass; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - heldActionClass = NSClassFromString(@"UIHeldAction"); - transitionContextClass = NSClassFromString(@"_UIViewControllerOneToOneTransitionContext"); - }); - - return @[FBFilterBlockWithObjectIvarRelation([UIView class], @"_subviewCache"), - FBFilterBlockWithObjectIvarRelation(heldActionClass, @"m_target"), - FBFilterBlockWithObjectToManyIvarsRelation([UITouch class], - [NSSet setWithArray:@[@"_view", - @"_gestureRecognizers", - @"_window", - @"_warpedIntoView"]]), - FBFilterBlockWithObjectToManyIvarsRelation(transitionContextClass, - [NSSet setWithArray:@[@"_toViewController", - @"_fromViewController"]])]; -#else - return nil; -#endif // _INTERNAL_RCD_ENABLED -} diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectGraphConfiguration.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectGraphConfiguration.h deleted file mode 100644 index 55eb87e8..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectGraphConfiguration.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "FBObjectiveCGraphElement.h" - -typedef NS_ENUM(NSUInteger, FBGraphEdgeType) { - FBGraphEdgeValid, - FBGraphEdgeInvalid, -}; - -@protocol FBObjectReference; - -/** - Every filter has to be of type FBGraphEdgeFilterBlock. Filter, given two object graph elements, it should decide, - whether a reference between them should be filtered out or not. - @see FBGetStandardGraphEdgeFilters() - */ -typedef FBGraphEdgeType (^FBGraphEdgeFilterBlock)(FBObjectiveCGraphElement *_Nullable fromObject, - NSString *_Nullable byIvar, - Class _Nullable toObjectOfClass); - -typedef FBObjectiveCGraphElement *_Nullable(^FBObjectiveCGraphElementTransformerBlock)(FBObjectiveCGraphElement *_Nonnull fromObject); - -/** - FBObjectGraphConfiguration represents a configuration for object graph walking. - It can hold filters and detector specific options. - */ -@interface FBObjectGraphConfiguration : NSObject - -/** - Every block represents a filter that every reference must pass in order to be inspected. - Reference will be described as relation from one object to another object. See definition of - FBGraphEdgeFilterBlock above. - - Invalid relations would be the relations that we are guaranteed are going to be broken at some point. - Be careful though, it's not so straightforward to tell if the relation will be broken *with 100% - certainty*, and if you'll filter out something that could otherwise show retain cycle that leaks - - it would never be caught by detector. - - For examples of what are the relations that will be broken at some point check FBStandardGraphEdgeFilters.mm - */ -@property (nonatomic, readonly, copy, nullable) NSArray *filterBlocks; - -@property (nonatomic, readonly, copy, nullable) FBObjectiveCGraphElementTransformerBlock transformerBlock; - -/** - Decides if object graph walker should look for retain cycles inside NSTimers. - */ -@property (nonatomic, readonly) BOOL shouldInspectTimers; - -/** - Decides if block objects should include their invocation address (the code part of the block) in the report. - If set to YES, then it will change from: `MallocBlock` to `<>`. - You can then symbolicate the address to retrieve a symbol name which will look like: - `__FOO_block_invoke` where FOO is replaced by the function creating the block. - This will allow easier understanding of the code involved in the cycle when blocks are involved. - */ -@property (nonatomic, readonly) BOOL shouldIncludeBlockAddress; - -/** - Will cache layout - */ -@property (nonatomic, readonly, nullable) NSMutableDictionary> *> *layoutCache; -@property (nonatomic, readonly) BOOL shouldCacheLayouts; - -- (nonnull instancetype)initWithFilterBlocks:(nonnull NSArray *)filterBlocks - shouldInspectTimers:(BOOL)shouldInspectTimers - transformerBlock:(nullable FBObjectiveCGraphElementTransformerBlock)transformerBlock - shouldIncludeBlockAddress:(BOOL)shouldIncludeBlockAddress NS_DESIGNATED_INITIALIZER; - -- (nonnull instancetype)initWithFilterBlocks:(nonnull NSArray *)filterBlocks - shouldInspectTimers:(BOOL)shouldInspectTimers - transformerBlock:(nullable FBObjectiveCGraphElementTransformerBlock)transformerBlock; - -- (nonnull instancetype)initWithFilterBlocks:(nonnull NSArray *)filterBlocks - shouldInspectTimers:(BOOL)shouldInspectTimers; - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectGraphConfiguration.m b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectGraphConfiguration.m deleted file mode 100644 index 825c73d1..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectGraphConfiguration.m +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBObjectGraphConfiguration.h" - -@implementation FBObjectGraphConfiguration - -- (instancetype)initWithFilterBlocks:(NSArray *)filterBlocks - shouldInspectTimers:(BOOL)shouldInspectTimers - transformerBlock:(nullable FBObjectiveCGraphElementTransformerBlock)transformerBlock - shouldIncludeBlockAddress:(BOOL)shouldIncludeBlockAddress -{ - if (self = [super init]) { - _filterBlocks = [filterBlocks copy]; - _shouldInspectTimers = shouldInspectTimers; - _shouldIncludeBlockAddress = shouldIncludeBlockAddress; - _transformerBlock = [transformerBlock copy]; - _layoutCache = [NSMutableDictionary new]; - } - - return self; -} - -- (instancetype)initWithFilterBlocks:(NSArray *)filterBlocks - shouldInspectTimers:(BOOL)shouldInspectTimers - transformerBlock:(nullable FBObjectiveCGraphElementTransformerBlock)transformerBlock -{ - return [self initWithFilterBlocks:filterBlocks - shouldInspectTimers:shouldInspectTimers - transformerBlock:transformerBlock - shouldIncludeBlockAddress:NO]; -} - -- (instancetype)initWithFilterBlocks:(NSArray *)filterBlocks - shouldInspectTimers:(BOOL)shouldInspectTimers -{ - return [self initWithFilterBlocks:filterBlocks - shouldInspectTimers:shouldInspectTimers - transformerBlock:nil]; -} - -- (instancetype)init -{ - // By default we are inspecting timers - return [self initWithFilterBlocks:@[] - shouldInspectTimers:YES]; -} - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCBlock.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCBlock.h deleted file mode 100644 index 6131a39a..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCBlock.h +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "FBObjectiveCGraphElement.h" - -@class FBGraphEdgeFilterProvider; - -/** - Object Graph element representing block. - */ -@interface FBObjectiveCBlock : FBObjectiveCGraphElement -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCBlock.m b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCBlock.m deleted file mode 100644 index 7097999b..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCBlock.m +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBObjectiveCBlock.h" - -#import - -#import "FBBlockStrongLayout.h" -#import "FBBlockStrongRelationDetector.h" -#import "FBObjectGraphConfiguration.h" -#import "FBObjectiveCObject.h" -#import "FBRetainCycleUtils.h" - -struct __attribute__((packed)) BlockLiteral { - void *isa; - int flags; - int reserved; - void *invoke; - void *descriptor; -}; - -@implementation FBObjectiveCBlock - -- (NSSet *)allRetainedObjects -{ - NSMutableArray *results = [[[super allRetainedObjects] allObjects] mutableCopy]; - - // Grab a strong reference to the object, otherwise it can crash while doing - // nasty stuff on deallocation - __attribute__((objc_precise_lifetime)) id anObject = self.object; - - void *blockObjectReference = (__bridge void *)anObject; - NSArray *allRetainedReferences = FBGetBlockStrongReferences(blockObjectReference); - - for (id object in allRetainedReferences) { - FBObjectiveCGraphElement *element = FBWrapObjectGraphElement(self, object, self.configuration); - if (element) { - [results addObject:element]; - } - } - - return [NSSet setWithArray:results]; -} - -/** - * We want to add more information to blocks because they show up - * in reports as MallocBlock and StackBlock which is not very informative. - * - * A block object is composed of: - * - code: what should be executed, it's stored in the .TEXT section ; - * - data: the variables that have been captured ; - * - metadata: notably the function signature. - * - * We extract the address of the code, which can then be converted to a - * human readable name given the debug symbol file. - * - * The symbol name contains the name of the function which allocated - * the block, making is easier to track the piece of code participating - * in the cycle. The symbolication must be done outside of this code - * since it will require access to the debug symbols, not present at - * runtime. - * - * Format: <> - */ -- (NSString *)classNameOrNull -{ - NSString *className = NSStringFromClass([self objectClass]); - if (!className) { - className = @"(null)"; - } - - if (!self.configuration.shouldIncludeBlockAddress) { - return className; - } - - // Find the reference of the block object. - __attribute__((objc_precise_lifetime)) id anObject = self.object; - if ([anObject isKindOfClass:[FBBlockStrongRelationDetector class]]) { - FBBlockStrongRelationDetector *blockObject = anObject; - anObject = [blockObject forwarding]; - } - void *blockObjectReference = (__bridge void *)anObject; - if (!blockObjectReference) { - return className; - } - - // Extract the invocated block of code from the structure. - const struct BlockLiteral *block = (struct BlockLiteral*) blockObjectReference; - const void *blockCodePtr = block->invoke; - - return [NSString stringWithFormat:@"<<%@:0x%llx>>", className, (unsigned long long)blockCodePtr]; -} - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCGraphElement.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCGraphElement.h deleted file mode 100644 index 38d0f12f..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCGraphElement.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -@class FBObjectGraphConfiguration; - -/** - Base Graph Element representation. It carries some data about the object and should be overridden in subclass - to provide references that subclass holds strongly (different for blocks, objects, other specializations). - The Graph Element itself can only provide references from FBAssociationManager. - */ -@interface FBObjectiveCGraphElement : NSObject - -/** - Designated initializer. - @param object Object this Graph Element will represent. - @param configuration Provides detector's configuration that contains filters and options - @param filterProvider Filter Provider that Graph Element will use to determine which references need to be dropped - @param namePath Description of how the object was retrieved from it's parent. Check namePath property. - */ -- (nonnull instancetype)initWithObject:(nullable id)object - configuration:(nonnull FBObjectGraphConfiguration *)configuration - namePath:(nullable NSArray *)namePath; - -- (nonnull instancetype)initWithObject:(nullable id)object - configuration:(nonnull FBObjectGraphConfiguration *)configuration; - - -/** - Name path that describes how this object was retrieved from its parent object by names - (for example ivar names, struct references). For more check FBObjectReference protocol. - */ -@property (nonatomic, copy, readonly, nullable) NSArray *namePath; -@property (nonatomic, weak, nullable) id object; -@property (nonatomic, readonly, nonnull) FBObjectGraphConfiguration *configuration; - -/** - Main accessor to all objects that the given object is retaining. Thread unsafe. - - @return NSSet of all objects this object is retaining. - */ -- (nullable NSSet *)allRetainedObjects; - -/** - @return address of the object represented by this element - */ -- (size_t)objectAddress; - -- (nullable Class)objectClass; -- (nonnull NSString *)classNameOrNull; - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCGraphElement.mm b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCGraphElement.mm deleted file mode 100644 index c9015abe..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCGraphElement.mm +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBObjectiveCGraphElement+Internal.h" - -#import -#import - -#import "FBAssociationManager.h" -#import "FBClassStrongLayout.h" -#import "FBObjectGraphConfiguration.h" -#import "FBRetainCycleUtils.h" -#import "FBRetainCycleDetector.h" - -@implementation FBObjectiveCGraphElement - -- (instancetype)initWithObject:(id)object -{ - return [self initWithObject:object - configuration:[FBObjectGraphConfiguration new]]; -} - -- (instancetype)initWithObject:(id)object - configuration:(nonnull FBObjectGraphConfiguration *)configuration -{ - return [self initWithObject:object - configuration:configuration - namePath:nil]; -} - -- (instancetype)initWithObject:(id)object - configuration:(nonnull FBObjectGraphConfiguration *)configuration - namePath:(NSArray *)namePath -{ - if (self = [super init]) { -#if _INTERNAL_RCD_ENABLED - // We are trying to mimic how ObjectiveC does storeWeak to not fall into - // _objc_fatal path - // https://github.com/bavarious/objc4/blob/3f282b8dbc0d1e501f97e4ed547a4a99cb3ac10b/runtime/objc-weak.mm#L369 - - Class aCls = object_getClass(object); - - BOOL (*allowsWeakReference)(id, SEL) = - (__typeof__(allowsWeakReference))class_getMethodImplementation(aCls, @selector(allowsWeakReference)); - - if (allowsWeakReference && (IMP)allowsWeakReference != _objc_msgForward) { - if (allowsWeakReference(object, @selector(allowsWeakReference))) { - // This is still racey since allowsWeakReference could change it value by now. - _object = object; - } - } else { - _object = object; - } -#endif - _namePath = namePath; - _configuration = configuration; - } - - return self; -} - -- (NSSet *)allRetainedObjects -{ - NSArray *retainedObjectsNotWrapped = [FBAssociationManager associationsForObject:_object]; - NSMutableSet *retainedObjects = [NSMutableSet new]; - - for (id obj in retainedObjectsNotWrapped) { - FBObjectiveCGraphElement *element = FBWrapObjectGraphElementWithContext(self, - obj, - _configuration, - @[@"__associated_object"]); - if (element) { - [retainedObjects addObject:element]; - } - } - - return retainedObjects; -} - -- (BOOL)isEqual:(id)object -{ - if ([object isKindOfClass:[FBObjectiveCGraphElement class]]) { - FBObjectiveCGraphElement *objcObject = object; - // Use pointer equality - return objcObject.object == _object; - } - return NO; -} - -- (NSUInteger)hash -{ - return (size_t)_object; -} - -- (NSString *)description -{ - if (_namePath) { - NSString *namePathStringified = [_namePath componentsJoinedByString:@" -> "]; - return [NSString stringWithFormat:@"-> %@ -> %@ ", namePathStringified, [self classNameOrNull]]; - } - return [NSString stringWithFormat:@"-> %@ ", [self classNameOrNull]]; -} - -- (size_t)objectAddress -{ - return (size_t)_object; -} - -- (NSString *)classNameOrNull -{ - NSString *className = NSStringFromClass([self objectClass]); - if (!className) { - className = @"(null)"; - } - - return className; -} - -- (Class)objectClass -{ - return object_getClass(_object); -} - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCObject.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCObject.h deleted file mode 100644 index 71e67ef8..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCObject.h +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "FBObjectiveCGraphElement.h" - -@class FBGraphEdgeFilterProvider; - -/** - FBObjectiveCGraphElement specialization that can gather all references kept in ivars, as part of collection - etc. - */ -@interface FBObjectiveCObject : FBObjectiveCGraphElement -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCObject.m b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCObject.m deleted file mode 100644 index a2694013..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCObject.m +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBObjectiveCObject.h" - -#import - -#import "FBClassStrongLayout.h" -#import "FBObjectGraphConfiguration.h" -#import "FBObjectReference.h" -#import "FBRetainCycleUtils.h" - -@implementation FBObjectiveCObject - -- (NSSet *)allRetainedObjects -{ - Class aCls = object_getClass(self.object); - if (!self.object || !aCls) { - return nil; - } - - NSArray *strongIvars = FBGetObjectStrongReferences(self.object, self.configuration.layoutCache); - - NSMutableArray *retainedObjects = [[[super allRetainedObjects] allObjects] mutableCopy]; - - for (id ref in strongIvars) { - id referencedObject = [ref objectReferenceFromObject:self.object]; - - if (referencedObject) { - NSArray *namePath = [ref namePath]; - FBObjectiveCGraphElement *element = FBWrapObjectGraphElementWithContext(self, - referencedObject, - self.configuration, - namePath); - if (element) { - [retainedObjects addObject:element]; - } - } - } - - if ([NSStringFromClass(aCls) hasPrefix:@"__NSCF"]) { - /** - If we are dealing with toll-free bridged collections, we are not guaranteed that the collection - will hold only Objective-C objects. We are not able to check in runtime what callbacks it uses to - retain/release (if any) and we could easily crash here. - */ - return [NSSet setWithArray:retainedObjects]; - } - - if (class_isMetaClass(aCls)) { - // If it's a meta-class it can conform to following protocols, - // but it would crash when trying enumerating - return nil; - } - - if ([aCls conformsToProtocol:@protocol(NSFastEnumeration)]) { - BOOL retainsKeys = [self _objectRetainsEnumerableKeys]; - BOOL retainsValues = [self _objectRetainsEnumerableValues]; - - BOOL isKeyValued = NO; - if ([aCls instancesRespondToSelector:@selector(objectForKey:)]) { - isKeyValued = YES; - } - - /** - This codepath is prone to errors. When you enumerate a collection that can be mutated while enumeration - we fall into risk of crash. To save ourselves from that we will catch such exception and try again. - We should not try this endlessly, so at some point we will simply give up. - */ - NSInteger tries = 10; - for (NSInteger i = 0; i < tries; ++i) { - // If collection is mutated we want to rollback and try again - let's keep refs in temporary set - NSMutableSet *temporaryRetainedObjects = [NSMutableSet new]; - @try { - for (id subobject in self.object) { - if (retainsKeys) { - FBObjectiveCGraphElement *element = FBWrapObjectGraphElement(self, subobject, self.configuration); - if (element) { - [temporaryRetainedObjects addObject:element]; - } - } - if (isKeyValued && retainsValues) { - FBObjectiveCGraphElement *element = FBWrapObjectGraphElement(self, - [self.object objectForKey:subobject], - self.configuration); - if (element) { - [temporaryRetainedObjects addObject:element]; - } - } - } - } - @catch (NSException *exception) { - // mutation happened, we want to try enumerating again - continue; - } - - // If we are here it means no exception happened and we want to break outer loop - [retainedObjects addObjectsFromArray:[temporaryRetainedObjects allObjects]]; - break; - } - } - - return [NSSet setWithArray:retainedObjects]; -} - -- (BOOL)_objectRetainsEnumerableValues -{ - if ([self.object respondsToSelector:@selector(valuePointerFunctions)]) { - NSPointerFunctions *pointerFunctions = [self.object valuePointerFunctions]; - if (pointerFunctions.usesWeakReadAndWriteBarriers) { - return NO; - } - } - - return YES; -} - -- (BOOL)_objectRetainsEnumerableKeys -{ - if ([self.object respondsToSelector:@selector(pointerFunctions)]) { - // NSHashTable and similar - // If object shows what pointer functions are used, lets try to determine - // if it's not retaining objects - NSPointerFunctions *pointerFunctions = [self.object pointerFunctions]; - if (pointerFunctions.usesWeakReadAndWriteBarriers) { - // It's weak - we should not touch it - return NO; - } - } - - if ([self.object respondsToSelector:@selector(keyPointerFunctions)]) { - NSPointerFunctions *pointerFunctions = [self.object keyPointerFunctions]; - if (pointerFunctions.usesWeakReadAndWriteBarriers) { - return NO; - } - } - - return YES; -} - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/Internal/FBObjectiveCGraphElement+Internal.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/Internal/FBObjectiveCGraphElement+Internal.h deleted file mode 100644 index e181842b..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/Internal/FBObjectiveCGraphElement+Internal.h +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "FBObjectiveCGraphElement.h" - -@interface FBObjectiveCGraphElement () - -- (instancetype)initWithObject:(id)object; - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/Specialization/FBObjectiveCNSCFTimer.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/Specialization/FBObjectiveCNSCFTimer.h deleted file mode 100644 index cb3a3e56..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/Specialization/FBObjectiveCNSCFTimer.h +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "FBObjectiveCObject.h" - -/** - Specialization of FBObjectiveCObject for NSTimer. - Standard methods that FBObjectiveCObject uses will not fetch us all objects retained by NSTimer. - One good example is target of NSTimer. - */ -@interface FBObjectiveCNSCFTimer : FBObjectiveCObject -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/Specialization/FBObjectiveCNSCFTimer.mm b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/Specialization/FBObjectiveCNSCFTimer.mm deleted file mode 100644 index 7a21f30b..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Graph/Specialization/FBObjectiveCNSCFTimer.mm +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBObjectiveCNSCFTimer.h" - -#import - -#import "FBRetainCycleDetector.h" -#import "FBRetainCycleUtils.h" - -@implementation FBObjectiveCNSCFTimer - -#if _INTERNAL_RCD_ENABLED - -typedef struct { - long _unknown; // This is always 1 - id target; - SEL selector; - NSDictionary *userInfo; -} _FBNSCFTimerInfoStruct; - -- (NSSet *)allRetainedObjects -{ - // Let's retain our timer - __attribute__((objc_precise_lifetime)) NSTimer *timer = self.object; - - if (!timer) { - return nil; - } - - NSMutableSet *retained = [[super allRetainedObjects] mutableCopy]; - - CFRunLoopTimerContext context; - CFRunLoopTimerGetContext((CFRunLoopTimerRef)timer, &context); - - // If it has a retain function, let's assume it retains strongly - if (context.info && context.retain) { - _FBNSCFTimerInfoStruct infoStruct = *(_FBNSCFTimerInfoStruct *)(context.info); - if (infoStruct.target) { - FBObjectiveCGraphElement *element = FBWrapObjectGraphElementWithContext(self, infoStruct.target, self.configuration, @[@"target"]); - if (element) { - [retained addObject:element]; - } - } - if (infoStruct.userInfo) { - FBObjectiveCGraphElement *element = FBWrapObjectGraphElementWithContext(self, infoStruct.userInfo, self.configuration, @[@"userInfo"]); - if (element) { - [retained addObject:element]; - } - } - } - - return retained; -} - -#endif // _INTERNAL_RCD_ENABLED - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockInterface.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockInterface.h deleted file mode 100644 index 3ae1ba9f..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockInterface.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -/** - We are mimicing Block structure based on Clang documentation: - http://clang.llvm.org/docs/Block-ABI-Apple.html - */ - -enum { // Flags from BlockLiteral - BLOCK_HAS_COPY_DISPOSE = (1 << 25), - BLOCK_HAS_CTOR = (1 << 26), // helpers have C++ code - BLOCK_IS_GLOBAL = (1 << 28), - BLOCK_HAS_STRET = (1 << 29), // IFF BLOCK_HAS_SIGNATURE - BLOCK_HAS_SIGNATURE = (1 << 30), -}; - -struct BlockDescriptor { - unsigned long int reserved; // NULL - unsigned long int size; - // optional helper functions - void (*copy_helper)(void *dst, void *src); // IFF (1<<25) - void (*dispose_helper)(void *src); // IFF (1<<25) - const char *signature; // IFF (1<<30) -}; - -struct BlockLiteral { - void *isa; // initialized to &_NSConcreteStackBlock or &_NSConcreteGlobalBlock - int flags; - int reserved; - void (*invoke)(void *, ...); - struct BlockDescriptor *descriptor; - // imported variables -}; diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongLayout.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongLayout.h deleted file mode 100644 index bb084159..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongLayout.h +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#ifdef __cplusplus -extern "C" { -#endif - -/** - Returns an array of id objects that will have only those references - that are retained by block. - */ -NSArray *_Nullable FBGetBlockStrongReferences(void *_Nonnull block); - -BOOL FBObjectIsBlock(void *_Nullable object); - -#ifdef __cplusplus -} -#endif diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongLayout.m b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongLayout.m deleted file mode 100644 index cc408efe..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongLayout.m +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#if __has_feature(objc_arc) -#error This file must be compiled with MRR. Use -fno-objc-arc flag. -#endif - -#import "FBBlockStrongLayout.h" - -#import - -#import "FBBlockInterface.h" -#import "FBBlockStrongRelationDetector.h" - -/** - We will be blackboxing variables that the block holds with our own custom class, - and we will check which of them were retained. - - The idea is based on the approach Circle uses: - https://github.com/mikeash/Circle - https://github.com/mikeash/Circle/blob/master/Circle/CircleIVarLayout.m - */ -static NSIndexSet *_GetBlockStrongLayout(void *block) { - struct BlockLiteral *blockLiteral = block; - - /** - BLOCK_HAS_CTOR - Block has a C++ constructor/destructor, which gives us a good chance it retains - objects that are not pointer aligned, so omit them. - - !BLOCK_HAS_COPY_DISPOSE - Block doesn't have a dispose function, so it does not retain objects and - we are not able to blackbox it. - */ - if ((blockLiteral->flags & BLOCK_HAS_CTOR) - || !(blockLiteral->flags & BLOCK_HAS_COPY_DISPOSE)) { - return nil; - } - - void (*dispose_helper)(void *src) = blockLiteral->descriptor->dispose_helper; - const size_t ptrSize = sizeof(void *); - - // Figure out the number of pointers it takes to fill out the object, rounding up. - const size_t elements = (blockLiteral->descriptor->size + ptrSize - 1) / ptrSize; - - // Create a fake object of the appropriate length. - void *obj[elements]; - void *detectors[elements]; - - for (size_t i = 0; i < elements; ++i) { - FBBlockStrongRelationDetector *detector = [FBBlockStrongRelationDetector new]; - obj[i] = detectors[i] = detector; - } - - @autoreleasepool { - dispose_helper(obj); - } - - // Run through the release detectors and add each one that got released to the object's - // strong ivar layout. - NSMutableIndexSet *layout = [NSMutableIndexSet indexSet]; - - for (size_t i = 0; i < elements; ++i) { - FBBlockStrongRelationDetector *detector = (FBBlockStrongRelationDetector *)(detectors[i]); - if (detector.isStrong) { - [layout addIndex:i]; - } - - // Destroy detectors - [detector trueRelease]; - } - - return layout; -} - -NSArray *FBGetBlockStrongReferences(void *block) { - if (!FBObjectIsBlock(block)) { - return nil; - } - - NSMutableArray *results = [NSMutableArray new]; - - void **blockReference = block; - NSIndexSet *strongLayout = _GetBlockStrongLayout(block); - [strongLayout enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { - void **reference = &blockReference[idx]; - - if (reference && (*reference)) { - id object = (id)(*reference); - - if (object) { - [results addObject:object]; - } - } - }]; - - return [results autorelease]; -} - -static Class _BlockClass() { - static dispatch_once_t onceToken; - static Class blockClass; - dispatch_once(&onceToken, ^{ - void (^testBlock)() = [^{} copy]; - blockClass = [testBlock class]; - while(class_getSuperclass(blockClass) && class_getSuperclass(blockClass) != [NSObject class]) { - blockClass = class_getSuperclass(blockClass); - } - [testBlock release]; - }); - return blockClass; -} - -BOOL FBObjectIsBlock(void *object) { - Class blockClass = _BlockClass(); - - Class candidate = object_getClass((__bridge id)object); - return [candidate isSubclassOfClass:blockClass]; -} diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongRelationDetector.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongRelationDetector.h deleted file mode 100644 index 8c706bdc..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongRelationDetector.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -/** - We created a detector object that will fake *any* object that block can retain. - - Using clever trickery from Circle: - https://github.com/mikeash/Circle/blob/master/Circle/CircleIVarLayout.m - - We are also faking that this object can be treated as a block. - Otherwise if the block is retained by block, it will try to call byref_dispose and - our object won't be able to respond. - */ - -struct _block_byref_block; -@interface FBBlockStrongRelationDetector : NSObject -{ - // __block fakery - void *forwarding; - int flags; //refcount; - int size; - void (*byref_keep)(struct _block_byref_block *dst, struct _block_byref_block *src); - void (*byref_dispose)(struct _block_byref_block *); - void *captured[16]; -} - -@property (nonatomic, assign, getter=isStrong) BOOL strong; - -- (oneway void)trueRelease; - -- (void *)forwarding; - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongRelationDetector.m b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongRelationDetector.m deleted file mode 100644 index 52b43c86..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongRelationDetector.m +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#if __has_feature(objc_arc) -#error This file must be compiled with MRR. Use -fno-objc-arc flag. -#endif - -#import "FBBlockStrongRelationDetector.h" - -#import - -static void byref_keep_nop(struct _block_byref_block *dst, struct _block_byref_block *src) {} -static void byref_dispose_nop(struct _block_byref_block *param) {} - -@implementation FBBlockStrongRelationDetector - -- (oneway void)release -{ - _strong = YES; -} - -- (id)retain -{ - return self; -} - -+ (id)alloc -{ - FBBlockStrongRelationDetector *obj = [super alloc]; - - // Setting up block fakery - obj->forwarding = obj; - obj->byref_keep = byref_keep_nop; - obj->byref_dispose = byref_dispose_nop; - - return obj; -} - -- (oneway void)trueRelease -{ - [super release]; -} - -- (void *)forwarding -{ - return self->forwarding; -} - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayout.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayout.h deleted file mode 100644 index 4ddaf810..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayout.h +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#ifdef __cplusplus -extern "C" { -#endif - -@protocol FBObjectReference; -/** - @return An array of id objects that will have *all* references - the object has (also not retained ivars, structs etc.) - */ -NSArray> *_Nonnull FBGetClassReferences(__unsafe_unretained Class _Nullable aCls); - -/** - @return An array of id objects that will have only those references - that are retained by the object. It also goes through parent classes. - */ -NSArray> *_Nonnull FBGetObjectStrongReferences(id _Nullable obj, - NSMutableDictionary> *> *_Nullable layoutCache); - -#ifdef __cplusplus -} -#endif diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayout.mm b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayout.mm deleted file mode 100644 index 5dbb558b..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayout.mm +++ /dev/null @@ -1,212 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBClassStrongLayout.h" - -#import -#import -#import -#import - -#import - -#import "FBIvarReference.h" -#import "FBObjectInStructReference.h" -#import "FBStructEncodingParser.h" -#import "Struct.h" -#import "Type.h" - -/** - If we stumble upon a struct, we need to go through it and check if it doesn't retain some objects. - */ -static NSArray *FBGetReferencesForObjectsInStructEncoding(FBIvarReference *ivar, std::string encoding) { - NSMutableArray *references = [NSMutableArray new]; - - std::string ivarName = std::string([ivar.name cStringUsingEncoding:NSUTF8StringEncoding]); - FB::RetainCycleDetector::Parser::Struct parsedStruct = - FB::RetainCycleDetector::Parser::parseStructEncodingWithName(encoding, ivarName); - - std::vector> types = parsedStruct.flattenTypes(); - - ptrdiff_t offset = ivar.offset; - - for (auto &type: types) { - NSUInteger size, align; - - std::string typeEncoding = type->typeEncoding; - if (typeEncoding[0] == '^') { - // It's a pointer, let's skip - size = sizeof(void *); - align = _Alignof(void *); - } else { - @try { - NSGetSizeAndAlignment(typeEncoding.c_str(), - &size, - &align); - } @catch (NSException *e) { - /** - If we failed, we probably have C++ and ObjC cannot get it's size and alignment. We are skipping. - If we would like to support it, we would need to derive size and alignment of type from the string. - C++ does not have reflection so we can't really do that unless we create the mapping ourselves. - */ - break; - } - } - - - // The object must be aligned - NSUInteger overAlignment = offset % align; - NSUInteger whatsMissing = (overAlignment == 0) ? 0 : align - overAlignment; - offset += whatsMissing; - - if (typeEncoding[0] == '@') { - - // The index that ivar layout will ask for is going to be aligned with pointer size - - // Prepare additional context - NSString *typeEncodingName = [NSString stringWithCString:type->name.c_str() encoding:NSUTF8StringEncoding]; - - NSMutableArray *namePath = [NSMutableArray new]; - - for (auto &name: type->typePath) { - NSString *nameString = [NSString stringWithCString:name.c_str() encoding:NSUTF8StringEncoding]; - if (nameString) { - [namePath addObject:nameString]; - } - } - - if (typeEncodingName) { - [namePath addObject:typeEncodingName]; - } - [references addObject:[[FBObjectInStructReference alloc] initWithIndex:(offset / sizeof(void *)) - namePath:namePath]]; - } - - offset += size; - } - - return references; -} - -NSArray> *FBGetClassReferences(Class aCls) { - NSMutableArray> *result = [NSMutableArray new]; - - unsigned int count; - Ivar *ivars = class_copyIvarList(aCls, &count); - - for (unsigned int i = 0; i < count; ++i) { - Ivar ivar = ivars[i]; - FBIvarReference *wrapper = [[FBIvarReference alloc] initWithIvar:ivar]; - - if (wrapper.type == FBStructType) { - std::string encoding = std::string(ivar_getTypeEncoding(wrapper.ivar)); - NSArray *references = FBGetReferencesForObjectsInStructEncoding(wrapper, encoding); - - [result addObjectsFromArray:references]; - } else { - [result addObject:wrapper]; - } - } - free(ivars); - - return [result copy]; -} - -static NSIndexSet *FBGetLayoutAsIndexesForDescription(NSUInteger minimumIndex, const uint8_t *layoutDescription) { - NSMutableIndexSet *interestingIndexes = [NSMutableIndexSet new]; - NSUInteger currentIndex = minimumIndex; - - while (*layoutDescription != '\x00') { - int upperNibble = (*layoutDescription & 0xf0) >> 4; - int lowerNibble = *layoutDescription & 0xf; - - // Upper nimble is for skipping - currentIndex += upperNibble; - - // Lower nimble describes count - [interestingIndexes addIndexesInRange:NSMakeRange(currentIndex, lowerNibble)]; - currentIndex += lowerNibble; - - ++layoutDescription; - } - - return interestingIndexes; -} - -static NSUInteger FBGetMinimumIvarIndex(__unsafe_unretained Class aCls) { - NSUInteger minimumIndex = 1; - unsigned int count; - Ivar *ivars = class_copyIvarList(aCls, &count); - - if (count > 0) { - Ivar ivar = ivars[0]; - ptrdiff_t offset = ivar_getOffset(ivar); - minimumIndex = offset / (sizeof(void *)); - } - - free(ivars); - - return minimumIndex; -} - -static NSArray> *FBGetStrongReferencesForClass(Class aCls) { - NSArray> *ivars = [FBGetClassReferences(aCls) filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) { - if ([evaluatedObject isKindOfClass:[FBIvarReference class]]) { - FBIvarReference *wrapper = evaluatedObject; - return wrapper.type != FBUnknownType; - } - return YES; - }]]; - - const uint8_t *fullLayout = class_getIvarLayout(aCls); - - if (!fullLayout) { - return nil; - } - - NSUInteger minimumIndex = FBGetMinimumIvarIndex(aCls); - NSIndexSet *parsedLayout = FBGetLayoutAsIndexesForDescription(minimumIndex, fullLayout); - - NSArray> *filteredIvars = - [ivars filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, - NSDictionary *bindings) { - return [parsedLayout containsIndex:[evaluatedObject indexInIvarLayout]]; - }]]; - - return filteredIvars; -} - -NSArray> *FBGetObjectStrongReferences(id obj, - NSMutableDictionary> *> *layoutCache) { - NSMutableArray> *array = [NSMutableArray new]; - - __unsafe_unretained Class previousClass = nil; - __unsafe_unretained Class currentClass = object_getClass(obj); - - while (previousClass != currentClass) { - NSArray> *ivars; - - if (layoutCache && currentClass) { - ivars = layoutCache[currentClass]; - } - - if (!ivars) { - ivars = FBGetStrongReferencesForClass(currentClass); - if (layoutCache && currentClass) { - layoutCache[currentClass] = ivars; - } - } - [array addObjectsFromArray:ivars]; - - previousClass = currentClass; - currentClass = class_getSuperclass(currentClass); - } - - return [array copy]; -} diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayoutHelpers.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayoutHelpers.h deleted file mode 100644 index 8ae718a5..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayoutHelpers.h +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import - -#ifdef __cplusplus -extern "C" { -#endif - -/** - Returns object on given index for obj in its ivar layout. - It will try to map the object to an Objective-C object, so if the index - is invalid it will crash with BAD_ACCESS. - - It cannot be called under ARC. - */ -id FBExtractObjectByOffset(id obj, NSUInteger index); - -#ifdef __cplusplus -} -#endif diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayoutHelpers.m b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayoutHelpers.m deleted file mode 100644 index 2528dfc9..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayoutHelpers.m +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#if __has_feature(objc_arc) -#error This file must be compiled with MRR. Use -fno-objc-arc flag. -#endif - -#import "FBClassStrongLayoutHelpers.h" - -id FBExtractObjectByOffset(id obj, NSUInteger index) { - id *idx = (id *)((uintptr_t)obj + (index * sizeof(void *))); - - return *idx; -} diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/BaseType.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/BaseType.h deleted file mode 100644 index 026bafdf..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/BaseType.h +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import - -namespace FB { namespace RetainCycleDetector { namespace Parser { - class BaseType { - public: - virtual ~BaseType() {} - }; - - class Unresolved: public BaseType { - public: - std::string value; - Unresolved(std::string value): value(value) {} - Unresolved(Unresolved&&) = default; - Unresolved &operator=(Unresolved&&) = default; - - Unresolved(const Unresolved&) = delete; - Unresolved &operator=(const Unresolved&) = delete; - }; -} } } diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/FBStructEncodingParser.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/FBStructEncodingParser.h deleted file mode 100644 index ffcf6759..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/FBStructEncodingParser.h +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "Struct.h" -#import "Type.h" - -namespace FB { namespace RetainCycleDetector { namespace Parser { - - /** - This function will parse a struct encoding from an ivar, and return an FBParsedStruct instance. - Check FBParsedStruct to learn more on how to interact with it. - - FBParseStructEncoding assumes the string passed to it will be a proper struct encoding. - It will not work with encodings provided by @encode() because they do not add names. - It will work with encodings provided by ivars (ivar_getTypeEncoding) - */ - Struct parseStructEncoding(const std::string &structEncodingString); - - - /** - You can provide name for root struct you are passing. The name will be then used - in typePath (check out FBParsedType for details). - The name here can be for example a name of an ivar with this struct. - */ - Struct parseStructEncodingWithName(const std::string &structEncodingString, - const std::string &structName); - - -} } } diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/FBStructEncodingParser.mm b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/FBStructEncodingParser.mm deleted file mode 100644 index dead2f62..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/FBStructEncodingParser.mm +++ /dev/null @@ -1,168 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBStructEncodingParser.h" - -#import -#import -#import -#import -#import - -#import "BaseType.h" - -namespace { - class _StringScanner { - public: - const std::string string; - size_t index; - - _StringScanner(const std::string &string): string(string), index(0) {} - - bool scanString(const std::string &stringToScan) { - if (!(string.compare(index, stringToScan.length(), stringToScan) == 0)) { - return false; - } - index += stringToScan.length(); - return true; - } - - const std::string scanUpToString(const std::string &upToString) { - size_t pos = string.find(upToString, index); - if (pos == std::string::npos) { - // Mark as whole string scanned - index = string.length(); - return ""; - } - - std::string inBetweenString = string.substr(index, pos - index); - index = pos; - return inBetweenString; - } - - const char currentCharacter() { - return string[index]; - } - - const std::string scanUpToCharacterFromSet(const std::string &characterSet) { - size_t pos = string.find_first_of(characterSet, index); - if (pos == std::string::npos) { - index = string.length(); - return ""; - } - - std::string inBetweenString = string.substr(index, pos-index); - index = pos; - return inBetweenString; - } - }; - -}; - -namespace FB { namespace RetainCycleDetector { namespace Parser { - - /** - Intermediate struct object used inside the algorithm to pass some - information when parsing nested structures. - */ - struct _StructParseResult { - std::vector> containedTypes; - const std::string typeName; - }; - - static const auto kOpenStruct = "{"; - static const auto kCloseStruct = "}"; - static const auto kLiteralEndingCharacters = "\"}"; - static const auto kQuote = "\""; - - static struct _StructParseResult _ParseStructEncodingWithScanner(_StringScanner &scanner, - NSString *debugStruct) { - std::vector> types; - - // Every struct starts with '{' - __unused const auto scannedCorrectly = scanner.scanString(kOpenStruct); - NSCAssert(scannedCorrectly, @"The first character of struct encoding should be {; debug_struct: %@", debugStruct); - - // Parse name - const auto structTypeName = scanner.scanUpToString("="); - scanner.scanString("="); - - while (!(scanner.scanString(kCloseStruct))) { - if (scanner.scanString(kQuote)) { - const auto parseResult = scanner.scanUpToString(kQuote); - scanner.scanString(kQuote); - if (parseResult.length() > 0) { - types.push_back(std::make_shared(parseResult)); - } - } else if (scanner.currentCharacter() == '{') { - // We do not want to consume '{' because we will call parser recursively - const auto locBefore = scanner.index; - auto parseResult = _ParseStructEncodingWithScanner(scanner, debugStruct); - - std::shared_ptr valueFromBefore; - if (!types.empty()) { - valueFromBefore = std::dynamic_pointer_cast(types.back()); - types.pop_back(); - } - const auto extractedNameFromBefore = valueFromBefore ? valueFromBefore->value - : ""; - std::shared_ptr type = std::make_shared(extractedNameFromBefore, - scanner.string.substr(locBefore, (scanner.index - locBefore)), - parseResult.typeName, - parseResult.containedTypes); - - types.emplace_back(type); - } else { - // It's a type name (literal), let's advance until we find '"', or '}' - const auto parseResult = scanner.scanUpToCharacterFromSet(kLiteralEndingCharacters); - std::string nameFromBefore = ""; - if (types.size() > 0) { - if (std::shared_ptr maybeUnresolved = std::dynamic_pointer_cast(types.back())) { - nameFromBefore = maybeUnresolved->value; - types.pop_back(); - } - } - std::shared_ptr type = std::make_shared(nameFromBefore, parseResult); - types.emplace_back(type); - } - } - - std::vector> filteredVector; - - for (const auto &t: types) { - if (const auto convertedType = std::dynamic_pointer_cast(t)) { - filteredVector.emplace_back(convertedType); - } - } - - return { - .containedTypes = filteredVector, - .typeName = structTypeName, - }; - } - - Struct parseStructEncoding(const std::string &structEncodingString) { - return parseStructEncodingWithName(structEncodingString, ""); - } - - Struct parseStructEncodingWithName(const std::string &structEncodingString, - const std::string &structName) { - _StringScanner scanner = _StringScanner(structEncodingString); - auto result = _ParseStructEncodingWithScanner(scanner, - [NSString stringWithCString:structEncodingString.c_str() - encoding:NSUTF8StringEncoding]); - - Struct outerStruct = Struct(structName, - structEncodingString, - result.typeName, - result.containedTypes); - outerStruct.passTypePath({}); - return outerStruct; - } -} } } diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/Struct.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/Struct.h deleted file mode 100644 index f7516167..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/Struct.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "Type.h" - -#import -#import -#import - -namespace FB { namespace RetainCycleDetector { namespace Parser { - class Struct: public Type { - public: - const std::string structTypeName; - - Struct(const std::string &name, - const std::string &typeEncoding, - const std::string &structTypeName, - std::vector> &typesContainedInStruct) - : Type(name, typeEncoding), - structTypeName(structTypeName), - typesContainedInStruct(std::move(typesContainedInStruct)) {}; - Struct(Struct&&) = default; - Struct &operator=(Struct&&) = default; - - Struct(const Struct&) = delete; - Struct &operator=(const Struct&) = delete; - - std::vector> flattenTypes(); - - virtual void passTypePath(std::vector typePath); - std::vector> typesContainedInStruct; - }; -} } } diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/Struct.mm b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/Struct.mm deleted file mode 100644 index 6e22ef13..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/Struct.mm +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "Struct.h" - -#import - -namespace FB { namespace RetainCycleDetector { namespace Parser { - void Struct::passTypePath(std::vector typePath) { - this->typePath = typePath; - - if (name.length() > 0) { - typePath.emplace_back(name); - } - if (structTypeName.length() > 0 && structTypeName != "?") { - typePath.emplace_back(structTypeName); - } - - for (auto &type: typesContainedInStruct) { - type->passTypePath(typePath); - } - } - - std::vector> Struct::flattenTypes() { - std::vector> flattenedTypes; - - for (const auto &type:typesContainedInStruct) { - const auto maybeStruct = std::dynamic_pointer_cast(type); - if (maybeStruct) { - // Complex type, recursively grab all references - flattenedTypes.reserve(flattenedTypes.size() + std::distance(maybeStruct->typesContainedInStruct.begin(), - maybeStruct->typesContainedInStruct.end())); - flattenedTypes.insert(flattenedTypes.end(), - maybeStruct->typesContainedInStruct.begin(), - maybeStruct->typesContainedInStruct.end()); - } else { - // Simple type - flattenedTypes.emplace_back(type); - } - } - - return flattenedTypes; - } - -} } } diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/Type.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/Type.h deleted file mode 100644 index 993e5ed6..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/Type.h +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import -#import -#import - -#import "BaseType.h" - -namespace FB { namespace RetainCycleDetector { namespace Parser { - class Type: public BaseType { - public: - const std::string name; - const std::string typeEncoding; - - Type(const std::string &name, - const std::string &typeEncoding): name(name), typeEncoding(typeEncoding) {} - Type(Type&&) = default; - Type &operator=(Type&&) = default; - - Type(const Type&) = delete; - Type &operator=(const Type&) = delete; - - virtual void passTypePath(std::vector typePath) { - this->typePath = typePath; - } - - std::vector typePath; - }; -} } } diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBIvarReference.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBIvarReference.h deleted file mode 100644 index c95a818d..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBIvarReference.h +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import - -#import "FBObjectReference.h" - -typedef NS_ENUM(NSUInteger, FBType) { - FBObjectType, - FBBlockType, - FBStructType, - FBUnknownType, -}; - -@interface FBIvarReference : NSObject - -@property (nonatomic, copy, readonly, nullable) NSString *name; -@property (nonatomic, readonly) FBType type; -@property (nonatomic, readonly) ptrdiff_t offset; -@property (nonatomic, readonly) NSUInteger index; -@property (nonatomic, readonly, nonnull) Ivar ivar; - -- (nonnull instancetype)initWithIvar:(nonnull Ivar)ivar; - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBIvarReference.m b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBIvarReference.m deleted file mode 100644 index f8cd7809..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBIvarReference.m +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBIvarReference.h" - -@implementation FBIvarReference - -- (instancetype)initWithIvar:(Ivar)ivar -{ - if (self = [super init]) { - _name = @(ivar_getName(ivar)); - _type = [self _convertEncodingToType:ivar_getTypeEncoding(ivar)]; - _offset = ivar_getOffset(ivar); - _index = _offset / sizeof(void *); - _ivar = ivar; - } - - return self; -} - -- (FBType)_convertEncodingToType:(const char *)typeEncoding -{ - if (typeEncoding[0] == '{') { - return FBStructType; - } - - if (typeEncoding[0] == '@') { - // It's an object or block - - // Let's try to determine if it's a block. Blocks tend to have - // @? typeEncoding. Docs state that it's undefined type, so - // we should still verify that ivar with that type is a block - if (strncmp(typeEncoding, "@?", 2) == 0) { - return FBBlockType; - } - - return FBObjectType; - } - - return FBUnknownType; -} - -- (NSString *)description -{ - return [NSString stringWithFormat:@"[%@, index: %lu]", _name, (unsigned long)_index]; -} - -#pragma mark - FBObjectReference - -- (NSUInteger)indexInIvarLayout -{ - return _index; -} - -- (id)objectReferenceFromObject:(id)object -{ - return object_getIvar(object, _ivar); -} - -- (NSArray *)namePath -{ - return @[@(ivar_getName(_ivar))]; -} - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBObjectInStructReference.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBObjectInStructReference.h deleted file mode 100644 index 9c5b3090..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBObjectInStructReference.h +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "FBObjectReference.h" - -/** - Struct object is an Objective-C object that is created inside - a struct. In Objective-C++ that object will be retained - by an object owning the struct, therefore will be listed in - ivar layout for the class. - */ - -@interface FBObjectInStructReference : NSObject - -- (nonnull instancetype)initWithIndex:(NSUInteger)index - namePath:(nullable NSArray *)namePath; - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBObjectInStructReference.m b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBObjectInStructReference.m deleted file mode 100644 index 6d5c8e2f..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBObjectInStructReference.m +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "FBObjectInStructReference.h" - -#import "FBClassStrongLayoutHelpers.h" - -@implementation FBObjectInStructReference -{ - NSUInteger _index; - NSArray *_namePath; -} - -- (instancetype)initWithIndex:(NSUInteger)index - namePath:(NSArray *)namePath -{ - if (self = [super init]) { - _index = index; - _namePath = namePath; - } - - return self; -} - -- (NSString *)description -{ - return [NSString stringWithFormat:@"[in_struct; index: %td]", _index]; -} - -#pragma mark - FBObjectReference - -- (id)objectReferenceFromObject:(id)object -{ - return FBExtractObjectByOffset(object, _index); -} - -- (NSUInteger)indexInIvarLayout -{ - return _index; -} - -- (NSArray *)namePath -{ - return _namePath; -} - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBObjectReference.h b/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBObjectReference.h deleted file mode 100644 index c00c217c..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBObjectReference.h +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -/** - Defines an outgoing reference from Objective-C object. - */ - -@protocol FBObjectReference - -/** - What is the index of that reference in ivar layout? - index * sizeof(void *) gives you offset from the - beginning of the object. - */ -- (NSUInteger)indexInIvarLayout; - -/** - For given object we need to be able to grab that object reference. - */ -- (nullable id)objectReferenceFromObject:(nullable id)object; - - -/** - For given reference in an object, there can be a path of names that leads to it. - For example it can be an ivar, thus the path will consist of ivar name only: - @[@"_myIvar"] - - But it also can be a reference in some nested struct like: - struct SomeStruct { - NSObject *myObject; - }; - - If that struct will be used in class, then name path would look like this: - @[@"_myIvar", @"SomeStruct", @"myObject"] - */ -- (nullable NSArray *)namePath; - -@end diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/LICENSE b/iOS_Tips/Pods/FBRetainCycleDetector/LICENSE deleted file mode 100644 index e1fe9070..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -License - -For FBRetainCycleDetector software - -Copyright (c) 2016-present, Facebook, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name Facebook nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/README.md b/iOS_Tips/Pods/FBRetainCycleDetector/README.md deleted file mode 100644 index 79bf40ea..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/README.md +++ /dev/null @@ -1,135 +0,0 @@ -# FBRetainCycleDetector -[![Build Status](https://travis-ci.org/facebook/FBRetainCycleDetector.svg?branch=master)](https://travis-ci.org/facebook/FBRetainCycleDetector) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![CocoaPods](https://img.shields.io/cocoapods/v/FBRetainCycleDetector.svg?maxAge=2592000)]() -[![License](https://img.shields.io/cocoapods/l/FBRetainCycleDetector.svg)](https://github.com/facebook/FBRetainCycledetector/blob/master/LICENSE) - -An iOS library that finds retain cycles using runtime analysis. - -## About -Retain cycles are one of the most common ways of creating memory leaks. It's incredibly easy to create a retain cycle, and tends to be hard to spot it. -The goal of FBRetainCycleDetector is to help find retain cycles at runtime. -The features of this project were influenced by [Circle](https://github.com/mikeash/Circle). - -## Installation - -### Carthage - -To your Cartfile add: - - github "facebook/FBRetainCycleDetector" - -`FBRetainCycleDetector` is built out from non-debug builds, so when you want to test it, use - - carthage update --configuration Debug - -### CocoaPods - -To your podspec add: - - pod 'FBRetainCycleDetector' - -You'll be able to use `FBRetainCycleDetector` fully only in `Debug` builds. This is controlled by [compilation flag](https://github.com/facebook/FBRetainCycleDetector/blob/master/FBRetainCycleDetector/Detector/FBRetainCycleDetector.h#L83) that can be provided to the build to make it work in other configurations. - -## Example usage - -Let's quickly dive in - -```objc -#import -``` - -```objc -FBRetainCycleDetector *detector = [FBRetainCycleDetector new]; -[detector addCandidate:myObject]; -NSSet *retainCycles = [detector findRetainCycles]; -NSLog(@"%@", retainCycles); -``` - -`- (NSSet *> *)findRetainCycles` will return a set of arrays of wrapped objects. It's pretty hard to look at at first, but let's go through it. Every array in this set will represent one retain cycle. Every element in this array is a wrapper around one object in this retain cycle. Check [FBObjectiveCGraphElement](https://github.com/facebook/FBRetainCycleDetector/blob/master/FBRetainCycleDetector/Graph/FBObjectiveCGraphElement.h). - -Example output could look like this: -``` -{( - ( - "-> MyObject ", - "-> _someObject -> __NSArrayI " - ) -)} -``` -`MyObject` through `someObject` property retained `NSArray` that it was a part of. - -FBRetainCycleDetector will look for cycles that are no longer than 10 objects. -We can make it bigger (although it's going to be slower!). - -```objc -FBRetainCycleDetector *detector = [FBRetainCycleDetector new]; -[detector addCandidate:myObject]; -NSSet *retainCycles = [detector findRetainCyclesWithMaxCycleLength:100]; -``` - -### Filters - -There could also be retain cycles that we would like to omit. It's because not every retain cycle is a leak, and we might want to filter them out. -To do so we need to specify filters: - -```objc -NSMutableArray *filters = @[ - FBFilterBlockWithObjectIvarRelation([UIView class], @"_subviewCache"), -]; - -// Configuration object can describe filters as well as some options -FBObjectGraphConfiguration *configuration = -[[FBObjectGraphConfiguration alloc] initWithFilterBlocks:filters - shouldInspectTimers:YES]; -FBRetainCycleDetector *detector = [[FBRetainCycleDetector alloc] initWithConfiguration:configuration]; -[detector addCandidate:myObject]; -NSSet *retainCycles = [detector findRetainCycles]; -``` - -Every filter is a block that having two `FBObjectiveCGraphElement` objects can say, if their relation is valid. - -Check [FBStandardGraphEdgeFilters](FBRetainCycleDetector/Filtering/FBStandardGraphEdgeFilters.h) to learn more about how to use filters. - -### NSTimer - -NSTimer can be troublesome as it will retain it's target. Oftentimes it means a retain cycle. `FBRetainCycleDetector` can detect those, -but if you want to skip them, you can specify that in the configuration you are passing to `FBRetainCycleDetector`. - -```objc -FBObjectGraphConfiguration *configuration = -[[FBObjectGraphConfiguration alloc] initWithFilterBlocks:someFilters - shouldInspectTimers:NO]; -FBRetainCycleDetector *detector = [[FBRetainCycleDetector alloc] initWithConfiguration:configuration]; -``` - -### Associations - -Objective-C let's us set associated objects for every object using [objc_setAssociatedObject](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ObjCRuntimeRef/#//apple_ref/c/func/objc_setAssociatedObject). - -These associated objects can lead to retain cycles if we use retaining policies, like `OBJC_ASSOCIATION_RETAIN_NONATOMIC`. FBRetainCycleDetector can catch these kinds of cycles, but to do so we need to set it up. Early in the application's lifetime, preferably in `main.m` we can add this: - -```objc -#import - -int main(int argc, char * argv[]) { - @autoreleasepool { - [FBAssociationManager hook]; - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} -``` - -In the code above `[FBAssociationManager hook]` will use [fishhook](https://github.com/facebook/fishhook) to interpose functions `objc_setAssociatedObject` and `objc_resetAssociatedObjects` to track associations before they are made. - -## Getting Candidates - -If you want to profile your app, you might want to have an abstraction over how to get candidates for `FBRetainCycleDetector`. While you can simply track it your own, you can also use [FBAllocationTracker](https://github.com/facebook/FBAllocationTracker). It's a small tool we created that can help you track the objects. It offers simple API that you can query for example for all instances of given class, or all class names currently tracked, etc. - -`FBAllocationTracker` and `FBRetainCycleDetector` can work nicely together. We have created a small example and drop-in project called [FBMemoryProfiler](https://github.com/facebook/FBMemoryProfiler) that leverages both these projects. It offers you very basic UI that you can use to track all allocations and force retain cycle detection from UI. - -## Contributing -See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out. - -## License -[`FBRetainCycleDetector` is BSD-licensed](LICENSE). We also provide an additional [patent grant](PATENTS). diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/fishhook/fishhook.c b/iOS_Tips/Pods/FBRetainCycleDetector/fishhook/fishhook.c deleted file mode 100644 index 00ea9aa9..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/fishhook/fishhook.c +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) 2013, Facebook, Inc. -// All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name Facebook nor the names of its contributors may be used to -// endorse or promote products derived from this software without specific -// prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "fishhook.h" - -#import -#import -#import -#import -#import -#import -#import - -#ifdef __LP64__ -typedef struct mach_header_64 mach_header_t; -typedef struct segment_command_64 segment_command_t; -typedef struct section_64 section_t; -typedef struct nlist_64 nlist_t; -#define LC_SEGMENT_ARCH_DEPENDENT LC_SEGMENT_64 -#else -typedef struct mach_header mach_header_t; -typedef struct segment_command segment_command_t; -typedef struct section section_t; -typedef struct nlist nlist_t; -#define LC_SEGMENT_ARCH_DEPENDENT LC_SEGMENT -#endif - -#ifndef SEG_DATA_CONST -#define SEG_DATA_CONST "__DATA_CONST" -#endif - -struct rcd_rebindings_entry { - struct rcd_rebinding *rebindings; - size_t rebindings_nel; - struct rcd_rebindings_entry *next; -}; - -static struct rcd_rebindings_entry *_rebindings_head; - -static int rcd_prepend_rebindings(struct rcd_rebindings_entry **rebindings_head, - struct rcd_rebinding rebindings[], - size_t nel) { - struct rcd_rebindings_entry *new_entry = malloc(sizeof(struct rcd_rebindings_entry)); - if (!new_entry) { - return -1; - } - new_entry->rebindings = malloc(sizeof(struct rcd_rebinding) * nel); - if (!new_entry->rebindings) { - free(new_entry); - return -1; - } - memcpy(new_entry->rebindings, rebindings, sizeof(struct rcd_rebinding) * nel); - new_entry->rebindings_nel = nel; - new_entry->next = *rebindings_head; - *rebindings_head = new_entry; - return 0; -} - -static void rcd_perform_rebinding_with_section(struct rcd_rebindings_entry *rebindings, - section_t *section, - intptr_t slide, - nlist_t *symtab, - char *strtab, - uint32_t *indirect_symtab) { - uint32_t *indirect_symbol_indices = indirect_symtab + section->reserved1; - void **indirect_symbol_bindings = (void **)((uintptr_t)slide + section->addr); - for (uint i = 0; i < section->size / sizeof(void *); i++) { - uint32_t symtab_index = indirect_symbol_indices[i]; - if (symtab_index == INDIRECT_SYMBOL_ABS || symtab_index == INDIRECT_SYMBOL_LOCAL || - symtab_index == (INDIRECT_SYMBOL_LOCAL | INDIRECT_SYMBOL_ABS)) { - continue; - } - uint32_t strtab_offset = symtab[symtab_index].n_un.n_strx; - char *symbol_name = strtab + strtab_offset; - struct rcd_rebindings_entry *cur = rebindings; - while (cur) { - for (uint j = 0; j < cur->rebindings_nel; j++) { - if (strlen(symbol_name) > 1 && - strcmp(&symbol_name[1], cur->rebindings[j].name) == 0) { - if (cur->rebindings[j].replaced != NULL && - indirect_symbol_bindings[i] != cur->rebindings[j].replacement) { - *(cur->rebindings[j].replaced) = indirect_symbol_bindings[i]; - } - indirect_symbol_bindings[i] = cur->rebindings[j].replacement; - goto symbol_loop; - } - } - cur = cur->next; - } - symbol_loop:; - } -} - -static void rebind_symbols_for_image(struct rcd_rebindings_entry *rebindings, - const struct mach_header *header, - intptr_t slide) { - Dl_info info; - if (dladdr(header, &info) == 0) { - return; - } - - segment_command_t *cur_seg_cmd; - segment_command_t *linkedit_segment = NULL; - struct symtab_command* symtab_cmd = NULL; - struct dysymtab_command* dysymtab_cmd = NULL; - - uintptr_t cur = (uintptr_t)header + sizeof(mach_header_t); - for (uint i = 0; i < header->ncmds; i++, cur += cur_seg_cmd->cmdsize) { - cur_seg_cmd = (segment_command_t *)cur; - if (cur_seg_cmd->cmd == LC_SEGMENT_ARCH_DEPENDENT) { - if (strcmp(cur_seg_cmd->segname, SEG_LINKEDIT) == 0) { - linkedit_segment = cur_seg_cmd; - } - } else if (cur_seg_cmd->cmd == LC_SYMTAB) { - symtab_cmd = (struct symtab_command*)cur_seg_cmd; - } else if (cur_seg_cmd->cmd == LC_DYSYMTAB) { - dysymtab_cmd = (struct dysymtab_command*)cur_seg_cmd; - } - } - - if (!symtab_cmd || !dysymtab_cmd || !linkedit_segment || - !dysymtab_cmd->nindirectsyms) { - return; - } - - // Find base symbol/string table addresses - uintptr_t linkedit_base = (uintptr_t)slide + linkedit_segment->vmaddr - linkedit_segment->fileoff; - nlist_t *symtab = (nlist_t *)(linkedit_base + symtab_cmd->symoff); - char *strtab = (char *)(linkedit_base + symtab_cmd->stroff); - - // Get indirect symbol table (array of uint32_t indices into symbol table) - uint32_t *indirect_symtab = (uint32_t *)(linkedit_base + dysymtab_cmd->indirectsymoff); - - cur = (uintptr_t)header + sizeof(mach_header_t); - for (uint i = 0; i < header->ncmds; i++, cur += cur_seg_cmd->cmdsize) { - cur_seg_cmd = (segment_command_t *)cur; - if (cur_seg_cmd->cmd == LC_SEGMENT_ARCH_DEPENDENT) { - if (strcmp(cur_seg_cmd->segname, SEG_DATA) != 0 && - strcmp(cur_seg_cmd->segname, SEG_DATA_CONST) != 0) { - continue; - } - for (uint j = 0; j < cur_seg_cmd->nsects; j++) { - section_t *sect = - (section_t *)(cur + sizeof(segment_command_t)) + j; - if ((sect->flags & SECTION_TYPE) == S_LAZY_SYMBOL_POINTERS) { - rcd_perform_rebinding_with_section(rebindings, sect, slide, symtab, strtab, indirect_symtab); - } - if ((sect->flags & SECTION_TYPE) == S_NON_LAZY_SYMBOL_POINTERS) { - rcd_perform_rebinding_with_section(rebindings, sect, slide, symtab, strtab, indirect_symtab); - } - } - } - } -} - -static void _rebind_symbols_for_image(const struct mach_header *header, - intptr_t slide) { - rebind_symbols_for_image(_rebindings_head, header, slide); -} - -int rcd_rebind_symbols_image(void *header, - intptr_t slide, - struct rcd_rebinding rebindings[], - size_t rebindings_nel) { - struct rcd_rebindings_entry *rebindings_head = NULL; - int retval = rcd_prepend_rebindings(&rebindings_head, rebindings, rebindings_nel); - rebind_symbols_for_image(rebindings_head, header, slide); - free(rebindings_head); - return retval; -} - -int rcd_rebind_symbols(struct rcd_rebinding rebindings[], size_t rebindings_nel) { - int retval = rcd_prepend_rebindings(&_rebindings_head, rebindings, rebindings_nel); - if (retval < 0) { - return retval; - } - // If this was the first call, register callback for image additions (which is also invoked for - // existing images, otherwise, just run on existing images - if (!_rebindings_head->next) { - _dyld_register_func_for_add_image(_rebind_symbols_for_image); - } else { - uint32_t c = _dyld_image_count(); - for (uint32_t i = 0; i < c; i++) { - _rebind_symbols_for_image(_dyld_get_image_header(i), _dyld_get_image_vmaddr_slide(i)); - } - } - return retval; -} diff --git a/iOS_Tips/Pods/FBRetainCycleDetector/fishhook/fishhook.h b/iOS_Tips/Pods/FBRetainCycleDetector/fishhook/fishhook.h deleted file mode 100644 index 20beedc4..00000000 --- a/iOS_Tips/Pods/FBRetainCycleDetector/fishhook/fishhook.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2013, Facebook, Inc. -// All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name Facebook nor the names of its contributors may be used to -// endorse or promote products derived from this software without specific -// prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef fishhook_h -#define fishhook_h - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - -/* - * A structure representing a particular intended rebinding from a symbol - * name to its replacement - */ -struct rcd_rebinding { - const char *name; - void *replacement; - void **replaced; -}; - -/* - * For each rebinding in rebindings, rebinds references to external, indirect - * symbols with the specified name to instead point at replacement for each - * image in the calling process as well as for all future images that are loaded - * by the process. If rebind_functions is called more than once, the symbols to - * rebind are added to the existing list of rebindings, and if a given symbol - * is rebound more than once, the later rebinding will take precedence. - */ -int rcd_rebind_symbols(struct rcd_rebinding rebindings[], size_t rebindings_nel); - -/* - * Rebinds as above, but only in the specified image. The header should point - * to the mach-o header, the slide should be the slide offset. Others as above. - */ -int rcd_rebind_symbols_image(void *header, - intptr_t slide, - struct rcd_rebinding rebindings[], - size_t rebindings_nel); - -#ifdef __cplusplus -} -#endif //__cplusplus - -#endif //fishhook_h - diff --git a/iOS_Tips/Pods/GPUImage/License.txt b/iOS_Tips/Pods/GPUImage/License.txt deleted file mode 100755 index e8062d91..00000000 --- a/iOS_Tips/Pods/GPUImage/License.txt +++ /dev/null @@ -1,9 +0,0 @@ -Copyright (c) 2012, Brad Larson, Ben Cochran, Hugues Lismonde, Keitaroh Kobayashi, Alaric Cole, Matthew Clark, Jacob Gundersen, Chris Williams. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -Neither the name of the GPUImage framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/iOS_Tips/Pods/GPUImage/README.md b/iOS_Tips/Pods/GPUImage/README.md deleted file mode 100755 index a487f368..00000000 --- a/iOS_Tips/Pods/GPUImage/README.md +++ /dev/null @@ -1,733 +0,0 @@ -# GPUImage # - -
- - - -Brad Larson - -http://www.sunsetlakesoftware.com - -[@bradlarson](http://twitter.com/bradlarson) - -contact@sunsetlakesoftware.com - -## Overview ## - -The GPUImage framework is a BSD-licensed iOS library that lets you apply GPU-accelerated filters and other effects to images, live camera video, and movies. In comparison to Core Image (part of iOS 5.0), GPUImage allows you to write your own custom filters, supports deployment to iOS 4.0, and has a simpler interface. However, it currently lacks some of the more advanced features of Core Image, such as facial detection. - -For massively parallel operations like processing images or live video frames, GPUs have some significant performance advantages over CPUs. On an iPhone 4, a simple image filter can be over 100 times faster to perform on the GPU than an equivalent CPU-based filter. - -However, running custom filters on the GPU requires a lot of code to set up and maintain an OpenGL ES 2.0 rendering target for these filters. I created a sample project to do this: - -http://www.sunsetlakesoftware.com/2010/10/22/gpu-accelerated-video-processing-mac-and-ios - -and found that there was a lot of boilerplate code I had to write in its creation. Therefore, I put together this framework that encapsulates a lot of the common tasks you'll encounter when processing images and video and made it so that you don't need to care about the OpenGL ES 2.0 underpinnings. - -This framework compares favorably to Core Image when handling video, taking only 2.5 ms on an iPhone 4 to upload a frame from the camera, apply a gamma filter, and display, versus 106 ms for the same operation using Core Image. CPU-based processing takes 460 ms, making GPUImage 40X faster than Core Image for this operation on this hardware, and 184X faster than CPU-bound processing. On an iPhone 4S, GPUImage is only 4X faster than Core Image for this case, and 102X faster than CPU-bound processing. However, for more complex operations like Gaussian blurs at larger radii, Core Image currently outpaces GPUImage. - -## License ## - -BSD-style, with the full license available with the framework in License.txt. - -## Technical requirements ## - -- OpenGL ES 2.0: Applications using this will not run on the original iPhone, iPhone 3G, and 1st and 2nd generation iPod touches -- iOS 4.1 as a deployment target (4.0 didn't have some extensions needed for movie reading). iOS 4.3 is needed as a deployment target if you wish to show live video previews when taking a still photo. -- iOS 5.0 SDK to build -- Devices must have a camera to use camera-related functionality (obviously) -- The framework uses automatic reference counting (ARC), but should support projects using both ARC and manual reference counting if added as a subproject as explained below. For manual reference counting applications targeting iOS 4.x, you'll need add -fobjc-arc to the Other Linker Flags for your application project. - -## General architecture ## - -GPUImage uses OpenGL ES 2.0 shaders to perform image and video manipulation much faster than could be done in CPU-bound routines. However, it hides the complexity of interacting with the OpenGL ES API in a simplified Objective-C interface. This interface lets you define input sources for images and video, attach filters in a chain, and send the resulting processed image or video to the screen, to a UIImage, or to a movie on disk. - -Images or frames of video are uploaded from source objects, which are subclasses of GPUImageOutput. These include GPUImageVideoCamera (for live video from an iOS camera), GPUImageStillCamera (for taking photos with the camera), GPUImagePicture (for still images), and GPUImageMovie (for movies). Source objects upload still image frames to OpenGL ES as textures, then hand those textures off to the next objects in the processing chain. - -Filters and other subsequent elements in the chain conform to the GPUImageInput protocol, which lets them take in the supplied or processed texture from the previous link in the chain and do something with it. Objects one step further down the chain are considered targets, and processing can be branched by adding multiple targets to a single output or filter. - -For example, an application that takes in live video from the camera, converts that video to a sepia tone, then displays the video onscreen would set up a chain looking something like the following: - - GPUImageVideoCamera -> GPUImageSepiaFilter -> GPUImageView - -## Adding the static library to your iOS project ## - -Note: if you want to use this in a Swift project, you need to use the steps in the "Adding this as a framework" section instead of the following. Swift needs modules for third-party code. - -Once you have the latest source code for the framework, it's fairly straightforward to add it to your application. Start by dragging the GPUImage.xcodeproj file into your application's Xcode project to embed the framework in your project. Next, go to your application's target and add GPUImage as a Target Dependency. Finally, you'll want to drag the libGPUImage.a library from the GPUImage framework's Products folder to the Link Binary With Libraries build phase in your application's target. - -GPUImage needs a few other frameworks to be linked into your application, so you'll need to add the following as linked libraries in your application target: - -- CoreMedia -- CoreVideo -- OpenGLES -- AVFoundation -- QuartzCore - -You'll also need to find the framework headers, so within your project's build settings set the Header Search Paths to the relative path from your application to the framework/ subdirectory within the GPUImage source directory. Make this header search path recursive. - -To use the GPUImage classes within your application, simply include the core framework header using the following: - - #import "GPUImage.h" - -As a note: if you run into the error "Unknown class GPUImageView in Interface Builder" or the like when trying to build an interface with Interface Builder, you may need to add -ObjC to your Other Linker Flags in your project's build settings. - -Also, if you need to deploy this to iOS 4.x, it appears that the current version of Xcode (4.3) requires that you weak-link the Core Video framework in your final application or you see crashes with the message "Symbol not found: _CVOpenGLESTextureCacheCreate" when you create an archive for upload to the App Store or for ad hoc distribution. To do this, go to your project's Build Phases tab, expand the Link Binary With Libraries group, and find CoreVideo.framework in the list. Change the setting for it in the far right of the list from Required to Optional. - -Additionally, this is an ARC-enabled framework, so if you want to use this within a manual reference counted application targeting iOS 4.x, you'll need to add -fobjc-arc to your Other Linker Flags as well. - -### Building a static library at the command line ### - -If you don't want to include the project as a dependency in your application's Xcode project, you can build a universal static library for the iOS Simulator or device. To do this, run `build.sh` at the command line. The resulting library and header files will be located at `build/Release-iphone`. You may also change the version of the iOS SDK by changing the `IOSSDK_VER` variable in `build.sh` (all available versions can be found using `xcodebuild -showsdks`). - -## Adding this as a framework (module) to your Mac or iOS project ## - -Xcode 6 and iOS 8 support the use of full frameworks, as does the Mac, which simplifies the process of adding this to your application. To add this to your application, I recommend dragging the .xcodeproj project file into your application's project (as you would in the static library target). - -For your application, go to its target build settings and choose the Build Phases tab. Under the Target Dependencies grouping, add GPUImageFramework on iOS (not GPUImage, which builds the static library) or GPUImage on the Mac. Under the Link Binary With Libraries section, add GPUImage.framework. - -This should cause GPUImage to build as a framework. Under Xcode 6, this will also build as a module, which will allow you to use this in Swift projects. When set up as above, you should just need to use - - import GPUImage - -to pull it in. - -You then need to add a new Copy Files build phase, set the Destination to Frameworks, and add the GPUImage.framework build product to that. This will allow the framework to be bundled with your application (otherwise, you'll see cryptic "dyld: Library not loaded: @rpath/GPUImage.framework/GPUImage" errors on execution). - -### Documentation ### - -Documentation is generated from header comments using appledoc. To build the documentation, switch to the "Documentation" scheme in Xcode. You should ensure that "APPLEDOC_PATH" (a User-Defined build setting) points to an appledoc binary, available on Github or through Homebrew. It will also build and install a .docset file, which you can view with your favorite documentation tool. - -## Performing common tasks ## - -### Filtering live video ### - -To filter live video from an iOS device's camera, you can use code like the following: - - GPUImageVideoCamera *videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionBack]; - videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait; - - GPUImageFilter *customFilter = [[GPUImageFilter alloc] initWithFragmentShaderFromFile:@"CustomShader"]; - GPUImageView *filteredVideoView = [[GPUImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, viewWidth, viewHeight)]; - - // Add the view somewhere so it's visible - - [videoCamera addTarget:customFilter]; - [customFilter addTarget:filteredVideoView]; - - [videoCamera startCameraCapture]; - -This sets up a video source coming from the iOS device's back-facing camera, using a preset that tries to capture at 640x480. This video is captured with the interface being in portrait mode, where the landscape-left-mounted camera needs to have its video frames rotated before display. A custom filter, using code from the file CustomShader.fsh, is then set as the target for the video frames from the camera. These filtered video frames are finally displayed onscreen with the help of a UIView subclass that can present the filtered OpenGL ES texture that results from this pipeline. - -The fill mode of the GPUImageView can be altered by setting its fillMode property, so that if the aspect ratio of the source video is different from that of the view, the video will either be stretched, centered with black bars, or zoomed to fill. - -For blending filters and others that take in more than one image, you can create multiple outputs and add a single filter as a target for both of these outputs. The order with which the outputs are added as targets will affect the order in which the input images are blended or otherwise processed. - -Also, if you wish to enable microphone audio capture for recording to a movie, you'll need to set the audioEncodingTarget of the camera to be your movie writer, like for the following: - - videoCamera.audioEncodingTarget = movieWriter; - - -### Capturing and filtering a still photo ### - -To capture and filter still photos, you can use a process similar to the one for filtering video. Instead of a GPUImageVideoCamera, you use a GPUImageStillCamera: - - stillCamera = [[GPUImageStillCamera alloc] init]; - stillCamera.outputImageOrientation = UIInterfaceOrientationPortrait; - - filter = [[GPUImageGammaFilter alloc] init]; - [stillCamera addTarget:filter]; - GPUImageView *filterView = (GPUImageView *)self.view; - [filter addTarget:filterView]; - - [stillCamera startCameraCapture]; - -This will give you a live, filtered feed of the still camera's preview video. Note that this preview video is only provided on iOS 4.3 and higher, so you may need to set that as your deployment target if you wish to have this functionality. - -Once you want to capture a photo, you use a callback block like the following: - - [stillCamera capturePhotoProcessedUpToFilter:filter withCompletionHandler:^(UIImage *processedImage, NSError *error){ - NSData *dataForJPEGFile = UIImageJPEGRepresentation(processedImage, 0.8); - - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - NSString *documentsDirectory = [paths objectAtIndex:0]; - - NSError *error2 = nil; - if (![dataForJPEGFile writeToFile:[documentsDirectory stringByAppendingPathComponent:@"FilteredPhoto.jpg"] options:NSAtomicWrite error:&error2]) - { - return; - } - }]; - -The above code captures a full-size photo processed by the same filter chain used in the preview view and saves that photo to disk as a JPEG in the application's documents directory. - -Note that the framework currently can't handle images larger than 2048 pixels wide or high on older devices (those before the iPhone 4S, iPad 2, or Retina iPad) due to texture size limitations. This means that the iPhone 4, whose camera outputs still photos larger than this, won't be able to capture photos like this. A tiling mechanism is being implemented to work around this. All other devices should be able to capture and filter photos using this method. - -### Processing a still image ### - -There are a couple of ways to process a still image and create a result. The first way you can do this is by creating a still image source object and manually creating a filter chain: - - UIImage *inputImage = [UIImage imageNamed:@"Lambeau.jpg"]; - - GPUImagePicture *stillImageSource = [[GPUImagePicture alloc] initWithImage:inputImage]; - GPUImageSepiaFilter *stillImageFilter = [[GPUImageSepiaFilter alloc] init]; - - [stillImageSource addTarget:stillImageFilter]; - [stillImageFilter useNextFrameForImageCapture]; - [stillImageSource processImage]; - - UIImage *currentFilteredVideoFrame = [stillImageFilter imageFromCurrentFramebuffer]; - -Note that for a manual capture of an image from a filter, you need to set -useNextFrameForImageCapture in order to tell the filter that you'll be needing to capture from it later. By default, GPUImage reuses framebuffers within filters to conserve memory, so if you need to hold on to a filter's framebuffer for manual image capture, you need to let it know ahead of time. - -For single filters that you wish to apply to an image, you can simply do the following: - - GPUImageSepiaFilter *stillImageFilter2 = [[GPUImageSepiaFilter alloc] init]; - UIImage *quickFilteredImage = [stillImageFilter2 imageByFilteringImage:inputImage]; - - -### Writing a custom filter ### - -One significant advantage of this framework over Core Image on iOS (as of iOS 5.0) is the ability to write your own custom image and video processing filters. These filters are supplied as OpenGL ES 2.0 fragment shaders, written in the C-like OpenGL Shading Language. - -A custom filter is initialized with code like - - GPUImageFilter *customFilter = [[GPUImageFilter alloc] initWithFragmentShaderFromFile:@"CustomShader"]; - -where the extension used for the fragment shader is .fsh. Additionally, you can use the -initWithFragmentShaderFromString: initializer to provide the fragment shader as a string, if you would not like to ship your fragment shaders in your application bundle. - -Fragment shaders perform their calculations for each pixel to be rendered at that filter stage. They do this using the OpenGL Shading Language (GLSL), a C-like language with additions specific to 2-D and 3-D graphics. An example of a fragment shader is the following sepia-tone filter: - - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 outputColor; - outputColor.r = (textureColor.r * 0.393) + (textureColor.g * 0.769) + (textureColor.b * 0.189); - outputColor.g = (textureColor.r * 0.349) + (textureColor.g * 0.686) + (textureColor.b * 0.168); - outputColor.b = (textureColor.r * 0.272) + (textureColor.g * 0.534) + (textureColor.b * 0.131); - outputColor.a = 1.0; - - gl_FragColor = outputColor; - } - -For an image filter to be usable within the GPUImage framework, the first two lines that take in the textureCoordinate varying (for the current coordinate within the texture, normalized to 1.0) and the inputImageTexture uniform (for the actual input image frame texture) are required. - -The remainder of the shader grabs the color of the pixel at this location in the passed-in texture, manipulates it in such a way as to produce a sepia tone, and writes that pixel color out to be used in the next stage of the processing pipeline. - -One thing to note when adding fragment shaders to your Xcode project is that Xcode thinks they are source code files. To work around this, you'll need to manually move your shader from the Compile Sources build phase to the Copy Bundle Resources one in order to get the shader to be included in your application bundle. - - -### Filtering and re-encoding a movie ### - -Movies can be loaded into the framework via the GPUImageMovie class, filtered, and then written out using a GPUImageMovieWriter. GPUImageMovieWriter is also fast enough to record video in realtime from an iPhone 4's camera at 640x480, so a direct filtered video source can be fed into it. Currently, GPUImageMovieWriter is fast enough to record live 720p video at up to 20 FPS on the iPhone 4, and both 720p and 1080p video at 30 FPS on the iPhone 4S (as well as on the new iPad). - -The following is an example of how you would load a sample movie, pass it through a pixellation filter, then record the result to disk as a 480 x 640 h.264 movie: - - movieFile = [[GPUImageMovie alloc] initWithURL:sampleURL]; - pixellateFilter = [[GPUImagePixellateFilter alloc] init]; - - [movieFile addTarget:pixellateFilter]; - - NSString *pathToMovie = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Movie.m4v"]; - unlink([pathToMovie UTF8String]); - NSURL *movieURL = [NSURL fileURLWithPath:pathToMovie]; - - movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:movieURL size:CGSizeMake(480.0, 640.0)]; - [pixellateFilter addTarget:movieWriter]; - - movieWriter.shouldPassthroughAudio = YES; - movieFile.audioEncodingTarget = movieWriter; - [movieFile enableSynchronizedEncodingUsingMovieWriter:movieWriter]; - - [movieWriter startRecording]; - [movieFile startProcessing]; - -Once recording is finished, you need to remove the movie recorder from the filter chain and close off the recording using code like the following: - - [pixellateFilter removeTarget:movieWriter]; - [movieWriter finishRecording]; - -A movie won't be usable until it has been finished off, so if this is interrupted before this point, the recording will be lost. - -### Interacting with OpenGL ES ### - -GPUImage can both export and import textures from OpenGL ES through the use of its GPUImageTextureOutput and GPUImageTextureInput classes, respectively. This lets you record a movie from an OpenGL ES scene that is rendered to a framebuffer object with a bound texture, or filter video or images and then feed them into OpenGL ES as a texture to be displayed in the scene. - -The one caution with this approach is that the textures used in these processes must be shared between GPUImage's OpenGL ES context and any other context via a share group or something similar. - -## Built-in filters ## - -There are currently 125 built-in filters, divided into the following categories: - -### Color adjustments ### - -- **GPUImageBrightnessFilter**: Adjusts the brightness of the image - - *brightness*: The adjusted brightness (-1.0 - 1.0, with 0.0 as the default) - -- **GPUImageExposureFilter**: Adjusts the exposure of the image - - *exposure*: The adjusted exposure (-10.0 - 10.0, with 0.0 as the default) - -- **GPUImageContrastFilter**: Adjusts the contrast of the image - - *contrast*: The adjusted contrast (0.0 - 4.0, with 1.0 as the default) - -- **GPUImageSaturationFilter**: Adjusts the saturation of an image - - *saturation*: The degree of saturation or desaturation to apply to the image (0.0 - 2.0, with 1.0 as the default) - -- **GPUImageGammaFilter**: Adjusts the gamma of an image - - *gamma*: The gamma adjustment to apply (0.0 - 3.0, with 1.0 as the default) - -- **GPUImageLevelsFilter**: Photoshop-like levels adjustment. The min, max, minOut and maxOut parameters are floats in the range [0, 1]. If you have parameters from Photoshop in the range [0, 255] you must first convert them to be [0, 1]. The gamma/mid parameter is a float >= 0. This matches the value from Photoshop. If you want to apply levels to RGB as well as individual channels you need to use this filter twice - first for the individual channels and then for all channels. - -- **GPUImageColorMatrixFilter**: Transforms the colors of an image by applying a matrix to them - - *colorMatrix*: A 4x4 matrix used to transform each color in an image - - *intensity*: The degree to which the new transformed color replaces the original color for each pixel - -- **GPUImageRGBFilter**: Adjusts the individual RGB channels of an image - - *red*: Normalized values by which each color channel is multiplied. The range is from 0.0 up, with 1.0 as the default. - - *green*: - - *blue*: - -- **GPUImageHueFilter**: Adjusts the hue of an image - - *hue*: The hue angle, in degrees. 90 degrees by default - -- **GPUImageToneCurveFilter**: Adjusts the colors of an image based on spline curves for each color channel. - - *redControlPoints*: - - *greenControlPoints*: - - *blueControlPoints*: - - *rgbCompositeControlPoints*: The tone curve takes in a series of control points that define the spline curve for each color component, or for all three in the composite. These are stored as NSValue-wrapped CGPoints in an NSArray, with normalized X and Y coordinates from 0 - 1. The defaults are (0,0), (0.5,0.5), (1,1). - -- **GPUImageHighlightShadowFilter**: Adjusts the shadows and highlights of an image - - *shadows*: Increase to lighten shadows, from 0.0 to 1.0, with 0.0 as the default. - - *highlights*: Decrease to darken highlights, from 0.0 to 1.0, with 1.0 as the default. - -- **GPUImageLookupFilter**: Uses an RGB color lookup image to remap the colors in an image. First, use your favourite photo editing application to apply a filter to lookup.png from GPUImage/framework/Resources. For this to work properly each pixel color must not depend on other pixels (e.g. blur will not work). If you need a more complex filter you can create as many lookup tables as required. Once ready, use your new lookup.png file as a second input for GPUImageLookupFilter. - -- **GPUImageAmatorkaFilter**: A photo filter based on a Photoshop action by Amatorka: http://amatorka.deviantart.com/art/Amatorka-Action-2-121069631 . If you want to use this effect you have to add lookup_amatorka.png from the GPUImage Resources folder to your application bundle. - -- **GPUImageMissEtikateFilter**: A photo filter based on a Photoshop action by Miss Etikate: http://miss-etikate.deviantart.com/art/Photoshop-Action-15-120151961 . If you want to use this effect you have to add lookup_miss_etikate.png from the GPUImage Resources folder to your application bundle. - -- **GPUImageSoftEleganceFilter**: Another lookup-based color remapping filter. If you want to use this effect you have to add lookup_soft_elegance_1.png and lookup_soft_elegance_2.png from the GPUImage Resources folder to your application bundle. - -- **GPUImageColorInvertFilter**: Inverts the colors of an image - -- **GPUImageGrayscaleFilter**: Converts an image to grayscale (a slightly faster implementation of the saturation filter, without the ability to vary the color contribution) - -- **GPUImageMonochromeFilter**: Converts the image to a single-color version, based on the luminance of each pixel - - *intensity*: The degree to which the specific color replaces the normal image color (0.0 - 1.0, with 1.0 as the default) - - *color*: The color to use as the basis for the effect, with (0.6, 0.45, 0.3, 1.0) as the default. - -- **GPUImageFalseColorFilter**: Uses the luminance of the image to mix between two user-specified colors - - *firstColor*: The first and second colors specify what colors replace the dark and light areas of the image, respectively. The defaults are (0.0, 0.0, 0.5) amd (1.0, 0.0, 0.0). - - *secondColor*: - -- **GPUImageHazeFilter**: Used to add or remove haze (similar to a UV filter) - - *distance*: Strength of the color applied. Default 0. Values between -.3 and .3 are best. - - *slope*: Amount of color change. Default 0. Values between -.3 and .3 are best. - -- **GPUImageSepiaFilter**: Simple sepia tone filter - - *intensity*: The degree to which the sepia tone replaces the normal image color (0.0 - 1.0, with 1.0 as the default) - -- **GPUImageOpacityFilter**: Adjusts the alpha channel of the incoming image - - *opacity*: The value to multiply the incoming alpha channel for each pixel by (0.0 - 1.0, with 1.0 as the default) - -- **GPUImageSolidColorGenerator**: This outputs a generated image with a solid color. You need to define the image size using -forceProcessingAtSize: - - *color*: The color, in a four component format, that is used to fill the image. - -- **GPUImageLuminanceThresholdFilter**: Pixels with a luminance above the threshold will appear white, and those below will be black - - *threshold*: The luminance threshold, from 0.0 to 1.0, with a default of 0.5 - -- **GPUImageAdaptiveThresholdFilter**: Determines the local luminance around a pixel, then turns the pixel black if it is below that local luminance and white if above. This can be useful for picking out text under varying lighting conditions. - - *blurRadiusInPixels*: A multiplier for the background averaging blur radius in pixels, with a default of 4. - -- **GPUImageAverageLuminanceThresholdFilter**: This applies a thresholding operation where the threshold is continually adjusted based on the average luminance of the scene. - - *thresholdMultiplier*: This is a factor that the average luminance will be multiplied by in order to arrive at the final threshold to use. By default, this is 1.0. - -- **GPUImageHistogramFilter**: This analyzes the incoming image and creates an output histogram with the frequency at which each color value occurs. The output of this filter is a 3-pixel-high, 256-pixel-wide image with the center (vertical) pixels containing pixels that correspond to the frequency at which various color values occurred. Each color value occupies one of the 256 width positions, from 0 on the left to 255 on the right. This histogram can be generated for individual color channels (kGPUImageHistogramRed, kGPUImageHistogramGreen, kGPUImageHistogramBlue), the luminance of the image (kGPUImageHistogramLuminance), or for all three color channels at once (kGPUImageHistogramRGB). - - *downsamplingFactor*: Rather than sampling every pixel, this dictates what fraction of the image is sampled. By default, this is 16 with a minimum of 1. This is needed to keep from saturating the histogram, which can only record 256 pixels for each color value before it becomes overloaded. - -- **GPUImageHistogramGenerator**: This is a special filter, in that it's primarily intended to work with the GPUImageHistogramFilter. It generates an output representation of the color histograms generated by GPUImageHistogramFilter, but it could be repurposed to display other kinds of values. It takes in an image and looks at the center (vertical) pixels. It then plots the numerical values of the RGB components in separate colored graphs in an output texture. You may need to force a size for this filter in order to make its output visible. - -- **GPUImageAverageColor**: This processes an input image and determines the average color of the scene, by averaging the RGBA components for each pixel in the image. A reduction process is used to progressively downsample the source image on the GPU, followed by a short averaging calculation on the CPU. The output from this filter is meaningless, but you need to set the colorAverageProcessingFinishedBlock property to a block that takes in four color components and a frame time and does something with them. - -- **GPUImageLuminosity**: Like the GPUImageAverageColor, this reduces an image to its average luminosity. You need to set the luminosityProcessingFinishedBlock to handle the output of this filter, which just returns a luminosity value and a frame time. - -- **GPUImageChromaKeyFilter**: For a given color in the image, sets the alpha channel to 0. This is similar to the GPUImageChromaKeyBlendFilter, only instead of blending in a second image for a matching color this doesn't take in a second image and just turns a given color transparent. - - *thresholdSensitivity*: How close a color match needs to exist to the target color to be replaced (default of 0.4) - - *smoothing*: How smoothly to blend for the color match (default of 0.1) - -### Image processing ### - -- **GPUImageTransformFilter**: This applies an arbitrary 2-D or 3-D transformation to an image - - *affineTransform*: This takes in a CGAffineTransform to adjust an image in 2-D - - *transform3D*: This takes in a CATransform3D to manipulate an image in 3-D - - *ignoreAspectRatio*: By default, the aspect ratio of the transformed image is maintained, but this can be set to YES to make the transformation independent of aspect ratio - -- **GPUImageCropFilter**: This crops an image to a specific region, then passes only that region on to the next stage in the filter - - *cropRegion*: A rectangular area to crop out of the image, normalized to coordinates from 0.0 - 1.0. The (0.0, 0.0) position is in the upper left of the image. - -- **GPUImageLanczosResamplingFilter**: This lets you up- or downsample an image using Lanczos resampling, which results in noticeably better quality than the standard linear or trilinear interpolation. Simply use -forceProcessingAtSize: to set the target output resolution for the filter, and the image will be resampled for that new size. - -- **GPUImageSharpenFilter**: Sharpens the image - - *sharpness*: The sharpness adjustment to apply (-4.0 - 4.0, with 0.0 as the default) - -- **GPUImageUnsharpMaskFilter**: Applies an unsharp mask - - *blurRadiusInPixels*: The blur radius of the underlying Gaussian blur. The default is 4.0. - - *intensity*: The strength of the sharpening, from 0.0 on up, with a default of 1.0 - -- **GPUImageGaussianBlurFilter**: A hardware-optimized, variable-radius Gaussian blur - - *texelSpacingMultiplier*: A multiplier for the spacing between texels, ranging from 0.0 on up, with a default of 1.0. Adjusting this may slightly increase the blur strength, but will introduce artifacts in the result. Highly recommend using other parameters first, before touching this one. - - *blurRadiusInPixels*: A radius in pixels to use for the blur, with a default of 2.0. This adjusts the sigma variable in the Gaussian distribution function. - - *blurRadiusAsFractionOfImageWidth*: - - *blurRadiusAsFractionOfImageHeight*: Setting these properties will allow the blur radius to scale with the size of the image - - *blurPasses*: The number of times to sequentially blur the incoming image. The more passes, the slower the filter. - -- **GPUImageBoxBlurFilter**: A hardware-optimized, variable-radius box blur - - *texelSpacingMultiplier*: A multiplier for the spacing between texels, ranging from 0.0 on up, with a default of 1.0. Adjusting this may slightly increase the blur strength, but will introduce artifacts in the result. Highly recommend using other parameters first, before touching this one. - - *blurRadiusInPixels*: A radius in pixels to use for the blur, with a default of 2.0. This adjusts the sigma variable in the Gaussian distribution function. - - *blurRadiusAsFractionOfImageWidth*: - - *blurRadiusAsFractionOfImageHeight*: Setting these properties will allow the blur radius to scale with the size of the image - - *blurPasses*: The number of times to sequentially blur the incoming image. The more passes, the slower the filter. - -- **GPUImageSingleComponentGaussianBlurFilter**: A modification of the GPUImageGaussianBlurFilter that operates only on the red component - - *texelSpacingMultiplier*: A multiplier for the spacing between texels, ranging from 0.0 on up, with a default of 1.0. Adjusting this may slightly increase the blur strength, but will introduce artifacts in the result. Highly recommend using other parameters first, before touching this one. - - *blurRadiusInPixels*: A radius in pixels to use for the blur, with a default of 2.0. This adjusts the sigma variable in the Gaussian distribution function. - - *blurRadiusAsFractionOfImageWidth*: - - *blurRadiusAsFractionOfImageHeight*: Setting these properties will allow the blur radius to scale with the size of the image - - *blurPasses*: The number of times to sequentially blur the incoming image. The more passes, the slower the filter. - -- **GPUImageGaussianSelectiveBlurFilter**: A Gaussian blur that preserves focus within a circular region - - *blurRadiusInPixels*: A radius in pixels to use for the blur, with a default of 5.0. This adjusts the sigma variable in the Gaussian distribution function. - - *excludeCircleRadius*: The radius of the circular area being excluded from the blur - - *excludeCirclePoint*: The center of the circular area being excluded from the blur - - *excludeBlurSize*: The size of the area between the blurred portion and the clear circle - - *aspectRatio*: The aspect ratio of the image, used to adjust the circularity of the in-focus region. By default, this matches the image aspect ratio, but you can override this value. - -- **GPUImageGaussianBlurPositionFilter**: The inverse of the GPUImageGaussianSelectiveBlurFilter, applying the blur only within a certain circle - - *blurSize*: A multiplier for the size of the blur, ranging from 0.0 on up, with a default of 1.0 - - *blurCenter*: Center for the blur, defaults to 0.5, 0.5 - - *blurRadius*: Radius for the blur, defaults to 1.0 - -- **GPUImageiOSBlurFilter**: An attempt to replicate the background blur used on iOS 7 in places like the control center. - - *blurRadiusInPixels*: A radius in pixels to use for the blur, with a default of 12.0. This adjusts the sigma variable in the Gaussian distribution function. - - *saturation*: Saturation ranges from 0.0 (fully desaturated) to 2.0 (max saturation), with 0.8 as the normal level - - *downsampling*: The degree to which to downsample, then upsample the incoming image to minimize computations within the Gaussian blur, with a default of 4.0. - -- **GPUImageMedianFilter**: Takes the median value of the three color components, over a 3x3 area - -- **GPUImageBilateralFilter**: A bilateral blur, which tries to blur similar color values while preserving sharp edges - - *texelSpacingMultiplier*: A multiplier for the spacing between texel reads, ranging from 0.0 on up, with a default of 4.0 - - *distanceNormalizationFactor*: A normalization factor for the distance between central color and sample color, with a default of 8.0. - -- **GPUImageTiltShiftFilter**: A simulated tilt shift lens effect - - *blurRadiusInPixels*: The radius of the underlying blur, in pixels. This is 7.0 by default. - - *topFocusLevel*: The normalized location of the top of the in-focus area in the image, this value should be lower than bottomFocusLevel, default 0.4 - - *bottomFocusLevel*: The normalized location of the bottom of the in-focus area in the image, this value should be higher than topFocusLevel, default 0.6 - - *focusFallOffRate*: The rate at which the image gets blurry away from the in-focus region, default 0.2 - -- **GPUImage3x3ConvolutionFilter**: Runs a 3x3 convolution kernel against the image - - *convolutionKernel*: The convolution kernel is a 3x3 matrix of values to apply to the pixel and its 8 surrounding pixels. The matrix is specified in row-major order, with the top left pixel being one.one and the bottom right three.three. If the values in the matrix don't add up to 1.0, the image could be brightened or darkened. - -- **GPUImageSobelEdgeDetectionFilter**: Sobel edge detection, with edges highlighted in white - - *texelWidth*: - - *texelHeight*: These parameters affect the visibility of the detected edges - - *edgeStrength*: Adjusts the dynamic range of the filter. Higher values lead to stronger edges, but can saturate the intensity colorspace. Default is 1.0. - -- **GPUImagePrewittEdgeDetectionFilter**: Prewitt edge detection, with edges highlighted in white - - *texelWidth*: - - *texelHeight*: These parameters affect the visibility of the detected edges - - *edgeStrength*: Adjusts the dynamic range of the filter. Higher values lead to stronger edges, but can saturate the intensity colorspace. Default is 1.0. - -- **GPUImageThresholdEdgeDetectionFilter**: Performs Sobel edge detection, but applies a threshold instead of giving gradual strength values - - *texelWidth*: - - *texelHeight*: These parameters affect the visibility of the detected edges - - *edgeStrength*: Adjusts the dynamic range of the filter. Higher values lead to stronger edges, but can saturate the intensity colorspace. Default is 1.0. - - *threshold*: Any edge above this threshold will be black, and anything below white. Ranges from 0.0 to 1.0, with 0.8 as the default - -- **GPUImageCannyEdgeDetectionFilter**: This uses the full Canny process to highlight one-pixel-wide edges - - *texelWidth*: - - *texelHeight*: These parameters affect the visibility of the detected edges - - *blurRadiusInPixels*: The underlying blur radius for the Gaussian blur. Default is 2.0. - - *blurTexelSpacingMultiplier*: The underlying blur texel spacing multiplier. Default is 1.0. - - *upperThreshold*: Any edge with a gradient magnitude above this threshold will pass and show up in the final result. Default is 0.4. - - *lowerThreshold*: Any edge with a gradient magnitude below this threshold will fail and be removed from the final result. Default is 0.1. - -- **GPUImageHarrisCornerDetectionFilter**: Runs the Harris corner detection algorithm on an input image, and produces an image with those corner points as white pixels and everything else black. The cornersDetectedBlock can be set, and you will be provided with a list of corners (in normalized 0..1 X, Y coordinates) within that callback for whatever additional operations you want to perform. - - *blurRadiusInPixels*: The radius of the underlying Gaussian blur. The default is 2.0. - - *sensitivity*: An internal scaling factor applied to adjust the dynamic range of the cornerness maps generated in the filter. The default is 5.0. - - *threshold*: The threshold at which a point is detected as a corner. This can vary significantly based on the size, lighting conditions, and iOS device camera type, so it might take a little experimentation to get right for your cases. Default is 0.20. - -- **GPUImageNobleCornerDetectionFilter**: Runs the Noble variant on the Harris corner detector. It behaves as described above for the Harris detector. - - *blurRadiusInPixels*: The radius of the underlying Gaussian blur. The default is 2.0. - - *sensitivity*: An internal scaling factor applied to adjust the dynamic range of the cornerness maps generated in the filter. The default is 5.0. - - *threshold*: The threshold at which a point is detected as a corner. This can vary significantly based on the size, lighting conditions, and iOS device camera type, so it might take a little experimentation to get right for your cases. Default is 0.2. - -- **GPUImageShiTomasiCornerDetectionFilter**: Runs the Shi-Tomasi feature detector. It behaves as described above for the Harris detector. - - *blurRadiusInPixels*: The radius of the underlying Gaussian blur. The default is 2.0. - - *sensitivity*: An internal scaling factor applied to adjust the dynamic range of the cornerness maps generated in the filter. The default is 1.5. - - *threshold*: The threshold at which a point is detected as a corner. This can vary significantly based on the size, lighting conditions, and iOS device camera type, so it might take a little experimentation to get right for your cases. Default is 0.2. - -- **GPUImageNonMaximumSuppressionFilter**: Currently used only as part of the Harris corner detection filter, this will sample a 1-pixel box around each pixel and determine if the center pixel's red channel is the maximum in that area. If it is, it stays. If not, it is set to 0 for all color components. - -- **GPUImageXYDerivativeFilter**: An internal component within the Harris corner detection filter, this calculates the squared difference between the pixels to the left and right of this one, the squared difference of the pixels above and below this one, and the product of those two differences. - -- **GPUImageCrosshairGenerator**: This draws a series of crosshairs on an image, most often used for identifying machine vision features. It does not take in a standard image like other filters, but a series of points in its -renderCrosshairsFromArray:count: method, which does the actual drawing. You will need to force this filter to render at the particular output size you need. - - *crosshairWidth*: The width, in pixels, of the crosshairs to be drawn onscreen. - -- **GPUImageDilationFilter**: This performs an image dilation operation, where the maximum intensity of the red channel in a rectangular neighborhood is used for the intensity of this pixel. The radius of the rectangular area to sample over is specified on initialization, with a range of 1-4 pixels. This is intended for use with grayscale images, and it expands bright regions. - -- **GPUImageRGBDilationFilter**: This is the same as the GPUImageDilationFilter, except that this acts on all color channels, not just the red channel. - -- **GPUImageErosionFilter**: This performs an image erosion operation, where the minimum intensity of the red channel in a rectangular neighborhood is used for the intensity of this pixel. The radius of the rectangular area to sample over is specified on initialization, with a range of 1-4 pixels. This is intended for use with grayscale images, and it expands dark regions. - -- **GPUImageRGBErosionFilter**: This is the same as the GPUImageErosionFilter, except that this acts on all color channels, not just the red channel. - -- **GPUImageOpeningFilter**: This performs an erosion on the red channel of an image, followed by a dilation of the same radius. The radius is set on initialization, with a range of 1-4 pixels. This filters out smaller bright regions. - -- **GPUImageRGBOpeningFilter**: This is the same as the GPUImageOpeningFilter, except that this acts on all color channels, not just the red channel. - -- **GPUImageClosingFilter**: This performs a dilation on the red channel of an image, followed by an erosion of the same radius. The radius is set on initialization, with a range of 1-4 pixels. This filters out smaller dark regions. - -- **GPUImageRGBClosingFilter**: This is the same as the GPUImageClosingFilter, except that this acts on all color channels, not just the red channel. - -- **GPUImageLocalBinaryPatternFilter**: This performs a comparison of intensity of the red channel of the 8 surrounding pixels and that of the central one, encoding the comparison results in a bit string that becomes this pixel intensity. The least-significant bit is the top-right comparison, going counterclockwise to end at the right comparison as the most significant bit. - -- **GPUImageLowPassFilter**: This applies a low pass filter to incoming video frames. This basically accumulates a weighted rolling average of previous frames with the current ones as they come in. This can be used to denoise video, add motion blur, or be used to create a high pass filter. - - *filterStrength*: This controls the degree by which the previous accumulated frames are blended with the current one. This ranges from 0.0 to 1.0, with a default of 0.5. - -- **GPUImageHighPassFilter**: This applies a high pass filter to incoming video frames. This is the inverse of the low pass filter, showing the difference between the current frame and the weighted rolling average of previous ones. This is most useful for motion detection. - - *filterStrength*: This controls the degree by which the previous accumulated frames are blended and then subtracted from the current one. This ranges from 0.0 to 1.0, with a default of 0.5. - -- **GPUImageMotionDetector**: This is a motion detector based on a high-pass filter. You set the motionDetectionBlock and on every incoming frame it will give you the centroid of any detected movement in the scene (in normalized X,Y coordinates) as well as an intensity of motion for the scene. - - *lowPassFilterStrength*: This controls the strength of the low pass filter used behind the scenes to establish the baseline that incoming frames are compared with. This ranges from 0.0 to 1.0, with a default of 0.5. - -- **GPUImageHoughTransformLineDetector**: Detects lines in the image using a Hough transform into parallel coordinate space. This approach is based entirely on the PC lines process developed by the Graph@FIT research group at the Brno University of Technology and described in their publications: M. Dubská, J. Havel, and A. Herout. Real-Time Detection of Lines using Parallel Coordinates and OpenGL. Proceedings of SCCG 2011, Bratislava, SK, p. 7 (http://medusa.fit.vutbr.cz/public/data/papers/2011-SCCG-Dubska-Real-Time-Line-Detection-Using-PC-and-OpenGL.pdf) and M. Dubská, J. Havel, and A. Herout. PClines — Line detection using parallel coordinates. 2011 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), p. 1489- 1494 (http://medusa.fit.vutbr.cz/public/data/papers/2011-CVPR-Dubska-PClines.pdf). - - *edgeThreshold*: A threshold value for which a point is detected as belonging to an edge for determining lines. Default is 0.9. - - *lineDetectionThreshold*: A threshold value for which a local maximum is detected as belonging to a line in parallel coordinate space. Default is 0.20. - - *linesDetectedBlock*: This block is called on the detection of lines, usually on every processed frame. A C array containing normalized slopes and intercepts in m, b pairs (y=mx+b) is passed in, along with a count of the number of lines detected and the current timestamp of the video frame. - -- **GPUImageLineGenerator**: A helper class that generates lines which can overlay the scene. The color of these lines can be adjusted using -setLineColorRed:green:blue: - - *lineWidth*: The width of the lines, in pixels, with a default of 1.0. - -- **GPUImageMotionBlurFilter**: Applies a directional motion blur to an image - - *blurSize*: A multiplier for the blur size, ranging from 0.0 on up, with a default of 1.0 - - *blurAngle*: The angular direction of the blur, in degrees. 0 degrees by default. - -- **GPUImageZoomBlurFilter**: Applies a directional motion blur to an image - - *blurSize*: A multiplier for the blur size, ranging from 0.0 on up, with a default of 1.0 - - *blurCenter*: The normalized center of the blur. (0.5, 0.5) by default - -### Blending modes ### - -- **GPUImageChromaKeyBlendFilter**: Selectively replaces a color in the first image with the second image - - *thresholdSensitivity*: How close a color match needs to exist to the target color to be replaced (default of 0.4) - - *smoothing*: How smoothly to blend for the color match (default of 0.1) - -- **GPUImageDissolveBlendFilter**: Applies a dissolve blend of two images - - *mix*: The degree with which the second image overrides the first (0.0 - 1.0, with 0.5 as the default) - -- **GPUImageMultiplyBlendFilter**: Applies a multiply blend of two images - -- **GPUImageAddBlendFilter**: Applies an additive blend of two images - -- **GPUImageSubtractBlendFilter**: Applies a subtractive blend of two images - -- **GPUImageDivideBlendFilter**: Applies a division blend of two images - -- **GPUImageOverlayBlendFilter**: Applies an overlay blend of two images - -- **GPUImageDarkenBlendFilter**: Blends two images by taking the minimum value of each color component between the images - -- **GPUImageLightenBlendFilter**: Blends two images by taking the maximum value of each color component between the images - -- **GPUImageColorBurnBlendFilter**: Applies a color burn blend of two images - -- **GPUImageColorDodgeBlendFilter**: Applies a color dodge blend of two images - -- **GPUImageScreenBlendFilter**: Applies a screen blend of two images - -- **GPUImageExclusionBlendFilter**: Applies an exclusion blend of two images - -- **GPUImageDifferenceBlendFilter**: Applies a difference blend of two images - -- **GPUImageHardLightBlendFilter**: Applies a hard light blend of two images - -- **GPUImageSoftLightBlendFilter**: Applies a soft light blend of two images - -- **GPUImageAlphaBlendFilter**: Blends the second image over the first, based on the second's alpha channel - - *mix*: The degree with which the second image overrides the first (0.0 - 1.0, with 1.0 as the default) - -- **GPUImageSourceOverBlendFilter**: Applies a source over blend of two images - -- **GPUImageColorBurnBlendFilter**: Applies a color burn blend of two images - -- **GPUImageColorDodgeBlendFilter**: Applies a color dodge blend of two images - -- **GPUImageNormalBlendFilter**: Applies a normal blend of two images - -- **GPUImageColorBlendFilter**: Applies a color blend of two images - -- **GPUImageHueBlendFilter**: Applies a hue blend of two images - -- **GPUImageSaturationBlendFilter**: Applies a saturation blend of two images - -- **GPUImageLuminosityBlendFilter**: Applies a luminosity blend of two images - -- **GPUImageLinearBurnBlendFilter**: Applies a linear burn blend of two images - -- **GPUImagePoissonBlendFilter**: Applies a Poisson blend of two images - - *mix*: Mix ranges from 0.0 (only image 1) to 1.0 (only image 2 gradients), with 1.0 as the normal level - - *numIterations*: The number of times to propagate the gradients. Crank this up to 100 or even 1000 if you want to get anywhere near convergence. Yes, this will be slow. - -- **GPUImageMaskFilter**: Masks one image using another - -### Visual effects ### - -- **GPUImagePixellateFilter**: Applies a pixellation effect on an image or video - - *fractionalWidthOfAPixel*: How large the pixels are, as a fraction of the width and height of the image (0.0 - 1.0, default 0.05) - -- **GPUImagePolarPixellateFilter**: Applies a pixellation effect on an image or video, based on polar coordinates instead of Cartesian ones - - *center*: The center about which to apply the pixellation, defaulting to (0.5, 0.5) - - *pixelSize*: The fractional pixel size, split into width and height components. The default is (0.05, 0.05) - -- **GPUImagePolkaDotFilter**: Breaks an image up into colored dots within a regular grid - - *fractionalWidthOfAPixel*: How large the dots are, as a fraction of the width and height of the image (0.0 - 1.0, default 0.05) - - *dotScaling*: What fraction of each grid space is taken up by a dot, from 0.0 to 1.0 with a default of 0.9. - -- **GPUImageHalftoneFilter**: Applies a halftone effect to an image, like news print - - *fractionalWidthOfAPixel*: How large the halftone dots are, as a fraction of the width and height of the image (0.0 - 1.0, default 0.05) - -- **GPUImageCrosshatchFilter**: This converts an image into a black-and-white crosshatch pattern - - *crossHatchSpacing*: The fractional width of the image to use as the spacing for the crosshatch. The default is 0.03. - - *lineWidth*: A relative width for the crosshatch lines. The default is 0.003. - -- **GPUImageSketchFilter**: Converts video to look like a sketch. This is just the Sobel edge detection filter with the colors inverted - - *texelWidth*: - - *texelHeight*: These parameters affect the visibility of the detected edges - - *edgeStrength*: Adjusts the dynamic range of the filter. Higher values lead to stronger edges, but can saturate the intensity colorspace. Default is 1.0. - -- **GPUImageThresholdSketchFilter**: Same as the sketch filter, only the edges are thresholded instead of being grayscale - - *texelWidth*: - - *texelHeight*: These parameters affect the visibility of the detected edges - - *edgeStrength*: Adjusts the dynamic range of the filter. Higher values lead to stronger edges, but can saturate the intensity colorspace. Default is 1.0. - - *threshold*: Any edge above this threshold will be black, and anything below white. Ranges from 0.0 to 1.0, with 0.8 as the default - -- **GPUImageToonFilter**: This uses Sobel edge detection to place a black border around objects, and then it quantizes the colors present in the image to give a cartoon-like quality to the image. - - *texelWidth*: - - *texelHeight*: These parameters affect the visibility of the detected edges - - *threshold*: The sensitivity of the edge detection, with lower values being more sensitive. Ranges from 0.0 to 1.0, with 0.2 as the default - - *quantizationLevels*: The number of color levels to represent in the final image. Default is 10.0 - -- **GPUImageSmoothToonFilter**: This uses a similar process as the GPUImageToonFilter, only it precedes the toon effect with a Gaussian blur to smooth out noise. - - *texelWidth*: - - *texelHeight*: These parameters affect the visibility of the detected edges - - *blurRadiusInPixels*: The radius of the underlying Gaussian blur. The default is 2.0. - - *threshold*: The sensitivity of the edge detection, with lower values being more sensitive. Ranges from 0.0 to 1.0, with 0.2 as the default - - *quantizationLevels*: The number of color levels to represent in the final image. Default is 10.0 - -- **GPUImageEmbossFilter**: Applies an embossing effect on the image - - *intensity*: The strength of the embossing, from 0.0 to 4.0, with 1.0 as the normal level - -- **GPUImagePosterizeFilter**: This reduces the color dynamic range into the number of steps specified, leading to a cartoon-like simple shading of the image. - - *colorLevels*: The number of color levels to reduce the image space to. This ranges from 1 to 256, with a default of 10. - -- **GPUImageSwirlFilter**: Creates a swirl distortion on the image - - *radius*: The radius from the center to apply the distortion, with a default of 0.5 - - *center*: The center of the image (in normalized coordinates from 0 - 1.0) about which to twist, with a default of (0.5, 0.5) - - *angle*: The amount of twist to apply to the image, with a default of 1.0 - -- **GPUImageBulgeDistortionFilter**: Creates a bulge distortion on the image - - *radius*: The radius from the center to apply the distortion, with a default of 0.25 - - *center*: The center of the image (in normalized coordinates from 0 - 1.0) about which to distort, with a default of (0.5, 0.5) - - *scale*: The amount of distortion to apply, from -1.0 to 1.0, with a default of 0.5 - -- **GPUImagePinchDistortionFilter**: Creates a pinch distortion of the image - - *radius*: The radius from the center to apply the distortion, with a default of 1.0 - - *center*: The center of the image (in normalized coordinates from 0 - 1.0) about which to distort, with a default of (0.5, 0.5) - - *scale*: The amount of distortion to apply, from -2.0 to 2.0, with a default of 1.0 - -- **GPUImageStretchDistortionFilter**: Creates a stretch distortion of the image - - *center*: The center of the image (in normalized coordinates from 0 - 1.0) about which to distort, with a default of (0.5, 0.5) - -- **GPUImageSphereRefractionFilter**: Simulates the refraction through a glass sphere - - *center*: The center about which to apply the distortion, with a default of (0.5, 0.5) - - *radius*: The radius of the distortion, ranging from 0.0 to 1.0, with a default of 0.25 - - *refractiveIndex*: The index of refraction for the sphere, with a default of 0.71 - -- **GPUImageGlassSphereFilter**: Same as the GPUImageSphereRefractionFilter, only the image is not inverted and there's a little bit of frosting at the edges of the glass - - *center*: The center about which to apply the distortion, with a default of (0.5, 0.5) - - *radius*: The radius of the distortion, ranging from 0.0 to 1.0, with a default of 0.25 - - *refractiveIndex*: The index of refraction for the sphere, with a default of 0.71 - -- **GPUImageVignetteFilter**: Performs a vignetting effect, fading out the image at the edges - - *x*: - - *y*: The directional intensity of the vignetting, with a default of x = 0.75, y = 0.5 - -- **GPUImageKuwaharaFilter**: Kuwahara image abstraction, drawn from the work of Kyprianidis, et. al. in their publication "Anisotropic Kuwahara Filtering on the GPU" within the GPU Pro collection. This produces an oil-painting-like image, but it is extremely computationally expensive, so it can take seconds to render a frame on an iPad 2. This might be best used for still images. - - *radius*: In integer specifying the number of pixels out from the center pixel to test when applying the filter, with a default of 4. A higher value creates a more abstracted image, but at the cost of much greater processing time. - -- **GPUImageKuwaharaRadius3Filter**: A modified version of the Kuwahara filter, optimized to work over just a radius of three pixels - -- **GPUImagePerlinNoiseFilter**: Generates an image full of Perlin noise - - *colorStart*: - - *colorFinish*: The color range for the noise being generated - - *scale*: The scaling of the noise being generated - -- **GPUImageCGAColorspaceFilter**: Simulates the colorspace of a CGA monitor - -- **GPUImageMosaicFilter**: This filter takes an input tileset, the tiles must ascend in luminance. It looks at the input image and replaces each display tile with an input tile according to the luminance of that tile. The idea was to replicate the ASCII video filters seen in other apps, but the tileset can be anything. - - *inputTileSize*: - - *numTiles*: - - *displayTileSize*: - - *colorOn*: - -- **GPUImageJFAVoronoiFilter**: Generates a Voronoi map, for use in a later stage. - - *sizeInPixels*: Size of the individual elements - -- **GPUImageVoronoiConsumerFilter**: Takes in the Voronoi map, and uses that to filter an incoming image. - - *sizeInPixels*: Size of the individual elements - -You can also easily write your own custom filters using the C-like OpenGL Shading Language, as described above. - -## Sample applications ## - -Several sample applications are bundled with the framework source. Most are compatible with both iPhone and iPad-class devices. They attempt to show off various aspects of the framework and should be used as the best examples of the API while the framework is under development. These include: - -### SimpleImageFilter ### - -A bundled JPEG image is loaded into the application at launch, a filter is applied to it, and the result rendered to the screen. Additionally, this sample shows two ways of taking in an image, filtering it, and saving it to disk. - -### SimpleVideoFilter ### - -A pixellate filter is applied to a live video stream, with a UISlider control that lets you adjust the pixel size on the live video. - -### SimpleVideoFileFilter ### - -A movie file is loaded from disk, an unsharp mask filter is applied to it, and the filtered result is re-encoded as another movie. - -### MultiViewFilterExample ### - -From a single camera feed, four views are populated with realtime filters applied to camera. One is just the straight camera video, one is a preprogrammed sepia tone, and two are custom filters based on shader programs. - -### FilterShowcase ### - -This demonstrates every filter supplied with GPUImage. - -### BenchmarkSuite ### - -This is used to test the performance of the overall framework by testing it against CPU-bound routines and Core Image. Benchmarks involving still images and video are run against all three, with results displayed in-application. - -### CubeExample ### - -This demonstrates the ability of GPUImage to interact with OpenGL ES rendering. Frames are captured from the camera, a sepia filter applied to them, and then they are fed into a texture to be applied to the face of a cube you can rotate with your finger. This cube in turn is rendered to a texture-backed framebuffer object, and that texture is fed back into GPUImage to have a pixellation filter applied to it before rendering to screen. - -In other words, the path of this application is camera -> sepia tone filter -> cube -> pixellation filter -> display. - -### ColorObjectTracking ### - -A version of my ColorTracking example from http://www.sunsetlakesoftware.com/2010/10/22/gpu-accelerated-video-processing-mac-and-ios ported across to use GPUImage, this application uses color in a scene to track objects from a live camera feed. The four views you can switch between include the raw camera feed, the camera feed with pixels matching the color threshold in white, the processed video where positions are encoded as colors within the pixels passing the threshold test, and finally the live video feed with a dot that tracks the selected color. Tapping the screen changes the color to track to match the color of the pixels under your finger. Tapping and dragging on the screen makes the color threshold more or less forgiving. This is most obvious on the second, color thresholding view. - -Currently, all processing for the color averaging in the last step is done on the CPU, so this is part is extremely slow. diff --git a/iOS_Tips/Pods/GPUImage/framework/Resources/lookup.png b/iOS_Tips/Pods/GPUImage/framework/Resources/lookup.png deleted file mode 100644 index ed814dfb..00000000 Binary files a/iOS_Tips/Pods/GPUImage/framework/Resources/lookup.png and /dev/null differ diff --git a/iOS_Tips/Pods/GPUImage/framework/Resources/lookup_amatorka.png b/iOS_Tips/Pods/GPUImage/framework/Resources/lookup_amatorka.png deleted file mode 100644 index 4a2cc8ac..00000000 Binary files a/iOS_Tips/Pods/GPUImage/framework/Resources/lookup_amatorka.png and /dev/null differ diff --git a/iOS_Tips/Pods/GPUImage/framework/Resources/lookup_miss_etikate.png b/iOS_Tips/Pods/GPUImage/framework/Resources/lookup_miss_etikate.png deleted file mode 100644 index e1317d78..00000000 Binary files a/iOS_Tips/Pods/GPUImage/framework/Resources/lookup_miss_etikate.png and /dev/null differ diff --git a/iOS_Tips/Pods/GPUImage/framework/Resources/lookup_soft_elegance_1.png b/iOS_Tips/Pods/GPUImage/framework/Resources/lookup_soft_elegance_1.png deleted file mode 100644 index 525437ab..00000000 Binary files a/iOS_Tips/Pods/GPUImage/framework/Resources/lookup_soft_elegance_1.png and /dev/null differ diff --git a/iOS_Tips/Pods/GPUImage/framework/Resources/lookup_soft_elegance_2.png b/iOS_Tips/Pods/GPUImage/framework/Resources/lookup_soft_elegance_2.png deleted file mode 100644 index ccc6d4ec..00000000 Binary files a/iOS_Tips/Pods/GPUImage/framework/Resources/lookup_soft_elegance_2.png and /dev/null differ diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GLProgram.h b/iOS_Tips/Pods/GPUImage/framework/Source/GLProgram.h deleted file mode 100755 index cd455e71..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GLProgram.h +++ /dev/null @@ -1,42 +0,0 @@ -// This is Jeff LaMarche's GLProgram OpenGL shader wrapper class from his OpenGL ES 2.0 book. -// A description of this can be found at his page on the topic: -// http://iphonedevelopment.blogspot.com/2010/11/opengl-es-20-for-ios-chapter-4.html -// I've extended this to be able to take programs as NSStrings in addition to files, for baked-in shaders - -#import - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -#import -#import -#else -#import -#import -#endif - -@interface GLProgram : NSObject -{ - NSMutableArray *attributes; - NSMutableArray *uniforms; - GLuint program, - vertShader, - fragShader; -} - -@property(readwrite, nonatomic) BOOL initialized; -@property(readwrite, copy, nonatomic) NSString *vertexShaderLog; -@property(readwrite, copy, nonatomic) NSString *fragmentShaderLog; -@property(readwrite, copy, nonatomic) NSString *programLog; - -- (id)initWithVertexShaderString:(NSString *)vShaderString - fragmentShaderString:(NSString *)fShaderString; -- (id)initWithVertexShaderString:(NSString *)vShaderString - fragmentShaderFilename:(NSString *)fShaderFilename; -- (id)initWithVertexShaderFilename:(NSString *)vShaderFilename - fragmentShaderFilename:(NSString *)fShaderFilename; -- (void)addAttribute:(NSString *)attributeName; -- (GLuint)attributeIndex:(NSString *)attributeName; -- (GLuint)uniformIndex:(NSString *)uniformName; -- (BOOL)link; -- (void)use; -- (void)validate; -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GLProgram.m b/iOS_Tips/Pods/GPUImage/framework/Source/GLProgram.m deleted file mode 100755 index 105d75fe..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GLProgram.m +++ /dev/null @@ -1,236 +0,0 @@ -// This is Jeff LaMarche's GLProgram OpenGL shader wrapper class from his OpenGL ES 2.0 book. -// A description of this can be found at his page on the topic: -// http://iphonedevelopment.blogspot.com/2010/11/opengl-es-20-for-ios-chapter-4.html - - -#import "GLProgram.h" -// START:typedefs -#pragma mark Function Pointer Definitions -typedef void (*GLInfoFunction)(GLuint program, GLenum pname, GLint* params); -typedef void (*GLLogFunction) (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); -// END:typedefs -#pragma mark - -#pragma mark Private Extension Method Declaration -// START:extension -@interface GLProgram() - -- (BOOL)compileShader:(GLuint *)shader - type:(GLenum)type - string:(NSString *)shaderString; -@end -// END:extension -#pragma mark - - -@implementation GLProgram -// START:init - -@synthesize initialized = _initialized; - -- (id)initWithVertexShaderString:(NSString *)vShaderString - fragmentShaderString:(NSString *)fShaderString; -{ - if ((self = [super init])) - { - _initialized = NO; - - attributes = [[NSMutableArray alloc] init]; - uniforms = [[NSMutableArray alloc] init]; - program = glCreateProgram(); - - if (![self compileShader:&vertShader - type:GL_VERTEX_SHADER - string:vShaderString]) - { - NSLog(@"Failed to compile vertex shader"); - } - - // Create and compile fragment shader - if (![self compileShader:&fragShader - type:GL_FRAGMENT_SHADER - string:fShaderString]) - { - NSLog(@"Failed to compile fragment shader"); - } - - glAttachShader(program, vertShader); - glAttachShader(program, fragShader); - } - - return self; -} - -- (id)initWithVertexShaderString:(NSString *)vShaderString - fragmentShaderFilename:(NSString *)fShaderFilename; -{ - NSString *fragShaderPathname = [[NSBundle mainBundle] pathForResource:fShaderFilename ofType:@"fsh"]; - NSString *fragmentShaderString = [NSString stringWithContentsOfFile:fragShaderPathname encoding:NSUTF8StringEncoding error:nil]; - - if ((self = [self initWithVertexShaderString:vShaderString fragmentShaderString:fragmentShaderString])) - { - } - - return self; -} - -- (id)initWithVertexShaderFilename:(NSString *)vShaderFilename - fragmentShaderFilename:(NSString *)fShaderFilename; -{ - NSString *vertShaderPathname = [[NSBundle mainBundle] pathForResource:vShaderFilename ofType:@"vsh"]; - NSString *vertexShaderString = [NSString stringWithContentsOfFile:vertShaderPathname encoding:NSUTF8StringEncoding error:nil]; - - NSString *fragShaderPathname = [[NSBundle mainBundle] pathForResource:fShaderFilename ofType:@"fsh"]; - NSString *fragmentShaderString = [NSString stringWithContentsOfFile:fragShaderPathname encoding:NSUTF8StringEncoding error:nil]; - - if ((self = [self initWithVertexShaderString:vertexShaderString fragmentShaderString:fragmentShaderString])) - { - } - - return self; -} -// END:init -// START:compile -- (BOOL)compileShader:(GLuint *)shader - type:(GLenum)type - string:(NSString *)shaderString -{ -// CFAbsoluteTime startTime = CFAbsoluteTimeGetCurrent(); - - GLint status; - const GLchar *source; - - source = - (GLchar *)[shaderString UTF8String]; - if (!source) - { - NSLog(@"Failed to load vertex shader"); - return NO; - } - - *shader = glCreateShader(type); - glShaderSource(*shader, 1, &source, NULL); - glCompileShader(*shader); - - glGetShaderiv(*shader, GL_COMPILE_STATUS, &status); - - if (status != GL_TRUE) - { - GLint logLength; - glGetShaderiv(*shader, GL_INFO_LOG_LENGTH, &logLength); - if (logLength > 0) - { - GLchar *log = (GLchar *)malloc(logLength); - glGetShaderInfoLog(*shader, logLength, &logLength, log); - if (shader == &vertShader) - { - self.vertexShaderLog = [NSString stringWithFormat:@"%s", log]; - } - else - { - self.fragmentShaderLog = [NSString stringWithFormat:@"%s", log]; - } - - free(log); - } - } - -// CFAbsoluteTime linkTime = (CFAbsoluteTimeGetCurrent() - startTime); -// NSLog(@"Compiled in %f ms", linkTime * 1000.0); - - return status == GL_TRUE; -} -// END:compile -#pragma mark - -// START:addattribute -- (void)addAttribute:(NSString *)attributeName -{ - if (![attributes containsObject:attributeName]) - { - [attributes addObject:attributeName]; - glBindAttribLocation(program, - (GLuint)[attributes indexOfObject:attributeName], - [attributeName UTF8String]); - } -} -// END:addattribute -// START:indexmethods -- (GLuint)attributeIndex:(NSString *)attributeName -{ - return (GLuint)[attributes indexOfObject:attributeName]; -} -- (GLuint)uniformIndex:(NSString *)uniformName -{ - return glGetUniformLocation(program, [uniformName UTF8String]); -} -// END:indexmethods -#pragma mark - -// START:link -- (BOOL)link -{ -// CFAbsoluteTime startTime = CFAbsoluteTimeGetCurrent(); - - GLint status; - - glLinkProgram(program); - - glGetProgramiv(program, GL_LINK_STATUS, &status); - if (status == GL_FALSE) - return NO; - - if (vertShader) - { - glDeleteShader(vertShader); - vertShader = 0; - } - if (fragShader) - { - glDeleteShader(fragShader); - fragShader = 0; - } - - self.initialized = YES; - -// CFAbsoluteTime linkTime = (CFAbsoluteTimeGetCurrent() - startTime); -// NSLog(@"Linked in %f ms", linkTime * 1000.0); - - return YES; -} -// END:link -// START:use -- (void)use -{ - glUseProgram(program); -} -// END:use -#pragma mark - - -- (void)validate; -{ - GLint logLength; - - glValidateProgram(program); - glGetProgramiv(program, GL_INFO_LOG_LENGTH, &logLength); - if (logLength > 0) - { - GLchar *log = (GLchar *)malloc(logLength); - glGetProgramInfoLog(program, logLength, &logLength, log); - self.programLog = [NSString stringWithFormat:@"%s", log]; - free(log); - } -} - -#pragma mark - -// START:dealloc -- (void)dealloc -{ - if (vertShader) - glDeleteShader(vertShader); - - if (fragShader) - glDeleteShader(fragShader); - - if (program) - glDeleteProgram(program); - -} -// END:dealloc -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage.h deleted file mode 100755 index f7e96b36..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage.h +++ /dev/null @@ -1,164 +0,0 @@ -#import "GLProgram.h" - -// Base classes -#import "GPUImageContext.h" -#import "GPUImageOutput.h" -#import "GPUImageView.h" -#import "GPUImageVideoCamera.h" -#import "GPUImageStillCamera.h" -#import "GPUImageMovie.h" -#import "GPUImagePicture.h" -#import "GPUImageRawDataInput.h" -#import "GPUImageRawDataOutput.h" -#import "GPUImageMovieWriter.h" -#import "GPUImageFilterPipeline.h" -#import "GPUImageTextureOutput.h" -#import "GPUImageFilterGroup.h" -#import "GPUImageTextureInput.h" -#import "GPUImageUIElement.h" -#import "GPUImageBuffer.h" -#import "GPUImageFramebuffer.h" -#import "GPUImageFramebufferCache.h" - -// Filters -#import "GPUImageFilter.h" -#import "GPUImageTwoInputFilter.h" -#import "GPUImagePixellateFilter.h" -#import "GPUImagePixellatePositionFilter.h" -#import "GPUImageSepiaFilter.h" -#import "GPUImageColorInvertFilter.h" -#import "GPUImageSaturationFilter.h" -#import "GPUImageContrastFilter.h" -#import "GPUImageExposureFilter.h" -#import "GPUImageBrightnessFilter.h" -#import "GPUImageLevelsFilter.h" -#import "GPUImageSharpenFilter.h" -#import "GPUImageGammaFilter.h" -#import "GPUImageSobelEdgeDetectionFilter.h" -#import "GPUImageSketchFilter.h" -#import "GPUImageToonFilter.h" -#import "GPUImageSmoothToonFilter.h" -#import "GPUImageMultiplyBlendFilter.h" -#import "GPUImageDissolveBlendFilter.h" -#import "GPUImageKuwaharaFilter.h" -#import "GPUImageKuwaharaRadius3Filter.h" -#import "GPUImageVignetteFilter.h" -#import "GPUImageGaussianBlurFilter.h" -#import "GPUImageGaussianBlurPositionFilter.h" -#import "GPUImageGaussianSelectiveBlurFilter.h" -#import "GPUImageOverlayBlendFilter.h" -#import "GPUImageDarkenBlendFilter.h" -#import "GPUImageLightenBlendFilter.h" -#import "GPUImageSwirlFilter.h" -#import "GPUImageSourceOverBlendFilter.h" -#import "GPUImageColorBurnBlendFilter.h" -#import "GPUImageColorDodgeBlendFilter.h" -#import "GPUImageScreenBlendFilter.h" -#import "GPUImageExclusionBlendFilter.h" -#import "GPUImageDifferenceBlendFilter.h" -#import "GPUImageSubtractBlendFilter.h" -#import "GPUImageHardLightBlendFilter.h" -#import "GPUImageSoftLightBlendFilter.h" -#import "GPUImageColorBlendFilter.h" -#import "GPUImageHueBlendFilter.h" -#import "GPUImageSaturationBlendFilter.h" -#import "GPUImageLuminosityBlendFilter.h" -#import "GPUImageCropFilter.h" -#import "GPUImageGrayscaleFilter.h" -#import "GPUImageTransformFilter.h" -#import "GPUImageChromaKeyBlendFilter.h" -#import "GPUImageHazeFilter.h" -#import "GPUImageLuminanceThresholdFilter.h" -#import "GPUImagePosterizeFilter.h" -#import "GPUImageBoxBlurFilter.h" -#import "GPUImageAdaptiveThresholdFilter.h" -#import "GPUImageUnsharpMaskFilter.h" -#import "GPUImageBulgeDistortionFilter.h" -#import "GPUImagePinchDistortionFilter.h" -#import "GPUImageCrosshatchFilter.h" -#import "GPUImageCGAColorspaceFilter.h" -#import "GPUImagePolarPixellateFilter.h" -#import "GPUImageStretchDistortionFilter.h" -#import "GPUImagePerlinNoiseFilter.h" -#import "GPUImageJFAVoronoiFilter.h" -#import "GPUImageVoronoiConsumerFilter.h" -#import "GPUImageMosaicFilter.h" -#import "GPUImageTiltShiftFilter.h" -#import "GPUImage3x3ConvolutionFilter.h" -#import "GPUImageEmbossFilter.h" -#import "GPUImageCannyEdgeDetectionFilter.h" -#import "GPUImageThresholdEdgeDetectionFilter.h" -#import "GPUImageMaskFilter.h" -#import "GPUImageHistogramFilter.h" -#import "GPUImageHistogramGenerator.h" -#import "GPUImageHistogramEqualizationFilter.h" -#import "GPUImagePrewittEdgeDetectionFilter.h" -#import "GPUImageXYDerivativeFilter.h" -#import "GPUImageHarrisCornerDetectionFilter.h" -#import "GPUImageAlphaBlendFilter.h" -#import "GPUImageNormalBlendFilter.h" -#import "GPUImageNonMaximumSuppressionFilter.h" -#import "GPUImageRGBFilter.h" -#import "GPUImageMedianFilter.h" -#import "GPUImageBilateralFilter.h" -#import "GPUImageCrosshairGenerator.h" -#import "GPUImageToneCurveFilter.h" -#import "GPUImageNobleCornerDetectionFilter.h" -#import "GPUImageShiTomasiFeatureDetectionFilter.h" -#import "GPUImageErosionFilter.h" -#import "GPUImageRGBErosionFilter.h" -#import "GPUImageDilationFilter.h" -#import "GPUImageRGBDilationFilter.h" -#import "GPUImageOpeningFilter.h" -#import "GPUImageRGBOpeningFilter.h" -#import "GPUImageClosingFilter.h" -#import "GPUImageRGBClosingFilter.h" -#import "GPUImageColorPackingFilter.h" -#import "GPUImageSphereRefractionFilter.h" -#import "GPUImageMonochromeFilter.h" -#import "GPUImageOpacityFilter.h" -#import "GPUImageHighlightShadowFilter.h" -#import "GPUImageFalseColorFilter.h" -#import "GPUImageHSBFilter.h" -#import "GPUImageHueFilter.h" -#import "GPUImageGlassSphereFilter.h" -#import "GPUImageLookupFilter.h" -#import "GPUImageAmatorkaFilter.h" -#import "GPUImageMissEtikateFilter.h" -#import "GPUImageSoftEleganceFilter.h" -#import "GPUImageAddBlendFilter.h" -#import "GPUImageDivideBlendFilter.h" -#import "GPUImagePolkaDotFilter.h" -#import "GPUImageLocalBinaryPatternFilter.h" -#import "GPUImageLanczosResamplingFilter.h" -#import "GPUImageAverageColor.h" -#import "GPUImageSolidColorGenerator.h" -#import "GPUImageLuminosity.h" -#import "GPUImageAverageLuminanceThresholdFilter.h" -#import "GPUImageWhiteBalanceFilter.h" -#import "GPUImageChromaKeyFilter.h" -#import "GPUImageLowPassFilter.h" -#import "GPUImageHighPassFilter.h" -#import "GPUImageMotionDetector.h" -#import "GPUImageHalftoneFilter.h" -#import "GPUImageThresholdedNonMaximumSuppressionFilter.h" -#import "GPUImageHoughTransformLineDetector.h" -#import "GPUImageParallelCoordinateLineTransformFilter.h" -#import "GPUImageThresholdSketchFilter.h" -#import "GPUImageLineGenerator.h" -#import "GPUImageLinearBurnBlendFilter.h" -#import "GPUImageGaussianBlurPositionFilter.h" -#import "GPUImagePixellatePositionFilter.h" -#import "GPUImageTwoInputCrossTextureSamplingFilter.h" -#import "GPUImagePoissonBlendFilter.h" -#import "GPUImageMotionBlurFilter.h" -#import "GPUImageZoomBlurFilter.h" -#import "GPUImageLaplacianFilter.h" -#import "GPUImageiOSBlurFilter.h" -#import "GPUImageLuminanceRangeFilter.h" -#import "GPUImageDirectionalNonMaximumSuppressionFilter.h" -#import "GPUImageDirectionalSobelEdgeDetectionFilter.h" -#import "GPUImageSingleComponentGaussianBlurFilter.h" -#import "GPUImageThreeInputFilter.h" -#import "GPUImageWeakPixelInclusionFilter.h" - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage3x3ConvolutionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage3x3ConvolutionFilter.h deleted file mode 100755 index 67e68def..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage3x3ConvolutionFilter.h +++ /dev/null @@ -1,18 +0,0 @@ -#import "GPUImage3x3TextureSamplingFilter.h" - -/** Runs a 3x3 convolution kernel against the image - */ -@interface GPUImage3x3ConvolutionFilter : GPUImage3x3TextureSamplingFilter -{ - GLint convolutionMatrixUniform; -} - -/** Convolution kernel to run against the image - - The convolution kernel is a 3x3 matrix of values to apply to the pixel and its 8 surrounding pixels. - The matrix is specified in row-major order, with the top left pixel being one.one and the bottom right three.three - If the values in the matrix don't add up to 1.0, the image could be brightened or darkened. - */ -@property(readwrite, nonatomic) GPUMatrix3x3 convolutionKernel; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage3x3ConvolutionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage3x3ConvolutionFilter.m deleted file mode 100755 index c623ac67..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage3x3ConvolutionFilter.m +++ /dev/null @@ -1,128 +0,0 @@ -#import "GPUImage3x3ConvolutionFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImage3x3ConvolutionFragmentShaderString = SHADER_STRING -( - precision highp float; - - uniform sampler2D inputImageTexture; - - uniform mediump mat3 convolutionMatrix; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - void main() - { - mediump vec3 bottomColor = texture2D(inputImageTexture, bottomTextureCoordinate).rgb; - mediump vec3 bottomLeftColor = texture2D(inputImageTexture, bottomLeftTextureCoordinate).rgb; - mediump vec3 bottomRightColor = texture2D(inputImageTexture, bottomRightTextureCoordinate).rgb; - mediump vec4 centerColor = texture2D(inputImageTexture, textureCoordinate); - mediump vec3 leftColor = texture2D(inputImageTexture, leftTextureCoordinate).rgb; - mediump vec3 rightColor = texture2D(inputImageTexture, rightTextureCoordinate).rgb; - mediump vec3 topColor = texture2D(inputImageTexture, topTextureCoordinate).rgb; - mediump vec3 topRightColor = texture2D(inputImageTexture, topRightTextureCoordinate).rgb; - mediump vec3 topLeftColor = texture2D(inputImageTexture, topLeftTextureCoordinate).rgb; - - mediump vec3 resultColor = topLeftColor * convolutionMatrix[0][0] + topColor * convolutionMatrix[0][1] + topRightColor * convolutionMatrix[0][2]; - resultColor += leftColor * convolutionMatrix[1][0] + centerColor.rgb * convolutionMatrix[1][1] + rightColor * convolutionMatrix[1][2]; - resultColor += bottomLeftColor * convolutionMatrix[2][0] + bottomColor * convolutionMatrix[2][1] + bottomRightColor * convolutionMatrix[2][2]; - - gl_FragColor = vec4(resultColor, centerColor.a); - } -); -#else -NSString *const kGPUImage3x3ConvolutionFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - uniform mat3 convolutionMatrix; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - void main() - { - vec3 bottomColor = texture2D(inputImageTexture, bottomTextureCoordinate).rgb; - vec3 bottomLeftColor = texture2D(inputImageTexture, bottomLeftTextureCoordinate).rgb; - vec3 bottomRightColor = texture2D(inputImageTexture, bottomRightTextureCoordinate).rgb; - vec4 centerColor = texture2D(inputImageTexture, textureCoordinate); - vec3 leftColor = texture2D(inputImageTexture, leftTextureCoordinate).rgb; - vec3 rightColor = texture2D(inputImageTexture, rightTextureCoordinate).rgb; - vec3 topColor = texture2D(inputImageTexture, topTextureCoordinate).rgb; - vec3 topRightColor = texture2D(inputImageTexture, topRightTextureCoordinate).rgb; - vec3 topLeftColor = texture2D(inputImageTexture, topLeftTextureCoordinate).rgb; - - vec3 resultColor = topLeftColor * convolutionMatrix[0][0] + topColor * convolutionMatrix[0][1] + topRightColor * convolutionMatrix[0][2]; - resultColor += leftColor * convolutionMatrix[1][0] + centerColor.rgb * convolutionMatrix[1][1] + rightColor * convolutionMatrix[1][2]; - resultColor += bottomLeftColor * convolutionMatrix[2][0] + bottomColor * convolutionMatrix[2][1] + bottomRightColor * convolutionMatrix[2][2]; - - gl_FragColor = vec4(resultColor, centerColor.a); - } -); -#endif - -@implementation GPUImage3x3ConvolutionFilter - -@synthesize convolutionKernel = _convolutionKernel; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImage3x3ConvolutionFragmentShaderString])) - { - return nil; - } - - self.convolutionKernel = (GPUMatrix3x3){ - {0.f, 0.f, 0.f}, - {0.f, 1.f, 0.f}, - {0.f, 0.f, 0.f} - }; - - return self; -} - -- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [super initWithFragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - convolutionMatrixUniform = [filterProgram uniformIndex:@"convolutionMatrix"]; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setConvolutionKernel:(GPUMatrix3x3)newValue; -{ - _convolutionKernel = newValue; - - [self setMatrix3f:_convolutionKernel forUniform:convolutionMatrixUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage3x3TextureSamplingFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage3x3TextureSamplingFilter.h deleted file mode 100644 index 5599e156..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage3x3TextureSamplingFilter.h +++ /dev/null @@ -1,18 +0,0 @@ -#import "GPUImageFilter.h" - -extern NSString *const kGPUImageNearbyTexelSamplingVertexShaderString; - -@interface GPUImage3x3TextureSamplingFilter : GPUImageFilter -{ - GLint texelWidthUniform, texelHeightUniform; - - CGFloat texelWidth, texelHeight; - BOOL hasOverriddenImageSizeFactor; -} - -// The texel width and height determines how far out to sample from this texel. By default, this is the normalized width of a pixel, but this can be overridden for different effects. -@property(readwrite, nonatomic) CGFloat texelWidth; -@property(readwrite, nonatomic) CGFloat texelHeight; - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage3x3TextureSamplingFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage3x3TextureSamplingFilter.m deleted file mode 100644 index 05c4d50c..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImage3x3TextureSamplingFilter.m +++ /dev/null @@ -1,121 +0,0 @@ -#import "GPUImage3x3TextureSamplingFilter.h" - -// Override vertex shader to remove dependent texture reads -NSString *const kGPUImageNearbyTexelSamplingVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - - uniform float texelWidth; - uniform float texelHeight; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - void main() - { - gl_Position = position; - - vec2 widthStep = vec2(texelWidth, 0.0); - vec2 heightStep = vec2(0.0, texelHeight); - vec2 widthHeightStep = vec2(texelWidth, texelHeight); - vec2 widthNegativeHeightStep = vec2(texelWidth, -texelHeight); - - textureCoordinate = inputTextureCoordinate.xy; - leftTextureCoordinate = inputTextureCoordinate.xy - widthStep; - rightTextureCoordinate = inputTextureCoordinate.xy + widthStep; - - topTextureCoordinate = inputTextureCoordinate.xy - heightStep; - topLeftTextureCoordinate = inputTextureCoordinate.xy - widthHeightStep; - topRightTextureCoordinate = inputTextureCoordinate.xy + widthNegativeHeightStep; - - bottomTextureCoordinate = inputTextureCoordinate.xy + heightStep; - bottomLeftTextureCoordinate = inputTextureCoordinate.xy - widthNegativeHeightStep; - bottomRightTextureCoordinate = inputTextureCoordinate.xy + widthHeightStep; - } -); - - -@implementation GPUImage3x3TextureSamplingFilter - -@synthesize texelWidth = _texelWidth; -@synthesize texelHeight = _texelHeight; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithVertexShaderFromString:(NSString *)vertexShaderString fragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [super initWithVertexShaderFromString:vertexShaderString fragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - texelWidthUniform = [filterProgram uniformIndex:@"texelWidth"]; - texelHeightUniform = [filterProgram uniformIndex:@"texelHeight"]; - - return self; -} - -- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [self initWithVertexShaderFromString:kGPUImageNearbyTexelSamplingVertexShaderString fragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - return self; -} - -- (void)setupFilterForSize:(CGSize)filterFrameSize; -{ - if (!hasOverriddenImageSizeFactor) - { - _texelWidth = 1.0 / filterFrameSize.width; - _texelHeight = 1.0 / filterFrameSize.height; - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:filterProgram]; - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - glUniform1f(texelWidthUniform, _texelHeight); - glUniform1f(texelHeightUniform, _texelWidth); - } - else - { - glUniform1f(texelWidthUniform, _texelWidth); - glUniform1f(texelHeightUniform, _texelHeight); - } - }); - } -} - -#pragma mark - -#pragma mark Accessors - -- (void)setTexelWidth:(CGFloat)newValue; -{ - hasOverriddenImageSizeFactor = YES; - _texelWidth = newValue; - - [self setFloat:_texelWidth forUniform:texelWidthUniform program:filterProgram]; -} - -- (void)setTexelHeight:(CGFloat)newValue; -{ - hasOverriddenImageSizeFactor = YES; - _texelHeight = newValue; - - [self setFloat:_texelHeight forUniform:texelHeightUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAdaptiveThresholdFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAdaptiveThresholdFilter.h deleted file mode 100755 index 32785560..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAdaptiveThresholdFilter.h +++ /dev/null @@ -1,9 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@interface GPUImageAdaptiveThresholdFilter : GPUImageFilterGroup - -/** A multiplier for the background averaging blur radius in pixels, with a default of 4 - */ -@property(readwrite, nonatomic) CGFloat blurRadiusInPixels; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAdaptiveThresholdFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAdaptiveThresholdFilter.m deleted file mode 100755 index 71fa6abf..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAdaptiveThresholdFilter.m +++ /dev/null @@ -1,100 +0,0 @@ -#import "GPUImageAdaptiveThresholdFilter.h" -#import "GPUImageFilter.h" -#import "GPUImageTwoInputFilter.h" -#import "GPUImageGrayscaleFilter.h" -#import "GPUImageBoxBlurFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageAdaptiveThresholdFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - highp float blurredInput = texture2D(inputImageTexture, textureCoordinate).r; - highp float localLuminance = texture2D(inputImageTexture2, textureCoordinate2).r; - highp float thresholdResult = step(blurredInput - 0.05, localLuminance); - - gl_FragColor = vec4(vec3(thresholdResult), 1.0); - } -); -#else -NSString *const kGPUImageAdaptiveThresholdFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - float blurredInput = texture2D(inputImageTexture, textureCoordinate).r; - float localLuminance = texture2D(inputImageTexture2, textureCoordinate2).r; - float thresholdResult = step(blurredInput - 0.05, localLuminance); - - gl_FragColor = vec4(vec3(thresholdResult), 1.0); - } -); -#endif - -@interface GPUImageAdaptiveThresholdFilter() -{ - GPUImageBoxBlurFilter *boxBlurFilter; -} -@end - -@implementation GPUImageAdaptiveThresholdFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - // First pass: reduce to luminance - GPUImageGrayscaleFilter *luminanceFilter = [[GPUImageGrayscaleFilter alloc] init]; - [self addFilter:luminanceFilter]; - - // Second pass: perform a box blur - boxBlurFilter = [[GPUImageBoxBlurFilter alloc] init]; - [self addFilter:boxBlurFilter]; - - // Third pass: compare the blurred background luminance to the local value - GPUImageFilter *adaptiveThresholdFilter = [[GPUImageTwoInputFilter alloc] initWithFragmentShaderFromString:kGPUImageAdaptiveThresholdFragmentShaderString]; - [self addFilter:adaptiveThresholdFilter]; - - [luminanceFilter addTarget:boxBlurFilter]; - - [boxBlurFilter addTarget:adaptiveThresholdFilter]; - // To prevent double updating of this filter, disable updates from the sharp luminance image side - [luminanceFilter addTarget:adaptiveThresholdFilter]; - - self.initialFilters = [NSArray arrayWithObject:luminanceFilter]; - self.terminalFilter = adaptiveThresholdFilter; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setBlurRadiusInPixels:(CGFloat)newValue; -{ - boxBlurFilter.blurRadiusInPixels = newValue; -} - -- (CGFloat)blurRadiusInPixels; -{ - return boxBlurFilter.blurRadiusInPixels; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAddBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAddBlendFilter.h deleted file mode 100644 index b14c60c6..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAddBlendFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageAddBlendFilter : GPUImageTwoInputFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAddBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAddBlendFilter.m deleted file mode 100644 index c89054a8..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAddBlendFilter.m +++ /dev/null @@ -1,100 +0,0 @@ -#import "GPUImageAddBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageAddBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - lowp vec4 base = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - mediump float r; - if (overlay.r * base.a + base.r * overlay.a >= overlay.a * base.a) { - r = overlay.a * base.a + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - } else { - r = overlay.r + base.r; - } - - mediump float g; - if (overlay.g * base.a + base.g * overlay.a >= overlay.a * base.a) { - g = overlay.a * base.a + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - } else { - g = overlay.g + base.g; - } - - mediump float b; - if (overlay.b * base.a + base.b * overlay.a >= overlay.a * base.a) { - b = overlay.a * base.a + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - } else { - b = overlay.b + base.b; - } - - mediump float a = overlay.a + base.a - overlay.a * base.a; - - gl_FragColor = vec4(r, g, b, a); - } -); -#else -NSString *const kGPUImageAddBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 base = texture2D(inputImageTexture, textureCoordinate); - vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - float r; - if (overlay.r * base.a + base.r * overlay.a >= overlay.a * base.a) { - r = overlay.a * base.a + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - } else { - r = overlay.r + base.r; - } - - float g; - if (overlay.g * base.a + base.g * overlay.a >= overlay.a * base.a) { - g = overlay.a * base.a + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - } else { - g = overlay.g + base.g; - } - - float b; - if (overlay.b * base.a + base.b * overlay.a >= overlay.a * base.a) { - b = overlay.a * base.a + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - } else { - b = overlay.b + base.b; - } - - float a = overlay.a + base.a - overlay.a * base.a; - - gl_FragColor = vec4(r, g, b, a); - } -); -#endif - - - -@implementation GPUImageAddBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageAddBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAlphaBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAlphaBlendFilter.h deleted file mode 100755 index c4d75759..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAlphaBlendFilter.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageAlphaBlendFilter : GPUImageTwoInputFilter -{ - GLint mixUniform; -} - -// Mix ranges from 0.0 (only image 1) to 1.0 (only image 2), with 1.0 as the normal level -@property(readwrite, nonatomic) CGFloat mix; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAlphaBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAlphaBlendFilter.m deleted file mode 100755 index 077df790..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAlphaBlendFilter.m +++ /dev/null @@ -1,72 +0,0 @@ -#import "GPUImageAlphaBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageAlphaBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform lowp float mixturePercent; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(mix(textureColor.rgb, textureColor2.rgb, textureColor2.a * mixturePercent), textureColor.a); - } -); -#else -NSString *const kGPUImageAlphaBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform float mixturePercent; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(mix(textureColor.rgb, textureColor2.rgb, textureColor2.a * mixturePercent), textureColor.a); - } -); -#endif - -@implementation GPUImageAlphaBlendFilter - -@synthesize mix = _mix; - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageAlphaBlendFragmentShaderString])) - { - return nil; - } - - mixUniform = [filterProgram uniformIndex:@"mixturePercent"]; - self.mix = 0.5; - - return self; -} - - -#pragma mark - -#pragma mark Accessors - -- (void)setMix:(CGFloat)newValue; -{ - _mix = newValue; - - [self setFloat:_mix forUniform:mixUniform program:filterProgram]; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAmatorkaFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAmatorkaFilter.h deleted file mode 100755 index 1dbe096d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAmatorkaFilter.h +++ /dev/null @@ -1,17 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImagePicture; - -/** A photo filter based on Photoshop action by Amatorka - http://amatorka.deviantart.com/art/Amatorka-Action-2-121069631 - */ - -// Note: If you want to use this effect you have to add lookup_amatorka.png -// from Resources folder to your application bundle. - -@interface GPUImageAmatorkaFilter : GPUImageFilterGroup -{ - GPUImagePicture *lookupImageSource; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAmatorkaFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAmatorkaFilter.m deleted file mode 100755 index 1ab3ec4e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAmatorkaFilter.m +++ /dev/null @@ -1,38 +0,0 @@ -#import "GPUImageAmatorkaFilter.h" -#import "GPUImagePicture.h" -#import "GPUImageLookupFilter.h" - -@implementation GPUImageAmatorkaFilter - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - UIImage *image = [UIImage imageNamed:@"lookup_amatorka.png"]; -#else - NSImage *image = [NSImage imageNamed:@"lookup_amatorka.png"]; -#endif - - NSAssert(image, @"To use GPUImageAmatorkaFilter you need to add lookup_amatorka.png from GPUImage/framework/Resources to your application bundle."); - - lookupImageSource = [[GPUImagePicture alloc] initWithImage:image]; - GPUImageLookupFilter *lookupFilter = [[GPUImageLookupFilter alloc] init]; - [self addFilter:lookupFilter]; - - [lookupImageSource addTarget:lookupFilter atTextureLocation:1]; - [lookupImageSource processImage]; - - self.initialFilters = [NSArray arrayWithObjects:lookupFilter, nil]; - self.terminalFilter = lookupFilter; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAverageColor.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAverageColor.h deleted file mode 100644 index e3d957d0..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAverageColor.h +++ /dev/null @@ -1,20 +0,0 @@ -#import "GPUImageFilter.h" - -extern NSString *const kGPUImageColorAveragingVertexShaderString; - -@interface GPUImageAverageColor : GPUImageFilter -{ - GLint texelWidthUniform, texelHeightUniform; - - NSUInteger numberOfStages; - - GLubyte *rawImagePixels; - CGSize finalStageSize; -} - -// This block is called on the completion of color averaging for a frame -@property(nonatomic, copy) void(^colorAverageProcessingFinishedBlock)(CGFloat redComponent, CGFloat greenComponent, CGFloat blueComponent, CGFloat alphaComponent, CMTime frameTime); - -- (void)extractAverageColorAtFrameTime:(CMTime)frameTime; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAverageColor.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAverageColor.m deleted file mode 100644 index a768ecb3..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAverageColor.m +++ /dev/null @@ -1,210 +0,0 @@ -#import "GPUImageAverageColor.h" - -NSString *const kGPUImageColorAveragingVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - - uniform float texelWidth; - uniform float texelHeight; - - varying vec2 upperLeftInputTextureCoordinate; - varying vec2 upperRightInputTextureCoordinate; - varying vec2 lowerLeftInputTextureCoordinate; - varying vec2 lowerRightInputTextureCoordinate; - - void main() - { - gl_Position = position; - - upperLeftInputTextureCoordinate = inputTextureCoordinate.xy + vec2(-texelWidth, -texelHeight); - upperRightInputTextureCoordinate = inputTextureCoordinate.xy + vec2(texelWidth, -texelHeight); - lowerLeftInputTextureCoordinate = inputTextureCoordinate.xy + vec2(-texelWidth, texelHeight); - lowerRightInputTextureCoordinate = inputTextureCoordinate.xy + vec2(texelWidth, texelHeight); - } - ); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageColorAveragingFragmentShaderString = SHADER_STRING -( - precision highp float; - - uniform sampler2D inputImageTexture; - - varying highp vec2 outputTextureCoordinate; - - varying highp vec2 upperLeftInputTextureCoordinate; - varying highp vec2 upperRightInputTextureCoordinate; - varying highp vec2 lowerLeftInputTextureCoordinate; - varying highp vec2 lowerRightInputTextureCoordinate; - - void main() - { - highp vec4 upperLeftColor = texture2D(inputImageTexture, upperLeftInputTextureCoordinate); - highp vec4 upperRightColor = texture2D(inputImageTexture, upperRightInputTextureCoordinate); - highp vec4 lowerLeftColor = texture2D(inputImageTexture, lowerLeftInputTextureCoordinate); - highp vec4 lowerRightColor = texture2D(inputImageTexture, lowerRightInputTextureCoordinate); - - gl_FragColor = 0.25 * (upperLeftColor + upperRightColor + lowerLeftColor + lowerRightColor); - } -); -#else -NSString *const kGPUImageColorAveragingFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - varying vec2 outputTextureCoordinate; - - varying vec2 upperLeftInputTextureCoordinate; - varying vec2 upperRightInputTextureCoordinate; - varying vec2 lowerLeftInputTextureCoordinate; - varying vec2 lowerRightInputTextureCoordinate; - - void main() - { - vec4 upperLeftColor = texture2D(inputImageTexture, upperLeftInputTextureCoordinate); - vec4 upperRightColor = texture2D(inputImageTexture, upperRightInputTextureCoordinate); - vec4 lowerLeftColor = texture2D(inputImageTexture, lowerLeftInputTextureCoordinate); - vec4 lowerRightColor = texture2D(inputImageTexture, lowerRightInputTextureCoordinate); - - gl_FragColor = 0.25 * (upperLeftColor + upperRightColor + lowerLeftColor + lowerRightColor); - } -); -#endif - -@implementation GPUImageAverageColor - -@synthesize colorAverageProcessingFinishedBlock = _colorAverageProcessingFinishedBlock; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithVertexShaderFromString:kGPUImageColorAveragingVertexShaderString fragmentShaderFromString:kGPUImageColorAveragingFragmentShaderString])) - { - return nil; - } - - texelWidthUniform = [filterProgram uniformIndex:@"texelWidth"]; - texelHeightUniform = [filterProgram uniformIndex:@"texelHeight"]; - finalStageSize = CGSizeMake(1.0, 1.0); - - __unsafe_unretained GPUImageAverageColor *weakSelf = self; - [self setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime) { - [weakSelf extractAverageColorAtFrameTime:frameTime]; - }]; - - return self; -} - -- (void)dealloc; -{ - if (rawImagePixels != NULL) - { - free(rawImagePixels); - } -} - -#pragma mark - -#pragma mark Managing the display FBOs - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - if (self.preventRendering) - { - [firstInputFramebuffer unlock]; - return; - } - - outputFramebuffer = nil; - [GPUImageContext setActiveShaderProgram:filterProgram]; - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - glVertexAttribPointer(filterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - - GLuint currentTexture = [firstInputFramebuffer texture]; - - NSUInteger numberOfReductionsInX = floor(log(inputTextureSize.width) / log(4.0)); - NSUInteger numberOfReductionsInY = floor(log(inputTextureSize.height) / log(4.0)); - NSUInteger reductionsToHitSideLimit = MIN(numberOfReductionsInX, numberOfReductionsInY); - for (NSUInteger currentReduction = 0; currentReduction < reductionsToHitSideLimit; currentReduction++) - { - CGSize currentStageSize = CGSizeMake(floor(inputTextureSize.width / pow(4.0, currentReduction + 1.0)), floor(inputTextureSize.height / pow(4.0, currentReduction + 1.0))); - if ( (currentStageSize.height < 2.0) || (currentStageSize.width < 2.0) ) - { - // A really small last stage seems to cause significant errors in the average, so I abort and leave the rest to the CPU at this point - break; - // currentStageSize.height = 2.0; // TODO: Rotate the image to account for this case, which causes FBO construction to fail - } - - [outputFramebuffer unlock]; - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:currentStageSize textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, currentTexture); - - glUniform1i(filterInputTextureUniform, 2); - - glUniform1f(texelWidthUniform, 0.5 / currentStageSize.width); - glUniform1f(texelHeightUniform, 0.5 / currentStageSize.height); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - currentTexture = [outputFramebuffer texture]; - finalStageSize = currentStageSize; - } - - [firstInputFramebuffer unlock]; -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - inputRotation = kGPUImageNoRotation; -} - -- (void)extractAverageColorAtFrameTime:(CMTime)frameTime; -{ - runSynchronouslyOnVideoProcessingQueue(^{ - // we need a normal color texture for averaging the color values - NSAssert(self.outputTextureOptions.internalFormat == GL_RGBA, @"The output texture internal format for this filter must be GL_RGBA."); - NSAssert(self.outputTextureOptions.type == GL_UNSIGNED_BYTE, @"The type of the output texture of this filter must be GL_UNSIGNED_BYTE."); - - NSUInteger totalNumberOfPixels = round(finalStageSize.width * finalStageSize.height); - - if (rawImagePixels == NULL) - { - rawImagePixels = (GLubyte *)malloc(totalNumberOfPixels * 4); - } - - [GPUImageContext useImageProcessingContext]; - [outputFramebuffer activateFramebuffer]; - glReadPixels(0, 0, (int)finalStageSize.width, (int)finalStageSize.height, GL_RGBA, GL_UNSIGNED_BYTE, rawImagePixels); - - NSUInteger redTotal = 0, greenTotal = 0, blueTotal = 0, alphaTotal = 0; - NSUInteger byteIndex = 0; - for (NSUInteger currentPixel = 0; currentPixel < totalNumberOfPixels; currentPixel++) - { - redTotal += rawImagePixels[byteIndex++]; - greenTotal += rawImagePixels[byteIndex++]; - blueTotal += rawImagePixels[byteIndex++]; - alphaTotal += rawImagePixels[byteIndex++]; - } - - CGFloat normalizedRedTotal = (CGFloat)redTotal / (CGFloat)totalNumberOfPixels / 255.0; - CGFloat normalizedGreenTotal = (CGFloat)greenTotal / (CGFloat)totalNumberOfPixels / 255.0; - CGFloat normalizedBlueTotal = (CGFloat)blueTotal / (CGFloat)totalNumberOfPixels / 255.0; - CGFloat normalizedAlphaTotal = (CGFloat)alphaTotal / (CGFloat)totalNumberOfPixels / 255.0; - - if (_colorAverageProcessingFinishedBlock != NULL) - { - _colorAverageProcessingFinishedBlock(normalizedRedTotal, normalizedGreenTotal, normalizedBlueTotal, normalizedAlphaTotal, frameTime); - } - }); -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAverageLuminanceThresholdFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAverageLuminanceThresholdFilter.h deleted file mode 100644 index 7f1ae464..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAverageLuminanceThresholdFilter.h +++ /dev/null @@ -1,8 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@interface GPUImageAverageLuminanceThresholdFilter : GPUImageFilterGroup - -// This is multiplied by the continually calculated average image luminosity to arrive at the final threshold. Default is 1.0. -@property(readwrite, nonatomic) CGFloat thresholdMultiplier; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAverageLuminanceThresholdFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAverageLuminanceThresholdFilter.m deleted file mode 100644 index eb2796f4..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageAverageLuminanceThresholdFilter.m +++ /dev/null @@ -1,47 +0,0 @@ -#import "GPUImageAverageLuminanceThresholdFilter.h" -#import "GPUImageLuminosity.h" -#import "GPUImageLuminanceThresholdFilter.h" - -@interface GPUImageAverageLuminanceThresholdFilter() -{ - GPUImageLuminosity *luminosityFilter; - GPUImageLuminanceThresholdFilter *luminanceThresholdFilter; -} -@end - -@implementation GPUImageAverageLuminanceThresholdFilter - -@synthesize thresholdMultiplier = _thresholdMultiplier; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - self.thresholdMultiplier = 1.0; - - luminosityFilter = [[GPUImageLuminosity alloc] init]; - [self addFilter:luminosityFilter]; - - luminanceThresholdFilter = [[GPUImageLuminanceThresholdFilter alloc] init]; - [self addFilter:luminanceThresholdFilter]; - - __unsafe_unretained GPUImageAverageLuminanceThresholdFilter *weakSelf = self; - __unsafe_unretained GPUImageLuminanceThresholdFilter *weakThreshold = luminanceThresholdFilter; - - [luminosityFilter setLuminosityProcessingFinishedBlock:^(CGFloat luminosity, CMTime frameTime) { - weakThreshold.threshold = luminosity * weakSelf.thresholdMultiplier; - }]; - - self.initialFilters = [NSArray arrayWithObjects:luminosityFilter, luminanceThresholdFilter, nil]; - self.terminalFilter = luminanceThresholdFilter; - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBilateralFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBilateralFilter.h deleted file mode 100644 index 6b736ccf..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBilateralFilter.h +++ /dev/null @@ -1,10 +0,0 @@ -#import "GPUImageGaussianBlurFilter.h" - -@interface GPUImageBilateralFilter : GPUImageGaussianBlurFilter -{ - CGFloat firstDistanceNormalizationFactorUniform; - CGFloat secondDistanceNormalizationFactorUniform; -} -// A normalization factor for the distance between central color and sample color. -@property(nonatomic, readwrite) CGFloat distanceNormalizationFactor; -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBilateralFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBilateralFilter.m deleted file mode 100644 index c2a8c867..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBilateralFilter.m +++ /dev/null @@ -1,231 +0,0 @@ -#import "GPUImageBilateralFilter.h" - -NSString *const kGPUImageBilateralBlurVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - - const int GAUSSIAN_SAMPLES = 9; - - uniform float texelWidthOffset; - uniform float texelHeightOffset; - - varying vec2 textureCoordinate; - varying vec2 blurCoordinates[GAUSSIAN_SAMPLES]; - - void main() - { - gl_Position = position; - textureCoordinate = inputTextureCoordinate.xy; - - // Calculate the positions for the blur - int multiplier = 0; - vec2 blurStep; - vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset); - - for (int i = 0; i < GAUSSIAN_SAMPLES; i++) - { - multiplier = (i - ((GAUSSIAN_SAMPLES - 1) / 2)); - // Blur in x (horizontal) - blurStep = float(multiplier) * singleStepOffset; - blurCoordinates[i] = inputTextureCoordinate.xy + blurStep; - } - } -); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageBilateralFilterFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - const lowp int GAUSSIAN_SAMPLES = 9; - - varying highp vec2 textureCoordinate; - varying highp vec2 blurCoordinates[GAUSSIAN_SAMPLES]; - - uniform mediump float distanceNormalizationFactor; - - void main() - { - lowp vec4 centralColor; - lowp float gaussianWeightTotal; - lowp vec4 sum; - lowp vec4 sampleColor; - lowp float distanceFromCentralColor; - lowp float gaussianWeight; - - centralColor = texture2D(inputImageTexture, blurCoordinates[4]); - gaussianWeightTotal = 0.18; - sum = centralColor * 0.18; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[0]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.05 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[1]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.09 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[2]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.12 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[3]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.15 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[5]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.15 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[6]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.12 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[7]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.09 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[8]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.05 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - gl_FragColor = sum / gaussianWeightTotal; - } -); -#else -NSString *const kGPUImageBilateralFilterFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - const int GAUSSIAN_SAMPLES = 9; - - varying vec2 textureCoordinate; - varying vec2 blurCoordinates[GAUSSIAN_SAMPLES]; - - uniform float distanceNormalizationFactor; - - void main() - { - vec4 centralColor; - float gaussianWeightTotal; - vec4 sum; - vec4 sampleColor; - float distanceFromCentralColor; - float gaussianWeight; - - centralColor = texture2D(inputImageTexture, blurCoordinates[4]); - gaussianWeightTotal = 0.18; - sum = centralColor * 0.18; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[0]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.05 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[1]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.09 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[2]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.12 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[3]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.15 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[5]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.15 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[6]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.12 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[7]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.09 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - sampleColor = texture2D(inputImageTexture, blurCoordinates[8]); - distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, 1.0); - gaussianWeight = 0.05 * (1.0 - distanceFromCentralColor); - gaussianWeightTotal += gaussianWeight; - sum += sampleColor * gaussianWeight; - - gl_FragColor = sum / gaussianWeightTotal; - } -); -#endif - -@implementation GPUImageBilateralFilter - -@synthesize distanceNormalizationFactor = _distanceNormalizationFactor; - -- (id)init; -{ - - if (!(self = [super initWithFirstStageVertexShaderFromString:kGPUImageBilateralBlurVertexShaderString - firstStageFragmentShaderFromString:kGPUImageBilateralFilterFragmentShaderString - secondStageVertexShaderFromString:kGPUImageBilateralBlurVertexShaderString - secondStageFragmentShaderFromString:kGPUImageBilateralFilterFragmentShaderString])) { - return nil; - } - - firstDistanceNormalizationFactorUniform = [filterProgram uniformIndex:@"distanceNormalizationFactor"]; - secondDistanceNormalizationFactorUniform = [filterProgram uniformIndex:@"distanceNormalizationFactor"]; - - self.texelSpacingMultiplier = 4.0; - self.distanceNormalizationFactor = 8.0; - - - return self; -} - - -#pragma mark - -#pragma mark Accessors - -- (void)setDistanceNormalizationFactor:(CGFloat)newValue -{ - _distanceNormalizationFactor = newValue; - - [self setFloat:newValue - forUniform:firstDistanceNormalizationFactorUniform - program:filterProgram]; - - [self setFloat:newValue - forUniform:secondDistanceNormalizationFactorUniform - program:secondFilterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBoxBlurFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBoxBlurFilter.h deleted file mode 100755 index 3fd880bf..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBoxBlurFilter.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "GPUImageGaussianBlurFilter.h" - -/** A hardware-accelerated box blur of an image - */ -@interface GPUImageBoxBlurFilter : GPUImageGaussianBlurFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBoxBlurFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBoxBlurFilter.m deleted file mode 100755 index 5a49385b..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBoxBlurFilter.m +++ /dev/null @@ -1,178 +0,0 @@ -#import "GPUImageBoxBlurFilter.h" - - -@implementation GPUImageBoxBlurFilter - -+ (NSString *)vertexShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; -{ - if (blurRadius < 1) - { - return kGPUImageVertexShaderString; - } - - // From these weights we calculate the offsets to read interpolated values from - NSUInteger numberOfOptimizedOffsets = MIN(blurRadius / 2 + (blurRadius % 2), 7); - - NSMutableString *shaderString = [[NSMutableString alloc] init]; - // Header - [shaderString appendFormat:@"\ - attribute vec4 position;\n\ - attribute vec4 inputTextureCoordinate;\n\ - \n\ - uniform float texelWidthOffset;\n\ - uniform float texelHeightOffset;\n\ - \n\ - varying vec2 blurCoordinates[%lu];\n\ - \n\ - void main()\n\ - {\n\ - gl_Position = position;\n\ - \n\ - vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset);\n", (unsigned long)(1 + (numberOfOptimizedOffsets * 2))]; - - // Inner offset loop - [shaderString appendString:@"blurCoordinates[0] = inputTextureCoordinate.xy;\n"]; - for (NSUInteger currentOptimizedOffset = 0; currentOptimizedOffset < numberOfOptimizedOffsets; currentOptimizedOffset++) - { - GLfloat optimizedOffset = (GLfloat)(currentOptimizedOffset * 2) + 1.5; - - [shaderString appendFormat:@"\ - blurCoordinates[%lu] = inputTextureCoordinate.xy + singleStepOffset * %f;\n\ - blurCoordinates[%lu] = inputTextureCoordinate.xy - singleStepOffset * %f;\n", (unsigned long)((currentOptimizedOffset * 2) + 1), optimizedOffset, (unsigned long)((currentOptimizedOffset * 2) + 2), optimizedOffset]; - } - - // Footer - [shaderString appendString:@"}\n"]; - - return shaderString; -} - -+ (NSString *)fragmentShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; -{ - if (blurRadius < 1) - { - return kGPUImagePassthroughFragmentShaderString; - } - - NSUInteger numberOfOptimizedOffsets = MIN(blurRadius / 2 + (blurRadius % 2), 7); - NSUInteger trueNumberOfOptimizedOffsets = blurRadius / 2 + (blurRadius % 2); - - NSMutableString *shaderString = [[NSMutableString alloc] init]; - - // Header -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - [shaderString appendFormat:@"\ - uniform sampler2D inputImageTexture;\n\ - uniform highp float texelWidthOffset;\n\ - uniform highp float texelHeightOffset;\n\ - \n\ - varying highp vec2 blurCoordinates[%lu];\n\ - \n\ - void main()\n\ - {\n\ - lowp vec4 sum = vec4(0.0);\n", (unsigned long)(1 + (numberOfOptimizedOffsets * 2)) ]; -#else - [shaderString appendFormat:@"\ - uniform sampler2D inputImageTexture;\n\ - uniform float texelWidthOffset;\n\ - uniform float texelHeightOffset;\n\ - \n\ - varying vec2 blurCoordinates[%lu];\n\ - \n\ - void main()\n\ - {\n\ - vec4 sum = vec4(0.0);\n", 1 + (numberOfOptimizedOffsets * 2) ]; -#endif - - GLfloat boxWeight = 1.0 / (GLfloat)((blurRadius * 2) + 1); - - // Inner texture loop - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[0]) * %f;\n", boxWeight]; - - for (NSUInteger currentBlurCoordinateIndex = 0; currentBlurCoordinateIndex < numberOfOptimizedOffsets; currentBlurCoordinateIndex++) - { - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[%lu]) * %f;\n", (unsigned long)((currentBlurCoordinateIndex * 2) + 1), boxWeight * 2.0]; - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[%lu]) * %f;\n", (unsigned long)((currentBlurCoordinateIndex * 2) + 2), boxWeight * 2.0]; - } - - // If the number of required samples exceeds the amount we can pass in via varyings, we have to do dependent texture reads in the fragment shader - if (trueNumberOfOptimizedOffsets > numberOfOptimizedOffsets) - { -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - [shaderString appendString:@"highp vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset);\n"]; -#else - [shaderString appendString:@"vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset);\n"]; -#endif - - for (NSUInteger currentOverlowTextureRead = numberOfOptimizedOffsets; currentOverlowTextureRead < trueNumberOfOptimizedOffsets; currentOverlowTextureRead++) - { - GLfloat optimizedOffset = (GLfloat)(currentOverlowTextureRead * 2) + 1.5; - - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[0] + singleStepOffset * %f) * %f;\n", optimizedOffset, boxWeight * 2.0]; - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[0] - singleStepOffset * %f) * %f;\n", optimizedOffset, boxWeight * 2.0]; - } - } - - // Footer - [shaderString appendString:@"\ - gl_FragColor = sum;\n\ - }\n"]; - - return shaderString; -} - -- (void)setupFilterForSize:(CGSize)filterFrameSize; -{ - [super setupFilterForSize:filterFrameSize]; - - if (shouldResizeBlurRadiusWithImageSize == YES) - { - - } -} - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - // NSString *currentGaussianBlurVertexShader = [GPUImageGaussianBlurFilter vertexShaderForStandardGaussianOfRadius:4 sigma:2.0]; - // NSString *currentGaussianBlurFragmentShader = [GPUImageGaussianBlurFilter fragmentShaderForStandardGaussianOfRadius:4 sigma:2.0]; - - NSString *currentBoxBlurVertexShader = [[self class] vertexShaderForOptimizedBlurOfRadius:4 sigma:0.0]; - NSString *currentBoxBlurFragmentShader = [[self class] fragmentShaderForOptimizedBlurOfRadius:4 sigma:0.0]; - - if (!(self = [super initWithFirstStageVertexShaderFromString:currentBoxBlurVertexShader firstStageFragmentShaderFromString:currentBoxBlurFragmentShader secondStageVertexShaderFromString:currentBoxBlurVertexShader secondStageFragmentShaderFromString:currentBoxBlurFragmentShader])) - { - return nil; - } - - _blurRadiusInPixels = 4.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setBlurRadiusInPixels:(CGFloat)newValue; -{ - CGFloat newBlurRadius = round(round(newValue / 2.0) * 2.0); // For now, only do even radii - - if (newBlurRadius != _blurRadiusInPixels) - { - _blurRadiusInPixels = newBlurRadius; - - NSString *newGaussianBlurVertexShader = [[self class] vertexShaderForOptimizedBlurOfRadius:_blurRadiusInPixels sigma:0.0]; - NSString *newGaussianBlurFragmentShader = [[self class] fragmentShaderForOptimizedBlurOfRadius:_blurRadiusInPixels sigma:0.0]; - - // NSLog(@"Optimized vertex shader: \n%@", newGaussianBlurVertexShader); - // NSLog(@"Optimized fragment shader: \n%@", newGaussianBlurFragmentShader); - // - [self switchToVertexShader:newGaussianBlurVertexShader fragmentShader:newGaussianBlurFragmentShader]; - } - shouldResizeBlurRadiusWithImageSize = NO; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBrightnessFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBrightnessFilter.h deleted file mode 100755 index 046473b9..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBrightnessFilter.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageBrightnessFilter : GPUImageFilter -{ - GLint brightnessUniform; -} - -// Brightness ranges from -1.0 to 1.0, with 0.0 as the normal level -@property(readwrite, nonatomic) CGFloat brightness; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBrightnessFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBrightnessFilter.m deleted file mode 100755 index 7e526d85..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBrightnessFilter.m +++ /dev/null @@ -1,66 +0,0 @@ -#import "GPUImageBrightnessFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageBrightnessFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform lowp float brightness; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4((textureColor.rgb + vec3(brightness)), textureColor.w); - } -); -#else -NSString *const kGPUImageBrightnessFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float brightness; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4((textureColor.rgb + vec3(brightness)), textureColor.w); - } - ); -#endif - -@implementation GPUImageBrightnessFilter - -@synthesize brightness = _brightness; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageBrightnessFragmentShaderString])) - { - return nil; - } - - brightnessUniform = [filterProgram uniformIndex:@"brightness"]; - self.brightness = 0.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setBrightness:(CGFloat)newValue; -{ - _brightness = newValue; - - [self setFloat:_brightness forUniform:brightnessUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBuffer.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBuffer.h deleted file mode 100644 index caf09c8d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBuffer.h +++ /dev/null @@ -1,10 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageBuffer : GPUImageFilter -{ - NSMutableArray *bufferedFramebuffers; -} - -@property(readwrite, nonatomic) NSUInteger bufferSize; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBuffer.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBuffer.m deleted file mode 100644 index c90d020a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBuffer.m +++ /dev/null @@ -1,112 +0,0 @@ -#import "GPUImageBuffer.h" - -@interface GPUImageBuffer() - -@end - -@implementation GPUImageBuffer - -@synthesize bufferSize = _bufferSize; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImagePassthroughFragmentShaderString])) - { - return nil; - } - - bufferedFramebuffers = [[NSMutableArray alloc] init]; -// [bufferedTextures addObject:[NSNumber numberWithInt:outputTexture]]; - _bufferSize = 1; - - return self; -} - -- (void)dealloc -{ - for (GPUImageFramebuffer *currentFramebuffer in bufferedFramebuffers) - { - [currentFramebuffer unlock]; - } -} - -#pragma mark - -#pragma mark GPUImageInput - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - if ([bufferedFramebuffers count] >= _bufferSize) - { - outputFramebuffer = [bufferedFramebuffers objectAtIndex:0]; - [bufferedFramebuffers removeObjectAtIndex:0]; - } - else - { - // Nothing yet in the buffer, so don't process further until the buffer is full - outputFramebuffer = firstInputFramebuffer; - [firstInputFramebuffer lock]; - } - - [bufferedFramebuffers addObject:firstInputFramebuffer]; - - // Need to pass along rotation information, as we're just holding on to buffered framebuffers and not rotating them ourselves - for (id currentTarget in targets) - { - if (currentTarget != self.targetToIgnoreForUpdates) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger textureIndex = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - - [currentTarget setInputRotation:inputRotation atIndex:textureIndex]; - } - } - - // Let the downstream video elements see the previous frame from the buffer before rendering a new one into place - [self informTargetsAboutNewFrameAtTime:frameTime]; - -// [self renderToTextureWithVertices:imageVertices textureCoordinates:[[self class] textureCoordinatesForRotation:inputRotation]]; -} - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - // No need to render to another texture anymore, since we'll be hanging on to the textures in our buffer -} - -#pragma mark - -#pragma mark Accessors - -- (void)setBufferSize:(NSUInteger)newValue; -{ - if ( (newValue == _bufferSize) || (newValue < 1) ) - { - return; - } - - if (newValue > _bufferSize) - { - NSUInteger texturesToAdd = newValue - _bufferSize; - for (NSUInteger currentTextureIndex = 0; currentTextureIndex < texturesToAdd; currentTextureIndex++) - { - // TODO: Deal with the growth of the size of the buffer by rotating framebuffers, no textures - } - } - else - { - NSUInteger texturesToRemove = _bufferSize - newValue; - for (NSUInteger currentTextureIndex = 0; currentTextureIndex < texturesToRemove; currentTextureIndex++) - { - GPUImageFramebuffer *lastFramebuffer = [bufferedFramebuffers lastObject]; - [bufferedFramebuffers removeObjectAtIndex:([bufferedFramebuffers count] - 1)]; - - [lastFramebuffer unlock]; - lastFramebuffer = nil; - } - } - - _bufferSize = newValue; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBulgeDistortionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBulgeDistortionFilter.h deleted file mode 100755 index d416e536..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBulgeDistortionFilter.h +++ /dev/null @@ -1,16 +0,0 @@ -#import "GPUImageFilter.h" - -/// Creates a bulge distortion on the image -@interface GPUImageBulgeDistortionFilter : GPUImageFilter -{ - GLint aspectRatioUniform, radiusUniform, centerUniform, scaleUniform; -} - -/// The center about which to apply the distortion, with a default of (0.5, 0.5) -@property(readwrite, nonatomic) CGPoint center; -/// The radius of the distortion, ranging from 0.0 to 1.0, with a default of 0.25 -@property(readwrite, nonatomic) CGFloat radius; -/// The amount of distortion to apply, from -1.0 to 1.0, with a default of 0.5 -@property(readwrite, nonatomic) CGFloat scale; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBulgeDistortionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBulgeDistortionFilter.m deleted file mode 100755 index 1f778ada..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageBulgeDistortionFilter.m +++ /dev/null @@ -1,174 +0,0 @@ -#import "GPUImageBulgeDistortionFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageBulgeDistortionFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp float aspectRatio; - uniform highp vec2 center; - uniform highp float radius; - uniform highp float scale; - - void main() - { - highp vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - highp float dist = distance(center, textureCoordinateToUse); - textureCoordinateToUse = textureCoordinate; - - if (dist < radius) - { - textureCoordinateToUse -= center; - highp float percent = 1.0 - ((radius - dist) / radius) * scale; - percent = percent * percent; - - textureCoordinateToUse = textureCoordinateToUse * percent; - textureCoordinateToUse += center; - } - - gl_FragColor = texture2D(inputImageTexture, textureCoordinateToUse ); - } -); -#else -NSString *const kGPUImageBulgeDistortionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform float aspectRatio; - uniform vec2 center; - uniform float radius; - uniform float scale; - - void main() - { - vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - float dist = distance(center, textureCoordinateToUse); - textureCoordinateToUse = textureCoordinate; - - if (dist < radius) - { - textureCoordinateToUse -= center; - float percent = 1.0 - ((radius - dist) / radius) * scale; - percent = percent * percent; - - textureCoordinateToUse = textureCoordinateToUse * percent; - textureCoordinateToUse += center; - } - - gl_FragColor = texture2D(inputImageTexture, textureCoordinateToUse ); - } -); -#endif - - -@interface GPUImageBulgeDistortionFilter () - -- (void)adjustAspectRatio; - -@property (readwrite, nonatomic) CGFloat aspectRatio; - -@end - -@implementation GPUImageBulgeDistortionFilter - -@synthesize aspectRatio = _aspectRatio; -@synthesize center = _center; -@synthesize radius = _radius; -@synthesize scale = _scale; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageBulgeDistortionFragmentShaderString])) - { - return nil; - } - - aspectRatioUniform = [filterProgram uniformIndex:@"aspectRatio"]; - radiusUniform = [filterProgram uniformIndex:@"radius"]; - scaleUniform = [filterProgram uniformIndex:@"scale"]; - centerUniform = [filterProgram uniformIndex:@"center"]; - - self.radius = 0.25; - self.scale = 0.5; - self.center = CGPointMake(0.5, 0.5); - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)adjustAspectRatio; -{ - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - [self setAspectRatio:(inputTextureSize.width / inputTextureSize.height)]; - } - else - { - [self setAspectRatio:(inputTextureSize.height / inputTextureSize.width)]; - } -} - -- (void)forceProcessingAtSize:(CGSize)frameSize; -{ - [super forceProcessingAtSize:frameSize]; - [self adjustAspectRatio]; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - CGSize oldInputSize = inputTextureSize; - [super setInputSize:newSize atIndex:textureIndex]; - - if ( (!CGSizeEqualToSize(oldInputSize, inputTextureSize)) && (!CGSizeEqualToSize(newSize, CGSizeZero)) ) - { - [self adjustAspectRatio]; - } -} - -- (void)setAspectRatio:(CGFloat)newValue; -{ - _aspectRatio = newValue; - - [self setFloat:_aspectRatio forUniform:aspectRatioUniform program:filterProgram]; -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - [super setInputRotation:newInputRotation atIndex:textureIndex]; - [self setCenter:self.center]; - [self adjustAspectRatio]; -} - -- (void)setRadius:(CGFloat)newValue; -{ - _radius = newValue; - - [self setFloat:_radius forUniform:radiusUniform program:filterProgram]; -} - -- (void)setScale:(CGFloat)newValue; -{ - _scale = newValue; - - [self setFloat:_scale forUniform:scaleUniform program:filterProgram]; -} - -- (void)setCenter:(CGPoint)newValue; -{ - _center = newValue; - - CGPoint rotatedPoint = [self rotatedPoint:_center forRotation:inputRotation]; - - [self setPoint:rotatedPoint forUniform:centerUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCGAColorspaceFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCGAColorspaceFilter.h deleted file mode 100755 index 4f97804b..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCGAColorspaceFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageCGAColorspaceFilter : GPUImageFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCGAColorspaceFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCGAColorspaceFilter.m deleted file mode 100755 index eee939a0..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCGAColorspaceFilter.m +++ /dev/null @@ -1,113 +0,0 @@ -// -// GPUImageCGAColorspaceFilter.m -// - -#import "GPUImageCGAColorspaceFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageCGAColorspaceFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - highp vec2 sampleDivisor = vec2(1.0 / 200.0, 1.0 / 320.0); - //highp vec4 colorDivisor = vec4(colorDepth); - - highp vec2 samplePos = textureCoordinate - mod(textureCoordinate, sampleDivisor); - highp vec4 color = texture2D(inputImageTexture, samplePos ); - - //gl_FragColor = texture2D(inputImageTexture, samplePos ); - mediump vec4 colorCyan = vec4(85.0 / 255.0, 1.0, 1.0, 1.0); - mediump vec4 colorMagenta = vec4(1.0, 85.0 / 255.0, 1.0, 1.0); - mediump vec4 colorWhite = vec4(1.0, 1.0, 1.0, 1.0); - mediump vec4 colorBlack = vec4(0.0, 0.0, 0.0, 1.0); - - mediump vec4 endColor; - highp float blackDistance = distance(color, colorBlack); - highp float whiteDistance = distance(color, colorWhite); - highp float magentaDistance = distance(color, colorMagenta); - highp float cyanDistance = distance(color, colorCyan); - - mediump vec4 finalColor; - - highp float colorDistance = min(magentaDistance, cyanDistance); - colorDistance = min(colorDistance, whiteDistance); - colorDistance = min(colorDistance, blackDistance); - - if (colorDistance == blackDistance) { - finalColor = colorBlack; - } else if (colorDistance == whiteDistance) { - finalColor = colorWhite; - } else if (colorDistance == cyanDistance) { - finalColor = colorCyan; - } else { - finalColor = colorMagenta; - } - - gl_FragColor = finalColor; - } -); -#else -NSString *const kGPUImageCGAColorspaceFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - vec2 sampleDivisor = vec2(1.0 / 200.0, 1.0 / 320.0); - //highp vec4 colorDivisor = vec4(colorDepth); - - vec2 samplePos = textureCoordinate - mod(textureCoordinate, sampleDivisor); - vec4 color = texture2D(inputImageTexture, samplePos ); - - //gl_FragColor = texture2D(inputImageTexture, samplePos ); - vec4 colorCyan = vec4(85.0 / 255.0, 1.0, 1.0, 1.0); - vec4 colorMagenta = vec4(1.0, 85.0 / 255.0, 1.0, 1.0); - vec4 colorWhite = vec4(1.0, 1.0, 1.0, 1.0); - vec4 colorBlack = vec4(0.0, 0.0, 0.0, 1.0); - - vec4 endColor; - float blackDistance = distance(color, colorBlack); - float whiteDistance = distance(color, colorWhite); - float magentaDistance = distance(color, colorMagenta); - float cyanDistance = distance(color, colorCyan); - - vec4 finalColor; - - float colorDistance = min(magentaDistance, cyanDistance); - colorDistance = min(colorDistance, whiteDistance); - colorDistance = min(colorDistance, blackDistance); - - if (colorDistance == blackDistance) { - finalColor = colorBlack; - } else if (colorDistance == whiteDistance) { - finalColor = colorWhite; - } else if (colorDistance == cyanDistance) { - finalColor = colorCyan; - } else { - finalColor = colorMagenta; - } - - gl_FragColor = finalColor; - } -); -#endif - -@implementation GPUImageCGAColorspaceFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageCGAColorspaceFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCannyEdgeDetectionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCannyEdgeDetectionFilter.h deleted file mode 100755 index 53c58502..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCannyEdgeDetectionFilter.h +++ /dev/null @@ -1,62 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImageGrayscaleFilter; -@class GPUImageSingleComponentGaussianBlurFilter; -@class GPUImageDirectionalSobelEdgeDetectionFilter; -@class GPUImageDirectionalNonMaximumSuppressionFilter; -@class GPUImageWeakPixelInclusionFilter; - -/** This applies the edge detection process described by John Canny in - - Canny, J., A Computational Approach To Edge Detection, IEEE Trans. Pattern Analysis and Machine Intelligence, 8(6):679–698, 1986. - - and implemented in OpenGL ES by - - A. Ensor, S. Hall. GPU-based Image Analysis on Mobile Devices. Proceedings of Image and Vision Computing New Zealand 2011. - - It starts with a conversion to luminance, followed by an accelerated 9-hit Gaussian blur. A Sobel operator is applied to obtain the overall - gradient strength in the blurred image, as well as the direction (in texture sampling steps) of the gradient. A non-maximum suppression filter - acts along the direction of the gradient, highlighting strong edges that pass the threshold and completely removing those that fail the lower - threshold. Finally, pixels from in-between these thresholds are either included in edges or rejected based on neighboring pixels. - */ -@interface GPUImageCannyEdgeDetectionFilter : GPUImageFilterGroup -{ - GPUImageGrayscaleFilter *luminanceFilter; - GPUImageSingleComponentGaussianBlurFilter *blurFilter; - GPUImageDirectionalSobelEdgeDetectionFilter *edgeDetectionFilter; - GPUImageDirectionalNonMaximumSuppressionFilter *nonMaximumSuppressionFilter; - GPUImageWeakPixelInclusionFilter *weakPixelInclusionFilter; -} - -/** The image width and height factors tweak the appearance of the edges. - - These parameters affect the visibility of the detected edges - - By default, they match the inverse of the filter size in pixels - */ -@property(readwrite, nonatomic) CGFloat texelWidth; -/** The image width and height factors tweak the appearance of the edges. - - These parameters affect the visibility of the detected edges - - By default, they match the inverse of the filter size in pixels - */ -@property(readwrite, nonatomic) CGFloat texelHeight; - -/** The underlying blur radius for the Gaussian blur. Default is 2.0. - */ -@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; - -/** The underlying blur texel spacing multiplier. Default is 1.0. - */ -@property (readwrite, nonatomic) CGFloat blurTexelSpacingMultiplier; - -/** Any edge with a gradient magnitude above this threshold will pass and show up in the final result. - */ -@property(readwrite, nonatomic) CGFloat upperThreshold; - -/** Any edge with a gradient magnitude below this threshold will fail and be removed from the final result. - */ -@property(readwrite, nonatomic) CGFloat lowerThreshold; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCannyEdgeDetectionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCannyEdgeDetectionFilter.m deleted file mode 100755 index 7327d532..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCannyEdgeDetectionFilter.m +++ /dev/null @@ -1,125 +0,0 @@ -#import "GPUImageCannyEdgeDetectionFilter.h" - -#import "GPUImageGrayscaleFilter.h" -#import "GPUImageDirectionalSobelEdgeDetectionFilter.h" -#import "GPUImageDirectionalNonMaximumSuppressionFilter.h" -#import "GPUImageWeakPixelInclusionFilter.h" -#import "GPUImageSingleComponentGaussianBlurFilter.h" - -@implementation GPUImageCannyEdgeDetectionFilter - -@synthesize upperThreshold; -@synthesize lowerThreshold; -@synthesize blurRadiusInPixels; -@synthesize blurTexelSpacingMultiplier; -@synthesize texelWidth; -@synthesize texelHeight; - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - // First pass: convert image to luminance - luminanceFilter = [[GPUImageGrayscaleFilter alloc] init]; - [self addFilter:luminanceFilter]; - - // Second pass: apply a variable Gaussian blur - blurFilter = [[GPUImageSingleComponentGaussianBlurFilter alloc] init]; - [self addFilter:blurFilter]; - - // Third pass: run the Sobel edge detection, with calculated gradient directions, on this blurred image - edgeDetectionFilter = [[GPUImageDirectionalSobelEdgeDetectionFilter alloc] init]; - [self addFilter:edgeDetectionFilter]; - - // Fourth pass: apply non-maximum suppression - nonMaximumSuppressionFilter = [[GPUImageDirectionalNonMaximumSuppressionFilter alloc] init]; - [self addFilter:nonMaximumSuppressionFilter]; - - // Fifth pass: include weak pixels to complete edges - weakPixelInclusionFilter = [[GPUImageWeakPixelInclusionFilter alloc] init]; - [self addFilter:weakPixelInclusionFilter]; - - [luminanceFilter addTarget:blurFilter]; - [blurFilter addTarget:edgeDetectionFilter]; - [edgeDetectionFilter addTarget:nonMaximumSuppressionFilter]; - [nonMaximumSuppressionFilter addTarget:weakPixelInclusionFilter]; - - self.initialFilters = [NSArray arrayWithObject:luminanceFilter]; -// self.terminalFilter = nonMaximumSuppressionFilter; - self.terminalFilter = weakPixelInclusionFilter; - - self.blurRadiusInPixels = 2.0; - self.blurTexelSpacingMultiplier = 1.0; - self.upperThreshold = 0.4; - self.lowerThreshold = 0.1; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setBlurRadiusInPixels:(CGFloat)newValue; -{ - blurFilter.blurRadiusInPixels = newValue; -} - -- (CGFloat)blurRadiusInPixels; -{ - return blurFilter.blurRadiusInPixels; -} - -- (void)setBlurTexelSpacingMultiplier:(CGFloat)newValue; -{ - blurFilter.texelSpacingMultiplier = newValue; -} - -- (CGFloat)blurTexelSpacingMultiplier; -{ - return blurFilter.texelSpacingMultiplier; -} - -- (void)setTexelWidth:(CGFloat)newValue; -{ - edgeDetectionFilter.texelWidth = newValue; -} - -- (CGFloat)texelWidth; -{ - return edgeDetectionFilter.texelWidth; -} - -- (void)setTexelHeight:(CGFloat)newValue; -{ - edgeDetectionFilter.texelHeight = newValue; -} - -- (CGFloat)texelHeight; -{ - return edgeDetectionFilter.texelHeight; -} - -- (void)setUpperThreshold:(CGFloat)newValue; -{ - nonMaximumSuppressionFilter.upperThreshold = newValue; -} - -- (CGFloat)upperThreshold; -{ - return nonMaximumSuppressionFilter.upperThreshold; -} - -- (void)setLowerThreshold:(CGFloat)newValue; -{ - nonMaximumSuppressionFilter.lowerThreshold = newValue; -} - -- (CGFloat)lowerThreshold; -{ - return nonMaximumSuppressionFilter.lowerThreshold; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageChromaKeyBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageChromaKeyBlendFilter.h deleted file mode 100755 index 00a5aed7..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageChromaKeyBlendFilter.h +++ /dev/null @@ -1,32 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -/** Selectively replaces a color in the first image with the second image - */ -@interface GPUImageChromaKeyBlendFilter : GPUImageTwoInputFilter -{ - GLint colorToReplaceUniform, thresholdSensitivityUniform, smoothingUniform; -} - -/** The threshold sensitivity controls how similar pixels need to be colored to be replaced - - The default value is 0.3 - */ -@property(readwrite, nonatomic) CGFloat thresholdSensitivity; - -/** The degree of smoothing controls how gradually similar colors are replaced in the image - - The default value is 0.1 - */ -@property(readwrite, nonatomic) CGFloat smoothing; - -/** The color to be replaced is specified using individual red, green, and blue components (normalized to 1.0). - - The default is green: (0.0, 1.0, 0.0). - - @param redComponent Red component of color to be replaced - @param greenComponent Green component of color to be replaced - @param blueComponent Blue component of color to be replaced - */ -- (void)setColorToReplaceRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageChromaKeyBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageChromaKeyBlendFilter.m deleted file mode 100755 index 4e6b4661..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageChromaKeyBlendFilter.m +++ /dev/null @@ -1,117 +0,0 @@ -#import "GPUImageChromaKeyBlendFilter.h" - -// Shader code based on Apple's CIChromaKeyFilter example: https://developer.apple.com/library/mac/#samplecode/CIChromaKeyFilter/Introduction/Intro.html - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageChromaKeyBlendFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform float thresholdSensitivity; - uniform float smoothing; - uniform vec3 colorToReplace; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - float maskY = 0.2989 * colorToReplace.r + 0.5866 * colorToReplace.g + 0.1145 * colorToReplace.b; - float maskCr = 0.7132 * (colorToReplace.r - maskY); - float maskCb = 0.5647 * (colorToReplace.b - maskY); - - float Y = 0.2989 * textureColor.r + 0.5866 * textureColor.g + 0.1145 * textureColor.b; - float Cr = 0.7132 * (textureColor.r - Y); - float Cb = 0.5647 * (textureColor.b - Y); - -// float blendValue = 1.0 - smoothstep(thresholdSensitivity - smoothing, thresholdSensitivity , abs(Cr - maskCr) + abs(Cb - maskCb)); - float blendValue = 1.0 - smoothstep(thresholdSensitivity, thresholdSensitivity + smoothing, distance(vec2(Cr, Cb), vec2(maskCr, maskCb))); - gl_FragColor = mix(textureColor, textureColor2, blendValue); - } -); -#else -NSString *const kGPUImageChromaKeyBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform float thresholdSensitivity; - uniform float smoothing; - uniform vec3 colorToReplace; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - float maskY = 0.2989 * colorToReplace.r + 0.5866 * colorToReplace.g + 0.1145 * colorToReplace.b; - float maskCr = 0.7132 * (colorToReplace.r - maskY); - float maskCb = 0.5647 * (colorToReplace.b - maskY); - - float Y = 0.2989 * textureColor.r + 0.5866 * textureColor.g + 0.1145 * textureColor.b; - float Cr = 0.7132 * (textureColor.r - Y); - float Cb = 0.5647 * (textureColor.b - Y); - - // float blendValue = 1.0 - smoothstep(thresholdSensitivity - smoothing, thresholdSensitivity , abs(Cr - maskCr) + abs(Cb - maskCb)); - float blendValue = 1.0 - smoothstep(thresholdSensitivity, thresholdSensitivity + smoothing, distance(vec2(Cr, Cb), vec2(maskCr, maskCb))); - gl_FragColor = mix(textureColor, textureColor2, blendValue); - } -); -#endif - -@implementation GPUImageChromaKeyBlendFilter - -@synthesize thresholdSensitivity = _thresholdSensitivity; -@synthesize smoothing = _smoothing; - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageChromaKeyBlendFragmentShaderString])) - { - return nil; - } - - thresholdSensitivityUniform = [filterProgram uniformIndex:@"thresholdSensitivity"]; - smoothingUniform = [filterProgram uniformIndex:@"smoothing"]; - colorToReplaceUniform = [filterProgram uniformIndex:@"colorToReplace"]; - - self.thresholdSensitivity = 0.4; - self.smoothing = 0.1; - [self setColorToReplaceRed:0.0 green:1.0 blue:0.0]; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setColorToReplaceRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; -{ - GPUVector3 colorToReplace = {redComponent, greenComponent, blueComponent}; - - [self setVec3:colorToReplace forUniform:colorToReplaceUniform program:filterProgram]; -} - -- (void)setThresholdSensitivity:(CGFloat)newValue; -{ - _thresholdSensitivity = newValue; - - [self setFloat:(GLfloat)_thresholdSensitivity forUniform:thresholdSensitivityUniform program:filterProgram]; -} - -- (void)setSmoothing:(CGFloat)newValue; -{ - _smoothing = newValue; - - [self setFloat:(GLfloat)_smoothing forUniform:smoothingUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageChromaKeyFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageChromaKeyFilter.h deleted file mode 100644 index 5ee7e498..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageChromaKeyFilter.h +++ /dev/null @@ -1,30 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageChromaKeyFilter : GPUImageFilter -{ - GLint colorToReplaceUniform, thresholdSensitivityUniform, smoothingUniform; -} - -/** The threshold sensitivity controls how similar pixels need to be colored to be replaced - - The default value is 0.3 - */ -@property(readwrite, nonatomic) CGFloat thresholdSensitivity; - -/** The degree of smoothing controls how gradually similar colors are replaced in the image - - The default value is 0.1 - */ -@property(readwrite, nonatomic) CGFloat smoothing; - -/** The color to be replaced is specified using individual red, green, and blue components (normalized to 1.0). - - The default is green: (0.0, 1.0, 0.0). - - @param redComponent Red component of color to be replaced - @param greenComponent Green component of color to be replaced - @param blueComponent Blue component of color to be replaced - */ -- (void)setColorToReplaceRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageChromaKeyFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageChromaKeyFilter.m deleted file mode 100644 index c70ef61d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageChromaKeyFilter.m +++ /dev/null @@ -1,113 +0,0 @@ -#import "GPUImageChromaKeyFilter.h" - -// Shader code based on Apple's CIChromaKeyFilter example: https://developer.apple.com/library/mac/#samplecode/CIChromaKeyFilter/Introduction/Intro.html - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageChromaKeyFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying highp vec2 textureCoordinate; - - uniform float thresholdSensitivity; - uniform float smoothing; - uniform vec3 colorToReplace; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - float maskY = 0.2989 * colorToReplace.r + 0.5866 * colorToReplace.g + 0.1145 * colorToReplace.b; - float maskCr = 0.7132 * (colorToReplace.r - maskY); - float maskCb = 0.5647 * (colorToReplace.b - maskY); - - float Y = 0.2989 * textureColor.r + 0.5866 * textureColor.g + 0.1145 * textureColor.b; - float Cr = 0.7132 * (textureColor.r - Y); - float Cb = 0.5647 * (textureColor.b - Y); - - // float blendValue = 1.0 - smoothstep(thresholdSensitivity - smoothing, thresholdSensitivity , abs(Cr - maskCr) + abs(Cb - maskCb)); - float blendValue = smoothstep(thresholdSensitivity, thresholdSensitivity + smoothing, distance(vec2(Cr, Cb), vec2(maskCr, maskCb))); - gl_FragColor = vec4(textureColor.rgb, textureColor.a * blendValue); - } -); -#else -NSString *const kGPUImageChromaKeyFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform float thresholdSensitivity; - uniform float smoothing; - uniform vec3 colorToReplace; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - float maskY = 0.2989 * colorToReplace.r + 0.5866 * colorToReplace.g + 0.1145 * colorToReplace.b; - float maskCr = 0.7132 * (colorToReplace.r - maskY); - float maskCb = 0.5647 * (colorToReplace.b - maskY); - - float Y = 0.2989 * textureColor.r + 0.5866 * textureColor.g + 0.1145 * textureColor.b; - float Cr = 0.7132 * (textureColor.r - Y); - float Cb = 0.5647 * (textureColor.b - Y); - - // float blendValue = 1.0 - smoothstep(thresholdSensitivity - smoothing, thresholdSensitivity , abs(Cr - maskCr) + abs(Cb - maskCb)); - float blendValue = smoothstep(thresholdSensitivity, thresholdSensitivity + smoothing, distance(vec2(Cr, Cb), vec2(maskCr, maskCb))); - gl_FragColor = vec4(textureColor.rgb, textureColor.a * blendValue); - } - ); -#endif - -@implementation GPUImageChromaKeyFilter - -@synthesize thresholdSensitivity = _thresholdSensitivity; -@synthesize smoothing = _smoothing; - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageChromaKeyFragmentShaderString])) - { - return nil; - } - - thresholdSensitivityUniform = [filterProgram uniformIndex:@"thresholdSensitivity"]; - smoothingUniform = [filterProgram uniformIndex:@"smoothing"]; - colorToReplaceUniform = [filterProgram uniformIndex:@"colorToReplace"]; - - self.thresholdSensitivity = 0.4; - self.smoothing = 0.1; - [self setColorToReplaceRed:0.0 green:1.0 blue:0.0]; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setColorToReplaceRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; -{ - GPUVector3 colorToReplace = {redComponent, greenComponent, blueComponent}; - - [self setVec3:colorToReplace forUniform:colorToReplaceUniform program:filterProgram]; -} - -- (void)setThresholdSensitivity:(CGFloat)newValue; -{ - _thresholdSensitivity = newValue; - - [self setFloat:(GLfloat)_thresholdSensitivity forUniform:thresholdSensitivityUniform program:filterProgram]; -} - -- (void)setSmoothing:(CGFloat)newValue; -{ - _smoothing = newValue; - - [self setFloat:(GLfloat)_smoothing forUniform:smoothingUniform program:filterProgram]; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageClosingFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageClosingFilter.h deleted file mode 100644 index 61e34c41..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageClosingFilter.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImageErosionFilter; -@class GPUImageDilationFilter; - -// A filter that first performs a dilation on the red channel of an image, followed by an erosion of the same radius. -// This helps to filter out smaller dark elements. - -@interface GPUImageClosingFilter : GPUImageFilterGroup -{ - GPUImageErosionFilter *erosionFilter; - GPUImageDilationFilter *dilationFilter; -} - -@property(readwrite, nonatomic) CGFloat verticalTexelSpacing, horizontalTexelSpacing; - -- (id)initWithRadius:(NSUInteger)radius; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageClosingFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageClosingFilter.m deleted file mode 100644 index 01e9b29b..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageClosingFilter.m +++ /dev/null @@ -1,57 +0,0 @@ -#import "GPUImageClosingFilter.h" -#import "GPUImageErosionFilter.h" -#import "GPUImageDilationFilter.h" - -@implementation GPUImageClosingFilter - -@synthesize verticalTexelSpacing = _verticalTexelSpacing; -@synthesize horizontalTexelSpacing = _horizontalTexelSpacing; - -- (id)init; -{ - if (!(self = [self initWithRadius:1])) - { - return nil; - } - - return self; -} - -- (id)initWithRadius:(NSUInteger)radius; -{ - if (!(self = [super init])) - { - return nil; - } - - // First pass: dilation - dilationFilter = [[GPUImageDilationFilter alloc] initWithRadius:radius]; - [self addFilter:dilationFilter]; - - // Second pass: erosion - erosionFilter = [[GPUImageErosionFilter alloc] initWithRadius:radius]; - [self addFilter:erosionFilter]; - - [dilationFilter addTarget:erosionFilter]; - - self.initialFilters = [NSArray arrayWithObjects:dilationFilter, nil]; - self.terminalFilter = erosionFilter; - - return self; -} - -- (void)setVerticalTexelSpacing:(CGFloat)newValue; -{ - _verticalTexelSpacing = newValue; - erosionFilter.verticalTexelSpacing = newValue; - dilationFilter.verticalTexelSpacing = newValue; -} - -- (void)setHorizontalTexelSpacing:(CGFloat)newValue; -{ - _horizontalTexelSpacing = newValue; - erosionFilter.horizontalTexelSpacing = newValue; - dilationFilter.horizontalTexelSpacing = newValue; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorBlendFilter.h deleted file mode 100644 index 302a16c6..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorBlendFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageColorBlendFilter : GPUImageTwoInputFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorBlendFilter.m deleted file mode 100644 index ced1cb8e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorBlendFilter.m +++ /dev/null @@ -1,113 +0,0 @@ -#import "GPUImageColorBlendFilter.h" - -/** - * Color blend mode based upon pseudo code from the PDF specification. - */ -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageColorBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - highp float lum(lowp vec3 c) { - return dot(c, vec3(0.3, 0.59, 0.11)); - } - - lowp vec3 clipcolor(lowp vec3 c) { - highp float l = lum(c); - lowp float n = min(min(c.r, c.g), c.b); - lowp float x = max(max(c.r, c.g), c.b); - - if (n < 0.0) { - c.r = l + ((c.r - l) * l) / (l - n); - c.g = l + ((c.g - l) * l) / (l - n); - c.b = l + ((c.b - l) * l) / (l - n); - } - if (x > 1.0) { - c.r = l + ((c.r - l) * (1.0 - l)) / (x - l); - c.g = l + ((c.g - l) * (1.0 - l)) / (x - l); - c.b = l + ((c.b - l) * (1.0 - l)) / (x - l); - } - - return c; - } - - lowp vec3 setlum(lowp vec3 c, highp float l) { - highp float d = l - lum(c); - c = c + vec3(d); - return clipcolor(c); - } - - void main() - { - highp vec4 baseColor = texture2D(inputImageTexture, textureCoordinate); - highp vec4 overlayColor = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(baseColor.rgb * (1.0 - overlayColor.a) + setlum(overlayColor.rgb, lum(baseColor.rgb)) * overlayColor.a, baseColor.a); - } -); -#else -NSString *const kGPUImageColorBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - float lum(vec3 c) { - return dot(c, vec3(0.3, 0.59, 0.11)); - } - - vec3 clipcolor(vec3 c) { - float l = lum(c); - float n = min(min(c.r, c.g), c.b); - float x = max(max(c.r, c.g), c.b); - - if (n < 0.0) { - c.r = l + ((c.r - l) * l) / (l - n); - c.g = l + ((c.g - l) * l) / (l - n); - c.b = l + ((c.b - l) * l) / (l - n); - } - if (x > 1.0) { - c.r = l + ((c.r - l) * (1.0 - l)) / (x - l); - c.g = l + ((c.g - l) * (1.0 - l)) / (x - l); - c.b = l + ((c.b - l) * (1.0 - l)) / (x - l); - } - - return c; - } - - vec3 setlum(vec3 c, float l) { - float d = l - lum(c); - c = c + vec3(d); - return clipcolor(c); - } - - void main() - { - vec4 baseColor = texture2D(inputImageTexture, textureCoordinate); - vec4 overlayColor = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(baseColor.rgb * (1.0 - overlayColor.a) + setlum(overlayColor.rgb, lum(baseColor.rgb)) * overlayColor.a, baseColor.a); - } -); -#endif - - -@implementation GPUImageColorBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageColorBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end \ No newline at end of file diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorBurnBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorBurnBlendFilter.h deleted file mode 100755 index 50ebb3f4..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorBurnBlendFilter.h +++ /dev/null @@ -1,9 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -/** Applies a color burn blend of two images - */ -@interface GPUImageColorBurnBlendFilter : GPUImageTwoInputFilter -{ -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorBurnBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorBurnBlendFilter.m deleted file mode 100755 index 5d6ff60d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorBurnBlendFilter.m +++ /dev/null @@ -1,52 +0,0 @@ -#import "GPUImageColorBurnBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageColorBurnBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - mediump vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - mediump vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - mediump vec4 whiteColor = vec4(1.0); - gl_FragColor = whiteColor - (whiteColor - textureColor) / textureColor2; - } -); -#else -NSString *const kGPUImageColorBurnBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - vec4 whiteColor = vec4(1.0); - gl_FragColor = whiteColor - (whiteColor - textureColor) / textureColor2; - } -); -#endif - -@implementation GPUImageColorBurnBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageColorBurnBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorDodgeBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorDodgeBlendFilter.h deleted file mode 100755 index 0f541c42..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorDodgeBlendFilter.h +++ /dev/null @@ -1,9 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -/** Applies a color dodge blend of two images - */ -@interface GPUImageColorDodgeBlendFilter : GPUImageTwoInputFilter -{ -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorDodgeBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorDodgeBlendFilter.m deleted file mode 100755 index 6a38827c..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorDodgeBlendFilter.m +++ /dev/null @@ -1,75 +0,0 @@ -#import "GPUImageColorDodgeBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageColorDodgeBlendFragmentShaderString = SHADER_STRING -( - - precision mediump float; - - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 base = texture2D(inputImageTexture, textureCoordinate); - vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - vec3 baseOverlayAlphaProduct = vec3(overlay.a * base.a); - vec3 rightHandProduct = overlay.rgb * (1.0 - base.a) + base.rgb * (1.0 - overlay.a); - - vec3 firstBlendColor = baseOverlayAlphaProduct + rightHandProduct; - vec3 overlayRGB = clamp((overlay.rgb / clamp(overlay.a, 0.01, 1.0)) * step(0.0, overlay.a), 0.0, 0.99); - - vec3 secondBlendColor = (base.rgb * overlay.a) / (1.0 - overlayRGB) + rightHandProduct; - - vec3 colorChoice = step((overlay.rgb * base.a + base.rgb * overlay.a), baseOverlayAlphaProduct); - - gl_FragColor = vec4(mix(firstBlendColor, secondBlendColor, colorChoice), 1.0); - } -); -#else -NSString *const kGPUImageColorDodgeBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 base = texture2D(inputImageTexture, textureCoordinate); - vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - vec3 baseOverlayAlphaProduct = vec3(overlay.a * base.a); - vec3 rightHandProduct = overlay.rgb * (1.0 - base.a) + base.rgb * (1.0 - overlay.a); - - vec3 firstBlendColor = baseOverlayAlphaProduct + rightHandProduct; - vec3 overlayRGB = clamp((overlay.rgb / clamp(overlay.a, 0.01, 1.0)) * step(0.0, overlay.a), 0.0, 0.99); - - vec3 secondBlendColor = (base.rgb * overlay.a) / (1.0 - overlayRGB) + rightHandProduct; - - vec3 colorChoice = step((overlay.rgb * base.a + base.rgb * overlay.a), baseOverlayAlphaProduct); - - gl_FragColor = vec4(mix(firstBlendColor, secondBlendColor, colorChoice), 1.0); - } -); -#endif - -@implementation GPUImageColorDodgeBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageColorDodgeBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorInvertFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorInvertFilter.h deleted file mode 100755 index aaeec438..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorInvertFilter.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageColorInvertFilter : GPUImageFilter -{ -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorInvertFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorInvertFilter.m deleted file mode 100755 index 0a8798b1..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorInvertFilter.m +++ /dev/null @@ -1,46 +0,0 @@ -#import "GPUImageColorInvertFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageInvertFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4((1.0 - textureColor.rgb), textureColor.w); - } -); -#else -NSString *const kGPUImageInvertFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4((1.0 - textureColor.rgb), textureColor.w); - } - ); -#endif - -@implementation GPUImageColorInvertFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageInvertFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorMatrixFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorMatrixFilter.h deleted file mode 100755 index 75887276..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorMatrixFilter.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "GPUImageFilter.h" - -/** Transforms the colors of an image by applying a matrix to them - */ -@interface GPUImageColorMatrixFilter : GPUImageFilter -{ - GLint colorMatrixUniform; - GLint intensityUniform; -} - -/** A 4x4 matrix used to transform each color in an image - */ -@property(readwrite, nonatomic) GPUMatrix4x4 colorMatrix; - -/** The degree to which the new transformed color replaces the original color for each pixel - */ -@property(readwrite, nonatomic) CGFloat intensity; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorMatrixFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorMatrixFilter.m deleted file mode 100755 index 0e21c7e8..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorMatrixFilter.m +++ /dev/null @@ -1,87 +0,0 @@ -#import "GPUImageColorMatrixFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageColorMatrixFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform lowp mat4 colorMatrix; - uniform lowp float intensity; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 outputColor = textureColor * colorMatrix; - - gl_FragColor = (intensity * outputColor) + ((1.0 - intensity) * textureColor); - } -); -#else -NSString *const kGPUImageColorMatrixFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform mat4 colorMatrix; - uniform float intensity; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 outputColor = textureColor * colorMatrix; - - gl_FragColor = (intensity * outputColor) + ((1.0 - intensity) * textureColor); - } -); -#endif - -@implementation GPUImageColorMatrixFilter - -@synthesize intensity = _intensity; -@synthesize colorMatrix = _colorMatrix; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageColorMatrixFragmentShaderString])) - { - return nil; - } - - colorMatrixUniform = [filterProgram uniformIndex:@"colorMatrix"]; - intensityUniform = [filterProgram uniformIndex:@"intensity"]; - - self.intensity = 1.f; - self.colorMatrix = (GPUMatrix4x4){ - {1.f, 0.f, 0.f, 0.f}, - {0.f, 1.f, 0.f, 0.f}, - {0.f, 0.f, 1.f, 0.f}, - {0.f, 0.f, 0.f, 1.f} - }; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setIntensity:(CGFloat)newIntensity; -{ - _intensity = newIntensity; - - [self setFloat:_intensity forUniform:intensityUniform program:filterProgram]; -} - -- (void)setColorMatrix:(GPUMatrix4x4)newColorMatrix; -{ - _colorMatrix = newColorMatrix; - - [self setMatrix4f:_colorMatrix forUniform:colorMatrixUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorPackingFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorPackingFilter.h deleted file mode 100644 index c2edca51..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorPackingFilter.h +++ /dev/null @@ -1,10 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageColorPackingFilter : GPUImageFilter -{ - GLint texelWidthUniform, texelHeightUniform; - - CGFloat texelWidth, texelHeight; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorPackingFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorPackingFilter.m deleted file mode 100644 index 1a087ca8..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageColorPackingFilter.m +++ /dev/null @@ -1,139 +0,0 @@ -#import "GPUImageColorPackingFilter.h" - -NSString *const kGPUImageColorPackingVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - - uniform float texelWidth; - uniform float texelHeight; - - varying vec2 upperLeftInputTextureCoordinate; - varying vec2 upperRightInputTextureCoordinate; - varying vec2 lowerLeftInputTextureCoordinate; - varying vec2 lowerRightInputTextureCoordinate; - - void main() - { - gl_Position = position; - - upperLeftInputTextureCoordinate = inputTextureCoordinate.xy + vec2(-texelWidth, -texelHeight); - upperRightInputTextureCoordinate = inputTextureCoordinate.xy + vec2(texelWidth, -texelHeight); - lowerLeftInputTextureCoordinate = inputTextureCoordinate.xy + vec2(-texelWidth, texelHeight); - lowerRightInputTextureCoordinate = inputTextureCoordinate.xy + vec2(texelWidth, texelHeight); - } -); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageColorPackingFragmentShaderString = SHADER_STRING -( - precision lowp float; - - uniform sampler2D inputImageTexture; - - uniform mediump mat3 convolutionMatrix; - - varying highp vec2 outputTextureCoordinate; - - varying highp vec2 upperLeftInputTextureCoordinate; - varying highp vec2 upperRightInputTextureCoordinate; - varying highp vec2 lowerLeftInputTextureCoordinate; - varying highp vec2 lowerRightInputTextureCoordinate; - - void main() - { - float upperLeftIntensity = texture2D(inputImageTexture, upperLeftInputTextureCoordinate).r; - float upperRightIntensity = texture2D(inputImageTexture, upperRightInputTextureCoordinate).r; - float lowerLeftIntensity = texture2D(inputImageTexture, lowerLeftInputTextureCoordinate).r; - float lowerRightIntensity = texture2D(inputImageTexture, lowerRightInputTextureCoordinate).r; - - gl_FragColor = vec4(upperLeftIntensity, upperRightIntensity, lowerLeftIntensity, lowerRightIntensity); - } -); -#else -NSString *const kGPUImageColorPackingFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - uniform mat3 convolutionMatrix; - - varying vec2 outputTextureCoordinate; - - varying vec2 upperLeftInputTextureCoordinate; - varying vec2 upperRightInputTextureCoordinate; - varying vec2 lowerLeftInputTextureCoordinate; - varying vec2 lowerRightInputTextureCoordinate; - - void main() - { - float upperLeftIntensity = texture2D(inputImageTexture, upperLeftInputTextureCoordinate).r; - float upperRightIntensity = texture2D(inputImageTexture, upperRightInputTextureCoordinate).r; - float lowerLeftIntensity = texture2D(inputImageTexture, lowerLeftInputTextureCoordinate).r; - float lowerRightIntensity = texture2D(inputImageTexture, lowerRightInputTextureCoordinate).r; - - gl_FragColor = vec4(upperLeftIntensity, upperRightIntensity, lowerLeftIntensity, lowerRightIntensity); - } -); -#endif - -@implementation GPUImageColorPackingFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithVertexShaderFromString:kGPUImageColorPackingVertexShaderString fragmentShaderFromString:kGPUImageColorPackingFragmentShaderString])) - { - return nil; - } - - texelWidthUniform = [filterProgram uniformIndex:@"texelWidth"]; - texelHeightUniform = [filterProgram uniformIndex:@"texelHeight"]; - - return self; -} - -- (void)setupFilterForSize:(CGSize)filterFrameSize; -{ - texelWidth = 0.5 / inputTextureSize.width; - texelHeight = 0.5 / inputTextureSize.height; - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:filterProgram]; - glUniform1f(texelWidthUniform, texelWidth); - glUniform1f(texelHeightUniform, texelHeight); - }); -} - -#pragma mark - -#pragma mark Managing the display FBOs - -- (CGSize)sizeOfFBO; -{ - CGSize outputSize = [self maximumOutputSize]; - if ( (CGSizeEqualToSize(outputSize, CGSizeZero)) || (inputTextureSize.width < outputSize.width) ) - { - CGSize quarterSize; - quarterSize.width = inputTextureSize.width / 2.0; - quarterSize.height = inputTextureSize.height / 2.0; - return quarterSize; - } - else - { - return outputSize; - } -} - -#pragma mark - -#pragma mark Rendering - -- (CGSize)outputFrameSize; -{ - CGSize quarterSize; - quarterSize.width = inputTextureSize.width / 2.0; - quarterSize.height = inputTextureSize.height / 2.0; - return quarterSize; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageContrastFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageContrastFilter.h deleted file mode 100755 index e09e6dc4..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageContrastFilter.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "GPUImageFilter.h" - -/** Adjusts the contrast of the image - */ -@interface GPUImageContrastFilter : GPUImageFilter -{ - GLint contrastUniform; -} - -/** Contrast ranges from 0.0 to 4.0 (max contrast), with 1.0 as the normal level - */ -@property(readwrite, nonatomic) CGFloat contrast; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageContrastFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageContrastFilter.m deleted file mode 100755 index 5ed1e22f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageContrastFilter.m +++ /dev/null @@ -1,66 +0,0 @@ -#import "GPUImageContrastFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageContrastFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform lowp float contrast; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4(((textureColor.rgb - vec3(0.5)) * contrast + vec3(0.5)), textureColor.w); - } -); -#else -NSString *const kGPUImageContrastFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float contrast; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4(((textureColor.rgb - vec3(0.5)) * contrast + vec3(0.5)), textureColor.w); - } - ); -#endif - -@implementation GPUImageContrastFilter - -@synthesize contrast = _contrast; - -#pragma mark - -#pragma mark Initialization - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageContrastFragmentShaderString])) - { - return nil; - } - - contrastUniform = [filterProgram uniformIndex:@"contrast"]; - self.contrast = 1.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setContrast:(CGFloat)newValue; -{ - _contrast = newValue; - - [self setFloat:_contrast forUniform:contrastUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCropFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCropFilter.h deleted file mode 100755 index 641fb7bf..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCropFilter.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageCropFilter : GPUImageFilter -{ - GLfloat cropTextureCoordinates[8]; -} - -// The crop region is the rectangle within the image to crop. It is normalized to a coordinate space from 0.0 to 1.0, with 0.0, 0.0 being the upper left corner of the image -@property(readwrite, nonatomic) CGRect cropRegion; - -// Initialization and teardown -- (id)initWithCropRegion:(CGRect)newCropRegion; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCropFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCropFilter.m deleted file mode 100755 index 22e33c17..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCropFilter.m +++ /dev/null @@ -1,274 +0,0 @@ -#import "GPUImageCropFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageCropFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - gl_FragColor = texture2D(inputImageTexture, textureCoordinate); - } -); -#else -NSString *const kGPUImageCropFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - gl_FragColor = texture2D(inputImageTexture, textureCoordinate); - } -); -#endif - -@interface GPUImageCropFilter () - -- (void)calculateCropTextureCoordinates; - -@end - -@interface GPUImageCropFilter() -{ - CGSize originallySuppliedInputSize; -} - -@end - -@implementation GPUImageCropFilter - -@synthesize cropRegion = _cropRegion; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithCropRegion:(CGRect)newCropRegion; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageCropFragmentShaderString])) - { - return nil; - } - - self.cropRegion = newCropRegion; - - return self; -} - -- (id)init; -{ - if (!(self = [self initWithCropRegion:CGRectMake(0.0, 0.0, 1.0, 1.0)])) - { - return nil; - } - - return self; -} - -#pragma mark - -#pragma mark Rendering - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - if (self.preventRendering) - { - return; - } - -// if (overrideInputSize) -// { -// if (CGSizeEqualToSize(forcedMaximumSize, CGSizeZero)) -// { -// return; -// } -// else -// { -// CGRect insetRect = AVMakeRectWithAspectRatioInsideRect(newSize, CGRectMake(0.0, 0.0, forcedMaximumSize.width, forcedMaximumSize.height)); -// inputTextureSize = insetRect.size; -// return; -// } -// } - - CGSize rotatedSize = [self rotatedSize:newSize forIndex:textureIndex]; - originallySuppliedInputSize = rotatedSize; - - CGSize scaledSize; - scaledSize.width = rotatedSize.width * _cropRegion.size.width; - scaledSize.height = rotatedSize.height * _cropRegion.size.height; - - - if (CGSizeEqualToSize(scaledSize, CGSizeZero)) - { - inputTextureSize = scaledSize; - } - else if (!CGSizeEqualToSize(inputTextureSize, scaledSize)) - { - inputTextureSize = scaledSize; - } -} - -#pragma mark - -#pragma mark GPUImageInput - -- (void)calculateCropTextureCoordinates; -{ - CGFloat minX = _cropRegion.origin.x; - CGFloat minY = _cropRegion.origin.y; - CGFloat maxX = CGRectGetMaxX(_cropRegion); - CGFloat maxY = CGRectGetMaxY(_cropRegion); - - switch(inputRotation) - { - case kGPUImageNoRotation: // Works - { - cropTextureCoordinates[0] = minX; // 0,0 - cropTextureCoordinates[1] = minY; - - cropTextureCoordinates[2] = maxX; // 1,0 - cropTextureCoordinates[3] = minY; - - cropTextureCoordinates[4] = minX; // 0,1 - cropTextureCoordinates[5] = maxY; - - cropTextureCoordinates[6] = maxX; // 1,1 - cropTextureCoordinates[7] = maxY; - }; break; - case kGPUImageRotateLeft: // Fixed - { - cropTextureCoordinates[0] = maxY; // 1,0 - cropTextureCoordinates[1] = 1.0 - maxX; - - cropTextureCoordinates[2] = maxY; // 1,1 - cropTextureCoordinates[3] = 1.0 - minX; - - cropTextureCoordinates[4] = minY; // 0,0 - cropTextureCoordinates[5] = 1.0 - maxX; - - cropTextureCoordinates[6] = minY; // 0,1 - cropTextureCoordinates[7] = 1.0 - minX; - }; break; - case kGPUImageRotateRight: // Fixed - { - cropTextureCoordinates[0] = minY; // 0,1 - cropTextureCoordinates[1] = 1.0 - minX; - - cropTextureCoordinates[2] = minY; // 0,0 - cropTextureCoordinates[3] = 1.0 - maxX; - - cropTextureCoordinates[4] = maxY; // 1,1 - cropTextureCoordinates[5] = 1.0 - minX; - - cropTextureCoordinates[6] = maxY; // 1,0 - cropTextureCoordinates[7] = 1.0 - maxX; - }; break; - case kGPUImageFlipVertical: // Works for me - { - cropTextureCoordinates[0] = minX; // 0,1 - cropTextureCoordinates[1] = maxY; - - cropTextureCoordinates[2] = maxX; // 1,1 - cropTextureCoordinates[3] = maxY; - - cropTextureCoordinates[4] = minX; // 0,0 - cropTextureCoordinates[5] = minY; - - cropTextureCoordinates[6] = maxX; // 1,0 - cropTextureCoordinates[7] = minY; - }; break; - case kGPUImageFlipHorizonal: // Works for me - { - cropTextureCoordinates[0] = maxX; // 1,0 - cropTextureCoordinates[1] = minY; - - cropTextureCoordinates[2] = minX; // 0,0 - cropTextureCoordinates[3] = minY; - - cropTextureCoordinates[4] = maxX; // 1,1 - cropTextureCoordinates[5] = maxY; - - cropTextureCoordinates[6] = minX; // 0,1 - cropTextureCoordinates[7] = maxY; - }; break; - case kGPUImageRotate180: // Fixed - { - cropTextureCoordinates[0] = maxX; // 1,1 - cropTextureCoordinates[1] = maxY; - - cropTextureCoordinates[2] = minX; // 0,1 - cropTextureCoordinates[3] = maxY; - - cropTextureCoordinates[4] = maxX; // 1,0 - cropTextureCoordinates[5] = minY; - - cropTextureCoordinates[6] = minX; // 0,0 - cropTextureCoordinates[7] = minY; - }; break; - case kGPUImageRotateRightFlipVertical: // Fixed - { - cropTextureCoordinates[0] = minY; // 0,0 - cropTextureCoordinates[1] = 1.0 - maxX; - - cropTextureCoordinates[2] = minY; // 0,1 - cropTextureCoordinates[3] = 1.0 - minX; - - cropTextureCoordinates[4] = maxY; // 1,0 - cropTextureCoordinates[5] = 1.0 - maxX; - - cropTextureCoordinates[6] = maxY; // 1,1 - cropTextureCoordinates[7] = 1.0 - minX; - }; break; - case kGPUImageRotateRightFlipHorizontal: // Fixed - { - cropTextureCoordinates[0] = maxY; // 1,1 - cropTextureCoordinates[1] = 1.0 - minX; - - cropTextureCoordinates[2] = maxY; // 1,0 - cropTextureCoordinates[3] = 1.0 - maxX; - - cropTextureCoordinates[4] = minY; // 0,1 - cropTextureCoordinates[5] = 1.0 - minX; - - cropTextureCoordinates[6] = minY; // 0,0 - cropTextureCoordinates[7] = 1.0 - maxX; - }; break; - } -} - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - static const GLfloat cropSquareVertices[] = { - -1.0f, -1.0f, - 1.0f, -1.0f, - -1.0f, 1.0f, - 1.0f, 1.0f, - }; - - [self renderToTextureWithVertices:cropSquareVertices textureCoordinates:cropTextureCoordinates]; - - [self informTargetsAboutNewFrameAtTime:frameTime]; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setCropRegion:(CGRect)newValue; -{ - NSParameterAssert(newValue.origin.x >= 0 && newValue.origin.x <= 1 && - newValue.origin.y >= 0 && newValue.origin.y <= 1 && - newValue.size.width >= 0 && newValue.size.width <= 1 && - newValue.size.height >= 0 && newValue.size.height <= 1); - - _cropRegion = newValue; - [self calculateCropTextureCoordinates]; -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - [super setInputRotation:newInputRotation atIndex:textureIndex]; - [self calculateCropTextureCoordinates]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCrosshairGenerator.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCrosshairGenerator.h deleted file mode 100644 index 569774f5..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCrosshairGenerator.h +++ /dev/null @@ -1,17 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageCrosshairGenerator : GPUImageFilter -{ - GLint crosshairWidthUniform, crosshairColorUniform; -} - -// The width of the displayed crosshairs, in pixels. Currently this only works well for odd widths. The default is 5. -@property(readwrite, nonatomic) CGFloat crosshairWidth; - -// The color of the crosshairs is specified using individual red, green, and blue components (normalized to 1.0). The default is green: (0.0, 1.0, 0.0). -- (void)setCrosshairColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; - -// Rendering -- (void)renderCrosshairsFromArray:(GLfloat *)crosshairCoordinates count:(NSUInteger)numberOfCrosshairs frameTime:(CMTime)frameTime; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCrosshairGenerator.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCrosshairGenerator.m deleted file mode 100644 index 9e2a29a2..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCrosshairGenerator.m +++ /dev/null @@ -1,139 +0,0 @@ -#import "GPUImageCrosshairGenerator.h" - -NSString *const kGPUImageCrosshairVertexShaderString = SHADER_STRING -( - attribute vec4 position; - - uniform float crosshairWidth; - - varying vec2 centerLocation; - varying float pointSpacing; - - void main() - { - gl_Position = vec4(((position.xy * 2.0) - 1.0), 0.0, 1.0); - gl_PointSize = crosshairWidth + 1.0; - pointSpacing = 1.0 / crosshairWidth; - centerLocation = vec2(pointSpacing * ceil(crosshairWidth / 2.0), pointSpacing * ceil(crosshairWidth / 2.0)); - } -); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageCrosshairFragmentShaderString = SHADER_STRING -( - uniform lowp vec3 crosshairColor; - - varying highp vec2 centerLocation; - varying highp float pointSpacing; - - void main() - { - lowp vec2 distanceFromCenter = abs(centerLocation - gl_PointCoord.xy); - lowp float axisTest = step(pointSpacing, gl_PointCoord.y) * step(distanceFromCenter.x, 0.09) + step(pointSpacing, gl_PointCoord.x) * step(distanceFromCenter.y, 0.09); - - gl_FragColor = vec4(crosshairColor * axisTest, axisTest); -// gl_FragColor = vec4(distanceFromCenterInX, distanceFromCenterInY, 0.0, 1.0); - } -); -#else -NSString *const kGPUImageCrosshairFragmentShaderString = SHADER_STRING -( - GPUImageEscapedHashIdentifier(version 120)\n - - uniform vec3 crosshairColor; - - varying vec2 centerLocation; - varying float pointSpacing; - - void main() - { - vec2 distanceFromCenter = abs(centerLocation - gl_PointCoord.xy); - float axisTest = step(pointSpacing, gl_PointCoord.y) * step(distanceFromCenter.x, 0.09) + step(pointSpacing, gl_PointCoord.x) * step(distanceFromCenter.y, 0.09); - - gl_FragColor = vec4(crosshairColor * axisTest, axisTest); - // gl_FragColor = vec4(distanceFromCenterInX, distanceFromCenterInY, 0.0, 1.0); - } -); -#endif - -@implementation GPUImageCrosshairGenerator - -@synthesize crosshairWidth = _crosshairWidth; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithVertexShaderFromString:kGPUImageCrosshairVertexShaderString fragmentShaderFromString:kGPUImageCrosshairFragmentShaderString])) - { - return nil; - } - - runSynchronouslyOnVideoProcessingQueue(^{ - crosshairWidthUniform = [filterProgram uniformIndex:@"crosshairWidth"]; - crosshairColorUniform = [filterProgram uniformIndex:@"crosshairColor"]; - - self.crosshairWidth = 5.0; - [self setCrosshairColorRed:0.0 green:1.0 blue:0.0]; - }); - - return self; -} - -#pragma mark - -#pragma mark Rendering - -- (void)renderCrosshairsFromArray:(GLfloat *)crosshairCoordinates count:(NSUInteger)numberOfCrosshairs frameTime:(CMTime)frameTime; -{ - if (self.preventRendering) - { - return; - } - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:filterProgram]; - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -#else - glEnable(GL_POINT_SPRITE); - glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); -#endif - - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, crosshairCoordinates); - - glDrawArrays(GL_POINTS, 0, (GLsizei)numberOfCrosshairs); - - [self informTargetsAboutNewFrameAtTime:frameTime]; - }); -} - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - // Prevent rendering of the frame by normal means -} - -#pragma mark - -#pragma mark Accessors - -- (void)setCrosshairWidth:(CGFloat)newValue; -{ - _crosshairWidth = newValue; - - [self setFloat:_crosshairWidth forUniform:crosshairWidthUniform program:filterProgram]; -} - -- (void)setCrosshairColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; -{ - GPUVector3 crosshairColor = {redComponent, greenComponent, blueComponent}; - - [self setVec3:crosshairColor forUniform:crosshairColorUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCrosshatchFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCrosshatchFilter.h deleted file mode 100755 index dab18967..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCrosshatchFilter.h +++ /dev/null @@ -1,13 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageCrosshatchFilter : GPUImageFilter -{ - GLint crossHatchSpacingUniform, lineWidthUniform; -} -// The fractional width of the image to use as the spacing for the crosshatch. The default is 0.03. -@property(readwrite, nonatomic) CGFloat crossHatchSpacing; - -// A relative width for the crosshatch lines. The default is 0.003. -@property(readwrite, nonatomic) CGFloat lineWidth; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCrosshatchFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCrosshatchFilter.m deleted file mode 100755 index 51dbd592..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageCrosshatchFilter.m +++ /dev/null @@ -1,163 +0,0 @@ -#import "GPUImageCrosshatchFilter.h" - -// Shader code based on http://machinesdontcare.wordpress.com/ - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageCrosshatchFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp float crossHatchSpacing; - uniform highp float lineWidth; - - const highp vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - highp float luminance = dot(texture2D(inputImageTexture, textureCoordinate).rgb, W); - - lowp vec4 colorToDisplay = vec4(1.0, 1.0, 1.0, 1.0); - if (luminance < 1.00) - { - if (mod(textureCoordinate.x + textureCoordinate.y, crossHatchSpacing) <= lineWidth) - { - colorToDisplay = vec4(0.0, 0.0, 0.0, 1.0); - } - } - if (luminance < 0.75) - { - if (mod(textureCoordinate.x - textureCoordinate.y, crossHatchSpacing) <= lineWidth) - { - colorToDisplay = vec4(0.0, 0.0, 0.0, 1.0); - } - } - if (luminance < 0.50) - { - if (mod(textureCoordinate.x + textureCoordinate.y - (crossHatchSpacing / 2.0), crossHatchSpacing) <= lineWidth) - { - colorToDisplay = vec4(0.0, 0.0, 0.0, 1.0); - } - } - if (luminance < 0.3) - { - if (mod(textureCoordinate.x - textureCoordinate.y - (crossHatchSpacing / 2.0), crossHatchSpacing) <= lineWidth) - { - colorToDisplay = vec4(0.0, 0.0, 0.0, 1.0); - } - } - - gl_FragColor = colorToDisplay; - } -); -#else -NSString *const kGPUImageCrosshatchFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform float crossHatchSpacing; - uniform float lineWidth; - - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - float luminance = dot(texture2D(inputImageTexture, textureCoordinate).rgb, W); - - vec4 colorToDisplay = vec4(1.0, 1.0, 1.0, 1.0); - if (luminance < 1.00) - { - if (mod(textureCoordinate.x + textureCoordinate.y, crossHatchSpacing) <= lineWidth) - { - colorToDisplay = vec4(0.0, 0.0, 0.0, 1.0); - } - } - if (luminance < 0.75) - { - if (mod(textureCoordinate.x - textureCoordinate.y, crossHatchSpacing) <= lineWidth) - { - colorToDisplay = vec4(0.0, 0.0, 0.0, 1.0); - } - } - if (luminance < 0.50) - { - if (mod(textureCoordinate.x + textureCoordinate.y - (crossHatchSpacing / 2.0), crossHatchSpacing) <= lineWidth) - { - colorToDisplay = vec4(0.0, 0.0, 0.0, 1.0); - } - } - if (luminance < 0.3) - { - if (mod(textureCoordinate.x - textureCoordinate.y - (crossHatchSpacing / 2.0), crossHatchSpacing) <= lineWidth) - { - colorToDisplay = vec4(0.0, 0.0, 0.0, 1.0); - } - } - - gl_FragColor = colorToDisplay; - } -); -#endif - -@implementation GPUImageCrosshatchFilter - -@synthesize crossHatchSpacing = _crossHatchSpacing; -@synthesize lineWidth = _lineWidth; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageCrosshatchFragmentShaderString])) - { - return nil; - } - - crossHatchSpacingUniform = [filterProgram uniformIndex:@"crossHatchSpacing"]; - lineWidthUniform = [filterProgram uniformIndex:@"lineWidth"]; - - self.crossHatchSpacing = 0.03; - self.lineWidth = 0.003; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setCrossHatchSpacing:(CGFloat)newValue; -{ - CGFloat singlePixelSpacing; - if (inputTextureSize.width != 0.0) - { - singlePixelSpacing = 1.0 / inputTextureSize.width; - } - else - { - singlePixelSpacing = 1.0 / 2048.0; - } - - if (newValue < singlePixelSpacing) - { - _crossHatchSpacing = singlePixelSpacing; - } - else - { - _crossHatchSpacing = newValue; - } - - [self setFloat:_crossHatchSpacing forUniform:crossHatchSpacingUniform program:filterProgram]; -} - -- (void)setLineWidth:(CGFloat)newValue; -{ - _lineWidth = newValue; - - [self setFloat:_lineWidth forUniform:lineWidthUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDarkenBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDarkenBlendFilter.h deleted file mode 100755 index 5dfe3405..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDarkenBlendFilter.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageDarkenBlendFilter : GPUImageTwoInputFilter -{ -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDarkenBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDarkenBlendFilter.m deleted file mode 100644 index 85ec9e8a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDarkenBlendFilter.m +++ /dev/null @@ -1,52 +0,0 @@ -#import "GPUImageDarkenBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageDarkenBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - lowp vec4 base = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 overlayer = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(min(overlayer.rgb * base.a, base.rgb * overlayer.a) + overlayer.rgb * (1.0 - base.a) + base.rgb * (1.0 - overlayer.a), 1.0); - } -); -#else -NSString *const kGPUImageDarkenBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 base = texture2D(inputImageTexture, textureCoordinate); - vec4 overlayer = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(min(overlayer.rgb * base.a, base.rgb * overlayer.a) + overlayer.rgb * (1.0 - base.a) + base.rgb * (1.0 - overlayer.a), 1.0); - } - ); -#endif - -@implementation GPUImageDarkenBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageDarkenBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDifferenceBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDifferenceBlendFilter.h deleted file mode 100755 index 7c7dfc23..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDifferenceBlendFilter.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageDifferenceBlendFilter : GPUImageTwoInputFilter -{ -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDifferenceBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDifferenceBlendFilter.m deleted file mode 100755 index 01bf09b2..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDifferenceBlendFilter.m +++ /dev/null @@ -1,50 +0,0 @@ -#import "GPUImageDifferenceBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageDifferenceBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - mediump vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - mediump vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - gl_FragColor = vec4(abs(textureColor2.rgb - textureColor.rgb), textureColor.a); - } -); -#else -NSString *const kGPUImageDifferenceBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - gl_FragColor = vec4(abs(textureColor2.rgb - textureColor.rgb), textureColor.a); - } -); -#endif - -@implementation GPUImageDifferenceBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageDifferenceBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDilationFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDilationFilter.h deleted file mode 100644 index 59423a37..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDilationFilter.h +++ /dev/null @@ -1,16 +0,0 @@ -#import "GPUImageTwoPassTextureSamplingFilter.h" - -// For each pixel, this sets it to the maximum value of the red channel in a rectangular neighborhood extending out dilationRadius pixels from the center. -// This extends out bright features, and is most commonly used with black-and-white thresholded images. - -extern NSString *const kGPUImageDilationRadiusOneVertexShaderString; -extern NSString *const kGPUImageDilationRadiusTwoVertexShaderString; -extern NSString *const kGPUImageDilationRadiusThreeVertexShaderString; -extern NSString *const kGPUImageDilationRadiusFourVertexShaderString; - -@interface GPUImageDilationFilter : GPUImageTwoPassTextureSamplingFilter - -// Acceptable values for dilationRadius, which sets the distance in pixels to sample out from the center, are 1, 2, 3, and 4. -- (id)initWithRadius:(NSUInteger)dilationRadius; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDilationFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDilationFilter.m deleted file mode 100644 index df065185..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDilationFilter.m +++ /dev/null @@ -1,431 +0,0 @@ -#import "GPUImageDilationFilter.h" - -@implementation GPUImageDilationFilter - -NSString *const kGPUImageDilationRadiusOneVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec2 inputTextureCoordinate; - - uniform float texelWidthOffset; - uniform float texelHeightOffset; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - - void main() - { - gl_Position = position; - - vec2 offset = vec2(texelWidthOffset, texelHeightOffset); - - centerTextureCoordinate = inputTextureCoordinate; - oneStepNegativeTextureCoordinate = inputTextureCoordinate - offset; - oneStepPositiveTextureCoordinate = inputTextureCoordinate + offset; - } -); - -NSString *const kGPUImageDilationRadiusTwoVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec2 inputTextureCoordinate; - - uniform float texelWidthOffset; - uniform float texelHeightOffset; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - - void main() - { - gl_Position = position; - - vec2 offset = vec2(texelWidthOffset, texelHeightOffset); - - centerTextureCoordinate = inputTextureCoordinate; - oneStepNegativeTextureCoordinate = inputTextureCoordinate - offset; - oneStepPositiveTextureCoordinate = inputTextureCoordinate + offset; - twoStepsNegativeTextureCoordinate = inputTextureCoordinate - (offset * 2.0); - twoStepsPositiveTextureCoordinate = inputTextureCoordinate + (offset * 2.0); - } -); - -NSString *const kGPUImageDilationRadiusThreeVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec2 inputTextureCoordinate; - - uniform float texelWidthOffset; - uniform float texelHeightOffset; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - - void main() - { - gl_Position = position; - - vec2 offset = vec2(texelWidthOffset, texelHeightOffset); - - centerTextureCoordinate = inputTextureCoordinate; - oneStepNegativeTextureCoordinate = inputTextureCoordinate - offset; - oneStepPositiveTextureCoordinate = inputTextureCoordinate + offset; - twoStepsNegativeTextureCoordinate = inputTextureCoordinate - (offset * 2.0); - twoStepsPositiveTextureCoordinate = inputTextureCoordinate + (offset * 2.0); - threeStepsNegativeTextureCoordinate = inputTextureCoordinate - (offset * 3.0); - threeStepsPositiveTextureCoordinate = inputTextureCoordinate + (offset * 3.0); - } -); - -NSString *const kGPUImageDilationRadiusFourVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec2 inputTextureCoordinate; - - uniform float texelWidthOffset; - uniform float texelHeightOffset; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - varying vec2 fourStepsPositiveTextureCoordinate; - varying vec2 fourStepsNegativeTextureCoordinate; - - void main() - { - gl_Position = position; - - vec2 offset = vec2(texelWidthOffset, texelHeightOffset); - - centerTextureCoordinate = inputTextureCoordinate; - oneStepNegativeTextureCoordinate = inputTextureCoordinate - offset; - oneStepPositiveTextureCoordinate = inputTextureCoordinate + offset; - twoStepsNegativeTextureCoordinate = inputTextureCoordinate - (offset * 2.0); - twoStepsPositiveTextureCoordinate = inputTextureCoordinate + (offset * 2.0); - threeStepsNegativeTextureCoordinate = inputTextureCoordinate - (offset * 3.0); - threeStepsPositiveTextureCoordinate = inputTextureCoordinate + (offset * 3.0); - fourStepsNegativeTextureCoordinate = inputTextureCoordinate - (offset * 4.0); - fourStepsPositiveTextureCoordinate = inputTextureCoordinate + (offset * 4.0); - } -); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageDilationRadiusOneFragmentShaderString = SHADER_STRING -( - precision lowp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - - lowp float maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - - gl_FragColor = vec4(vec3(maxValue), 1.0); - } -); - -NSString *const kGPUImageDilationRadiusTwoFragmentShaderString = SHADER_STRING -( - precision lowp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - float twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate).r; - float twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate).r; - - lowp float maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - maxValue = max(maxValue, twoStepsPositiveIntensity); - maxValue = max(maxValue, twoStepsNegativeIntensity); - - gl_FragColor = vec4(vec3(maxValue), 1.0); - } -); - -NSString *const kGPUImageDilationRadiusThreeFragmentShaderString = SHADER_STRING -( - precision lowp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - float twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate).r; - float twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate).r; - float threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate).r; - float threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate).r; - - lowp float maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - maxValue = max(maxValue, twoStepsPositiveIntensity); - maxValue = max(maxValue, twoStepsNegativeIntensity); - maxValue = max(maxValue, threeStepsPositiveIntensity); - maxValue = max(maxValue, threeStepsNegativeIntensity); - - gl_FragColor = vec4(vec3(maxValue), 1.0); - } -); - -NSString *const kGPUImageDilationRadiusFourFragmentShaderString = SHADER_STRING -( - precision lowp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - varying vec2 fourStepsPositiveTextureCoordinate; - varying vec2 fourStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - float twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate).r; - float twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate).r; - float threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate).r; - float threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate).r; - float fourStepsPositiveIntensity = texture2D(inputImageTexture, fourStepsPositiveTextureCoordinate).r; - float fourStepsNegativeIntensity = texture2D(inputImageTexture, fourStepsNegativeTextureCoordinate).r; - - lowp float maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - maxValue = max(maxValue, twoStepsPositiveIntensity); - maxValue = max(maxValue, twoStepsNegativeIntensity); - maxValue = max(maxValue, threeStepsPositiveIntensity); - maxValue = max(maxValue, threeStepsNegativeIntensity); - maxValue = max(maxValue, fourStepsPositiveIntensity); - maxValue = max(maxValue, fourStepsNegativeIntensity); - - gl_FragColor = vec4(vec3(maxValue), 1.0); - } -); -#else -NSString *const kGPUImageDilationRadiusOneFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - - float maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - - gl_FragColor = vec4(vec3(maxValue), 1.0); - } -); - -NSString *const kGPUImageDilationRadiusTwoFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - float twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate).r; - float twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate).r; - - float maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - maxValue = max(maxValue, twoStepsPositiveIntensity); - maxValue = max(maxValue, twoStepsNegativeIntensity); - - gl_FragColor = vec4(vec3(maxValue), 1.0); - } -); - -NSString *const kGPUImageDilationRadiusThreeFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - float twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate).r; - float twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate).r; - float threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate).r; - float threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate).r; - - float maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - maxValue = max(maxValue, twoStepsPositiveIntensity); - maxValue = max(maxValue, twoStepsNegativeIntensity); - maxValue = max(maxValue, threeStepsPositiveIntensity); - maxValue = max(maxValue, threeStepsNegativeIntensity); - - gl_FragColor = vec4(vec3(maxValue), 1.0); - } -); - -NSString *const kGPUImageDilationRadiusFourFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - varying vec2 fourStepsPositiveTextureCoordinate; - varying vec2 fourStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - float twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate).r; - float twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate).r; - float threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate).r; - float threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate).r; - float fourStepsPositiveIntensity = texture2D(inputImageTexture, fourStepsPositiveTextureCoordinate).r; - float fourStepsNegativeIntensity = texture2D(inputImageTexture, fourStepsNegativeTextureCoordinate).r; - - float maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - maxValue = max(maxValue, twoStepsPositiveIntensity); - maxValue = max(maxValue, twoStepsNegativeIntensity); - maxValue = max(maxValue, threeStepsPositiveIntensity); - maxValue = max(maxValue, threeStepsNegativeIntensity); - maxValue = max(maxValue, fourStepsPositiveIntensity); - maxValue = max(maxValue, fourStepsNegativeIntensity); - - gl_FragColor = vec4(vec3(maxValue), 1.0); - } -); -#endif - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithRadius:(NSUInteger)dilationRadius; -{ - NSString *fragmentShaderForThisRadius = nil; - NSString *vertexShaderForThisRadius = nil; - - switch (dilationRadius) - { - case 0: - case 1: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusOneVertexShaderString; - fragmentShaderForThisRadius = kGPUImageDilationRadiusOneFragmentShaderString; - }; break; - case 2: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusTwoVertexShaderString; - fragmentShaderForThisRadius = kGPUImageDilationRadiusTwoFragmentShaderString; - }; break; - case 3: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusThreeVertexShaderString; - fragmentShaderForThisRadius = kGPUImageDilationRadiusThreeFragmentShaderString; - }; break; - case 4: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusFourVertexShaderString; - fragmentShaderForThisRadius = kGPUImageDilationRadiusFourFragmentShaderString; - }; break; - default: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusFourVertexShaderString; - fragmentShaderForThisRadius = kGPUImageDilationRadiusFourFragmentShaderString; - }; break; - } - - if (!(self = [super initWithFirstStageVertexShaderFromString:vertexShaderForThisRadius firstStageFragmentShaderFromString:fragmentShaderForThisRadius secondStageVertexShaderFromString:vertexShaderForThisRadius secondStageFragmentShaderFromString:fragmentShaderForThisRadius])) - { - return nil; - } - - return self; -} - -- (id)init; -{ - if (!(self = [self initWithRadius:1])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDirectionalNonMaximumSuppressionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDirectionalNonMaximumSuppressionFilter.h deleted file mode 100644 index fdffb9fb..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDirectionalNonMaximumSuppressionFilter.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageDirectionalNonMaximumSuppressionFilter : GPUImageFilter -{ - GLint texelWidthUniform, texelHeightUniform; - GLint upperThresholdUniform, lowerThresholdUniform; - - BOOL hasOverriddenImageSizeFactor; -} - -// The texel width and height determines how far out to sample from this texel. By default, this is the normalized width of a pixel, but this can be overridden for different effects. -@property(readwrite, nonatomic) CGFloat texelWidth; -@property(readwrite, nonatomic) CGFloat texelHeight; - -// These thresholds set cutoffs for the intensities that definitely get registered (upper threshold) and those that definitely don't (lower threshold) -@property(readwrite, nonatomic) CGFloat upperThreshold; -@property(readwrite, nonatomic) CGFloat lowerThreshold; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDirectionalNonMaximumSuppressionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDirectionalNonMaximumSuppressionFilter.m deleted file mode 100644 index b442f3aa..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDirectionalNonMaximumSuppressionFilter.m +++ /dev/null @@ -1,141 +0,0 @@ -#import "GPUImageDirectionalNonMaximumSuppressionFilter.h" - -@implementation GPUImageDirectionalNonMaximumSuppressionFilter - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageDirectionalNonmaximumSuppressionFragmentShaderString = SHADER_STRING -( - precision mediump float; - - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform highp float texelWidth; - uniform highp float texelHeight; - uniform mediump float upperThreshold; - uniform mediump float lowerThreshold; - - void main() - { - vec3 currentGradientAndDirection = texture2D(inputImageTexture, textureCoordinate).rgb; - vec2 gradientDirection = ((currentGradientAndDirection.gb * 2.0) - 1.0) * vec2(texelWidth, texelHeight); - - float firstSampledGradientMagnitude = texture2D(inputImageTexture, textureCoordinate + gradientDirection).r; - float secondSampledGradientMagnitude = texture2D(inputImageTexture, textureCoordinate - gradientDirection).r; - - float multiplier = step(firstSampledGradientMagnitude, currentGradientAndDirection.r); - multiplier = multiplier * step(secondSampledGradientMagnitude, currentGradientAndDirection.r); - - float thresholdCompliance = smoothstep(lowerThreshold, upperThreshold, currentGradientAndDirection.r); - multiplier = multiplier * thresholdCompliance; - - gl_FragColor = vec4(multiplier, multiplier, multiplier, 1.0); - } -); -#else -NSString *const kGPUImageDirectionalNonmaximumSuppressionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float texelWidth; - uniform float texelHeight; - uniform float upperThreshold; - uniform float lowerThreshold; - - void main() - { - vec3 currentGradientAndDirection = texture2D(inputImageTexture, textureCoordinate).rgb; - vec2 gradientDirection = ((currentGradientAndDirection.gb * 2.0) - 1.0) * vec2(texelWidth, texelHeight); - - float firstSampledGradientMagnitude = texture2D(inputImageTexture, textureCoordinate + gradientDirection).r; - float secondSampledGradientMagnitude = texture2D(inputImageTexture, textureCoordinate - gradientDirection).r; - - float multiplier = step(firstSampledGradientMagnitude, currentGradientAndDirection.r); - multiplier = multiplier * step(secondSampledGradientMagnitude, currentGradientAndDirection.r); - - float thresholdCompliance = smoothstep(lowerThreshold, upperThreshold, currentGradientAndDirection.r); - multiplier = multiplier * thresholdCompliance; - - gl_FragColor = vec4(multiplier, multiplier, multiplier, 1.0); - } -); -#endif - -@synthesize texelWidth = _texelWidth; -@synthesize texelHeight = _texelHeight; -@synthesize upperThreshold = _upperThreshold; -@synthesize lowerThreshold = _lowerThreshold; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageDirectionalNonmaximumSuppressionFragmentShaderString])) - { - return nil; - } - - texelWidthUniform = [filterProgram uniformIndex:@"texelWidth"]; - texelHeightUniform = [filterProgram uniformIndex:@"texelHeight"]; - upperThresholdUniform = [filterProgram uniformIndex:@"upperThreshold"]; - lowerThresholdUniform = [filterProgram uniformIndex:@"lowerThreshold"]; - - self.upperThreshold = 0.5; - self.lowerThreshold = 0.1; - - return self; -} - -- (void)setupFilterForSize:(CGSize)filterFrameSize; -{ - if (!hasOverriddenImageSizeFactor) - { - _texelWidth = 1.0 / filterFrameSize.width; - _texelHeight = 1.0 / filterFrameSize.height; - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:filterProgram]; - glUniform1f(texelWidthUniform, _texelWidth); - glUniform1f(texelHeightUniform, _texelHeight); - }); - } -} - -#pragma mark - -#pragma mark Accessors - -- (void)setTexelWidth:(CGFloat)newValue; -{ - hasOverriddenImageSizeFactor = YES; - _texelWidth = newValue; - - [self setFloat:_texelWidth forUniform:texelWidthUniform program:filterProgram]; -} - -- (void)setTexelHeight:(CGFloat)newValue; -{ - hasOverriddenImageSizeFactor = YES; - _texelHeight = newValue; - - [self setFloat:_texelHeight forUniform:texelHeightUniform program:filterProgram]; -} - -- (void)setLowerThreshold:(CGFloat)newValue; -{ - _lowerThreshold = newValue; - - [self setFloat:_lowerThreshold forUniform:lowerThresholdUniform program:filterProgram]; -} - -- (void)setUpperThreshold:(CGFloat)newValue; -{ - _upperThreshold = newValue; - - [self setFloat:_upperThreshold forUniform:upperThresholdUniform program:filterProgram]; -} - - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDirectionalSobelEdgeDetectionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDirectionalSobelEdgeDetectionFilter.h deleted file mode 100644 index cfccc897..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDirectionalSobelEdgeDetectionFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImage3x3TextureSamplingFilter.h" - -@interface GPUImageDirectionalSobelEdgeDetectionFilter : GPUImage3x3TextureSamplingFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDirectionalSobelEdgeDetectionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDirectionalSobelEdgeDetectionFilter.m deleted file mode 100644 index a3575e3a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDirectionalSobelEdgeDetectionFilter.m +++ /dev/null @@ -1,103 +0,0 @@ -#import "GPUImageDirectionalSobelEdgeDetectionFilter.h" - -@implementation GPUImageDirectionalSobelEdgeDetectionFilter - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageDirectionalSobelEdgeDetectionFragmentShaderString = SHADER_STRING -( - precision mediump float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - - vec2 gradientDirection; - gradientDirection.x = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity; - gradientDirection.y = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity; - - float gradientMagnitude = length(gradientDirection); - vec2 normalizedDirection = normalize(gradientDirection); - normalizedDirection = sign(normalizedDirection) * floor(abs(normalizedDirection) + 0.617316); // Offset by 1-sin(pi/8) to set to 0 if near axis, 1 if away - normalizedDirection = (normalizedDirection + 1.0) * 0.5; // Place -1.0 - 1.0 within 0 - 1.0 - - gl_FragColor = vec4(gradientMagnitude, normalizedDirection.x, normalizedDirection.y, 1.0); - } -); -#else -NSString *const kGPUImageDirectionalSobelEdgeDetectionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - - vec2 gradientDirection; - gradientDirection.x = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity; - gradientDirection.y = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity; - - float gradientMagnitude = length(gradientDirection); - vec2 normalizedDirection = normalize(gradientDirection); - normalizedDirection = sign(normalizedDirection) * floor(abs(normalizedDirection) + 0.617316); // Offset by 1-sin(pi/8) to set to 0 if near axis, 1 if away - normalizedDirection = (normalizedDirection + 1.0) * 0.5; // Place -1.0 - 1.0 within 0 - 1.0 - - gl_FragColor = vec4(gradientMagnitude, normalizedDirection.x, normalizedDirection.y, 1.0); - } -); -#endif - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageDirectionalSobelEdgeDetectionFragmentShaderString])) - { - return nil; - } - - return self; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDissolveBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDissolveBlendFilter.h deleted file mode 100755 index b4e5720a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDissolveBlendFilter.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageDissolveBlendFilter : GPUImageTwoInputFilter -{ - GLint mixUniform; -} - -// Mix ranges from 0.0 (only image 1) to 1.0 (only image 2), with 0.5 (half of either) as the normal level -@property(readwrite, nonatomic) CGFloat mix; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDissolveBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDissolveBlendFilter.m deleted file mode 100755 index b4a5609f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDissolveBlendFilter.m +++ /dev/null @@ -1,72 +0,0 @@ -#import "GPUImageDissolveBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageDissolveBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - uniform lowp float mixturePercent; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = mix(textureColor, textureColor2, mixturePercent); - } -); -#else -NSString *const kGPUImageDissolveBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - uniform float mixturePercent; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = mix(textureColor, textureColor2, mixturePercent); - } -); -#endif - -@implementation GPUImageDissolveBlendFilter - -@synthesize mix = _mix; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageDissolveBlendFragmentShaderString])) - { - return nil; - } - - mixUniform = [filterProgram uniformIndex:@"mixturePercent"]; - self.mix = 0.5; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setMix:(CGFloat)newValue; -{ - _mix = newValue; - - [self setFloat:_mix forUniform:mixUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDivideBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDivideBlendFilter.h deleted file mode 100644 index ad798e29..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDivideBlendFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageDivideBlendFilter : GPUImageTwoInputFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDivideBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDivideBlendFilter.m deleted file mode 100644 index 63ee071e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageDivideBlendFilter.m +++ /dev/null @@ -1,96 +0,0 @@ -#import "GPUImageDivideBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageDivideBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - mediump vec4 base = texture2D(inputImageTexture, textureCoordinate); - mediump vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - mediump float ra; - if (overlay.a == 0.0 || ((base.r / overlay.r) > (base.a / overlay.a))) - ra = overlay.a * base.a + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - else - ra = (base.r * overlay.a * overlay.a) / overlay.r + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - - - mediump float ga; - if (overlay.a == 0.0 || ((base.g / overlay.g) > (base.a / overlay.a))) - ga = overlay.a * base.a + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - else - ga = (base.g * overlay.a * overlay.a) / overlay.g + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - - - mediump float ba; - if (overlay.a == 0.0 || ((base.b / overlay.b) > (base.a / overlay.a))) - ba = overlay.a * base.a + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - else - ba = (base.b * overlay.a * overlay.a) / overlay.b + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - - mediump float a = overlay.a + base.a - overlay.a * base.a; - - gl_FragColor = vec4(ra, ga, ba, a); - } -); -#else -NSString *const kGPUImageDivideBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 base = texture2D(inputImageTexture, textureCoordinate); - vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - float ra; - if (overlay.a == 0.0 || ((base.r / overlay.r) > (base.a / overlay.a))) - ra = overlay.a * base.a + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - else - ra = (base.r * overlay.a * overlay.a) / overlay.r + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - - - float ga; - if (overlay.a == 0.0 || ((base.g / overlay.g) > (base.a / overlay.a))) - ga = overlay.a * base.a + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - else - ga = (base.g * overlay.a * overlay.a) / overlay.g + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - - - float ba; - if (overlay.a == 0.0 || ((base.b / overlay.b) > (base.a / overlay.a))) - ba = overlay.a * base.a + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - else - ba = (base.b * overlay.a * overlay.a) / overlay.b + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - - float a = overlay.a + base.a - overlay.a * base.a; - - gl_FragColor = vec4(ra, ga, ba, a); - } - ); -#endif - -@implementation GPUImageDivideBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageDivideBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageEmbossFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageEmbossFilter.h deleted file mode 100755 index dbd21e82..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageEmbossFilter.h +++ /dev/null @@ -1,8 +0,0 @@ -#import "GPUImage3x3ConvolutionFilter.h" - -@interface GPUImageEmbossFilter : GPUImage3x3ConvolutionFilter - -// The strength of the embossing, from 0.0 to 4.0, with 1.0 as the normal level -@property(readwrite, nonatomic) CGFloat intensity; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageEmbossFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageEmbossFilter.m deleted file mode 100755 index 6ba48cd4..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageEmbossFilter.m +++ /dev/null @@ -1,49 +0,0 @@ -#import "GPUImageEmbossFilter.h" - -@implementation GPUImageEmbossFilter - -@synthesize intensity = _intensity; - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - self.intensity = 1.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setIntensity:(CGFloat)newValue; -{ -// [(GPUImage3x3ConvolutionFilter *)filter setConvolutionMatrix:(GPUMatrix3x3){ -// {-2.0f, -1.0f, 0.0f}, -// {-1.0f, 1.0f, 1.0f}, -// { 0.0f, 1.0f, 2.0f} -// }]; - - _intensity = newValue; - - GPUMatrix3x3 newConvolutionMatrix; - newConvolutionMatrix.one.one = _intensity * (-2.0); - newConvolutionMatrix.one.two = -_intensity; - newConvolutionMatrix.one.three = 0.0f; - - newConvolutionMatrix.two.one = -_intensity; - newConvolutionMatrix.two.two = 1.0; - newConvolutionMatrix.two.three = _intensity; - - newConvolutionMatrix.three.one = 0.0f; - newConvolutionMatrix.three.two = _intensity; - newConvolutionMatrix.three.three = _intensity * 2.0; - - self.convolutionKernel = newConvolutionMatrix; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageErosionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageErosionFilter.h deleted file mode 100644 index b311a265..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageErosionFilter.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "GPUImageTwoPassTextureSamplingFilter.h" - -// For each pixel, this sets it to the minimum value of the red channel in a rectangular neighborhood extending out dilationRadius pixels from the center. -// This extends out dark features, and is most commonly used with black-and-white thresholded images. - -@interface GPUImageErosionFilter : GPUImageTwoPassTextureSamplingFilter - -// Acceptable values for erosionRadius, which sets the distance in pixels to sample out from the center, are 1, 2, 3, and 4. -- (id)initWithRadius:(NSUInteger)erosionRadius; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageErosionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageErosionFilter.m deleted file mode 100644 index 05f4f28d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageErosionFilter.m +++ /dev/null @@ -1,312 +0,0 @@ -#import "GPUImageErosionFilter.h" -#import "GPUImageDilationFilter.h" - -@implementation GPUImageErosionFilter - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageErosionRadiusOneFragmentShaderString = SHADER_STRING -( - precision lowp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - - lowp float minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - - gl_FragColor = vec4(vec3(minValue), 1.0); - } -); - -NSString *const kGPUImageErosionRadiusTwoFragmentShaderString = SHADER_STRING -( - precision lowp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - float twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate).r; - float twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate).r; - - lowp float minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - minValue = min(minValue, twoStepsPositiveIntensity); - minValue = min(minValue, twoStepsNegativeIntensity); - - gl_FragColor = vec4(vec3(minValue), 1.0); - } -); - -NSString *const kGPUImageErosionRadiusThreeFragmentShaderString = SHADER_STRING -( - precision lowp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - float twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate).r; - float twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate).r; - float threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate).r; - float threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate).r; - - lowp float minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - minValue = min(minValue, twoStepsPositiveIntensity); - minValue = min(minValue, twoStepsNegativeIntensity); - minValue = min(minValue, threeStepsPositiveIntensity); - minValue = min(minValue, threeStepsNegativeIntensity); - - gl_FragColor = vec4(vec3(minValue), 1.0); - } -); - -NSString *const kGPUImageErosionRadiusFourFragmentShaderString = SHADER_STRING -( - precision lowp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - varying vec2 fourStepsPositiveTextureCoordinate; - varying vec2 fourStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - float twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate).r; - float twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate).r; - float threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate).r; - float threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate).r; - float fourStepsPositiveIntensity = texture2D(inputImageTexture, fourStepsPositiveTextureCoordinate).r; - float fourStepsNegativeIntensity = texture2D(inputImageTexture, fourStepsNegativeTextureCoordinate).r; - - lowp float minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - minValue = min(minValue, twoStepsPositiveIntensity); - minValue = min(minValue, twoStepsNegativeIntensity); - minValue = min(minValue, threeStepsPositiveIntensity); - minValue = min(minValue, threeStepsNegativeIntensity); - minValue = min(minValue, fourStepsPositiveIntensity); - minValue = min(minValue, fourStepsNegativeIntensity); - - gl_FragColor = vec4(vec3(minValue), 1.0); - } -); -#else -NSString *const kGPUImageErosionRadiusOneFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - - float minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - - gl_FragColor = vec4(vec3(minValue), 1.0); - } -); - -NSString *const kGPUImageErosionRadiusTwoFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - float twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate).r; - float twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate).r; - - float minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - minValue = min(minValue, twoStepsPositiveIntensity); - minValue = min(minValue, twoStepsNegativeIntensity); - - gl_FragColor = vec4(vec3(minValue), 1.0); - } -); - -NSString *const kGPUImageErosionRadiusThreeFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - float twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate).r; - float twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate).r; - float threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate).r; - float threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate).r; - - float minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - minValue = min(minValue, twoStepsPositiveIntensity); - minValue = min(minValue, twoStepsNegativeIntensity); - minValue = min(minValue, threeStepsPositiveIntensity); - minValue = min(minValue, threeStepsNegativeIntensity); - - gl_FragColor = vec4(vec3(minValue), 1.0); - } -); - -NSString *const kGPUImageErosionRadiusFourFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - varying vec2 fourStepsPositiveTextureCoordinate; - varying vec2 fourStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate).r; - float oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate).r; - float oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate).r; - float twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate).r; - float twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate).r; - float threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate).r; - float threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate).r; - float fourStepsPositiveIntensity = texture2D(inputImageTexture, fourStepsPositiveTextureCoordinate).r; - float fourStepsNegativeIntensity = texture2D(inputImageTexture, fourStepsNegativeTextureCoordinate).r; - - float minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - minValue = min(minValue, twoStepsPositiveIntensity); - minValue = min(minValue, twoStepsNegativeIntensity); - minValue = min(minValue, threeStepsPositiveIntensity); - minValue = min(minValue, threeStepsNegativeIntensity); - minValue = min(minValue, fourStepsPositiveIntensity); - minValue = min(minValue, fourStepsNegativeIntensity); - - gl_FragColor = vec4(vec3(minValue), 1.0); - } -); -#endif - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithRadius:(NSUInteger)dilationRadius; -{ - NSString *fragmentShaderForThisRadius = nil; - NSString *vertexShaderForThisRadius = nil; - - switch (dilationRadius) - { - case 0: - case 1: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusOneVertexShaderString; - fragmentShaderForThisRadius = kGPUImageErosionRadiusOneFragmentShaderString; - }; break; - case 2: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusTwoVertexShaderString; - fragmentShaderForThisRadius = kGPUImageErosionRadiusTwoFragmentShaderString; - }; break; - case 3: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusThreeVertexShaderString; - fragmentShaderForThisRadius = kGPUImageErosionRadiusThreeFragmentShaderString; - }; break; - case 4: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusFourVertexShaderString; - fragmentShaderForThisRadius = kGPUImageErosionRadiusFourFragmentShaderString; - }; break; - default: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusFourVertexShaderString; - fragmentShaderForThisRadius = kGPUImageErosionRadiusFourFragmentShaderString; - }; break; - } - - if (!(self = [super initWithFirstStageVertexShaderFromString:vertexShaderForThisRadius firstStageFragmentShaderFromString:fragmentShaderForThisRadius secondStageVertexShaderFromString:vertexShaderForThisRadius secondStageFragmentShaderFromString:fragmentShaderForThisRadius])) - { - return nil; - } - - return self; -} - -- (id)init; -{ - if (!(self = [self initWithRadius:1])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageExclusionBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageExclusionBlendFilter.h deleted file mode 100755 index f7c83f57..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageExclusionBlendFilter.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageExclusionBlendFilter : GPUImageTwoInputFilter -{ -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageExclusionBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageExclusionBlendFilter.m deleted file mode 100755 index c364159f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageExclusionBlendFilter.m +++ /dev/null @@ -1,56 +0,0 @@ -#import "GPUImageExclusionBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageExclusionBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - mediump vec4 base = texture2D(inputImageTexture, textureCoordinate); - mediump vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - // Dca = (Sca.Da + Dca.Sa - 2.Sca.Dca) + Sca.(1 - Da) + Dca.(1 - Sa) - - gl_FragColor = vec4((overlay.rgb * base.a + base.rgb * overlay.a - 2.0 * overlay.rgb * base.rgb) + overlay.rgb * (1.0 - base.a) + base.rgb * (1.0 - overlay.a), base.a); - } -); -#else -NSString *const kGPUImageExclusionBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 base = texture2D(inputImageTexture, textureCoordinate); - vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - // Dca = (Sca.Da + Dca.Sa - 2.Sca.Dca) + Sca.(1 - Da) + Dca.(1 - Sa) - - gl_FragColor = vec4((overlay.rgb * base.a + base.rgb * overlay.a - 2.0 * overlay.rgb * base.rgb) + overlay.rgb * (1.0 - base.a) + base.rgb * (1.0 - overlay.a), base.a); - } - ); -#endif - -@implementation GPUImageExclusionBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageExclusionBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageExposureFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageExposureFilter.h deleted file mode 100755 index 886a052f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageExposureFilter.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageExposureFilter : GPUImageFilter -{ - GLint exposureUniform; -} - -// Exposure ranges from -10.0 to 10.0, with 0.0 as the normal level -@property(readwrite, nonatomic) CGFloat exposure; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageExposureFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageExposureFilter.m deleted file mode 100755 index d5ee2c9f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageExposureFilter.m +++ /dev/null @@ -1,66 +0,0 @@ -#import "GPUImageExposureFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageExposureFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform highp float exposure; - - void main() - { - highp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4(textureColor.rgb * pow(2.0, exposure), textureColor.w); - } -); -#else -NSString *const kGPUImageExposureFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float exposure; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4(textureColor.rgb * pow(2.0, exposure), textureColor.w); - } -); -#endif - -@implementation GPUImageExposureFilter - -@synthesize exposure = _exposure; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageExposureFragmentShaderString])) - { - return nil; - } - - exposureUniform = [filterProgram uniformIndex:@"exposure"]; - self.exposure = 0.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setExposure:(CGFloat)newValue; -{ - _exposure = newValue; - - [self setFloat:_exposure forUniform:exposureUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFASTCornerDetectionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFASTCornerDetectionFilter.h deleted file mode 100644 index 86e7cf42..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFASTCornerDetectionFilter.h +++ /dev/null @@ -1,33 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImageGrayscaleFilter; -@class GPUImage3x3TextureSamplingFilter; -@class GPUImageNonMaximumSuppressionFilter; - -/* - An implementation of the Features from Accelerated Segment Test (FAST) feature detector as described in the following publications: - - E. Rosten and T. Drummond. Fusing points and lines for high performance tracking. IEEE International Conference on Computer Vision, 2005. - E. Rosten and T. Drummond. Machine learning for high-speed corner detection. European Conference on Computer Vision, 2006. - - For more about the FAST feature detector, see the resources here: - http://www.edwardrosten.com/work/fast.html - */ - -typedef enum { kGPUImageFAST12Contiguous, kGPUImageFAST12ContiguousNonMaximumSuppressed} GPUImageFASTDetectorType; - -@interface GPUImageFASTCornerDetectionFilter : GPUImageFilterGroup -{ - GPUImageGrayscaleFilter *luminanceReductionFilter; - GPUImage3x3TextureSamplingFilter *featureDetectionFilter; - GPUImageNonMaximumSuppressionFilter *nonMaximumSuppressionFilter; -// Generate a lookup texture based on the bit patterns - -// Step 1: convert to monochrome if necessary -// Step 2: do a lookup at each pixel based on the Bresenham circle, encode comparison in two color components -// Step 3: do non-maximum suppression of close corner points -} - -- (id)initWithFASTDetectorVariant:(GPUImageFASTDetectorType)detectorType; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFASTCornerDetectionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFASTCornerDetectionFilter.m deleted file mode 100644 index b04a24aa..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFASTCornerDetectionFilter.m +++ /dev/null @@ -1,89 +0,0 @@ -#import "GPUImageFASTCornerDetectionFilter.h" - -#import "GPUImageGrayscaleFilter.h" -#import "GPUImage3x3TextureSamplingFilter.h" -#import "GPUImageNonMaximumSuppressionFilter.h" - -// 14 total texture coordinates from vertex shader for non-dependent reads -// 3 texture coordinates for dependent reads, then - -NSString *const kGPUImageFASTDetectorFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - uniform sampler2D lookupTable; - - void main() - { - lowp float centerIntensity = texture2D(inputImageTexture, textureCoordinate).r; - lowp float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - lowp float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - lowp float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - lowp float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - lowp float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - lowp float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - lowp float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - lowp float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - - lowp float byteTally = 1.0 / 255.0 * step(centerIntensity, topRightIntensity); - byteTally += 2.0 / 255.0 * step(centerIntensity, topIntensity); - byteTally += 4.0 / 255.0 * step(centerIntensity, topLeftIntensity); - byteTally += 8.0 / 255.0 * step(centerIntensity, leftIntensity); - byteTally += 16.0 / 255.0 * step(centerIntensity, bottomLeftIntensity); - byteTally += 32.0 / 255.0 * step(centerIntensity, bottomIntensity); - byteTally += 64.0 / 255.0 * step(centerIntensity, bottomRightIntensity); - byteTally += 128.0 / 255.0 * step(centerIntensity, rightIntensity); - - // TODO: Replace the above with a dot product and two vec4s - // TODO: Apply step to a matrix, rather than individually - - gl_FragColor = vec4(byteTally, byteTally, byteTally, 1.0); - } - ); - - -@implementation GPUImageFASTCornerDetectionFilter - -- (id)init; -{ - if (!(self = [self initWithFASTDetectorVariant:kGPUImageFAST12ContiguousNonMaximumSuppressed])) - { - return nil; - } - - return self; -} - -- (id)initWithFASTDetectorVariant:(GPUImageFASTDetectorType)detectorType; -{ - if (!(self = [super init])) - { - return nil; - } - -// [derivativeFilter addTarget:blurFilter]; -// [blurFilter addTarget:harrisCornerDetectionFilter]; -// [harrisCornerDetectionFilter addTarget:nonMaximumSuppressionFilter]; - // [simpleThresholdFilter addTarget:colorPackingFilter]; - -// self.initialFilters = [NSArray arrayWithObjects:derivativeFilter, nil]; - // self.terminalFilter = colorPackingFilter; -// self.terminalFilter = nonMaximumSuppressionFilter; - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFalseColorFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFalseColorFilter.h deleted file mode 100644 index cb0b82f7..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFalseColorFilter.h +++ /dev/null @@ -1,15 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageFalseColorFilter : GPUImageFilter -{ - GLint firstColorUniform, secondColorUniform; -} - -// The first and second colors specify what colors replace the dark and light areas of the image, respectively. The defaults are (0.0, 0.0, 0.5) amd (1.0, 0.0, 0.0). -@property(readwrite, nonatomic) GPUVector4 firstColor; -@property(readwrite, nonatomic) GPUVector4 secondColor; - -- (void)setFirstColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; -- (void)setSecondColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFalseColorFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFalseColorFilter.m deleted file mode 100644 index f514dbab..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFalseColorFilter.m +++ /dev/null @@ -1,101 +0,0 @@ -#import "GPUImageFalseColorFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUFalseColorFragmentShaderString = SHADER_STRING -( - precision lowp float; - - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float intensity; - uniform vec3 firstColor; - uniform vec3 secondColor; - - const mediump vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float luminance = dot(textureColor.rgb, luminanceWeighting); - - gl_FragColor = vec4( mix(firstColor.rgb, secondColor.rgb, luminance), textureColor.a); - } -); -#else -NSString *const kGPUFalseColorFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float intensity; - uniform vec3 firstColor; - uniform vec3 secondColor; - - const vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float luminance = dot(textureColor.rgb, luminanceWeighting); - - gl_FragColor = vec4( mix(firstColor.rgb, secondColor.rgb, luminance), textureColor.a); - } -); -#endif - - -@implementation GPUImageFalseColorFilter - -@synthesize secondColor = _secondColor; -@synthesize firstColor = _firstColor; - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUFalseColorFragmentShaderString])) - { - return nil; - } - - firstColorUniform = [filterProgram uniformIndex:@"firstColor"]; - secondColorUniform = [filterProgram uniformIndex:@"secondColor"]; - - self.firstColor = (GPUVector4){0.0f, 0.0f, 0.5f, 1.0f}; - self.secondColor = (GPUVector4){1.0f, 0.0f, 0.0f, 1.0f}; - - return self; -} - - -#pragma mark - -#pragma mark Accessors - -- (void)setFirstColor:(GPUVector4)newValue; -{ - _firstColor = newValue; - - [self setFirstColorRed:_firstColor.one green:_firstColor.two blue:_firstColor.three]; -} - -- (void)setSecondColor:(GPUVector4)newValue; -{ - _secondColor = newValue; - - [self setSecondColorRed:_secondColor.one green:_secondColor.two blue:_secondColor.three]; -} - -- (void)setFirstColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; -{ - GPUVector3 firstColor = {redComponent, greenComponent, blueComponent}; - - [self setVec3:firstColor forUniform:firstColorUniform program:filterProgram]; -} - -- (void)setSecondColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; -{ - GPUVector3 secondColor = {redComponent, greenComponent, blueComponent}; - - [self setVec3:secondColor forUniform:secondColorUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilter.h deleted file mode 100755 index 0171aa80..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilter.h +++ /dev/null @@ -1,134 +0,0 @@ -#import "GPUImageOutput.h" - -#define STRINGIZE(x) #x -#define STRINGIZE2(x) STRINGIZE(x) -#define SHADER_STRING(text) @ STRINGIZE2(text) - -#define GPUImageHashIdentifier # -#define GPUImageWrappedLabel(x) x -#define GPUImageEscapedHashIdentifier(a) GPUImageWrappedLabel(GPUImageHashIdentifier)a - -extern NSString *const kGPUImageVertexShaderString; -extern NSString *const kGPUImagePassthroughFragmentShaderString; - -struct GPUVector4 { - GLfloat one; - GLfloat two; - GLfloat three; - GLfloat four; -}; -typedef struct GPUVector4 GPUVector4; - -struct GPUVector3 { - GLfloat one; - GLfloat two; - GLfloat three; -}; -typedef struct GPUVector3 GPUVector3; - -struct GPUMatrix4x4 { - GPUVector4 one; - GPUVector4 two; - GPUVector4 three; - GPUVector4 four; -}; -typedef struct GPUMatrix4x4 GPUMatrix4x4; - -struct GPUMatrix3x3 { - GPUVector3 one; - GPUVector3 two; - GPUVector3 three; -}; -typedef struct GPUMatrix3x3 GPUMatrix3x3; - -/** GPUImage's base filter class - - Filters and other subsequent elements in the chain conform to the GPUImageInput protocol, which lets them take in the supplied or processed texture from the previous link in the chain and do something with it. Objects one step further down the chain are considered targets, and processing can be branched by adding multiple targets to a single output or filter. - */ -@interface GPUImageFilter : GPUImageOutput -{ - GPUImageFramebuffer *firstInputFramebuffer; - - GLProgram *filterProgram; - GLint filterPositionAttribute, filterTextureCoordinateAttribute; - GLint filterInputTextureUniform; - GLfloat backgroundColorRed, backgroundColorGreen, backgroundColorBlue, backgroundColorAlpha; - - BOOL isEndProcessing; - - CGSize currentFilterSize; - GPUImageRotationMode inputRotation; - - BOOL currentlyReceivingMonochromeInput; - - NSMutableDictionary *uniformStateRestorationBlocks; - dispatch_semaphore_t imageCaptureSemaphore; -} - -@property(readonly) CVPixelBufferRef renderTarget; -@property(readwrite, nonatomic) BOOL preventRendering; -@property(readwrite, nonatomic) BOOL currentlyReceivingMonochromeInput; - -/// @name Initialization and teardown - -/** - Initialize with vertex and fragment shaders - - You make take advantage of the SHADER_STRING macro to write your shaders in-line. - @param vertexShaderString Source code of the vertex shader to use - @param fragmentShaderString Source code of the fragment shader to use - */ -- (id)initWithVertexShaderFromString:(NSString *)vertexShaderString fragmentShaderFromString:(NSString *)fragmentShaderString; - -/** - Initialize with a fragment shader - - You may take advantage of the SHADER_STRING macro to write your shader in-line. - @param fragmentShaderString Source code of fragment shader to use - */ -- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; -/** - Initialize with a fragment shader - @param fragmentShaderFilename Filename of fragment shader to load - */ -- (id)initWithFragmentShaderFromFile:(NSString *)fragmentShaderFilename; -- (void)initializeAttributes; -- (void)setupFilterForSize:(CGSize)filterFrameSize; -- (CGSize)rotatedSize:(CGSize)sizeToRotate forIndex:(NSInteger)textureIndex; -- (CGPoint)rotatedPoint:(CGPoint)pointToRotate forRotation:(GPUImageRotationMode)rotation; - -/// @name Managing the display FBOs -/** Size of the frame buffer object - */ -- (CGSize)sizeOfFBO; - -/// @name Rendering -+ (const GLfloat *)textureCoordinatesForRotation:(GPUImageRotationMode)rotationMode; -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -- (void)informTargetsAboutNewFrameAtTime:(CMTime)frameTime; -- (CGSize)outputFrameSize; - -/// @name Input parameters -- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent; -- (void)setInteger:(GLint)newInteger forUniformName:(NSString *)uniformName; -- (void)setFloat:(GLfloat)newFloat forUniformName:(NSString *)uniformName; -- (void)setSize:(CGSize)newSize forUniformName:(NSString *)uniformName; -- (void)setPoint:(CGPoint)newPoint forUniformName:(NSString *)uniformName; -- (void)setFloatVec3:(GPUVector3)newVec3 forUniformName:(NSString *)uniformName; -- (void)setFloatVec4:(GPUVector4)newVec4 forUniform:(NSString *)uniformName; -- (void)setFloatArray:(GLfloat *)array length:(GLsizei)count forUniform:(NSString*)uniformName; - -- (void)setMatrix3f:(GPUMatrix3x3)matrix forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -- (void)setMatrix4f:(GPUMatrix4x4)matrix forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -- (void)setFloat:(GLfloat)floatValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -- (void)setPoint:(CGPoint)pointValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -- (void)setSize:(CGSize)sizeValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -- (void)setVec3:(GPUVector3)vectorValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -- (void)setVec4:(GPUVector4)vectorValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -- (void)setFloatArray:(GLfloat *)arrayValue length:(GLsizei)arrayLength forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -- (void)setInteger:(GLint)intValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; - -- (void)setAndExecuteUniformStateCallbackAtIndex:(GLint)uniform forProgram:(GLProgram *)shaderProgram toBlock:(dispatch_block_t)uniformStateBlock; -- (void)setUniformsForProgramAtIndex:(NSUInteger)programIndex; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilter.m deleted file mode 100755 index 406d707a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilter.m +++ /dev/null @@ -1,753 +0,0 @@ -#import "GPUImageFilter.h" -#import "GPUImagePicture.h" -#import - -// Hardcode the vertex shader for standard filters, but this can be overridden -NSString *const kGPUImageVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - - varying vec2 textureCoordinate; - - void main() - { - gl_Position = position; - textureCoordinate = inputTextureCoordinate.xy; - } - ); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - -NSString *const kGPUImagePassthroughFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - gl_FragColor = texture2D(inputImageTexture, textureCoordinate); - } -); - -#else - -NSString *const kGPUImagePassthroughFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - gl_FragColor = texture2D(inputImageTexture, textureCoordinate); - } -); -#endif - - -@implementation GPUImageFilter - -@synthesize preventRendering = _preventRendering; -@synthesize currentlyReceivingMonochromeInput; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithVertexShaderFromString:(NSString *)vertexShaderString fragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [super init])) - { - return nil; - } - - uniformStateRestorationBlocks = [NSMutableDictionary dictionaryWithCapacity:10]; - _preventRendering = NO; - currentlyReceivingMonochromeInput = NO; - inputRotation = kGPUImageNoRotation; - backgroundColorRed = 0.0; - backgroundColorGreen = 0.0; - backgroundColorBlue = 0.0; - backgroundColorAlpha = 0.0; - imageCaptureSemaphore = dispatch_semaphore_create(0); - dispatch_semaphore_signal(imageCaptureSemaphore); - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - - filterProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:vertexShaderString fragmentShaderString:fragmentShaderString]; - - if (!filterProgram.initialized) - { - [self initializeAttributes]; - - if (![filterProgram link]) - { - NSString *progLog = [filterProgram programLog]; - NSLog(@"Program link log: %@", progLog); - NSString *fragLog = [filterProgram fragmentShaderLog]; - NSLog(@"Fragment shader compile log: %@", fragLog); - NSString *vertLog = [filterProgram vertexShaderLog]; - NSLog(@"Vertex shader compile log: %@", vertLog); - filterProgram = nil; - NSAssert(NO, @"Filter shader link failed"); - } - } - - filterPositionAttribute = [filterProgram attributeIndex:@"position"]; - filterTextureCoordinateAttribute = [filterProgram attributeIndex:@"inputTextureCoordinate"]; - filterInputTextureUniform = [filterProgram uniformIndex:@"inputImageTexture"]; // This does assume a name of "inputImageTexture" for the fragment shader - - [GPUImageContext setActiveShaderProgram:filterProgram]; - - glEnableVertexAttribArray(filterPositionAttribute); - glEnableVertexAttribArray(filterTextureCoordinateAttribute); - }); - - return self; -} - -- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [self initWithVertexShaderFromString:kGPUImageVertexShaderString fragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - return self; -} - -- (id)initWithFragmentShaderFromFile:(NSString *)fragmentShaderFilename; -{ - NSString *fragmentShaderPathname = [[NSBundle mainBundle] pathForResource:fragmentShaderFilename ofType:@"fsh"]; - NSString *fragmentShaderString = [NSString stringWithContentsOfFile:fragmentShaderPathname encoding:NSUTF8StringEncoding error:nil]; - - if (!(self = [self initWithFragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - return self; -} - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImagePassthroughFragmentShaderString])) - { - return nil; - } - - return self; -} - -- (void)initializeAttributes; -{ - [filterProgram addAttribute:@"position"]; - [filterProgram addAttribute:@"inputTextureCoordinate"]; - - // Override this, calling back to this super method, in order to add new attributes to your vertex shader -} - -- (void)setupFilterForSize:(CGSize)filterFrameSize; -{ - // This is where you can override to provide some custom setup, if your filter has a size-dependent element -} - -- (void)dealloc -{ -#if !OS_OBJECT_USE_OBJC - if (imageCaptureSemaphore != NULL) - { - dispatch_release(imageCaptureSemaphore); - } -#endif - -} - -#pragma mark - -#pragma mark Still image processing - -- (void)useNextFrameForImageCapture; -{ - usingNextFrameForImageCapture = YES; - - // Set the semaphore high, if it isn't already - if (dispatch_semaphore_wait(imageCaptureSemaphore, DISPATCH_TIME_NOW) != 0) - { - return; - } -} - -- (CGImageRef)newCGImageFromCurrentlyProcessedOutput -{ - // Give it three seconds to process, then abort if they forgot to set up the image capture properly - double timeoutForImageCapture = 3.0; - dispatch_time_t convertedTimeout = dispatch_time(DISPATCH_TIME_NOW, timeoutForImageCapture * NSEC_PER_SEC); - - if (dispatch_semaphore_wait(imageCaptureSemaphore, convertedTimeout) != 0) - { - return NULL; - } - - GPUImageFramebuffer* framebuffer = [self framebufferForOutput]; - - usingNextFrameForImageCapture = NO; - dispatch_semaphore_signal(imageCaptureSemaphore); - - CGImageRef image = [framebuffer newCGImageFromFramebufferContents]; - return image; -} - -#pragma mark - -#pragma mark Managing the display FBOs - -- (CGSize)sizeOfFBO; -{ - CGSize outputSize = [self maximumOutputSize]; - if ( (CGSizeEqualToSize(outputSize, CGSizeZero)) || (inputTextureSize.width < outputSize.width) ) - { - return inputTextureSize; - } - else - { - return outputSize; - } -} - -#pragma mark - -#pragma mark Rendering - -+ (const GLfloat *)textureCoordinatesForRotation:(GPUImageRotationMode)rotationMode; -{ - static const GLfloat noRotationTextureCoordinates[] = { - 0.0f, 0.0f, - 1.0f, 0.0f, - 0.0f, 1.0f, - 1.0f, 1.0f, - }; - - static const GLfloat rotateLeftTextureCoordinates[] = { - 1.0f, 0.0f, - 1.0f, 1.0f, - 0.0f, 0.0f, - 0.0f, 1.0f, - }; - - static const GLfloat rotateRightTextureCoordinates[] = { - 0.0f, 1.0f, - 0.0f, 0.0f, - 1.0f, 1.0f, - 1.0f, 0.0f, - }; - - static const GLfloat verticalFlipTextureCoordinates[] = { - 0.0f, 1.0f, - 1.0f, 1.0f, - 0.0f, 0.0f, - 1.0f, 0.0f, - }; - - static const GLfloat horizontalFlipTextureCoordinates[] = { - 1.0f, 0.0f, - 0.0f, 0.0f, - 1.0f, 1.0f, - 0.0f, 1.0f, - }; - - static const GLfloat rotateRightVerticalFlipTextureCoordinates[] = { - 0.0f, 0.0f, - 0.0f, 1.0f, - 1.0f, 0.0f, - 1.0f, 1.0f, - }; - - static const GLfloat rotateRightHorizontalFlipTextureCoordinates[] = { - 1.0f, 1.0f, - 1.0f, 0.0f, - 0.0f, 1.0f, - 0.0f, 0.0f, - }; - - static const GLfloat rotate180TextureCoordinates[] = { - 1.0f, 1.0f, - 0.0f, 1.0f, - 1.0f, 0.0f, - 0.0f, 0.0f, - }; - - switch(rotationMode) - { - case kGPUImageNoRotation: return noRotationTextureCoordinates; - case kGPUImageRotateLeft: return rotateLeftTextureCoordinates; - case kGPUImageRotateRight: return rotateRightTextureCoordinates; - case kGPUImageFlipVertical: return verticalFlipTextureCoordinates; - case kGPUImageFlipHorizonal: return horizontalFlipTextureCoordinates; - case kGPUImageRotateRightFlipVertical: return rotateRightVerticalFlipTextureCoordinates; - case kGPUImageRotateRightFlipHorizontal: return rotateRightHorizontalFlipTextureCoordinates; - case kGPUImageRotate180: return rotate180TextureCoordinates; - } -} - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - if (self.preventRendering) - { - [firstInputFramebuffer unlock]; - return; - } - - [GPUImageContext setActiveShaderProgram:filterProgram]; - - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - if (usingNextFrameForImageCapture) - { - [outputFramebuffer lock]; - } - - [self setUniformsForProgramAtIndex:0]; - - glClearColor(backgroundColorRed, backgroundColorGreen, backgroundColorBlue, backgroundColorAlpha); - glClear(GL_COLOR_BUFFER_BIT); - - glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, [firstInputFramebuffer texture]); - - glUniform1i(filterInputTextureUniform, 2); - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - glVertexAttribPointer(filterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - [firstInputFramebuffer unlock]; - - if (usingNextFrameForImageCapture) - { - dispatch_semaphore_signal(imageCaptureSemaphore); - } -} - -- (void)informTargetsAboutNewFrameAtTime:(CMTime)frameTime; -{ - if (self.frameProcessingCompletionBlock != NULL) - { - self.frameProcessingCompletionBlock(self, frameTime); - } - - // Get all targets the framebuffer so they can grab a lock on it - for (id currentTarget in targets) - { - if (currentTarget != self.targetToIgnoreForUpdates) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger textureIndex = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - - [self setInputFramebufferForTarget:currentTarget atIndex:textureIndex]; - [currentTarget setInputSize:[self outputFrameSize] atIndex:textureIndex]; - } - } - - // Release our hold so it can return to the cache immediately upon processing - [[self framebufferForOutput] unlock]; - - if (usingNextFrameForImageCapture) - { -// usingNextFrameForImageCapture = NO; - } - else - { - [self removeOutputFramebuffer]; - } - - // Trigger processing last, so that our unlock comes first in serial execution, avoiding the need for a callback - for (id currentTarget in targets) - { - if (currentTarget != self.targetToIgnoreForUpdates) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger textureIndex = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - [currentTarget newFrameReadyAtTime:frameTime atIndex:textureIndex]; - } - } -} - -- (CGSize)outputFrameSize; -{ - return inputTextureSize; -} - -#pragma mark - -#pragma mark Input parameters - -- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent; -{ - backgroundColorRed = redComponent; - backgroundColorGreen = greenComponent; - backgroundColorBlue = blueComponent; - backgroundColorAlpha = alphaComponent; -} - -- (void)setInteger:(GLint)newInteger forUniformName:(NSString *)uniformName; -{ - GLint uniformIndex = [filterProgram uniformIndex:uniformName]; - [self setInteger:newInteger forUniform:uniformIndex program:filterProgram]; -} - -- (void)setFloat:(GLfloat)newFloat forUniformName:(NSString *)uniformName; -{ - GLint uniformIndex = [filterProgram uniformIndex:uniformName]; - [self setFloat:newFloat forUniform:uniformIndex program:filterProgram]; -} - -- (void)setSize:(CGSize)newSize forUniformName:(NSString *)uniformName; -{ - GLint uniformIndex = [filterProgram uniformIndex:uniformName]; - [self setSize:newSize forUniform:uniformIndex program:filterProgram]; -} - -- (void)setPoint:(CGPoint)newPoint forUniformName:(NSString *)uniformName; -{ - GLint uniformIndex = [filterProgram uniformIndex:uniformName]; - [self setPoint:newPoint forUniform:uniformIndex program:filterProgram]; -} - -- (void)setFloatVec3:(GPUVector3)newVec3 forUniformName:(NSString *)uniformName; -{ - GLint uniformIndex = [filterProgram uniformIndex:uniformName]; - [self setVec3:newVec3 forUniform:uniformIndex program:filterProgram]; -} - -- (void)setFloatVec4:(GPUVector4)newVec4 forUniform:(NSString *)uniformName; -{ - GLint uniformIndex = [filterProgram uniformIndex:uniformName]; - [self setVec4:newVec4 forUniform:uniformIndex program:filterProgram]; -} - -- (void)setFloatArray:(GLfloat *)array length:(GLsizei)count forUniform:(NSString*)uniformName -{ - GLint uniformIndex = [filterProgram uniformIndex:uniformName]; - - [self setFloatArray:array length:count forUniform:uniformIndex program:filterProgram]; -} - -- (void)setMatrix3f:(GPUMatrix3x3)matrix forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -{ - runAsynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:shaderProgram]; - [self setAndExecuteUniformStateCallbackAtIndex:uniform forProgram:shaderProgram toBlock:^{ - glUniformMatrix3fv(uniform, 1, GL_FALSE, (GLfloat *)&matrix); - }]; - }); -} - -- (void)setMatrix4f:(GPUMatrix4x4)matrix forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -{ - runAsynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:shaderProgram]; - [self setAndExecuteUniformStateCallbackAtIndex:uniform forProgram:shaderProgram toBlock:^{ - glUniformMatrix4fv(uniform, 1, GL_FALSE, (GLfloat *)&matrix); - }]; - }); -} - -- (void)setFloat:(GLfloat)floatValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -{ - runAsynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:shaderProgram]; - [self setAndExecuteUniformStateCallbackAtIndex:uniform forProgram:shaderProgram toBlock:^{ - glUniform1f(uniform, floatValue); - }]; - }); -} - -- (void)setPoint:(CGPoint)pointValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -{ - runAsynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:shaderProgram]; - [self setAndExecuteUniformStateCallbackAtIndex:uniform forProgram:shaderProgram toBlock:^{ - GLfloat positionArray[2]; - positionArray[0] = pointValue.x; - positionArray[1] = pointValue.y; - - glUniform2fv(uniform, 1, positionArray); - }]; - }); -} - -- (void)setSize:(CGSize)sizeValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -{ - runAsynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:shaderProgram]; - - [self setAndExecuteUniformStateCallbackAtIndex:uniform forProgram:shaderProgram toBlock:^{ - GLfloat sizeArray[2]; - sizeArray[0] = sizeValue.width; - sizeArray[1] = sizeValue.height; - - glUniform2fv(uniform, 1, sizeArray); - }]; - }); -} - -- (void)setVec3:(GPUVector3)vectorValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -{ - runAsynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:shaderProgram]; - - [self setAndExecuteUniformStateCallbackAtIndex:uniform forProgram:shaderProgram toBlock:^{ - glUniform3fv(uniform, 1, (GLfloat *)&vectorValue); - }]; - }); -} - -- (void)setVec4:(GPUVector4)vectorValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -{ - runAsynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:shaderProgram]; - - [self setAndExecuteUniformStateCallbackAtIndex:uniform forProgram:shaderProgram toBlock:^{ - glUniform4fv(uniform, 1, (GLfloat *)&vectorValue); - }]; - }); -} - -- (void)setFloatArray:(GLfloat *)arrayValue length:(GLsizei)arrayLength forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -{ - // Make a copy of the data, so it doesn't get overwritten before async call executes - NSData* arrayData = [NSData dataWithBytes:arrayValue length:arrayLength * sizeof(arrayValue[0])]; - - runAsynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:shaderProgram]; - - [self setAndExecuteUniformStateCallbackAtIndex:uniform forProgram:shaderProgram toBlock:^{ - glUniform1fv(uniform, arrayLength, [arrayData bytes]); - }]; - }); -} - -- (void)setInteger:(GLint)intValue forUniform:(GLint)uniform program:(GLProgram *)shaderProgram; -{ - runAsynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:shaderProgram]; - - [self setAndExecuteUniformStateCallbackAtIndex:uniform forProgram:shaderProgram toBlock:^{ - glUniform1i(uniform, intValue); - }]; - }); -} - -- (void)setAndExecuteUniformStateCallbackAtIndex:(GLint)uniform forProgram:(GLProgram *)shaderProgram toBlock:(dispatch_block_t)uniformStateBlock; -{ - [uniformStateRestorationBlocks setObject:[uniformStateBlock copy] forKey:[NSNumber numberWithInt:uniform]]; - uniformStateBlock(); -} - -- (void)setUniformsForProgramAtIndex:(NSUInteger)programIndex; -{ - [uniformStateRestorationBlocks enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop){ - dispatch_block_t currentBlock = obj; - currentBlock(); - }]; -} - -#pragma mark - -#pragma mark GPUImageInput - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - static const GLfloat imageVertices[] = { - -1.0f, -1.0f, - 1.0f, -1.0f, - -1.0f, 1.0f, - 1.0f, 1.0f, - }; - - [self renderToTextureWithVertices:imageVertices textureCoordinates:[[self class] textureCoordinatesForRotation:inputRotation]]; - - [self informTargetsAboutNewFrameAtTime:frameTime]; -} - -- (NSInteger)nextAvailableTextureIndex; -{ - return 0; -} - -- (void)setInputFramebuffer:(GPUImageFramebuffer *)newInputFramebuffer atIndex:(NSInteger)textureIndex; -{ - firstInputFramebuffer = newInputFramebuffer; - [firstInputFramebuffer lock]; -} - -- (CGSize)rotatedSize:(CGSize)sizeToRotate forIndex:(NSInteger)textureIndex; -{ - CGSize rotatedSize = sizeToRotate; - - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - rotatedSize.width = sizeToRotate.height; - rotatedSize.height = sizeToRotate.width; - } - - return rotatedSize; -} - -- (CGPoint)rotatedPoint:(CGPoint)pointToRotate forRotation:(GPUImageRotationMode)rotation; -{ - CGPoint rotatedPoint; - switch(rotation) - { - case kGPUImageNoRotation: return pointToRotate; break; - case kGPUImageFlipHorizonal: - { - rotatedPoint.x = 1.0 - pointToRotate.x; - rotatedPoint.y = pointToRotate.y; - }; break; - case kGPUImageFlipVertical: - { - rotatedPoint.x = pointToRotate.x; - rotatedPoint.y = 1.0 - pointToRotate.y; - }; break; - case kGPUImageRotateLeft: - { - rotatedPoint.x = 1.0 - pointToRotate.y; - rotatedPoint.y = pointToRotate.x; - }; break; - case kGPUImageRotateRight: - { - rotatedPoint.x = pointToRotate.y; - rotatedPoint.y = 1.0 - pointToRotate.x; - }; break; - case kGPUImageRotateRightFlipVertical: - { - rotatedPoint.x = pointToRotate.y; - rotatedPoint.y = pointToRotate.x; - }; break; - case kGPUImageRotateRightFlipHorizontal: - { - rotatedPoint.x = 1.0 - pointToRotate.y; - rotatedPoint.y = 1.0 - pointToRotate.x; - }; break; - case kGPUImageRotate180: - { - rotatedPoint.x = 1.0 - pointToRotate.x; - rotatedPoint.y = 1.0 - pointToRotate.y; - }; break; - } - - return rotatedPoint; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - if (self.preventRendering) - { - return; - } - - if (overrideInputSize) - { - if (CGSizeEqualToSize(forcedMaximumSize, CGSizeZero)) - { - } - else - { - CGRect insetRect = AVMakeRectWithAspectRatioInsideRect(newSize, CGRectMake(0.0, 0.0, forcedMaximumSize.width, forcedMaximumSize.height)); - inputTextureSize = insetRect.size; - } - } - else - { - CGSize rotatedSize = [self rotatedSize:newSize forIndex:textureIndex]; - - if (CGSizeEqualToSize(rotatedSize, CGSizeZero)) - { - inputTextureSize = rotatedSize; - } - else if (!CGSizeEqualToSize(inputTextureSize, rotatedSize)) - { - inputTextureSize = rotatedSize; - } - } - - [self setupFilterForSize:[self sizeOfFBO]]; -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - inputRotation = newInputRotation; -} - -- (void)forceProcessingAtSize:(CGSize)frameSize; -{ - if (CGSizeEqualToSize(frameSize, CGSizeZero)) - { - overrideInputSize = NO; - } - else - { - overrideInputSize = YES; - inputTextureSize = frameSize; - forcedMaximumSize = CGSizeZero; - } -} - -- (void)forceProcessingAtSizeRespectingAspectRatio:(CGSize)frameSize; -{ - if (CGSizeEqualToSize(frameSize, CGSizeZero)) - { - overrideInputSize = NO; - inputTextureSize = CGSizeZero; - forcedMaximumSize = CGSizeZero; - } - else - { - overrideInputSize = YES; - forcedMaximumSize = frameSize; - } -} - -- (CGSize)maximumOutputSize; -{ - // I'm temporarily disabling adjustments for smaller output sizes until I figure out how to make this work better - return CGSizeZero; - - /* - if (CGSizeEqualToSize(cachedMaximumOutputSize, CGSizeZero)) - { - for (id currentTarget in targets) - { - if ([currentTarget maximumOutputSize].width > cachedMaximumOutputSize.width) - { - cachedMaximumOutputSize = [currentTarget maximumOutputSize]; - } - } - } - - return cachedMaximumOutputSize; - */ -} - -- (void)endProcessing -{ - if (!isEndProcessing) - { - isEndProcessing = YES; - - for (id currentTarget in targets) - { - [currentTarget endProcessing]; - } - } -} - -- (BOOL)wantsMonochromeInput; -{ - return NO; -} - -#pragma mark - -#pragma mark Accessors - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilterGroup.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilterGroup.h deleted file mode 100755 index 6817cdf0..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilterGroup.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "GPUImageOutput.h" -#import "GPUImageFilter.h" - -@interface GPUImageFilterGroup : GPUImageOutput -{ - NSMutableArray *filters; - BOOL isEndProcessing; -} - -@property(readwrite, nonatomic, strong) GPUImageOutput *terminalFilter; -@property(readwrite, nonatomic, strong) NSArray *initialFilters; -@property(readwrite, nonatomic, strong) GPUImageOutput *inputFilterToIgnoreForUpdates; - -// Filter management -- (void)addFilter:(GPUImageOutput *)newFilter; -- (GPUImageOutput *)filterAtIndex:(NSUInteger)filterIndex; -- (NSUInteger)filterCount; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilterGroup.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilterGroup.m deleted file mode 100755 index 72cfe5e7..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilterGroup.m +++ /dev/null @@ -1,208 +0,0 @@ -#import "GPUImageFilterGroup.h" -#import "GPUImagePicture.h" - -@implementation GPUImageFilterGroup - -@synthesize terminalFilter = _terminalFilter; -@synthesize initialFilters = _initialFilters; -@synthesize inputFilterToIgnoreForUpdates = _inputFilterToIgnoreForUpdates; - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - filters = [[NSMutableArray alloc] init]; - - return self; -} - -#pragma mark - -#pragma mark Filter management - -- (void)addFilter:(GPUImageOutput *)newFilter; -{ - [filters addObject:newFilter]; -} - -- (GPUImageOutput *)filterAtIndex:(NSUInteger)filterIndex; -{ - return [filters objectAtIndex:filterIndex]; -} - -- (NSUInteger)filterCount; -{ - return [filters count]; -} - -#pragma mark - -#pragma mark Still image processing - -- (void)useNextFrameForImageCapture; -{ - [self.terminalFilter useNextFrameForImageCapture]; -} - -- (CGImageRef)newCGImageFromCurrentlyProcessedOutput; -{ - return [self.terminalFilter newCGImageFromCurrentlyProcessedOutput]; -} - -#pragma mark - -#pragma mark GPUImageOutput overrides - -- (void)setTargetToIgnoreForUpdates:(id)targetToIgnoreForUpdates; -{ - [_terminalFilter setTargetToIgnoreForUpdates:targetToIgnoreForUpdates]; -} - -- (void)addTarget:(id)newTarget atTextureLocation:(NSInteger)textureLocation; -{ - [_terminalFilter addTarget:newTarget atTextureLocation:textureLocation]; -} - -- (void)removeTarget:(id)targetToRemove; -{ - [_terminalFilter removeTarget:targetToRemove]; -} - -- (void)removeAllTargets; -{ - [_terminalFilter removeAllTargets]; -} - -- (NSArray *)targets; -{ - return [_terminalFilter targets]; -} - -- (void)setFrameProcessingCompletionBlock:(void (^)(GPUImageOutput *, CMTime))frameProcessingCompletionBlock; -{ - [_terminalFilter setFrameProcessingCompletionBlock:frameProcessingCompletionBlock]; -} - -- (void (^)(GPUImageOutput *, CMTime))frameProcessingCompletionBlock; -{ - return [_terminalFilter frameProcessingCompletionBlock]; -} - -#pragma mark - -#pragma mark GPUImageInput protocol - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - for (GPUImageOutput *currentFilter in _initialFilters) - { - if (currentFilter != self.inputFilterToIgnoreForUpdates) - { - [currentFilter newFrameReadyAtTime:frameTime atIndex:textureIndex]; - } - } -} - -- (void)setInputFramebuffer:(GPUImageFramebuffer *)newInputFramebuffer atIndex:(NSInteger)textureIndex; -{ - for (GPUImageOutput *currentFilter in _initialFilters) - { - [currentFilter setInputFramebuffer:newInputFramebuffer atIndex:textureIndex]; - } -} - -- (NSInteger)nextAvailableTextureIndex; -{ -// if ([_initialFilters count] > 0) -// { -// return [[_initialFilters objectAtIndex:0] nextAvailableTextureIndex]; -// } - - return 0; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - for (GPUImageOutput *currentFilter in _initialFilters) - { - [currentFilter setInputSize:newSize atIndex:textureIndex]; - } -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - for (GPUImageOutput *currentFilter in _initialFilters) - { - [currentFilter setInputRotation:newInputRotation atIndex:(NSInteger)textureIndex]; - } -} - -- (void)forceProcessingAtSize:(CGSize)frameSize; -{ - for (GPUImageOutput *currentFilter in filters) - { - [currentFilter forceProcessingAtSize:frameSize]; - } -} - -- (void)forceProcessingAtSizeRespectingAspectRatio:(CGSize)frameSize; -{ - for (GPUImageOutput *currentFilter in filters) - { - [currentFilter forceProcessingAtSizeRespectingAspectRatio:frameSize]; - } -} - -- (CGSize)maximumOutputSize; -{ - // I'm temporarily disabling adjustments for smaller output sizes until I figure out how to make this work better - return CGSizeZero; - - /* - if (CGSizeEqualToSize(cachedMaximumOutputSize, CGSizeZero)) - { - for (id currentTarget in _initialFilters) - { - if ([currentTarget maximumOutputSize].width > cachedMaximumOutputSize.width) - { - cachedMaximumOutputSize = [currentTarget maximumOutputSize]; - } - } - } - - return cachedMaximumOutputSize; - */ -} - -- (void)endProcessing; -{ - if (!isEndProcessing) - { - isEndProcessing = YES; - - for (id currentTarget in _initialFilters) - { - [currentTarget endProcessing]; - } - } -} - -- (BOOL)wantsMonochromeInput; -{ - BOOL allInputsWantMonochromeInput = YES; - for (GPUImageOutput *currentFilter in _initialFilters) - { - allInputsWantMonochromeInput = allInputsWantMonochromeInput && [currentFilter wantsMonochromeInput]; - } - - return allInputsWantMonochromeInput; -} - -- (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; -{ - for (GPUImageOutput *currentFilter in _initialFilters) - { - [currentFilter setCurrentlyReceivingMonochromeInput:newValue]; - } -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilterPipeline.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilterPipeline.h deleted file mode 100755 index dc2baeac..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilterPipeline.h +++ /dev/null @@ -1,30 +0,0 @@ -#import -#import "GPUImageOutput.h" - -@interface GPUImageFilterPipeline : NSObject -{ - NSString *stringValue; -} - -@property (strong) NSMutableArray *filters; - -@property (strong) GPUImageOutput *input; -@property (strong) id output; - -- (id) initWithOrderedFilters:(NSArray*) filters input:(GPUImageOutput*)input output:(id )output; -- (id) initWithConfiguration:(NSDictionary*) configuration input:(GPUImageOutput*)input output:(id )output; -- (id) initWithConfigurationFile:(NSURL*) configuration input:(GPUImageOutput*)input output:(id )output; - -- (void) addFilter:(GPUImageOutput *)filter; -- (void) addFilter:(GPUImageOutput *)filter atIndex:(NSUInteger)insertIndex; -- (void) replaceFilterAtIndex:(NSUInteger)index withFilter:(GPUImageOutput *)filter; -- (void) replaceAllFilters:(NSArray *) newFilters; -- (void) removeFilter:(GPUImageOutput *)filter; -- (void) removeFilterAtIndex:(NSUInteger)index; -- (void) removeAllFilters; - -- (UIImage *) currentFilteredFrame; -- (UIImage *) currentFilteredFrameWithOrientation:(UIImageOrientation)imageOrientation; -- (CGImageRef) newCGImageFromCurrentFilteredFrame; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilterPipeline.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilterPipeline.m deleted file mode 100755 index 4fbe5ebb..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFilterPipeline.m +++ /dev/null @@ -1,218 +0,0 @@ -#import "GPUImageFilterPipeline.h" - -@interface GPUImageFilterPipeline () - -- (BOOL)_parseConfiguration:(NSDictionary *)configuration; - -- (void)_refreshFilters; - -@end - -@implementation GPUImageFilterPipeline - -@synthesize filters = _filters, input = _input, output = _output; - -#pragma mark Config file init - -- (id)initWithConfiguration:(NSDictionary *)configuration input:(GPUImageOutput *)input output:(id )output { - self = [super init]; - if (self) { - self.input = input; - self.output = output; - if (![self _parseConfiguration:configuration]) { - NSLog(@"Sorry, a parsing error occurred."); - abort(); - } - [self _refreshFilters]; - } - return self; -} - -- (id)initWithConfigurationFile:(NSURL *)configuration input:(GPUImageOutput *)input output:(id )output { - return [self initWithConfiguration:[NSDictionary dictionaryWithContentsOfURL:configuration] input:input output:output]; -} - -- (BOOL)_parseConfiguration:(NSDictionary *)configuration { - NSArray *filters = [configuration objectForKey:@"Filters"]; - if (!filters) { - return NO; - } - - NSError *regexError = nil; - NSRegularExpression *parsingRegex = [NSRegularExpression regularExpressionWithPattern:@"(float|CGPoint|NSString)\\((.*?)(?:,\\s*(.*?))*\\)" - options:0 - error:®exError]; - - // It's faster to put them into an array and then pass it to the filters property than it is to call [self addFilter:] every time - NSMutableArray *orderedFilters = [NSMutableArray arrayWithCapacity:[filters count]]; - for (NSDictionary *filter in filters) { - NSString *filterName = [filter objectForKey:@"FilterName"]; - Class theClass = NSClassFromString(filterName); - GPUImageOutput *genericFilter = [[theClass alloc] init]; - // Set up the properties - NSDictionary *filterAttributes; - if ((filterAttributes = [filter objectForKey:@"Attributes"])) { - for (NSString *propertyKey in filterAttributes) { - // Set up the selector - SEL theSelector = NSSelectorFromString(propertyKey); - NSInvocation *inv = [NSInvocation invocationWithMethodSignature:[theClass instanceMethodSignatureForSelector:theSelector]]; - [inv setSelector:theSelector]; - [inv setTarget:genericFilter]; - - // check selector given with parameter - if ([propertyKey hasSuffix:@":"]) { - - stringValue = nil; - - // Then parse the arguments - NSMutableArray *parsedArray; - if ([[filterAttributes objectForKey:propertyKey] isKindOfClass:[NSArray class]]) { - NSArray *array = [filterAttributes objectForKey:propertyKey]; - parsedArray = [NSMutableArray arrayWithCapacity:[array count]]; - for (NSString *string in array) { - NSTextCheckingResult *parse = [parsingRegex firstMatchInString:string - options:0 - range:NSMakeRange(0, [string length])]; - - NSString *modifier = [string substringWithRange:[parse rangeAtIndex:1]]; - if ([modifier isEqualToString:@"float"]) { - // Float modifier, one argument - CGFloat value = [[string substringWithRange:[parse rangeAtIndex:2]] floatValue]; - [parsedArray addObject:[NSNumber numberWithFloat:value]]; - [inv setArgument:&value atIndex:2]; - } else if ([modifier isEqualToString:@"CGPoint"]) { - // CGPoint modifier, two float arguments - CGFloat x = [[string substringWithRange:[parse rangeAtIndex:2]] floatValue]; - CGFloat y = [[string substringWithRange:[parse rangeAtIndex:3]] floatValue]; - CGPoint value = CGPointMake(x, y); - [parsedArray addObject:[NSValue valueWithCGPoint:value]]; - } else if ([modifier isEqualToString:@"NSString"]) { - // NSString modifier, one string argument - stringValue = [[string substringWithRange:[parse rangeAtIndex:2]] copy]; - [inv setArgument:&stringValue atIndex:2]; - - } else { - return NO; - } - } - [inv setArgument:&parsedArray atIndex:2]; - } else { - NSString *string = [filterAttributes objectForKey:propertyKey]; - NSTextCheckingResult *parse = [parsingRegex firstMatchInString:string - options:0 - range:NSMakeRange(0, [string length])]; - - NSString *modifier = [string substringWithRange:[parse rangeAtIndex:1]]; - if ([modifier isEqualToString:@"float"]) { - // Float modifier, one argument - CGFloat value = [[string substringWithRange:[parse rangeAtIndex:2]] floatValue]; - [inv setArgument:&value atIndex:2]; - } else if ([modifier isEqualToString:@"CGPoint"]) { - // CGPoint modifier, two float arguments - CGFloat x = [[string substringWithRange:[parse rangeAtIndex:2]] floatValue]; - CGFloat y = [[string substringWithRange:[parse rangeAtIndex:3]] floatValue]; - CGPoint value = CGPointMake(x, y); - [inv setArgument:&value atIndex:2]; - } else if ([modifier isEqualToString:@"NSString"]) { - // NSString modifier, one string argument - stringValue = [[string substringWithRange:[parse rangeAtIndex:2]] copy]; - [inv setArgument:&stringValue atIndex:2]; - - } else { - return NO; - } - } - } - - - [inv invoke]; - } - } - [orderedFilters addObject:genericFilter]; - } - self.filters = orderedFilters; - - return YES; -} - -#pragma mark Regular init - -- (id)initWithOrderedFilters:(NSArray *)filters input:(GPUImageOutput *)input output:(id )output { - self = [super init]; - if (self) { - self.input = input; - self.output = output; - self.filters = [NSMutableArray arrayWithArray:filters]; - [self _refreshFilters]; - } - return self; -} - -- (void)addFilter:(GPUImageOutput *)filter atIndex:(NSUInteger)insertIndex { - [self.filters insertObject:filter atIndex:insertIndex]; - [self _refreshFilters]; -} - -- (void)addFilter:(GPUImageOutput *)filter { - [self.filters addObject:filter]; - [self _refreshFilters]; -} - -- (void)replaceFilterAtIndex:(NSUInteger)index withFilter:(GPUImageOutput *)filter { - [self.filters replaceObjectAtIndex:index withObject:filter]; - [self _refreshFilters]; -} - -- (void) removeFilter:(GPUImageOutput *)filter; -{ - [self.filters removeObject:filter]; - [self _refreshFilters]; -} - -- (void)removeFilterAtIndex:(NSUInteger)index { - [self.filters removeObjectAtIndex:index]; - [self _refreshFilters]; -} - -- (void)removeAllFilters { - [self.filters removeAllObjects]; - [self _refreshFilters]; -} - -- (void)replaceAllFilters:(NSArray *)newFilters { - self.filters = [NSMutableArray arrayWithArray:newFilters]; - [self _refreshFilters]; -} - -- (void)_refreshFilters { - - id prevFilter = self.input; - GPUImageOutput *theFilter = nil; - - for (int i = 0; i < [self.filters count]; i++) { - theFilter = [self.filters objectAtIndex:i]; - [prevFilter removeAllTargets]; - [prevFilter addTarget:theFilter]; - prevFilter = theFilter; - } - - [prevFilter removeAllTargets]; - - if (self.output != nil) { - [prevFilter addTarget:self.output]; - } -} - -- (UIImage *)currentFilteredFrame { - return [(GPUImageOutput *)[_filters lastObject] imageFromCurrentFramebuffer]; -} - -- (UIImage *)currentFilteredFrameWithOrientation:(UIImageOrientation)imageOrientation { - return [(GPUImageOutput *)[_filters lastObject] imageFromCurrentFramebufferWithOrientation:imageOrientation]; -} - -- (CGImageRef)newCGImageFromCurrentFilteredFrame { - return [(GPUImageOutput *)[_filters lastObject] newCGImageFromCurrentlyProcessedOutput]; -} - -@end \ No newline at end of file diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFramebuffer.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFramebuffer.h deleted file mode 100644 index 5cf20dd3..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFramebuffer.h +++ /dev/null @@ -1,58 +0,0 @@ -#import - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -#import -#import -#import -#else -#import -#import -#endif - -#import -#import - - -typedef struct GPUTextureOptions { - GLenum minFilter; - GLenum magFilter; - GLenum wrapS; - GLenum wrapT; - GLenum internalFormat; - GLenum format; - GLenum type; -} GPUTextureOptions; - -@interface GPUImageFramebuffer : NSObject - -@property(readonly) CGSize size; -@property(readonly) GPUTextureOptions textureOptions; -@property(readonly) GLuint texture; -@property(readonly) BOOL missingFramebuffer; - -// Initialization and teardown -- (id)initWithSize:(CGSize)framebufferSize; -- (id)initWithSize:(CGSize)framebufferSize textureOptions:(GPUTextureOptions)fboTextureOptions onlyTexture:(BOOL)onlyGenerateTexture; -- (id)initWithSize:(CGSize)framebufferSize overriddenTexture:(GLuint)inputTexture; - -// Usage -- (void)activateFramebuffer; - -// Reference counting -- (void)lock; -- (void)unlock; -- (void)clearAllLocks; -- (void)disableReferenceCounting; -- (void)enableReferenceCounting; - -// Image capture -- (CGImageRef)newCGImageFromFramebufferContents; -- (void)restoreRenderTarget; - -// Raw data bytes -- (void)lockForReading; -- (void)unlockAfterReading; -- (NSUInteger)bytesPerRow; -- (GLubyte *)byteBuffer; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFramebuffer.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFramebuffer.m deleted file mode 100644 index 1d3d48fc..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFramebuffer.m +++ /dev/null @@ -1,448 +0,0 @@ -#import "GPUImageFramebuffer.h" -#import "GPUImageOutput.h" - -@interface GPUImageFramebuffer() -{ - GLuint framebuffer; -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - CVPixelBufferRef renderTarget; - CVOpenGLESTextureRef renderTexture; - NSUInteger readLockCount; -#else -#endif - NSUInteger framebufferReferenceCount; - BOOL referenceCountingDisabled; -} - -- (void)generateFramebuffer; -- (void)generateTexture; -- (void)destroyFramebuffer; - -@end - -void dataProviderReleaseCallback (void *info, const void *data, size_t size); -void dataProviderUnlockCallback (void *info, const void *data, size_t size); - -@implementation GPUImageFramebuffer - -@synthesize size = _size; -@synthesize textureOptions = _textureOptions; -@synthesize texture = _texture; -@synthesize missingFramebuffer = _missingFramebuffer; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithSize:(CGSize)framebufferSize textureOptions:(GPUTextureOptions)fboTextureOptions onlyTexture:(BOOL)onlyGenerateTexture; -{ - if (!(self = [super init])) - { - return nil; - } - - _textureOptions = fboTextureOptions; - _size = framebufferSize; - framebufferReferenceCount = 0; - referenceCountingDisabled = NO; - _missingFramebuffer = onlyGenerateTexture; - - if (_missingFramebuffer) - { - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - [self generateTexture]; - framebuffer = 0; - }); - } - else - { - [self generateFramebuffer]; - } - return self; -} - -- (id)initWithSize:(CGSize)framebufferSize overriddenTexture:(GLuint)inputTexture; -{ - if (!(self = [super init])) - { - return nil; - } - - GPUTextureOptions defaultTextureOptions; - defaultTextureOptions.minFilter = GL_LINEAR; - defaultTextureOptions.magFilter = GL_LINEAR; - defaultTextureOptions.wrapS = GL_CLAMP_TO_EDGE; - defaultTextureOptions.wrapT = GL_CLAMP_TO_EDGE; - defaultTextureOptions.internalFormat = GL_RGBA; - defaultTextureOptions.format = GL_BGRA; - defaultTextureOptions.type = GL_UNSIGNED_BYTE; - - _textureOptions = defaultTextureOptions; - _size = framebufferSize; - framebufferReferenceCount = 0; - referenceCountingDisabled = YES; - - _texture = inputTexture; - - return self; -} - -- (id)initWithSize:(CGSize)framebufferSize; -{ - GPUTextureOptions defaultTextureOptions; - defaultTextureOptions.minFilter = GL_LINEAR; - defaultTextureOptions.magFilter = GL_LINEAR; - defaultTextureOptions.wrapS = GL_CLAMP_TO_EDGE; - defaultTextureOptions.wrapT = GL_CLAMP_TO_EDGE; - defaultTextureOptions.internalFormat = GL_RGBA; - defaultTextureOptions.format = GL_BGRA; - defaultTextureOptions.type = GL_UNSIGNED_BYTE; - - if (!(self = [self initWithSize:framebufferSize textureOptions:defaultTextureOptions onlyTexture:NO])) - { - return nil; - } - - return self; -} - -- (void)dealloc -{ - [self destroyFramebuffer]; -} - -#pragma mark - -#pragma mark Internal - -- (void)generateTexture; -{ - glActiveTexture(GL_TEXTURE1); - glGenTextures(1, &_texture); - glBindTexture(GL_TEXTURE_2D, _texture); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, _textureOptions.minFilter); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, _textureOptions.magFilter); - // This is necessary for non-power-of-two textures - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, _textureOptions.wrapS); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, _textureOptions.wrapT); - - // TODO: Handle mipmaps -} - -- (void)generateFramebuffer; -{ - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - - glGenFramebuffers(1, &framebuffer); - glBindFramebuffer(GL_FRAMEBUFFER, framebuffer); - - // By default, all framebuffers on iOS 5.0+ devices are backed by texture caches, using one shared cache - if ([GPUImageContext supportsFastTextureUpload]) - { -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - CVOpenGLESTextureCacheRef coreVideoTextureCache = [[GPUImageContext sharedImageProcessingContext] coreVideoTextureCache]; - // Code originally sourced from http://allmybrain.com/2011/12/08/rendering-to-a-texture-with-ios-5-texture-cache-api/ - - CFDictionaryRef empty; // empty value for attr value. - CFMutableDictionaryRef attrs; - empty = CFDictionaryCreate(kCFAllocatorDefault, NULL, NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); // our empty IOSurface properties dictionary - attrs = CFDictionaryCreateMutable(kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - CFDictionarySetValue(attrs, kCVPixelBufferIOSurfacePropertiesKey, empty); - - CVReturn err = CVPixelBufferCreate(kCFAllocatorDefault, (int)_size.width, (int)_size.height, kCVPixelFormatType_32BGRA, attrs, &renderTarget); - if (err) - { - NSLog(@"FBO size: %f, %f", _size.width, _size.height); - NSAssert(NO, @"Error at CVPixelBufferCreate %d", err); - } - - err = CVOpenGLESTextureCacheCreateTextureFromImage (kCFAllocatorDefault, coreVideoTextureCache, renderTarget, - NULL, // texture attributes - GL_TEXTURE_2D, - _textureOptions.internalFormat, // opengl format - (int)_size.width, - (int)_size.height, - _textureOptions.format, // native iOS format - _textureOptions.type, - 0, - &renderTexture); - if (err) - { - NSAssert(NO, @"Error at CVOpenGLESTextureCacheCreateTextureFromImage %d", err); - } - - CFRelease(attrs); - CFRelease(empty); - - glBindTexture(CVOpenGLESTextureGetTarget(renderTexture), CVOpenGLESTextureGetName(renderTexture)); - _texture = CVOpenGLESTextureGetName(renderTexture); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, _textureOptions.wrapS); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, _textureOptions.wrapT); - - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, CVOpenGLESTextureGetName(renderTexture), 0); -#endif - } - else - { - [self generateTexture]; - - glBindTexture(GL_TEXTURE_2D, _texture); - - glTexImage2D(GL_TEXTURE_2D, 0, _textureOptions.internalFormat, (int)_size.width, (int)_size.height, 0, _textureOptions.format, _textureOptions.type, 0); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, _texture, 0); - } - - #ifndef NS_BLOCK_ASSERTIONS - GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); - NSAssert(status == GL_FRAMEBUFFER_COMPLETE, @"Incomplete filter FBO: %d", status); - #endif - - glBindTexture(GL_TEXTURE_2D, 0); - }); -} - -- (void)destroyFramebuffer; -{ - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - - if (framebuffer) - { - glDeleteFramebuffers(1, &framebuffer); - framebuffer = 0; - } - - - if ([GPUImageContext supportsFastTextureUpload] && (!_missingFramebuffer)) - { -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - if (renderTarget) - { - CFRelease(renderTarget); - renderTarget = NULL; - } - - if (renderTexture) - { - CFRelease(renderTexture); - renderTexture = NULL; - } -#endif - } - else - { - glDeleteTextures(1, &_texture); - } - - }); -} - -#pragma mark - -#pragma mark Usage - -- (void)activateFramebuffer; -{ - glBindFramebuffer(GL_FRAMEBUFFER, framebuffer); - glViewport(0, 0, (int)_size.width, (int)_size.height); -} - -#pragma mark - -#pragma mark Reference counting - -- (void)lock; -{ - if (referenceCountingDisabled) - { - return; - } - - framebufferReferenceCount++; -} - -- (void)unlock; -{ - if (referenceCountingDisabled) - { - return; - } - - NSAssert(framebufferReferenceCount > 0, @"Tried to overrelease a framebuffer, did you forget to call -useNextFrameForImageCapture before using -imageFromCurrentFramebuffer?"); - framebufferReferenceCount--; - if (framebufferReferenceCount < 1) - { - [[GPUImageContext sharedFramebufferCache] returnFramebufferToCache:self]; - } -} - -- (void)clearAllLocks; -{ - framebufferReferenceCount = 0; -} - -- (void)disableReferenceCounting; -{ - referenceCountingDisabled = YES; -} - -- (void)enableReferenceCounting; -{ - referenceCountingDisabled = NO; -} - -#pragma mark - -#pragma mark Image capture - -void dataProviderReleaseCallback (void *info, const void *data, size_t size) -{ - free((void *)data); -} - -void dataProviderUnlockCallback (void *info, const void *data, size_t size) -{ - GPUImageFramebuffer *framebuffer = (__bridge_transfer GPUImageFramebuffer*)info; - - [framebuffer restoreRenderTarget]; - [framebuffer unlock]; - [[GPUImageContext sharedFramebufferCache] removeFramebufferFromActiveImageCaptureList:framebuffer]; -} - -- (CGImageRef)newCGImageFromFramebufferContents; -{ - // a CGImage can only be created from a 'normal' color texture - NSAssert(self.textureOptions.internalFormat == GL_RGBA, @"For conversion to a CGImage the output texture format for this filter must be GL_RGBA."); - NSAssert(self.textureOptions.type == GL_UNSIGNED_BYTE, @"For conversion to a CGImage the type of the output texture of this filter must be GL_UNSIGNED_BYTE."); - - __block CGImageRef cgImageFromBytes; - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - - NSUInteger totalBytesForImage = (int)_size.width * (int)_size.height * 4; - // It appears that the width of a texture must be padded out to be a multiple of 8 (32 bytes) if reading from it using a texture cache - - GLubyte *rawImagePixels; - - CGDataProviderRef dataProvider = NULL; - if ([GPUImageContext supportsFastTextureUpload]) - { -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - NSUInteger paddedWidthOfImage = CVPixelBufferGetBytesPerRow(renderTarget) / 4.0; - NSUInteger paddedBytesForImage = paddedWidthOfImage * (int)_size.height * 4; - - glFinish(); - CFRetain(renderTarget); // I need to retain the pixel buffer here and release in the data source callback to prevent its bytes from being prematurely deallocated during a photo write operation - [self lockForReading]; - rawImagePixels = (GLubyte *)CVPixelBufferGetBaseAddress(renderTarget); - dataProvider = CGDataProviderCreateWithData((__bridge_retained void*)self, rawImagePixels, paddedBytesForImage, dataProviderUnlockCallback); - [[GPUImageContext sharedFramebufferCache] addFramebufferToActiveImageCaptureList:self]; // In case the framebuffer is swapped out on the filter, need to have a strong reference to it somewhere for it to hang on while the image is in existence -#else -#endif - } - else - { - [self activateFramebuffer]; - rawImagePixels = (GLubyte *)malloc(totalBytesForImage); - glReadPixels(0, 0, (int)_size.width, (int)_size.height, GL_RGBA, GL_UNSIGNED_BYTE, rawImagePixels); - dataProvider = CGDataProviderCreateWithData(NULL, rawImagePixels, totalBytesForImage, dataProviderReleaseCallback); - [self unlock]; // Don't need to keep this around anymore - } - - CGColorSpaceRef defaultRGBColorSpace = CGColorSpaceCreateDeviceRGB(); - - if ([GPUImageContext supportsFastTextureUpload]) - { -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - cgImageFromBytes = CGImageCreate((int)_size.width, (int)_size.height, 8, 32, CVPixelBufferGetBytesPerRow(renderTarget), defaultRGBColorSpace, kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst, dataProvider, NULL, NO, kCGRenderingIntentDefault); -#else -#endif - } - else - { - cgImageFromBytes = CGImageCreate((int)_size.width, (int)_size.height, 8, 32, 4 * (int)_size.width, defaultRGBColorSpace, kCGBitmapByteOrderDefault | kCGImageAlphaLast, dataProvider, NULL, NO, kCGRenderingIntentDefault); - } - - // Capture image with current device orientation - CGDataProviderRelease(dataProvider); - CGColorSpaceRelease(defaultRGBColorSpace); - - }); - - return cgImageFromBytes; -} - -- (void)restoreRenderTarget; -{ -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - [self unlockAfterReading]; - CFRelease(renderTarget); -#else -#endif -} - -#pragma mark - -#pragma mark Raw data bytes - -- (void)lockForReading -{ -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - if ([GPUImageContext supportsFastTextureUpload]) - { - if (readLockCount == 0) - { - CVPixelBufferLockBaseAddress(renderTarget, 0); - } - readLockCount++; - } -#endif -} - -- (void)unlockAfterReading -{ -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - if ([GPUImageContext supportsFastTextureUpload]) - { - NSAssert(readLockCount > 0, @"Unbalanced call to -[GPUImageFramebuffer unlockAfterReading]"); - readLockCount--; - if (readLockCount == 0) - { - CVPixelBufferUnlockBaseAddress(renderTarget, 0); - } - } -#endif -} - -- (NSUInteger)bytesPerRow; -{ - if ([GPUImageContext supportsFastTextureUpload]) - { -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - return CVPixelBufferGetBytesPerRow(renderTarget); -#else - return _size.width * 4; // TODO: do more with this on the non-texture-cache side -#endif - } - else - { - return _size.width * 4; - } -} - -- (GLubyte *)byteBuffer; -{ -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - [self lockForReading]; - GLubyte * bufferBytes = CVPixelBufferGetBaseAddress(renderTarget); - [self unlockAfterReading]; - return bufferBytes; -#else - return NULL; // TODO: do more with this on the non-texture-cache side -#endif -} - -- (GLuint)texture; -{ -// NSLog(@"Accessing texture: %d from FB: %@", _texture, self); - return _texture; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFramebufferCache.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFramebufferCache.h deleted file mode 100644 index e56a3456..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFramebufferCache.h +++ /dev/null @@ -1,15 +0,0 @@ -#import -#import -#import "GPUImageFramebuffer.h" - -@interface GPUImageFramebufferCache : NSObject - -// Framebuffer management -- (GPUImageFramebuffer *)fetchFramebufferForSize:(CGSize)framebufferSize textureOptions:(GPUTextureOptions)textureOptions onlyTexture:(BOOL)onlyTexture; -- (GPUImageFramebuffer *)fetchFramebufferForSize:(CGSize)framebufferSize onlyTexture:(BOOL)onlyTexture; -- (void)returnFramebufferToCache:(GPUImageFramebuffer *)framebuffer; -- (void)purgeAllUnassignedFramebuffers; -- (void)addFramebufferToActiveImageCaptureList:(GPUImageFramebuffer *)framebuffer; -- (void)removeFramebufferFromActiveImageCaptureList:(GPUImageFramebuffer *)framebuffer; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFramebufferCache.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFramebufferCache.m deleted file mode 100644 index 21925ad9..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageFramebufferCache.m +++ /dev/null @@ -1,179 +0,0 @@ -#import "GPUImageFramebufferCache.h" -#import "GPUImageContext.h" -#import "GPUImageOutput.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -#import -#else -#endif - -@interface GPUImageFramebufferCache() -{ -// NSCache *framebufferCache; - NSMutableDictionary *framebufferCache; - NSMutableDictionary *framebufferTypeCounts; - NSMutableArray *activeImageCaptureList; // Where framebuffers that may be lost by a filter, but which are still needed for a UIImage, etc., are stored - id memoryWarningObserver; - - dispatch_queue_t framebufferCacheQueue; -} - -- (NSString *)hashForSize:(CGSize)size textureOptions:(GPUTextureOptions)textureOptions onlyTexture:(BOOL)onlyTexture; - -@end - - -@implementation GPUImageFramebufferCache - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - memoryWarningObserver = [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidReceiveMemoryWarningNotification object:nil queue:nil usingBlock:^(NSNotification *note) { - - [self purgeAllUnassignedFramebuffers]; - }]; -#else -#endif - -// framebufferCache = [[NSCache alloc] init]; - framebufferCache = [[NSMutableDictionary alloc] init]; - framebufferTypeCounts = [[NSMutableDictionary alloc] init]; - activeImageCaptureList = [[NSMutableArray alloc] init]; - framebufferCacheQueue = dispatch_queue_create("com.sunsetlakesoftware.GPUImage.framebufferCacheQueue", NULL); - - return self; -} - -#pragma mark - -#pragma mark Framebuffer management - -- (NSString *)hashForSize:(CGSize)size textureOptions:(GPUTextureOptions)textureOptions onlyTexture:(BOOL)onlyTexture; -{ - if (onlyTexture) - { - return [NSString stringWithFormat:@"%.1fx%.1f-%d:%d:%d:%d:%d:%d:%d-NOFB", size.width, size.height, textureOptions.minFilter, textureOptions.magFilter, textureOptions.wrapS, textureOptions.wrapT, textureOptions.internalFormat, textureOptions.format, textureOptions.type]; - } - else - { - return [NSString stringWithFormat:@"%.1fx%.1f-%d:%d:%d:%d:%d:%d:%d", size.width, size.height, textureOptions.minFilter, textureOptions.magFilter, textureOptions.wrapS, textureOptions.wrapT, textureOptions.internalFormat, textureOptions.format, textureOptions.type]; - } -} - -- (GPUImageFramebuffer *)fetchFramebufferForSize:(CGSize)framebufferSize textureOptions:(GPUTextureOptions)textureOptions onlyTexture:(BOOL)onlyTexture; -{ - __block GPUImageFramebuffer *framebufferFromCache = nil; -// dispatch_sync(framebufferCacheQueue, ^{ - runSynchronouslyOnVideoProcessingQueue(^{ - NSString *lookupHash = [self hashForSize:framebufferSize textureOptions:textureOptions onlyTexture:onlyTexture]; - NSNumber *numberOfMatchingTexturesInCache = [framebufferTypeCounts objectForKey:lookupHash]; - NSInteger numberOfMatchingTextures = [numberOfMatchingTexturesInCache integerValue]; - - if ([numberOfMatchingTexturesInCache integerValue] < 1) - { - // Nothing in the cache, create a new framebuffer to use - framebufferFromCache = [[GPUImageFramebuffer alloc] initWithSize:framebufferSize textureOptions:textureOptions onlyTexture:onlyTexture]; - } - else - { - // Something found, pull the old framebuffer and decrement the count - NSInteger currentTextureID = (numberOfMatchingTextures - 1); - while ((framebufferFromCache == nil) && (currentTextureID >= 0)) - { - NSString *textureHash = [NSString stringWithFormat:@"%@-%ld", lookupHash, (long)currentTextureID]; - framebufferFromCache = [framebufferCache objectForKey:textureHash]; - // Test the values in the cache first, to see if they got invalidated behind our back - if (framebufferFromCache != nil) - { - // Withdraw this from the cache while it's in use - [framebufferCache removeObjectForKey:textureHash]; - } - currentTextureID--; - } - - currentTextureID++; - - [framebufferTypeCounts setObject:[NSNumber numberWithInteger:currentTextureID] forKey:lookupHash]; - - if (framebufferFromCache == nil) - { - framebufferFromCache = [[GPUImageFramebuffer alloc] initWithSize:framebufferSize textureOptions:textureOptions onlyTexture:onlyTexture]; - } - } - }); - - [framebufferFromCache lock]; - return framebufferFromCache; -} - -- (GPUImageFramebuffer *)fetchFramebufferForSize:(CGSize)framebufferSize onlyTexture:(BOOL)onlyTexture; -{ - GPUTextureOptions defaultTextureOptions; - defaultTextureOptions.minFilter = GL_LINEAR; - defaultTextureOptions.magFilter = GL_LINEAR; - defaultTextureOptions.wrapS = GL_CLAMP_TO_EDGE; - defaultTextureOptions.wrapT = GL_CLAMP_TO_EDGE; - defaultTextureOptions.internalFormat = GL_RGBA; - defaultTextureOptions.format = GL_BGRA; - defaultTextureOptions.type = GL_UNSIGNED_BYTE; - - return [self fetchFramebufferForSize:framebufferSize textureOptions:defaultTextureOptions onlyTexture:onlyTexture]; -} - -- (void)returnFramebufferToCache:(GPUImageFramebuffer *)framebuffer; -{ - [framebuffer clearAllLocks]; - -// dispatch_async(framebufferCacheQueue, ^{ - runAsynchronouslyOnVideoProcessingQueue(^{ - CGSize framebufferSize = framebuffer.size; - GPUTextureOptions framebufferTextureOptions = framebuffer.textureOptions; - NSString *lookupHash = [self hashForSize:framebufferSize textureOptions:framebufferTextureOptions onlyTexture:framebuffer.missingFramebuffer]; - NSNumber *numberOfMatchingTexturesInCache = [framebufferTypeCounts objectForKey:lookupHash]; - NSInteger numberOfMatchingTextures = [numberOfMatchingTexturesInCache integerValue]; - - NSString *textureHash = [NSString stringWithFormat:@"%@-%ld", lookupHash, (long)numberOfMatchingTextures]; - -// [framebufferCache setObject:framebuffer forKey:textureHash cost:round(framebufferSize.width * framebufferSize.height * 4.0)]; - [framebufferCache setObject:framebuffer forKey:textureHash]; - [framebufferTypeCounts setObject:[NSNumber numberWithInteger:(numberOfMatchingTextures + 1)] forKey:lookupHash]; - }); -} - -- (void)purgeAllUnassignedFramebuffers; -{ - runAsynchronouslyOnVideoProcessingQueue(^{ -// dispatch_async(framebufferCacheQueue, ^{ - [framebufferCache removeAllObjects]; - [framebufferTypeCounts removeAllObjects]; -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - CVOpenGLESTextureCacheFlush([[GPUImageContext sharedImageProcessingContext] coreVideoTextureCache], 0); -#else -#endif - }); -} - -- (void)addFramebufferToActiveImageCaptureList:(GPUImageFramebuffer *)framebuffer; -{ - runAsynchronouslyOnVideoProcessingQueue(^{ -// dispatch_async(framebufferCacheQueue, ^{ - [activeImageCaptureList addObject:framebuffer]; - }); -} - -- (void)removeFramebufferFromActiveImageCaptureList:(GPUImageFramebuffer *)framebuffer; -{ - runAsynchronouslyOnVideoProcessingQueue(^{ -// dispatch_async(framebufferCacheQueue, ^{ - [activeImageCaptureList removeObject:framebuffer]; - }); -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGammaFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGammaFilter.h deleted file mode 100755 index 0521d089..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGammaFilter.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageGammaFilter : GPUImageFilter -{ - GLint gammaUniform; -} - -// Gamma ranges from 0.0 to 3.0, with 1.0 as the normal level -@property(readwrite, nonatomic) CGFloat gamma; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGammaFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGammaFilter.m deleted file mode 100755 index 35adaba2..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGammaFilter.m +++ /dev/null @@ -1,66 +0,0 @@ -#import "GPUImageGammaFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageGammaFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform lowp float gamma; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4(pow(textureColor.rgb, vec3(gamma)), textureColor.w); - } -); -#else -NSString *const kGPUImageGammaFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float gamma; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4(pow(textureColor.rgb, vec3(gamma)), textureColor.w); - } -); -#endif - -@implementation GPUImageGammaFilter - -@synthesize gamma = _gamma; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageGammaFragmentShaderString])) - { - return nil; - } - - gammaUniform = [filterProgram uniformIndex:@"gamma"]; - self.gamma = 1.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setGamma:(CGFloat)newValue; -{ - _gamma = newValue; - - [self setFloat:_gamma forUniform:gammaUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianBlurFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianBlurFilter.h deleted file mode 100755 index 1fb7a137..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianBlurFilter.h +++ /dev/null @@ -1,36 +0,0 @@ -#import "GPUImageTwoPassTextureSamplingFilter.h" - -/** A Gaussian blur filter - Interpolated optimization based on Daniel Rákos' work at http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/ - */ - -@interface GPUImageGaussianBlurFilter : GPUImageTwoPassTextureSamplingFilter -{ - BOOL shouldResizeBlurRadiusWithImageSize; - CGFloat _blurRadiusInPixels; -} - -/** A multiplier for the spacing between texels, ranging from 0.0 on up, with a default of 1.0. Adjusting this may slightly increase the blur strength, but will introduce artifacts in the result. - */ -@property (readwrite, nonatomic) CGFloat texelSpacingMultiplier; - -/** A radius in pixels to use for the blur, with a default of 2.0. This adjusts the sigma variable in the Gaussian distribution function. - */ -@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; - -/** Setting these properties will allow the blur radius to scale with the size of the image. These properties are mutually exclusive; setting either will set the other to 0. - */ -@property (readwrite, nonatomic) CGFloat blurRadiusAsFractionOfImageWidth; -@property (readwrite, nonatomic) CGFloat blurRadiusAsFractionOfImageHeight; - -/// The number of times to sequentially blur the incoming image. The more passes, the slower the filter. -@property(readwrite, nonatomic) NSUInteger blurPasses; - -+ (NSString *)vertexShaderForStandardBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; -+ (NSString *)fragmentShaderForStandardBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; -+ (NSString *)vertexShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; -+ (NSString *)fragmentShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; - -- (void)switchToVertexShader:(NSString *)newVertexShader fragmentShader:(NSString *)newFragmentShader; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianBlurFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianBlurFilter.m deleted file mode 100755 index ec99352a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianBlurFilter.m +++ /dev/null @@ -1,513 +0,0 @@ -#import "GPUImageGaussianBlurFilter.h" - -@implementation GPUImageGaussianBlurFilter - -@synthesize texelSpacingMultiplier = _texelSpacingMultiplier; -@synthesize blurRadiusInPixels = _blurRadiusInPixels; -@synthesize blurRadiusAsFractionOfImageWidth = _blurRadiusAsFractionOfImageWidth; -@synthesize blurRadiusAsFractionOfImageHeight = _blurRadiusAsFractionOfImageHeight; -@synthesize blurPasses = _blurPasses; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithFirstStageVertexShaderFromString:(NSString *)firstStageVertexShaderString firstStageFragmentShaderFromString:(NSString *)firstStageFragmentShaderString secondStageVertexShaderFromString:(NSString *)secondStageVertexShaderString secondStageFragmentShaderFromString:(NSString *)secondStageFragmentShaderString -{ - if (!(self = [super initWithFirstStageVertexShaderFromString:firstStageVertexShaderString firstStageFragmentShaderFromString:firstStageFragmentShaderString secondStageVertexShaderFromString:secondStageVertexShaderString secondStageFragmentShaderFromString:secondStageFragmentShaderString])) - { - return nil; - } - - self.texelSpacingMultiplier = 1.0; - _blurRadiusInPixels = 2.0; - shouldResizeBlurRadiusWithImageSize = NO; - - return self; -} - -- (id)init; -{ - NSString *currentGaussianBlurVertexShader = [[self class] vertexShaderForOptimizedBlurOfRadius:4 sigma:2.0]; - NSString *currentGaussianBlurFragmentShader = [[self class] fragmentShaderForOptimizedBlurOfRadius:4 sigma:2.0]; - - return [self initWithFirstStageVertexShaderFromString:currentGaussianBlurVertexShader firstStageFragmentShaderFromString:currentGaussianBlurFragmentShader secondStageVertexShaderFromString:currentGaussianBlurVertexShader secondStageFragmentShaderFromString:currentGaussianBlurFragmentShader]; -} - -#pragma mark - -#pragma mark Auto-generation of optimized Gaussian shaders - -// "Implementation limit of 32 varying components exceeded" - Max number of varyings for these GPUs - -+ (NSString *)vertexShaderForStandardBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; -{ - if (blurRadius < 1) - { - return kGPUImageVertexShaderString; - } - -// NSLog(@"Max varyings: %d", [GPUImageContext maximumVaryingVectorsForThisDevice]); - NSMutableString *shaderString = [[NSMutableString alloc] init]; - - // Header - [shaderString appendFormat:@"\ - attribute vec4 position;\n\ - attribute vec4 inputTextureCoordinate;\n\ - \n\ - uniform float texelWidthOffset;\n\ - uniform float texelHeightOffset;\n\ - \n\ - varying vec2 blurCoordinates[%lu];\n\ - \n\ - void main()\n\ - {\n\ - gl_Position = position;\n\ - \n\ - vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset);\n", (unsigned long)(blurRadius * 2 + 1) ]; - - // Inner offset loop - for (NSUInteger currentBlurCoordinateIndex = 0; currentBlurCoordinateIndex < (blurRadius * 2 + 1); currentBlurCoordinateIndex++) - { - NSInteger offsetFromCenter = currentBlurCoordinateIndex - blurRadius; - if (offsetFromCenter < 0) - { - [shaderString appendFormat:@"blurCoordinates[%ld] = inputTextureCoordinate.xy - singleStepOffset * %f;\n", (unsigned long)currentBlurCoordinateIndex, (GLfloat)(-offsetFromCenter)]; - } - else if (offsetFromCenter > 0) - { - [shaderString appendFormat:@"blurCoordinates[%ld] = inputTextureCoordinate.xy + singleStepOffset * %f;\n", (unsigned long)currentBlurCoordinateIndex, (GLfloat)(offsetFromCenter)]; - } - else - { - [shaderString appendFormat:@"blurCoordinates[%ld] = inputTextureCoordinate.xy;\n", (unsigned long)currentBlurCoordinateIndex]; - } - } - - // Footer - [shaderString appendString:@"}\n"]; - - return shaderString; -} - -+ (NSString *)fragmentShaderForStandardBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; -{ - if (blurRadius < 1) - { - return kGPUImagePassthroughFragmentShaderString; - } - - // First, generate the normal Gaussian weights for a given sigma - GLfloat *standardGaussianWeights = calloc(blurRadius + 1, sizeof(GLfloat)); - GLfloat sumOfWeights = 0.0; - for (NSUInteger currentGaussianWeightIndex = 0; currentGaussianWeightIndex < blurRadius + 1; currentGaussianWeightIndex++) - { - standardGaussianWeights[currentGaussianWeightIndex] = (1.0 / sqrt(2.0 * M_PI * pow(sigma, 2.0))) * exp(-pow(currentGaussianWeightIndex, 2.0) / (2.0 * pow(sigma, 2.0))); - - if (currentGaussianWeightIndex == 0) - { - sumOfWeights += standardGaussianWeights[currentGaussianWeightIndex]; - } - else - { - sumOfWeights += 2.0 * standardGaussianWeights[currentGaussianWeightIndex]; - } - } - - // Next, normalize these weights to prevent the clipping of the Gaussian curve at the end of the discrete samples from reducing luminance - for (NSUInteger currentGaussianWeightIndex = 0; currentGaussianWeightIndex < blurRadius + 1; currentGaussianWeightIndex++) - { - standardGaussianWeights[currentGaussianWeightIndex] = standardGaussianWeights[currentGaussianWeightIndex] / sumOfWeights; - } - - // Finally, generate the shader from these weights - NSMutableString *shaderString = [[NSMutableString alloc] init]; - - // Header -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - [shaderString appendFormat:@"\ - uniform sampler2D inputImageTexture;\n\ - \n\ - varying highp vec2 blurCoordinates[%lu];\n\ - \n\ - void main()\n\ - {\n\ - lowp vec4 sum = vec4(0.0);\n", (unsigned long)(blurRadius * 2 + 1) ]; -#else - [shaderString appendFormat:@"\ - uniform sampler2D inputImageTexture;\n\ - \n\ - varying vec2 blurCoordinates[%lu];\n\ - \n\ - void main()\n\ - {\n\ - vec4 sum = vec4(0.0);\n", (blurRadius * 2 + 1) ]; -#endif - - // Inner texture loop - for (NSUInteger currentBlurCoordinateIndex = 0; currentBlurCoordinateIndex < (blurRadius * 2 + 1); currentBlurCoordinateIndex++) - { - NSInteger offsetFromCenter = currentBlurCoordinateIndex - blurRadius; - if (offsetFromCenter < 0) - { - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[%lu]) * %f;\n", (unsigned long)currentBlurCoordinateIndex, standardGaussianWeights[-offsetFromCenter]]; - } - else - { - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[%lu]) * %f;\n", (unsigned long)currentBlurCoordinateIndex, standardGaussianWeights[offsetFromCenter]]; - } - } - - // Footer - [shaderString appendString:@"\ - gl_FragColor = sum;\n\ - }\n"]; - - free(standardGaussianWeights); - return shaderString; -} - -+ (NSString *)vertexShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; -{ - if (blurRadius < 1) - { - return kGPUImageVertexShaderString; - } - - // First, generate the normal Gaussian weights for a given sigma - GLfloat *standardGaussianWeights = calloc(blurRadius + 1, sizeof(GLfloat)); - GLfloat sumOfWeights = 0.0; - for (NSUInteger currentGaussianWeightIndex = 0; currentGaussianWeightIndex < blurRadius + 1; currentGaussianWeightIndex++) - { - standardGaussianWeights[currentGaussianWeightIndex] = (1.0 / sqrt(2.0 * M_PI * pow(sigma, 2.0))) * exp(-pow(currentGaussianWeightIndex, 2.0) / (2.0 * pow(sigma, 2.0))); - - if (currentGaussianWeightIndex == 0) - { - sumOfWeights += standardGaussianWeights[currentGaussianWeightIndex]; - } - else - { - sumOfWeights += 2.0 * standardGaussianWeights[currentGaussianWeightIndex]; - } - } - - // Next, normalize these weights to prevent the clipping of the Gaussian curve at the end of the discrete samples from reducing luminance - for (NSUInteger currentGaussianWeightIndex = 0; currentGaussianWeightIndex < blurRadius + 1; currentGaussianWeightIndex++) - { - standardGaussianWeights[currentGaussianWeightIndex] = standardGaussianWeights[currentGaussianWeightIndex] / sumOfWeights; - } - - // From these weights we calculate the offsets to read interpolated values from - NSUInteger numberOfOptimizedOffsets = MIN(blurRadius / 2 + (blurRadius % 2), 7); - GLfloat *optimizedGaussianOffsets = calloc(numberOfOptimizedOffsets, sizeof(GLfloat)); - - for (NSUInteger currentOptimizedOffset = 0; currentOptimizedOffset < numberOfOptimizedOffsets; currentOptimizedOffset++) - { - GLfloat firstWeight = standardGaussianWeights[currentOptimizedOffset*2 + 1]; - GLfloat secondWeight = standardGaussianWeights[currentOptimizedOffset*2 + 2]; - - GLfloat optimizedWeight = firstWeight + secondWeight; - - optimizedGaussianOffsets[currentOptimizedOffset] = (firstWeight * (currentOptimizedOffset*2 + 1) + secondWeight * (currentOptimizedOffset*2 + 2)) / optimizedWeight; - } - - NSMutableString *shaderString = [[NSMutableString alloc] init]; - // Header - [shaderString appendFormat:@"\ - attribute vec4 position;\n\ - attribute vec4 inputTextureCoordinate;\n\ - \n\ - uniform float texelWidthOffset;\n\ - uniform float texelHeightOffset;\n\ - \n\ - varying vec2 blurCoordinates[%lu];\n\ - \n\ - void main()\n\ - {\n\ - gl_Position = position;\n\ - \n\ - vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset);\n", (unsigned long)(1 + (numberOfOptimizedOffsets * 2))]; - - // Inner offset loop - [shaderString appendString:@"blurCoordinates[0] = inputTextureCoordinate.xy;\n"]; - for (NSUInteger currentOptimizedOffset = 0; currentOptimizedOffset < numberOfOptimizedOffsets; currentOptimizedOffset++) - { - [shaderString appendFormat:@"\ - blurCoordinates[%lu] = inputTextureCoordinate.xy + singleStepOffset * %f;\n\ - blurCoordinates[%lu] = inputTextureCoordinate.xy - singleStepOffset * %f;\n", (unsigned long)((currentOptimizedOffset * 2) + 1), optimizedGaussianOffsets[currentOptimizedOffset], (unsigned long)((currentOptimizedOffset * 2) + 2), optimizedGaussianOffsets[currentOptimizedOffset]]; - } - - // Footer - [shaderString appendString:@"}\n"]; - - free(optimizedGaussianOffsets); - free(standardGaussianWeights); - return shaderString; -} - -+ (NSString *)fragmentShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; -{ - if (blurRadius < 1) - { - return kGPUImagePassthroughFragmentShaderString; - } - - // First, generate the normal Gaussian weights for a given sigma - GLfloat *standardGaussianWeights = calloc(blurRadius + 1, sizeof(GLfloat)); - GLfloat sumOfWeights = 0.0; - for (NSUInteger currentGaussianWeightIndex = 0; currentGaussianWeightIndex < blurRadius + 1; currentGaussianWeightIndex++) - { - standardGaussianWeights[currentGaussianWeightIndex] = (1.0 / sqrt(2.0 * M_PI * pow(sigma, 2.0))) * exp(-pow(currentGaussianWeightIndex, 2.0) / (2.0 * pow(sigma, 2.0))); - - if (currentGaussianWeightIndex == 0) - { - sumOfWeights += standardGaussianWeights[currentGaussianWeightIndex]; - } - else - { - sumOfWeights += 2.0 * standardGaussianWeights[currentGaussianWeightIndex]; - } - } - - // Next, normalize these weights to prevent the clipping of the Gaussian curve at the end of the discrete samples from reducing luminance - for (NSUInteger currentGaussianWeightIndex = 0; currentGaussianWeightIndex < blurRadius + 1; currentGaussianWeightIndex++) - { - standardGaussianWeights[currentGaussianWeightIndex] = standardGaussianWeights[currentGaussianWeightIndex] / sumOfWeights; - } - - // From these weights we calculate the offsets to read interpolated values from - NSUInteger numberOfOptimizedOffsets = MIN(blurRadius / 2 + (blurRadius % 2), 7); - NSUInteger trueNumberOfOptimizedOffsets = blurRadius / 2 + (blurRadius % 2); - - NSMutableString *shaderString = [[NSMutableString alloc] init]; - - // Header -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - [shaderString appendFormat:@"\ - uniform sampler2D inputImageTexture;\n\ - uniform highp float texelWidthOffset;\n\ - uniform highp float texelHeightOffset;\n\ - \n\ - varying highp vec2 blurCoordinates[%lu];\n\ - \n\ - void main()\n\ - {\n\ - lowp vec4 sum = vec4(0.0);\n", (unsigned long)(1 + (numberOfOptimizedOffsets * 2)) ]; -#else - [shaderString appendFormat:@"\ - uniform sampler2D inputImageTexture;\n\ - uniform float texelWidthOffset;\n\ - uniform float texelHeightOffset;\n\ - \n\ - varying vec2 blurCoordinates[%lu];\n\ - \n\ - void main()\n\ - {\n\ - vec4 sum = vec4(0.0);\n", 1 + (numberOfOptimizedOffsets * 2) ]; -#endif - - // Inner texture loop - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[0]) * %f;\n", standardGaussianWeights[0]]; - - for (NSUInteger currentBlurCoordinateIndex = 0; currentBlurCoordinateIndex < numberOfOptimizedOffsets; currentBlurCoordinateIndex++) - { - GLfloat firstWeight = standardGaussianWeights[currentBlurCoordinateIndex * 2 + 1]; - GLfloat secondWeight = standardGaussianWeights[currentBlurCoordinateIndex * 2 + 2]; - GLfloat optimizedWeight = firstWeight + secondWeight; - - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[%lu]) * %f;\n", (unsigned long)((currentBlurCoordinateIndex * 2) + 1), optimizedWeight]; - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[%lu]) * %f;\n", (unsigned long)((currentBlurCoordinateIndex * 2) + 2), optimizedWeight]; - } - - // If the number of required samples exceeds the amount we can pass in via varyings, we have to do dependent texture reads in the fragment shader - if (trueNumberOfOptimizedOffsets > numberOfOptimizedOffsets) - { -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - [shaderString appendString:@"highp vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset);\n"]; -#else - [shaderString appendString:@"vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset);\n"]; -#endif - - for (NSUInteger currentOverlowTextureRead = numberOfOptimizedOffsets; currentOverlowTextureRead < trueNumberOfOptimizedOffsets; currentOverlowTextureRead++) - { - GLfloat firstWeight = standardGaussianWeights[currentOverlowTextureRead * 2 + 1]; - GLfloat secondWeight = standardGaussianWeights[currentOverlowTextureRead * 2 + 2]; - - GLfloat optimizedWeight = firstWeight + secondWeight; - GLfloat optimizedOffset = (firstWeight * (currentOverlowTextureRead * 2 + 1) + secondWeight * (currentOverlowTextureRead * 2 + 2)) / optimizedWeight; - - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[0] + singleStepOffset * %f) * %f;\n", optimizedOffset, optimizedWeight]; - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[0] - singleStepOffset * %f) * %f;\n", optimizedOffset, optimizedWeight]; - } - } - - // Footer - [shaderString appendString:@"\ - gl_FragColor = sum;\n\ - }\n"]; - - free(standardGaussianWeights); - return shaderString; -} - -- (void)setupFilterForSize:(CGSize)filterFrameSize; -{ - [super setupFilterForSize:filterFrameSize]; - - if (shouldResizeBlurRadiusWithImageSize) - { - if (self.blurRadiusAsFractionOfImageWidth > 0) - { - self.blurRadiusInPixels = filterFrameSize.width * self.blurRadiusAsFractionOfImageWidth; - } - else - { - self.blurRadiusInPixels = filterFrameSize.height * self.blurRadiusAsFractionOfImageHeight; - } - } -} - -#pragma mark - -#pragma mark Rendering - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - [super renderToTextureWithVertices:vertices textureCoordinates:textureCoordinates]; - - for (NSUInteger currentAdditionalBlurPass = 1; currentAdditionalBlurPass < _blurPasses; currentAdditionalBlurPass++) - { - [super renderToTextureWithVertices:vertices textureCoordinates:[[self class] textureCoordinatesForRotation:kGPUImageNoRotation]]; - } -} - -- (void)switchToVertexShader:(NSString *)newVertexShader fragmentShader:(NSString *)newFragmentShader; -{ - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - - filterProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:newVertexShader fragmentShaderString:newFragmentShader]; - - if (!filterProgram.initialized) - { - [self initializeAttributes]; - - if (![filterProgram link]) - { - NSString *progLog = [filterProgram programLog]; - NSLog(@"Program link log: %@", progLog); - NSString *fragLog = [filterProgram fragmentShaderLog]; - NSLog(@"Fragment shader compile log: %@", fragLog); - NSString *vertLog = [filterProgram vertexShaderLog]; - NSLog(@"Vertex shader compile log: %@", vertLog); - filterProgram = nil; - NSAssert(NO, @"Filter shader link failed"); - } - } - - filterPositionAttribute = [filterProgram attributeIndex:@"position"]; - filterTextureCoordinateAttribute = [filterProgram attributeIndex:@"inputTextureCoordinate"]; - filterInputTextureUniform = [filterProgram uniformIndex:@"inputImageTexture"]; // This does assume a name of "inputImageTexture" for the fragment shader - verticalPassTexelWidthOffsetUniform = [filterProgram uniformIndex:@"texelWidthOffset"]; - verticalPassTexelHeightOffsetUniform = [filterProgram uniformIndex:@"texelHeightOffset"]; - [GPUImageContext setActiveShaderProgram:filterProgram]; - - glEnableVertexAttribArray(filterPositionAttribute); - glEnableVertexAttribArray(filterTextureCoordinateAttribute); - - secondFilterProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:newVertexShader fragmentShaderString:newFragmentShader]; - - if (!secondFilterProgram.initialized) - { - [self initializeSecondaryAttributes]; - - if (![secondFilterProgram link]) - { - NSString *progLog = [secondFilterProgram programLog]; - NSLog(@"Program link log: %@", progLog); - NSString *fragLog = [secondFilterProgram fragmentShaderLog]; - NSLog(@"Fragment shader compile log: %@", fragLog); - NSString *vertLog = [secondFilterProgram vertexShaderLog]; - NSLog(@"Vertex shader compile log: %@", vertLog); - secondFilterProgram = nil; - NSAssert(NO, @"Filter shader link failed"); - } - } - - secondFilterPositionAttribute = [secondFilterProgram attributeIndex:@"position"]; - secondFilterTextureCoordinateAttribute = [secondFilterProgram attributeIndex:@"inputTextureCoordinate"]; - secondFilterInputTextureUniform = [secondFilterProgram uniformIndex:@"inputImageTexture"]; // This does assume a name of "inputImageTexture" for the fragment shader - secondFilterInputTextureUniform2 = [secondFilterProgram uniformIndex:@"inputImageTexture2"]; // This does assume a name of "inputImageTexture2" for second input texture in the fragment shader - horizontalPassTexelWidthOffsetUniform = [secondFilterProgram uniformIndex:@"texelWidthOffset"]; - horizontalPassTexelHeightOffsetUniform = [secondFilterProgram uniformIndex:@"texelHeightOffset"]; - [GPUImageContext setActiveShaderProgram:secondFilterProgram]; - - glEnableVertexAttribArray(secondFilterPositionAttribute); - glEnableVertexAttribArray(secondFilterTextureCoordinateAttribute); - - [self setupFilterForSize:[self sizeOfFBO]]; - glFinish(); - }); - -} - -#pragma mark - -#pragma mark Accessors - -- (void)setTexelSpacingMultiplier:(CGFloat)newValue; -{ - _texelSpacingMultiplier = newValue; - - _verticalTexelSpacing = _texelSpacingMultiplier; - _horizontalTexelSpacing = _texelSpacingMultiplier; - - [self setupFilterForSize:[self sizeOfFBO]]; -} - -// inputRadius for Core Image's CIGaussianBlur is really sigma in the Gaussian equation, so I'm using that for my blur radius, to be consistent -- (void)setBlurRadiusInPixels:(CGFloat)newValue; -{ - // 7.0 is the limit for blur size for hardcoded varying offsets - - if (round(newValue) != _blurRadiusInPixels) - { - _blurRadiusInPixels = round(newValue); // For now, only do integral sigmas - - NSUInteger calculatedSampleRadius = 0; - if (_blurRadiusInPixels >= 1) // Avoid a divide-by-zero error here - { - // Calculate the number of pixels to sample from by setting a bottom limit for the contribution of the outermost pixel - CGFloat minimumWeightToFindEdgeOfSamplingArea = 1.0/256.0; - calculatedSampleRadius = floor(sqrt(-2.0 * pow(_blurRadiusInPixels, 2.0) * log(minimumWeightToFindEdgeOfSamplingArea * sqrt(2.0 * M_PI * pow(_blurRadiusInPixels, 2.0))) )); - calculatedSampleRadius += calculatedSampleRadius % 2; // There's nothing to gain from handling odd radius sizes, due to the optimizations I use - } - -// NSLog(@"Blur radius: %f, calculated sample radius: %d", _blurRadiusInPixels, calculatedSampleRadius); -// - NSString *newGaussianBlurVertexShader = [[self class] vertexShaderForOptimizedBlurOfRadius:calculatedSampleRadius sigma:_blurRadiusInPixels]; - NSString *newGaussianBlurFragmentShader = [[self class] fragmentShaderForOptimizedBlurOfRadius:calculatedSampleRadius sigma:_blurRadiusInPixels]; - -// NSLog(@"Optimized vertex shader: \n%@", newGaussianBlurVertexShader); -// NSLog(@"Optimized fragment shader: \n%@", newGaussianBlurFragmentShader); -// - [self switchToVertexShader:newGaussianBlurVertexShader fragmentShader:newGaussianBlurFragmentShader]; - } - shouldResizeBlurRadiusWithImageSize = NO; -} - -- (void)setBlurRadiusAsFractionOfImageWidth:(CGFloat)blurRadiusAsFractionOfImageWidth -{ - if (blurRadiusAsFractionOfImageWidth < 0) return; - - shouldResizeBlurRadiusWithImageSize = _blurRadiusAsFractionOfImageWidth != blurRadiusAsFractionOfImageWidth && blurRadiusAsFractionOfImageWidth > 0; - _blurRadiusAsFractionOfImageWidth = blurRadiusAsFractionOfImageWidth; - _blurRadiusAsFractionOfImageHeight = 0; -} - -- (void)setBlurRadiusAsFractionOfImageHeight:(CGFloat)blurRadiusAsFractionOfImageHeight -{ - if (blurRadiusAsFractionOfImageHeight < 0) return; - - shouldResizeBlurRadiusWithImageSize = _blurRadiusAsFractionOfImageHeight != blurRadiusAsFractionOfImageHeight && blurRadiusAsFractionOfImageHeight > 0; - _blurRadiusAsFractionOfImageHeight = blurRadiusAsFractionOfImageHeight; - _blurRadiusAsFractionOfImageWidth = 0; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianBlurPositionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianBlurPositionFilter.h deleted file mode 100755 index dc88a563..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianBlurPositionFilter.h +++ /dev/null @@ -1,22 +0,0 @@ -#import "GPUImageTwoPassTextureSamplingFilter.h" - -/** A more generalized 9x9 Gaussian blur filter - */ -@interface GPUImageGaussianBlurPositionFilter : GPUImageTwoPassTextureSamplingFilter -{ - GLint blurCenterUniform, blurRadiusUniform, aspectRatioUniform; -} - -/** A multiplier for the blur size, ranging from 0.0 on up, with a default of 1.0 - */ -@property (readwrite, nonatomic) CGFloat blurSize; - -/** Center for the blur, defaults to 0.5, 0.5 - */ -@property (readwrite, nonatomic) CGPoint blurCenter; - -/** Radius for the blur, defaults to 1.0 - */ -@property (readwrite, nonatomic) CGFloat blurRadius; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianBlurPositionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianBlurPositionFilter.m deleted file mode 100755 index 8ecd9246..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianBlurPositionFilter.m +++ /dev/null @@ -1,232 +0,0 @@ -#import "GPUImageGaussianBlurPositionFilter.h" - -NSString *const kGPUImageGaussianBlurPositionVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - - const int GAUSSIAN_SAMPLES = 9; - - uniform float texelWidthOffset; - uniform float texelHeightOffset; - varying vec2 textureCoordinate; - varying vec2 blurCoordinates[GAUSSIAN_SAMPLES]; - - void main() - { - gl_Position = position; - textureCoordinate = inputTextureCoordinate.xy; - - // Calculate the positions for the blur - int multiplier = 0; - vec2 blurStep; - vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset); - - for (int i = 0; i < GAUSSIAN_SAMPLES; i++) { - multiplier = (i - ((GAUSSIAN_SAMPLES - 1) / 2)); - // Blur in x (horizontal) - blurStep = float(multiplier) * singleStepOffset; - blurCoordinates[i] = inputTextureCoordinate.xy + blurStep; - } - } -); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageGaussianBlurPositionFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - const lowp int GAUSSIAN_SAMPLES = 9; - - varying highp vec2 textureCoordinate; - varying highp vec2 blurCoordinates[GAUSSIAN_SAMPLES]; - - uniform highp float aspectRatio; - uniform lowp vec2 blurCenter; - uniform highp float blurRadius; - - void main() { - highp vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - highp float dist = distance(blurCenter, textureCoordinateToUse); - - if (dist < blurRadius) - { - lowp vec4 sum = vec4(0.0); - - sum += texture2D(inputImageTexture, blurCoordinates[0]) * 0.05; - sum += texture2D(inputImageTexture, blurCoordinates[1]) * 0.09; - sum += texture2D(inputImageTexture, blurCoordinates[2]) * 0.12; - sum += texture2D(inputImageTexture, blurCoordinates[3]) * 0.15; - sum += texture2D(inputImageTexture, blurCoordinates[4]) * 0.18; - sum += texture2D(inputImageTexture, blurCoordinates[5]) * 0.15; - sum += texture2D(inputImageTexture, blurCoordinates[6]) * 0.12; - sum += texture2D(inputImageTexture, blurCoordinates[7]) * 0.09; - sum += texture2D(inputImageTexture, blurCoordinates[8]) * 0.05; - - gl_FragColor = sum; - } - else - { - gl_FragColor = texture2D(inputImageTexture, textureCoordinate); - } - } -); -#else -NSString *const kGPUImageGaussianBlurPositionFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - const int GAUSSIAN_SAMPLES = 9; - - varying vec2 textureCoordinate; - varying vec2 blurCoordinates[GAUSSIAN_SAMPLES]; - - uniform float aspectRatio; - uniform vec2 blurCenter; - uniform float blurRadius; - - void main() - { - vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - float dist = distance(blurCenter, textureCoordinateToUse); - - if (dist < blurRadius) - { - vec4 sum = vec4(0.0); - - sum += texture2D(inputImageTexture, blurCoordinates[0]) * 0.05; - sum += texture2D(inputImageTexture, blurCoordinates[1]) * 0.09; - sum += texture2D(inputImageTexture, blurCoordinates[2]) * 0.12; - sum += texture2D(inputImageTexture, blurCoordinates[3]) * 0.15; - sum += texture2D(inputImageTexture, blurCoordinates[4]) * 0.18; - sum += texture2D(inputImageTexture, blurCoordinates[5]) * 0.15; - sum += texture2D(inputImageTexture, blurCoordinates[6]) * 0.12; - sum += texture2D(inputImageTexture, blurCoordinates[7]) * 0.09; - sum += texture2D(inputImageTexture, blurCoordinates[8]) * 0.05; - - gl_FragColor = sum; - } - else - { - gl_FragColor = texture2D(inputImageTexture, textureCoordinate); - } - } -); -#endif - -@interface GPUImageGaussianBlurPositionFilter () - -- (void)adjustAspectRatio; - -@property (readwrite, nonatomic) CGFloat aspectRatio; - -@end - -@implementation GPUImageGaussianBlurPositionFilter - -@synthesize blurSize = _blurSize; -@synthesize blurCenter = _blurCenter; -@synthesize aspectRatio = _aspectRatio; - -- (id) initWithFirstStageVertexShaderFromString:(NSString *)firstStageVertexShaderString - firstStageFragmentShaderFromString:(NSString *)firstStageFragmentShaderString - secondStageVertexShaderFromString:(NSString *)secondStageVertexShaderString - secondStageFragmentShaderFromString:(NSString *)secondStageFragmentShaderString { - - if (!(self = [super initWithFirstStageVertexShaderFromString:firstStageVertexShaderString ? firstStageVertexShaderString : kGPUImageGaussianBlurPositionVertexShaderString - firstStageFragmentShaderFromString:firstStageFragmentShaderString ? firstStageFragmentShaderString : kGPUImageGaussianBlurPositionFragmentShaderString - secondStageVertexShaderFromString:secondStageVertexShaderString ? secondStageVertexShaderString : kGPUImageGaussianBlurPositionVertexShaderString - secondStageFragmentShaderFromString:secondStageFragmentShaderString ? secondStageFragmentShaderString : kGPUImageGaussianBlurPositionFragmentShaderString])) { - return nil; - } - - aspectRatioUniform = [secondFilterProgram uniformIndex:@"aspectRatio"]; - blurCenterUniform = [secondFilterProgram uniformIndex:@"blurCenter"]; - blurRadiusUniform = [secondFilterProgram uniformIndex:@"blurRadius"]; - - self.blurSize = 1.0; - self.blurRadius = 1.0; - self.blurCenter = CGPointMake(0.5, 0.5); - - return self; -} - -- (id)init; -{ - return [self initWithFirstStageVertexShaderFromString:nil - firstStageFragmentShaderFromString:nil - secondStageVertexShaderFromString:nil - secondStageFragmentShaderFromString:nil]; -} - -- (void)adjustAspectRatio; -{ - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - [self setAspectRatio:(inputTextureSize.width / inputTextureSize.height)]; - } - else - { - [self setAspectRatio:(inputTextureSize.height / inputTextureSize.width)]; - } -} - -- (void)forceProcessingAtSize:(CGSize)frameSize; -{ - [super forceProcessingAtSize:frameSize]; - [self adjustAspectRatio]; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - CGSize oldInputSize = inputTextureSize; - [super setInputSize:newSize atIndex:textureIndex]; - - if ( (!CGSizeEqualToSize(oldInputSize, inputTextureSize)) && (!CGSizeEqualToSize(newSize, CGSizeZero)) ) - { - [self adjustAspectRatio]; - } -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - [super setInputRotation:newInputRotation atIndex:textureIndex]; - [self setBlurCenter:self.blurCenter]; - [self adjustAspectRatio]; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setBlurSize:(CGFloat)newValue; -{ - _blurSize = newValue; - - _verticalTexelSpacing = _blurSize; - _horizontalTexelSpacing = _blurSize; - - [self setupFilterForSize:[self sizeOfFBO]]; -} - -- (void) setBlurCenter:(CGPoint)blurCenter; -{ - _blurCenter = blurCenter; - CGPoint rotatedPoint = [self rotatedPoint:blurCenter forRotation:inputRotation]; - [self setPoint:rotatedPoint forUniform:blurCenterUniform program:secondFilterProgram]; -} - -- (void) setBlurRadius:(CGFloat)blurRadius; -{ - _blurRadius = blurRadius; - - [self setFloat:_blurRadius forUniform:blurRadiusUniform program:secondFilterProgram]; -} - -- (void) setAspectRatio:(CGFloat)newValue; -{ - _aspectRatio = newValue; - - [self setFloat:_aspectRatio forUniform:aspectRatioUniform program:secondFilterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianSelectiveBlurFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianSelectiveBlurFilter.h deleted file mode 100755 index 02324566..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianSelectiveBlurFilter.h +++ /dev/null @@ -1,30 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImageGaussianBlurFilter; - -/** A Gaussian blur that preserves focus within a circular region - */ -@interface GPUImageGaussianSelectiveBlurFilter : GPUImageFilterGroup -{ - GPUImageGaussianBlurFilter *blurFilter; - GPUImageFilter *selectiveFocusFilter; - BOOL hasOverriddenAspectRatio; -} - -/** The radius of the circular area being excluded from the blur - */ -@property (readwrite, nonatomic) CGFloat excludeCircleRadius; -/** The center of the circular area being excluded from the blur - */ -@property (readwrite, nonatomic) CGPoint excludeCirclePoint; -/** The size of the area between the blurred portion and the clear circle - */ -@property (readwrite, nonatomic) CGFloat excludeBlurSize; -/** A radius in pixels to use for the blur, with a default of 5.0. This adjusts the sigma variable in the Gaussian distribution function. - */ -@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; -/** The aspect ratio of the image, used to adjust the circularity of the in-focus region. By default, this matches the image aspect ratio, but you can override this value. - */ -@property (readwrite, nonatomic) CGFloat aspectRatio; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianSelectiveBlurFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianSelectiveBlurFilter.m deleted file mode 100755 index 7ebc9e19..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGaussianSelectiveBlurFilter.m +++ /dev/null @@ -1,147 +0,0 @@ -#import "GPUImageGaussianSelectiveBlurFilter.h" -#import "GPUImageGaussianBlurFilter.h" -#import "GPUImageTwoInputFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageGaussianSelectiveBlurFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform lowp float excludeCircleRadius; - uniform lowp vec2 excludeCirclePoint; - uniform lowp float excludeBlurSize; - uniform highp float aspectRatio; - - void main() - { - lowp vec4 sharpImageColor = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 blurredImageColor = texture2D(inputImageTexture2, textureCoordinate2); - - highp vec2 textureCoordinateToUse = vec2(textureCoordinate2.x, (textureCoordinate2.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - highp float distanceFromCenter = distance(excludeCirclePoint, textureCoordinateToUse); - - gl_FragColor = mix(sharpImageColor, blurredImageColor, smoothstep(excludeCircleRadius - excludeBlurSize, excludeCircleRadius, distanceFromCenter)); - } -); -#else -NSString *const kGPUImageGaussianSelectiveBlurFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform float excludeCircleRadius; - uniform vec2 excludeCirclePoint; - uniform float excludeBlurSize; - uniform float aspectRatio; - - void main() - { - vec4 sharpImageColor = texture2D(inputImageTexture, textureCoordinate); - vec4 blurredImageColor = texture2D(inputImageTexture2, textureCoordinate2); - - vec2 textureCoordinateToUse = vec2(textureCoordinate2.x, (textureCoordinate2.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - float distanceFromCenter = distance(excludeCirclePoint, textureCoordinateToUse); - - gl_FragColor = mix(sharpImageColor, blurredImageColor, smoothstep(excludeCircleRadius - excludeBlurSize, excludeCircleRadius, distanceFromCenter)); - } -); -#endif - -@implementation GPUImageGaussianSelectiveBlurFilter - -@synthesize excludeCirclePoint = _excludeCirclePoint, excludeCircleRadius = _excludeCircleRadius, excludeBlurSize = _excludeBlurSize; -@synthesize blurRadiusInPixels = _blurRadiusInPixels; -@synthesize aspectRatio = _aspectRatio; - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - hasOverriddenAspectRatio = NO; - - // First pass: apply a variable Gaussian blur - blurFilter = [[GPUImageGaussianBlurFilter alloc] init]; - [self addFilter:blurFilter]; - - // Second pass: combine the blurred image with the original sharp one - selectiveFocusFilter = [[GPUImageTwoInputFilter alloc] initWithFragmentShaderFromString:kGPUImageGaussianSelectiveBlurFragmentShaderString]; - [self addFilter:selectiveFocusFilter]; - - // Texture location 0 needs to be the sharp image for both the blur and the second stage processing - [blurFilter addTarget:selectiveFocusFilter atTextureLocation:1]; - - // To prevent double updating of this filter, disable updates from the sharp image side - self.initialFilters = [NSArray arrayWithObjects:blurFilter, selectiveFocusFilter, nil]; - self.terminalFilter = selectiveFocusFilter; - - self.blurRadiusInPixels = 5.0; - - self.excludeCircleRadius = 60.0/320.0; - self.excludeCirclePoint = CGPointMake(0.5f, 0.5f); - self.excludeBlurSize = 30.0/320.0; - - return self; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - CGSize oldInputSize = inputTextureSize; - [super setInputSize:newSize atIndex:textureIndex]; - inputTextureSize = newSize; - - if ( (!CGSizeEqualToSize(oldInputSize, inputTextureSize)) && (!hasOverriddenAspectRatio) && (!CGSizeEqualToSize(newSize, CGSizeZero)) ) - { - _aspectRatio = (inputTextureSize.width / inputTextureSize.height); - [selectiveFocusFilter setFloat:_aspectRatio forUniformName:@"aspectRatio"]; - } -} - -#pragma mark - -#pragma mark Accessors - -- (void)setBlurRadiusInPixels:(CGFloat)newValue; -{ - blurFilter.blurRadiusInPixels = newValue; -} - -- (CGFloat)blurRadiusInPixels; -{ - return blurFilter.blurRadiusInPixels; -} - -- (void)setExcludeCirclePoint:(CGPoint)newValue; -{ - _excludeCirclePoint = newValue; - [selectiveFocusFilter setPoint:newValue forUniformName:@"excludeCirclePoint"]; -} - -- (void)setExcludeCircleRadius:(CGFloat)newValue; -{ - _excludeCircleRadius = newValue; - [selectiveFocusFilter setFloat:newValue forUniformName:@"excludeCircleRadius"]; -} - -- (void)setExcludeBlurSize:(CGFloat)newValue; -{ - _excludeBlurSize = newValue; - [selectiveFocusFilter setFloat:newValue forUniformName:@"excludeBlurSize"]; -} - -- (void)setAspectRatio:(CGFloat)newValue; -{ - hasOverriddenAspectRatio = YES; - _aspectRatio = newValue; - [selectiveFocusFilter setFloat:_aspectRatio forUniformName:@"aspectRatio"]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGlassSphereFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGlassSphereFilter.h deleted file mode 100644 index 809a4ee8..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGlassSphereFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageSphereRefractionFilter.h" - -@interface GPUImageGlassSphereFilter : GPUImageSphereRefractionFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGlassSphereFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGlassSphereFilter.m deleted file mode 100644 index 18662916..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGlassSphereFilter.m +++ /dev/null @@ -1,106 +0,0 @@ -#import "GPUImageGlassSphereFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageGlassSphereFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp vec2 center; - uniform highp float radius; - uniform highp float aspectRatio; - uniform highp float refractiveIndex; -// uniform vec3 lightPosition; - const highp vec3 lightPosition = vec3(-0.5, 0.5, 1.0); - const highp vec3 ambientLightPosition = vec3(0.0, 0.0, 1.0); - - void main() - { - highp vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - highp float distanceFromCenter = distance(center, textureCoordinateToUse); - lowp float checkForPresenceWithinSphere = step(distanceFromCenter, radius); - - distanceFromCenter = distanceFromCenter / radius; - - highp float normalizedDepth = radius * sqrt(1.0 - distanceFromCenter * distanceFromCenter); - highp vec3 sphereNormal = normalize(vec3(textureCoordinateToUse - center, normalizedDepth)); - - highp vec3 refractedVector = 2.0 * refract(vec3(0.0, 0.0, -1.0), sphereNormal, refractiveIndex); - refractedVector.xy = -refractedVector.xy; - - highp vec3 finalSphereColor = texture2D(inputImageTexture, (refractedVector.xy + 1.0) * 0.5).rgb; - - // Grazing angle lighting - highp float lightingIntensity = 2.5 * (1.0 - pow(clamp(dot(ambientLightPosition, sphereNormal), 0.0, 1.0), 0.25)); - finalSphereColor += lightingIntensity; - - // Specular lighting - lightingIntensity = clamp(dot(normalize(lightPosition), sphereNormal), 0.0, 1.0); - lightingIntensity = pow(lightingIntensity, 15.0); - finalSphereColor += vec3(0.8, 0.8, 0.8) * lightingIntensity; - - gl_FragColor = vec4(finalSphereColor, 1.0) * checkForPresenceWithinSphere; - } -); -#else -NSString *const kGPUImageGlassSphereFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform vec2 center; - uniform float radius; - uniform float aspectRatio; - uniform float refractiveIndex; - // uniform vec3 lightPosition; - const vec3 lightPosition = vec3(-0.5, 0.5, 1.0); - const vec3 ambientLightPosition = vec3(0.0, 0.0, 1.0); - - void main() - { - vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - float distanceFromCenter = distance(center, textureCoordinateToUse); - float checkForPresenceWithinSphere = step(distanceFromCenter, radius); - - distanceFromCenter = distanceFromCenter / radius; - - float normalizedDepth = radius * sqrt(1.0 - distanceFromCenter * distanceFromCenter); - vec3 sphereNormal = normalize(vec3(textureCoordinateToUse - center, normalizedDepth)); - - vec3 refractedVector = 2.0 * refract(vec3(0.0, 0.0, -1.0), sphereNormal, refractiveIndex); - refractedVector.xy = -refractedVector.xy; - - vec3 finalSphereColor = texture2D(inputImageTexture, (refractedVector.xy + 1.0) * 0.5).rgb; - - // Grazing angle lighting - float lightingIntensity = 2.5 * (1.0 - pow(clamp(dot(ambientLightPosition, sphereNormal), 0.0, 1.0), 0.25)); - finalSphereColor += lightingIntensity; - - // Specular lighting - lightingIntensity = clamp(dot(normalize(lightPosition), sphereNormal), 0.0, 1.0); - lightingIntensity = pow(lightingIntensity, 15.0); - finalSphereColor += vec3(0.8, 0.8, 0.8) * lightingIntensity; - - gl_FragColor = vec4(finalSphereColor, 1.0) * checkForPresenceWithinSphere; - } -); -#endif - -@implementation GPUImageGlassSphereFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageGlassSphereFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGrayscaleFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGrayscaleFilter.h deleted file mode 100755 index 2d97f8c3..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGrayscaleFilter.h +++ /dev/null @@ -1,9 +0,0 @@ -#import "GPUImageFilter.h" - -extern NSString *const kGPUImageLuminanceFragmentShaderString; - -/** Converts an image to grayscale (a slightly faster implementation of the saturation filter, without the ability to vary the color contribution) - */ -@interface GPUImageGrayscaleFilter : GPUImageFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGrayscaleFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGrayscaleFilter.m deleted file mode 100755 index 0066ca87..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageGrayscaleFilter.m +++ /dev/null @@ -1,141 +0,0 @@ -#import "GPUImageGrayscaleFilter.h" - -@implementation GPUImageGrayscaleFilter - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLuminanceFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - const highp vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float luminance = dot(textureColor.rgb, W); - - gl_FragColor = vec4(vec3(luminance), textureColor.a); - } -); -#else -NSString *const kGPUImageLuminanceFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float luminance = dot(textureColor.rgb, W); - - gl_FragColor = vec4(vec3(luminance), textureColor.a); - } -); -#endif - - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - if (!currentlyReceivingMonochromeInput) - { - [super renderToTextureWithVertices:vertices textureCoordinates:textureCoordinates]; - } -} - -//- (void)setInputTexture:(GLuint)newInputTexture atIndex:(NSInteger)textureIndex; -//{ -// [super setInputTexture:newInputTexture atIndex:textureIndex]; -// if (currentlyReceivingMonochromeInput) -// { -// [self notifyTargetsAboutNewOutputTexture]; -// } -//} - -//- (GLuint)textureForOutput; -//{ -// if (currentlyReceivingMonochromeInput) -// { -// return filterSourceTexture; -// } -// else -// { -// return outputTexture; -// } -//} - -- (BOOL)wantsMonochromeInput; -{ -// return YES; - return NO; -} - -- (BOOL)providesMonochromeOutput; -{ -// return YES; - return NO; -} - -// TODO: Rewrite this based on the new GPUImageFilter implementation -//- (void)informTargetsAboutNewFrameAtTime:(CMTime)frameTime; -//{ -// if (self.frameProcessingCompletionBlock != NULL) -// { -// self.frameProcessingCompletionBlock(self, frameTime); -// } -// -// for (id currentTarget in targets) -// { -// if (currentTarget != self.targetToIgnoreForUpdates) -// { -// NSInteger indexOfObject = [targets indexOfObject:currentTarget]; -// NSInteger textureIndex = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; -// -// if ([GPUImageContext supportsFastTextureUpload] && preparedToCaptureImage) -// { -// [self setInputTextureForTarget:currentTarget atIndex:textureIndex]; -// } -// -// if (currentlyReceivingMonochromeInput) -// { -// [currentTarget setInputRotation:inputRotation atIndex:textureIndex]; -// -// CGSize sizeToRotate = [self outputFrameSize]; -// CGSize rotatedSize = sizeToRotate; -// if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) -// { -// rotatedSize.width = sizeToRotate.height; -// rotatedSize.height = sizeToRotate.width; -// } -// [currentTarget setInputSize:rotatedSize atIndex:textureIndex]; -// } -// else -// { -// [currentTarget setInputSize:[self outputFrameSize] atIndex:textureIndex]; -// } -// [currentTarget newFrameReadyAtTime:frameTime atIndex:textureIndex]; -// } -// } -//} - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageLuminanceFragmentShaderString])) - { - return nil; - } - - return self; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHSBFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHSBFilter.h deleted file mode 100644 index 65a9e1de..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHSBFilter.h +++ /dev/null @@ -1,27 +0,0 @@ -#import "GPUImageColorMatrixFilter.h" - -@interface GPUImageHSBFilter : GPUImageColorMatrixFilter - -/** Reset the filter to have no transformations. - */ -- (void)reset; - -/** Add a hue rotation to the filter. - The hue rotation is in the range [-360, 360] with 0 being no-change. - Note that this adjustment is additive, so use the reset method if you need to. - */ -- (void)rotateHue:(float)h; - -/** Add a saturation adjustment to the filter. - The saturation adjustment is in the range [0.0, 2.0] with 1.0 being no-change. - Note that this adjustment is additive, so use the reset method if you need to. - */ -- (void)adjustSaturation:(float)s; - -/** Add a brightness adjustment to the filter. - The brightness adjustment is in the range [0.0, 2.0] with 1.0 being no-change. - Note that this adjustment is additive, so use the reset method if you need to. - */ -- (void)adjustBrightness:(float)b; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHSBFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHSBFilter.m deleted file mode 100644 index eb668f7d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHSBFilter.m +++ /dev/null @@ -1,414 +0,0 @@ -#import "GPUImageHSBFilter.h" - -@implementation GPUImageHSBFilter { - float matrix[4][4]; -} - -- (id)init -{ - self = [super init]; - if (self) { - [self reset]; - } - return self; -} - -- (void)reset { - identmat(matrix); - [self _updateColorMatrix]; -} - -- (void)rotateHue:(float)h { - huerotatemat(matrix, h); - [self _updateColorMatrix]; -} - -- (void)adjustSaturation:(float)s { - saturatemat(matrix, s); - [self _updateColorMatrix]; -} - -- (void)adjustBrightness:(float)b { - cscalemat(matrix, b, b, b); - [self _updateColorMatrix]; -} - -- (void)_updateColorMatrix { - GPUMatrix4x4 gpuMatrix; - gpuMatrix.one.one = matrix[0][0]; - gpuMatrix.one.two = matrix[1][0]; - gpuMatrix.one.three = matrix[2][0]; - gpuMatrix.one.four = matrix[3][0]; - gpuMatrix.two.one = matrix[0][1]; - gpuMatrix.two.two = matrix[1][1]; - gpuMatrix.two.three = matrix[2][1]; - gpuMatrix.two.four = matrix[3][1]; - gpuMatrix.three.one = matrix[0][2]; - gpuMatrix.three.two = matrix[1][2]; - gpuMatrix.three.three = matrix[2][2]; - gpuMatrix.three.four = matrix[3][2]; - gpuMatrix.four.one = matrix[0][3]; - gpuMatrix.four.two = matrix[1][3]; - gpuMatrix.four.three = matrix[2][3]; - gpuMatrix.four.four = matrix[3][3]; - self.colorMatrix = gpuMatrix; -} - -#pragma mark - Matrix algorithms - -/* Matrix algorithms adapted from http://www.graficaobscura.com/matrix/index.html - - Note about luminance vector values below from that page: - Where rwgt is 0.3086, gwgt is 0.6094, and bwgt is 0.0820. This is the luminance vector. Notice here that we do not use the standard NTSC weights of 0.299, 0.587, and 0.114. The NTSC weights are only applicable to RGB colors in a gamma 2.2 color space. For linear RGB colors the values above are better. - */ -//#define RLUM (0.3086f) -//#define GLUM (0.6094f) -//#define BLUM (0.0820f) - -/* This is the vector value from the PDF specification, and may be closer to what Photoshop uses */ -#define RLUM (0.3f) -#define GLUM (0.59f) -#define BLUM (0.11f) - -/* - * matrixmult - - * multiply two matricies - */ -static void matrixmult(a,b,c) -float a[4][4], b[4][4], c[4][4]; -{ - int x, y; - float temp[4][4]; - - for(y=0; y<4 ; y++) - for(x=0 ; x<4 ; x++) { - temp[y][x] = b[y][0] * a[0][x] - + b[y][1] * a[1][x] - + b[y][2] * a[2][x] - + b[y][3] * a[3][x]; - } - for(y=0; y<4; y++) - for(x=0; x<4; x++) - c[y][x] = temp[y][x]; -} - -/* - * identmat - - * make an identity matrix - */ -static void identmat(matrix) -float matrix[4][4]; -{ - memset(matrix, 0, sizeof(float[4][4])); - matrix[0][0] = 1.0f; - matrix[1][1] = 1.0f; - matrix[2][2] = 1.0f; - matrix[3][3] = 1.0f; -} - -/* - * xformpnt - - * transform a 3D point using a matrix - */ -static void xformpnt(matrix,x,y,z,tx,ty,tz) -float matrix[4][4]; -float x,y,z; -float *tx,*ty,*tz; -{ - *tx = x*matrix[0][0] + y*matrix[1][0] + z*matrix[2][0] + matrix[3][0]; - *ty = x*matrix[0][1] + y*matrix[1][1] + z*matrix[2][1] + matrix[3][1]; - *tz = x*matrix[0][2] + y*matrix[1][2] + z*matrix[2][2] + matrix[3][2]; -} - -/* - * cscalemat - - * make a color scale marix - */ -static void cscalemat(mat,rscale,gscale,bscale) -float mat[4][4]; -float rscale, gscale, bscale; -{ - float mmat[4][4]; - - mmat[0][0] = rscale; - mmat[0][1] = 0.0; - mmat[0][2] = 0.0; - mmat[0][3] = 0.0; - - mmat[1][0] = 0.0; - mmat[1][1] = gscale; - mmat[1][2] = 0.0; - mmat[1][3] = 0.0; - - - mmat[2][0] = 0.0; - mmat[2][1] = 0.0; - mmat[2][2] = bscale; - mmat[2][3] = 0.0; - - mmat[3][0] = 0.0; - mmat[3][1] = 0.0; - mmat[3][2] = 0.0; - mmat[3][3] = 1.0; - matrixmult(mmat,mat,mat); -} - -/* - * saturatemat - - * make a saturation marix - */ -static void saturatemat(mat,sat) -float mat[4][4]; -float sat; -{ - float mmat[4][4]; - float a, b, c, d, e, f, g, h, i; - float rwgt, gwgt, bwgt; - - rwgt = RLUM; - gwgt = GLUM; - bwgt = BLUM; - - a = (1.0-sat)*rwgt + sat; - b = (1.0-sat)*rwgt; - c = (1.0-sat)*rwgt; - d = (1.0-sat)*gwgt; - e = (1.0-sat)*gwgt + sat; - f = (1.0-sat)*gwgt; - g = (1.0-sat)*bwgt; - h = (1.0-sat)*bwgt; - i = (1.0-sat)*bwgt + sat; - mmat[0][0] = a; - mmat[0][1] = b; - mmat[0][2] = c; - mmat[0][3] = 0.0; - - mmat[1][0] = d; - mmat[1][1] = e; - mmat[1][2] = f; - mmat[1][3] = 0.0; - - mmat[2][0] = g; - mmat[2][1] = h; - mmat[2][2] = i; - mmat[2][3] = 0.0; - - mmat[3][0] = 0.0; - mmat[3][1] = 0.0; - mmat[3][2] = 0.0; - mmat[3][3] = 1.0; - matrixmult(mmat,mat,mat); -} - -/* - * xrotate - - * rotate about the x (red) axis - */ -static void xrotatemat(mat,rs,rc) -float mat[4][4]; -float rs, rc; -{ - float mmat[4][4]; - - mmat[0][0] = 1.0; - mmat[0][1] = 0.0; - mmat[0][2] = 0.0; - mmat[0][3] = 0.0; - - mmat[1][0] = 0.0; - mmat[1][1] = rc; - mmat[1][2] = rs; - mmat[1][3] = 0.0; - - mmat[2][0] = 0.0; - mmat[2][1] = -rs; - mmat[2][2] = rc; - mmat[2][3] = 0.0; - - mmat[3][0] = 0.0; - mmat[3][1] = 0.0; - mmat[3][2] = 0.0; - mmat[3][3] = 1.0; - matrixmult(mmat,mat,mat); -} - -/* - * yrotate - - * rotate about the y (green) axis - */ -static void yrotatemat(mat,rs,rc) -float mat[4][4]; -float rs, rc; -{ - float mmat[4][4]; - - mmat[0][0] = rc; - mmat[0][1] = 0.0; - mmat[0][2] = -rs; - mmat[0][3] = 0.0; - - mmat[1][0] = 0.0; - mmat[1][1] = 1.0; - mmat[1][2] = 0.0; - mmat[1][3] = 0.0; - - mmat[2][0] = rs; - mmat[2][1] = 0.0; - mmat[2][2] = rc; - mmat[2][3] = 0.0; - - mmat[3][0] = 0.0; - mmat[3][1] = 0.0; - mmat[3][2] = 0.0; - mmat[3][3] = 1.0; - matrixmult(mmat,mat,mat); -} - -/* - * zrotate - - * rotate about the z (blue) axis - */ -static void zrotatemat(mat,rs,rc) -float mat[4][4]; -float rs, rc; -{ - float mmat[4][4]; - - mmat[0][0] = rc; - mmat[0][1] = rs; - mmat[0][2] = 0.0; - mmat[0][3] = 0.0; - - mmat[1][0] = -rs; - mmat[1][1] = rc; - mmat[1][2] = 0.0; - mmat[1][3] = 0.0; - - mmat[2][0] = 0.0; - mmat[2][1] = 0.0; - mmat[2][2] = 1.0; - mmat[2][3] = 0.0; - - mmat[3][0] = 0.0; - mmat[3][1] = 0.0; - mmat[3][2] = 0.0; - mmat[3][3] = 1.0; - matrixmult(mmat,mat,mat); -} - -/* - * zshear - - * shear z using x and y. - */ -static void zshearmat(mat,dx,dy) -float mat[4][4]; -float dx, dy; -{ - float mmat[4][4]; - - mmat[0][0] = 1.0; - mmat[0][1] = 0.0; - mmat[0][2] = dx; - mmat[0][3] = 0.0; - - mmat[1][0] = 0.0; - mmat[1][1] = 1.0; - mmat[1][2] = dy; - mmat[1][3] = 0.0; - - mmat[2][0] = 0.0; - mmat[2][1] = 0.0; - mmat[2][2] = 1.0; - mmat[2][3] = 0.0; - - mmat[3][0] = 0.0; - mmat[3][1] = 0.0; - mmat[3][2] = 0.0; - mmat[3][3] = 1.0; - matrixmult(mmat,mat,mat); -} - -/* - * simplehuerotatemat - - * simple hue rotation. This changes luminance - */ -//static void simplehuerotatemat(mat,rot) -//float mat[4][4]; -//float rot; -//{ -// float mag; -// float xrs, xrc; -// float yrs, yrc; -// float zrs, zrc; -// -// /* rotate the grey vector into positive Z */ -// mag = sqrt(2.0); -// xrs = 1.0/mag; -// xrc = 1.0/mag; -// xrotatemat(mat,xrs,xrc); -// -// mag = sqrt(3.0); -// yrs = -1.0/mag; -// yrc = sqrt(2.0)/mag; -// yrotatemat(mat,yrs,yrc); -// -// /* rotate the hue */ -// zrs = sin(rot*M_PI/180.0); -// zrc = cos(rot*M_PI/180.0); -// zrotatemat(mat,zrs,zrc); -// -// /* rotate the grey vector back into place */ -// yrotatemat(mat,-yrs,yrc); -// xrotatemat(mat,-xrs,xrc); -//} - -/* - * huerotatemat - - * rotate the hue, while maintaining luminance. - */ -static void huerotatemat(mat,rot) -float mat[4][4]; -float rot; -{ - float mmat[4][4]; - float mag; - float lx, ly, lz; - float xrs, xrc; - float yrs, yrc; - float zrs, zrc; - float zsx, zsy; - - identmat(mmat); - - /* rotate the grey vector into positive Z */ - mag = sqrt(2.0); - xrs = 1.0/mag; - xrc = 1.0/mag; - xrotatemat(mmat,xrs,xrc); - mag = sqrt(3.0); - yrs = -1.0/mag; - yrc = sqrt(2.0)/mag; - yrotatemat(mmat,yrs,yrc); - - /* shear the space to make the luminance plane horizontal */ - xformpnt(mmat,RLUM,GLUM,BLUM,&lx,&ly,&lz); - zsx = lx/lz; - zsy = ly/lz; - zshearmat(mmat,zsx,zsy); - - /* rotate the hue */ - zrs = sin(rot*M_PI/180.0); - zrc = cos(rot*M_PI/180.0); - zrotatemat(mmat,zrs,zrc); - - /* unshear the space to put the luminance plane back */ - zshearmat(mmat,-zsx,-zsy); - - /* rotate the grey vector back into place */ - yrotatemat(mmat,-yrs,yrc); - xrotatemat(mmat,-xrs,xrc); - - matrixmult(mmat,mat,mat); -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHalftoneFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHalftoneFilter.h deleted file mode 100644 index 1860bc97..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHalftoneFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImagePixellateFilter.h" - -@interface GPUImageHalftoneFilter : GPUImagePixellateFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHalftoneFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHalftoneFilter.m deleted file mode 100644 index 1b621c6a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHalftoneFilter.m +++ /dev/null @@ -1,79 +0,0 @@ -#import "GPUImageHalftoneFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageHalftoneFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp float fractionalWidthOfPixel; - uniform highp float aspectRatio; - uniform highp float dotScaling; - - const highp vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - highp vec2 sampleDivisor = vec2(fractionalWidthOfPixel, fractionalWidthOfPixel / aspectRatio); - - highp vec2 samplePos = textureCoordinate - mod(textureCoordinate, sampleDivisor) + 0.5 * sampleDivisor; - highp vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - highp vec2 adjustedSamplePos = vec2(samplePos.x, (samplePos.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - highp float distanceFromSamplePoint = distance(adjustedSamplePos, textureCoordinateToUse); - - lowp vec3 sampledColor = texture2D(inputImageTexture, samplePos ).rgb; - highp float dotScaling = 1.0 - dot(sampledColor, W); - - lowp float checkForPresenceWithinDot = 1.0 - step(distanceFromSamplePoint, (fractionalWidthOfPixel * 0.5) * dotScaling); - - gl_FragColor = vec4(vec3(checkForPresenceWithinDot), 1.0); - } -); -#else -NSString *const kGPUImageHalftoneFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform float fractionalWidthOfPixel; - uniform float aspectRatio; - uniform float dotScaling; - - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - vec2 sampleDivisor = vec2(fractionalWidthOfPixel, fractionalWidthOfPixel / aspectRatio); - - vec2 samplePos = textureCoordinate - mod(textureCoordinate, sampleDivisor) + 0.5 * sampleDivisor; - vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - vec2 adjustedSamplePos = vec2(samplePos.x, (samplePos.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - float distanceFromSamplePoint = distance(adjustedSamplePos, textureCoordinateToUse); - - vec3 sampledColor = texture2D(inputImageTexture, samplePos ).rgb; - float dotScaling = 1.0 - dot(sampledColor, W); - - float checkForPresenceWithinDot = 1.0 - step(distanceFromSamplePoint, (fractionalWidthOfPixel * 0.5) * dotScaling); - - gl_FragColor = vec4(vec3(checkForPresenceWithinDot), 1.0); - } -); -#endif - -@implementation GPUImageHalftoneFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageHalftoneFragmentShaderString])) - { - return nil; - } - - self.fractionalWidthOfAPixel = 0.01; - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHardLightBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHardLightBlendFilter.h deleted file mode 100755 index 47d62609..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHardLightBlendFilter.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageHardLightBlendFilter : GPUImageTwoInputFilter -{ -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHardLightBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHardLightBlendFilter.m deleted file mode 100755 index 2896ce82..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHardLightBlendFilter.m +++ /dev/null @@ -1,99 +0,0 @@ -#import "GPUImageHardLightBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageHardLightBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - const highp vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - mediump vec4 base = texture2D(inputImageTexture, textureCoordinate); - mediump vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - highp float ra; - if (2.0 * overlay.r < overlay.a) { - ra = 2.0 * overlay.r * base.r + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - } else { - ra = overlay.a * base.a - 2.0 * (base.a - base.r) * (overlay.a - overlay.r) + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - } - - highp float ga; - if (2.0 * overlay.g < overlay.a) { - ga = 2.0 * overlay.g * base.g + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - } else { - ga = overlay.a * base.a - 2.0 * (base.a - base.g) * (overlay.a - overlay.g) + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - } - - highp float ba; - if (2.0 * overlay.b < overlay.a) { - ba = 2.0 * overlay.b * base.b + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - } else { - ba = overlay.a * base.a - 2.0 * (base.a - base.b) * (overlay.a - overlay.b) + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - } - - gl_FragColor = vec4(ra, ga, ba, 1.0); - } -); -#else -NSString *const kGPUImageHardLightBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - vec4 base = texture2D(inputImageTexture, textureCoordinate); - vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - float ra; - if (2.0 * overlay.r < overlay.a) { - ra = 2.0 * overlay.r * base.r + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - } else { - ra = overlay.a * base.a - 2.0 * (base.a - base.r) * (overlay.a - overlay.r) + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - } - - float ga; - if (2.0 * overlay.g < overlay.a) { - ga = 2.0 * overlay.g * base.g + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - } else { - ga = overlay.a * base.a - 2.0 * (base.a - base.g) * (overlay.a - overlay.g) + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - } - - float ba; - if (2.0 * overlay.b < overlay.a) { - ba = 2.0 * overlay.b * base.b + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - } else { - ba = overlay.a * base.a - 2.0 * (base.a - base.b) * (overlay.a - overlay.b) + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - } - - gl_FragColor = vec4(ra, ga, ba, 1.0); - } -); -#endif - - -@implementation GPUImageHardLightBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageHardLightBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHarrisCornerDetectionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHarrisCornerDetectionFilter.h deleted file mode 100755 index 1492b8b8..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHarrisCornerDetectionFilter.h +++ /dev/null @@ -1,53 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImageGaussianBlurFilter; -@class GPUImageXYDerivativeFilter; -@class GPUImageGrayscaleFilter; -@class GPUImageGaussianBlurFilter; -@class GPUImageThresholdedNonMaximumSuppressionFilter; -@class GPUImageColorPackingFilter; - -//#define DEBUGFEATUREDETECTION - -/** Harris corner detector - - First pass: reduce to luminance and take the derivative of the luminance texture (GPUImageXYDerivativeFilter) - - Second pass: blur the derivative (GPUImageGaussianBlurFilter) - - Third pass: apply the Harris corner detection calculation - - This is the Harris corner detector, as described in - C. Harris and M. Stephens. A Combined Corner and Edge Detector. Proc. Alvey Vision Conf., Univ. Manchester, pp. 147-151, 1988. - */ -@interface GPUImageHarrisCornerDetectionFilter : GPUImageFilterGroup -{ - GPUImageXYDerivativeFilter *derivativeFilter; - GPUImageGaussianBlurFilter *blurFilter; - GPUImageFilter *harrisCornerDetectionFilter; - GPUImageThresholdedNonMaximumSuppressionFilter *nonMaximumSuppressionFilter; - GPUImageColorPackingFilter *colorPackingFilter; - GLfloat *cornersArray; - GLubyte *rawImagePixels; -} - -/** The radius of the underlying Gaussian blur. The default is 2.0. - */ -@property(readwrite, nonatomic) CGFloat blurRadiusInPixels; - -// This changes the dynamic range of the Harris corner detector by amplifying small cornerness values. Default is 5.0. -@property(readwrite, nonatomic) CGFloat sensitivity; - -// A threshold value at which a point is recognized as being a corner after the non-maximum suppression. Default is 0.20. -@property(readwrite, nonatomic) CGFloat threshold; - -// This block is called on the detection of new corner points, usually on every processed frame. A C array containing normalized coordinates in X, Y pairs is passed in, along with a count of the number of corners detected and the current timestamp of the video frame -@property(nonatomic, copy) void(^cornersDetectedBlock)(GLfloat* cornerArray, NSUInteger cornersDetected, CMTime frameTime); - -// These images are only enabled when built with DEBUGFEATUREDETECTION defined, and are used to examine the intermediate states of the feature detector -@property(nonatomic, readonly, strong) NSMutableArray *intermediateImages; - -// Initialization and teardown -- (id)initWithCornerDetectionFragmentShader:(NSString *)cornerDetectionFragmentShader; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHarrisCornerDetectionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHarrisCornerDetectionFilter.m deleted file mode 100755 index 999748dd..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHarrisCornerDetectionFilter.m +++ /dev/null @@ -1,292 +0,0 @@ -#import "GPUImageHarrisCornerDetectionFilter.h" -#import "GPUImageGaussianBlurFilter.h" -#import "GPUImageXYDerivativeFilter.h" -#import "GPUImageGrayscaleFilter.h" -#import "GPUImageThresholdedNonMaximumSuppressionFilter.h" -#import "GPUImageColorPackingFilter.h" -#import "GPUImageGaussianBlurFilter.h" - -@interface GPUImageHarrisCornerDetectionFilter() - -- (void)extractCornerLocationsFromImageAtFrameTime:(CMTime)frameTime; - -@end - -// This is the Harris corner detector, as described in -// C. Harris and M. Stephens. A Combined Corner and Edge Detector. Proc. Alvey Vision Conf., Univ. Manchester, pp. 147-151, 1988. - -@implementation GPUImageHarrisCornerDetectionFilter - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageHarrisCornerDetectionFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform lowp float sensitivity; - - const mediump float harrisConstant = 0.04; - - void main() - { - mediump vec3 derivativeElements = texture2D(inputImageTexture, textureCoordinate).rgb; - - mediump float derivativeSum = derivativeElements.x + derivativeElements.y; - - mediump float zElement = (derivativeElements.z * 2.0) - 1.0; - - // R = Ix^2 * Iy^2 - Ixy * Ixy - k * (Ix^2 + Iy^2)^2 - mediump float cornerness = derivativeElements.x * derivativeElements.y - (zElement * zElement) - harrisConstant * derivativeSum * derivativeSum; - - gl_FragColor = vec4(vec3(cornerness * sensitivity), 1.0); - } -); -#else -NSString *const kGPUImageHarrisCornerDetectionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float sensitivity; - - const float harrisConstant = 0.04; - - void main() - { - vec3 derivativeElements = texture2D(inputImageTexture, textureCoordinate).rgb; - - float derivativeSum = derivativeElements.x + derivativeElements.y; - - float zElement = (derivativeElements.z * 2.0) - 1.0; - - // R = Ix^2 * Iy^2 - Ixy * Ixy - k * (Ix^2 + Iy^2)^2 - float cornerness = derivativeElements.x * derivativeElements.y - (zElement * zElement) - harrisConstant * derivativeSum * derivativeSum; - - gl_FragColor = vec4(vec3(cornerness * sensitivity), 1.0); - } -); -#endif - -@synthesize blurRadiusInPixels; -@synthesize cornersDetectedBlock; -@synthesize sensitivity = _sensitivity; -@synthesize threshold = _threshold; -@synthesize intermediateImages = _intermediateImages; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithCornerDetectionFragmentShader:kGPUImageHarrisCornerDetectionFragmentShaderString])) - { - return nil; - } - - return self; -} - -- (id)initWithCornerDetectionFragmentShader:(NSString *)cornerDetectionFragmentShader; -{ - if (!(self = [super init])) - { - return nil; - } - -#ifdef DEBUGFEATUREDETECTION - _intermediateImages = [[NSMutableArray alloc] init]; -#endif - - // First pass: reduce to luminance and take the derivative of the luminance texture - derivativeFilter = [[GPUImageXYDerivativeFilter alloc] init]; - [self addFilter:derivativeFilter]; - -#ifdef DEBUGFEATUREDETECTION - __unsafe_unretained NSMutableArray *weakIntermediateImages = _intermediateImages; - __unsafe_unretained GPUImageFilter *weakFilter = derivativeFilter; - [derivativeFilter setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime){ - UIImage *intermediateImage = [weakFilter imageFromCurrentlyProcessedOutput]; - [weakIntermediateImages addObject:intermediateImage]; - }]; -#endif - - // Second pass: blur the derivative - blurFilter = [[GPUImageGaussianBlurFilter alloc] init]; - [self addFilter:blurFilter]; - -#ifdef DEBUGFEATUREDETECTION - weakFilter = blurFilter; - [blurFilter setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime){ - UIImage *intermediateImage = [weakFilter imageFromCurrentlyProcessedOutput]; - [weakIntermediateImages addObject:intermediateImage]; - }]; -#endif - - // Third pass: apply the Harris corner detection calculation - harrisCornerDetectionFilter = [[GPUImageFilter alloc] initWithFragmentShaderFromString:cornerDetectionFragmentShader]; - [self addFilter:harrisCornerDetectionFilter]; - -#ifdef DEBUGFEATUREDETECTION - weakFilter = harrisCornerDetectionFilter; - [harrisCornerDetectionFilter setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime){ - UIImage *intermediateImage = [weakFilter imageFromCurrentlyProcessedOutput]; - [weakIntermediateImages addObject:intermediateImage]; - }]; -#endif - - // Fourth pass: apply non-maximum suppression and thresholding to find the local maxima - nonMaximumSuppressionFilter = [[GPUImageThresholdedNonMaximumSuppressionFilter alloc] init]; - [self addFilter:nonMaximumSuppressionFilter]; - - __unsafe_unretained GPUImageHarrisCornerDetectionFilter *weakSelf = self; -#ifdef DEBUGFEATUREDETECTION - weakFilter = nonMaximumSuppressionFilter; - [nonMaximumSuppressionFilter setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime){ - UIImage *intermediateImage = [weakFilter imageFromCurrentlyProcessedOutput]; - [weakIntermediateImages addObject:intermediateImage]; - - [weakSelf extractCornerLocationsFromImageAtFrameTime:frameTime]; - }]; -#else - [nonMaximumSuppressionFilter setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime) { - [weakSelf extractCornerLocationsFromImageAtFrameTime:frameTime]; - }]; -#endif - -// Sixth pass: compress the thresholded points into the RGBA channels -// colorPackingFilter = [[GPUImageColorPackingFilter alloc] init]; -// [self addFilter:colorPackingFilter]; -// -// -//#ifdef DEBUGFEATUREDETECTION -// __unsafe_unretained GPUImageHarrisCornerDetectionFilter *weakSelf = self; -// weakFilter = colorPackingFilter; -// [colorPackingFilter setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime){ -// NSLog(@"Triggered response from compaction filter"); -// -// UIImage *intermediateImage = [weakFilter imageFromCurrentlyProcessedOutput]; -// [weakIntermediateImages addObject:intermediateImage]; -// -// [weakSelf extractCornerLocationsFromImageAtFrameTime:frameTime]; -// }]; -//#else -// __unsafe_unretained GPUImageHarrisCornerDetectionFilter *weakSelf = self; -// [colorPackingFilter setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime) { -// [weakSelf extractCornerLocationsFromImageAtFrameTime:frameTime]; -// }]; -//#endif - - [derivativeFilter addTarget:blurFilter]; - [blurFilter addTarget:harrisCornerDetectionFilter]; - [harrisCornerDetectionFilter addTarget:nonMaximumSuppressionFilter]; -// [simpleThresholdFilter addTarget:colorPackingFilter]; - - self.initialFilters = [NSArray arrayWithObjects:derivativeFilter, nil]; -// self.terminalFilter = colorPackingFilter; - self.terminalFilter = nonMaximumSuppressionFilter; - - self.blurRadiusInPixels = 2.0; - self.sensitivity = 5.0; - self.threshold = 0.20; - - return self; -} - -- (void)dealloc; -{ - free(rawImagePixels); - free(cornersArray); -} - -#pragma mark - -#pragma mark Corner extraction - -- (void)extractCornerLocationsFromImageAtFrameTime:(CMTime)frameTime; -{ - // we need a normal color texture for this filter - NSAssert(self.outputTextureOptions.internalFormat == GL_RGBA, @"The output texture format for this filter must be GL_RGBA."); - NSAssert(self.outputTextureOptions.type == GL_UNSIGNED_BYTE, @"The type of the output texture of this filter must be GL_UNSIGNED_BYTE."); - - NSUInteger numberOfCorners = 0; - CGSize imageSize = nonMaximumSuppressionFilter.outputFrameSize; - - unsigned int imageByteSize = imageSize.width * imageSize.height * 4; - - if (rawImagePixels == NULL) - { - rawImagePixels = (GLubyte *)malloc(imageByteSize); - cornersArray = calloc(512 * 2, sizeof(GLfloat)); - } - - glReadPixels(0, 0, (int)imageSize.width, (int)imageSize.height, GL_RGBA, GL_UNSIGNED_BYTE, rawImagePixels); - - CFAbsoluteTime startTime = CFAbsoluteTimeGetCurrent(); - - unsigned int imageWidth = imageSize.width * 4; - - unsigned int currentByte = 0; - unsigned int cornerStorageIndex = 0; - while (currentByte < imageByteSize) - { - GLubyte colorByte = rawImagePixels[currentByte]; - - if (colorByte > 0) - { - unsigned int xCoordinate = currentByte % imageWidth; - unsigned int yCoordinate = currentByte / imageWidth; - - cornersArray[cornerStorageIndex++] = (CGFloat)(xCoordinate / 4) / imageSize.width; - cornersArray[cornerStorageIndex++] = (CGFloat)(yCoordinate) / imageSize.height; - numberOfCorners++; - - numberOfCorners = MIN(numberOfCorners, 511); - cornerStorageIndex = MIN(cornerStorageIndex, 1021); - } - currentByte +=4; - } - - CFAbsoluteTime currentFrameTime = (CFAbsoluteTimeGetCurrent() - startTime); - NSLog(@"Processing time : %f ms", 1000.0 * currentFrameTime); - - if (cornersDetectedBlock != NULL) - { - cornersDetectedBlock(cornersArray, numberOfCorners, frameTime); - } -} - -- (BOOL)wantsMonochromeInput; -{ -// return YES; - return NO; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setBlurRadiusInPixels:(CGFloat)newValue; -{ - blurFilter.blurRadiusInPixels = newValue; -} - -- (CGFloat)blurRadiusInPixels; -{ - return blurFilter.blurRadiusInPixels; -} - -- (void)setSensitivity:(CGFloat)newValue; -{ - _sensitivity = newValue; - [harrisCornerDetectionFilter setFloat:newValue forUniformName:@"sensitivity"]; -} - -- (void)setThreshold:(CGFloat)newValue; -{ - nonMaximumSuppressionFilter.threshold = newValue; -} - -- (CGFloat)threshold; -{ - return nonMaximumSuppressionFilter.threshold; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHazeFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHazeFilter.h deleted file mode 100755 index eb3fbca6..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHazeFilter.h +++ /dev/null @@ -1,29 +0,0 @@ -#import "GPUImageFilter.h" - -/* - * The haze filter can be used to add or remove haze (similar to a UV filter) - * - * @author Alaric Cole - * @creationDate 03/10/12 - * - */ - -/** The haze filter can be used to add or remove haze - - This is similar to a UV filter - */ -@interface GPUImageHazeFilter : GPUImageFilter -{ - GLint distanceUniform; - GLint slopeUniform; -} - -/** Strength of the color applied. Default 0. Values between -.3 and .3 are best - */ -@property(readwrite, nonatomic) CGFloat distance; - -/** Amount of color change. Default 0. Values between -.3 and .3 are best - */ -@property(readwrite, nonatomic) CGFloat slope; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHazeFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHazeFilter.m deleted file mode 100755 index f90fc22f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHazeFilter.m +++ /dev/null @@ -1,96 +0,0 @@ -#import "GPUImageHazeFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageHazeFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform lowp float hazeDistance; - uniform highp float slope; - - void main() - { - //todo reconsider precision modifiers - highp vec4 color = vec4(1.0);//todo reimplement as a parameter - - highp float d = textureCoordinate.y * slope + hazeDistance; - - highp vec4 c = texture2D(inputImageTexture, textureCoordinate) ; // consider using unpremultiply - - c = (c - d * color) / (1.0 -d); - - gl_FragColor = c; //consider using premultiply(c); - } -); -#else -NSString *const kGPUImageHazeFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform float hazeDistance; - uniform float slope; - - void main() - { - //todo reconsider precision modifiers - vec4 color = vec4(1.0);//todo reimplement as a parameter - - float d = textureCoordinate.y * slope + hazeDistance; - - vec4 c = texture2D(inputImageTexture, textureCoordinate) ; // consider using unpremultiply - - c = (c - d * color) / (1.0 -d); - - gl_FragColor = c; //consider using premultiply(c); - } -); -#endif - - - - -@implementation GPUImageHazeFilter - -@synthesize distance = _distance; -@synthesize slope = _slope; -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageHazeFragmentShaderString])) - { - return nil; - } - - distanceUniform = [filterProgram uniformIndex:@"hazeDistance"]; - slopeUniform = [filterProgram uniformIndex:@"slope"]; - - self.distance = 0.2; - self.slope = 0.0; - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setDistance:(CGFloat)newValue; -{ - _distance = newValue; - - [self setFloat:_distance forUniform:distanceUniform program:filterProgram]; -} - -- (void)setSlope:(CGFloat)newValue; -{ - _slope = newValue; - - [self setFloat:_slope forUniform:slopeUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHighPassFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHighPassFilter.h deleted file mode 100644 index 263d8df1..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHighPassFilter.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "GPUImageFilterGroup.h" -#import "GPUImageLowPassFilter.h" -#import "GPUImageDifferenceBlendFilter.h" - -@interface GPUImageHighPassFilter : GPUImageFilterGroup -{ - GPUImageLowPassFilter *lowPassFilter; - GPUImageDifferenceBlendFilter *differenceBlendFilter; -} - -// This controls the degree by which the previous accumulated frames are blended and then subtracted from the current one. This ranges from 0.0 to 1.0, with a default of 0.5. -@property(readwrite, nonatomic) CGFloat filterStrength; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHighPassFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHighPassFilter.m deleted file mode 100644 index 511240d8..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHighPassFilter.m +++ /dev/null @@ -1,46 +0,0 @@ -#import "GPUImageHighPassFilter.h" - -@implementation GPUImageHighPassFilter - -@synthesize filterStrength; - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - // Start with a low pass filter to define the component to be removed - lowPassFilter = [[GPUImageLowPassFilter alloc] init]; - [self addFilter:lowPassFilter]; - - // Take the difference of the current frame from the low pass filtered result to get the high pass - differenceBlendFilter = [[GPUImageDifferenceBlendFilter alloc] init]; - [self addFilter:differenceBlendFilter]; - - // Texture location 0 needs to be the original image for the difference blend - [lowPassFilter addTarget:differenceBlendFilter atTextureLocation:1]; - - self.initialFilters = [NSArray arrayWithObjects:lowPassFilter, differenceBlendFilter, nil]; - self.terminalFilter = differenceBlendFilter; - - self.filterStrength = 0.5; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setFilterStrength:(CGFloat)newValue; -{ - lowPassFilter.filterStrength = newValue; -} - -- (CGFloat)filterStrength; -{ - return lowPassFilter.filterStrength; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHighlightShadowFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHighlightShadowFilter.h deleted file mode 100644 index 35791298..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHighlightShadowFilter.h +++ /dev/null @@ -1,20 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageHighlightShadowFilter : GPUImageFilter -{ - GLint shadowsUniform, highlightsUniform; -} - -/** - * 0 - 1, increase to lighten shadows. - * @default 0 - */ -@property(readwrite, nonatomic) CGFloat shadows; - -/** - * 0 - 1, decrease to darken highlights. - * @default 1 - */ -@property(readwrite, nonatomic) CGFloat highlights; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHighlightShadowFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHighlightShadowFilter.m deleted file mode 100644 index aa92b740..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHighlightShadowFilter.m +++ /dev/null @@ -1,93 +0,0 @@ -#import "GPUImageHighlightShadowFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageHighlightShadowFragmentShaderString = SHADER_STRING -( -uniform sampler2D inputImageTexture; -varying highp vec2 textureCoordinate; - -uniform lowp float shadows; -uniform lowp float highlights; - -const mediump vec3 luminanceWeighting = vec3(0.3, 0.3, 0.3); - -void main() -{ - lowp vec4 source = texture2D(inputImageTexture, textureCoordinate); - mediump float luminance = dot(source.rgb, luminanceWeighting); - - mediump float shadow = clamp((pow(luminance, 1.0/(shadows+1.0)) + (-0.76)*pow(luminance, 2.0/(shadows+1.0))) - luminance, 0.0, 1.0); - mediump float highlight = clamp((1.0 - (pow(1.0-luminance, 1.0/(2.0-highlights)) + (-0.8)*pow(1.0-luminance, 2.0/(2.0-highlights)))) - luminance, -1.0, 0.0); - lowp vec3 result = vec3(0.0, 0.0, 0.0) + ((luminance + shadow + highlight) - 0.0) * ((source.rgb - vec3(0.0, 0.0, 0.0))/(luminance - 0.0)); - - gl_FragColor = vec4(result.rgb, source.a); -} -); -#else -NSString *const kGPUImageHighlightShadowFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - varying vec2 textureCoordinate; - - uniform float shadows; - uniform float highlights; - - const vec3 luminanceWeighting = vec3(0.3, 0.3, 0.3); - - void main() - { - vec4 source = texture2D(inputImageTexture, textureCoordinate); - float luminance = dot(source.rgb, luminanceWeighting); - - float shadow = clamp((pow(luminance, 1.0/(shadows+1.0)) + (-0.76)*pow(luminance, 2.0/(shadows+1.0))) - luminance, 0.0, 1.0); - float highlight = clamp((1.0 - (pow(1.0-luminance, 1.0/(2.0-highlights)) + (-0.8)*pow(1.0-luminance, 2.0/(2.0-highlights)))) - luminance, -1.0, 0.0); - vec3 result = vec3(0.0, 0.0, 0.0) + ((luminance + shadow + highlight) - 0.0) * ((source.rgb - vec3(0.0, 0.0, 0.0))/(luminance - 0.0)); - - gl_FragColor = vec4(result.rgb, source.a); - } -); -#endif - -@implementation GPUImageHighlightShadowFilter - -@synthesize shadows = _shadows; -@synthesize highlights = _highlights; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageHighlightShadowFragmentShaderString])) - { - return nil; - } - - shadowsUniform = [filterProgram uniformIndex:@"shadows"]; - highlightsUniform = [filterProgram uniformIndex:@"highlights"]; - - self.shadows = 0.0; - self.highlights = 1.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setShadows:(CGFloat)newValue; -{ - _shadows = newValue; - - [self setFloat:_shadows forUniform:shadowsUniform program:filterProgram]; -} - -- (void)setHighlights:(CGFloat)newValue; -{ - _highlights = newValue; - - [self setFloat:_highlights forUniform:highlightsUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramEqualizationFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramEqualizationFilter.h deleted file mode 100644 index 2b71cda0..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramEqualizationFilter.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// GPUImageHistogramEqualizationFilter.h -// FilterShowcase -// -// Created by Adam Marcus on 19/08/2014. -// Copyright (c) 2014 Sunset Lake Software LLC. All rights reserved. -// - -#import "GPUImageFilterGroup.h" -#import "GPUImageHistogramFilter.h" -#import "GPUImageRawDataOutput.h" -#import "GPUImageRawDataInput.h" -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageHistogramEqualizationFilter : GPUImageFilterGroup -{ - GPUImageHistogramFilter *histogramFilter; - GPUImageRawDataOutput *rawDataOutputFilter; - GPUImageRawDataInput *rawDataInputFilter; -} - -@property(readwrite, nonatomic) NSUInteger downsamplingFactor; - -- (id)initWithHistogramType:(GPUImageHistogramType)newHistogramType; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramEqualizationFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramEqualizationFilter.m deleted file mode 100644 index 7d6b9a2d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramEqualizationFilter.m +++ /dev/null @@ -1,307 +0,0 @@ -// -// GPUImageHistogramEqualizationFilter.m -// FilterShowcase -// -// Created by Adam Marcus on 19/08/2014. -// Copyright (c) 2014 Sunset Lake Software LLC. All rights reserved. -// - -#import "GPUImageHistogramEqualizationFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageRedHistogramEqualizationFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp float redCurveValue = texture2D(inputImageTexture2, vec2(textureColor.r, 0.0)).r; - - gl_FragColor = vec4(redCurveValue, textureColor.g, textureColor.b, textureColor.a); - } - ); -#else -NSString *const kGPUImageRedHistogramEqualizationFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float redCurveValue = texture2D(inputImageTexture2, vec2(textureColor.r, 0.0)).r; - - gl_FragColor = vec4(redCurveValue, textureColor.g, textureColor.b, textureColor.a); - } - ); -#endif - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageGreenHistogramEqualizationFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp float greenCurveValue = texture2D(inputImageTexture2, vec2(textureColor.g, 0.0)).g; - - gl_FragColor = vec4(textureColor.r, greenCurveValue, textureColor.b, textureColor.a); - } - ); -#else -NSString *const kGPUImageGreenHistogramEqualizationFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float greenCurveValue = texture2D(inputImageTexture2, vec2(textureColor.g, 0.0)).g; - - gl_FragColor = vec4(textureColor.r, greenCurveValue, textureColor.b, textureColor.a); - } - ); -#endif - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageBlueHistogramEqualizationFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp float blueCurveValue = texture2D(inputImageTexture2, vec2(textureColor.b, 0.0)).b; - - gl_FragColor = vec4(textureColor.r, textureColor.g, blueCurveValue, textureColor.a); - } - ); -#else -NSString *const kGPUImageBlueHistogramEqualizationFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float blueCurveValue = texture2D(inputImageTexture2, vec2(textureColor.b, 0.0)).b; - - gl_FragColor = vec4(textureColor.r, textureColor.g, blueCurveValue, textureColor.a); - } - ); -#endif - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageRGBHistogramEqualizationFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp float redCurveValue = texture2D(inputImageTexture2, vec2(textureColor.r, 0.0)).r; - lowp float greenCurveValue = texture2D(inputImageTexture2, vec2(textureColor.g, 0.0)).g; - lowp float blueCurveValue = texture2D(inputImageTexture2, vec2(textureColor.b, 0.0)).b; - - gl_FragColor = vec4(redCurveValue, greenCurveValue, blueCurveValue, textureColor.a); - } - ); -#else -NSString *const kGPUImageRGBHistogramEqualizationFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float redCurveValue = texture2D(inputImageTexture2, vec2(textureColor.r, 0.0)).r; - float greenCurveValue = texture2D(inputImageTexture2, vec2(textureColor.g, 0.0)).g; - float blueCurveValue = texture2D(inputImageTexture2, vec2(textureColor.b, 0.0)).b; - - gl_FragColor = vec4(redCurveValue, greenCurveValue, blueCurveValue, textureColor.a); - } - ); -#endif - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLuminanceHistogramEqualizationFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - const lowp vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp float luminance = dot(textureColor.rgb, W); - lowp float newLuminance = texture2D(inputImageTexture2, vec2(luminance, 0.0)).r; - lowp float deltaLuminance = newLuminance - luminance; - - lowp float red = clamp(textureColor.r + deltaLuminance, 0.0, 1.0); - lowp float green = clamp(textureColor.g + deltaLuminance, 0.0, 1.0); - lowp float blue = clamp(textureColor.b + deltaLuminance, 0.0, 1.0); - - gl_FragColor = vec4(red, green, blue, textureColor.a); - } - ); -#else -NSString *const kGPUImageLuminanceHistogramEqualizationFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float luminance = dot(textureColor.rgb, W); - float newLuminance = texture2D(inputImageTexture2, vec2(luminance, 0.0)).r; - float deltaLuminance = newLuminance - luminance; - - float red = clamp(textureColor.r + deltaLuminance, 0.0, 1.0); - float green = clamp(textureColor.g + deltaLuminance, 0.0, 1.0); - float blue = clamp(textureColor.b + deltaLuminance, 0.0, 1.0); - - gl_FragColor = vec4(red, green, blue, textureColor.a); - } - ); -#endif - -@implementation GPUImageHistogramEqualizationFilter - -@synthesize downsamplingFactor = _downsamplingFactor; - -#pragma mark - -#pragma mark Initialization - -- (id)init; -{ - if (!(self = [self initWithHistogramType:kGPUImageHistogramRGB])) - { - return nil; - } - - return self; -} - -- (id)initWithHistogramType:(GPUImageHistogramType)newHistogramType -{ - if (!(self = [super init])) - { - return nil; - } - - histogramFilter = [[GPUImageHistogramFilter alloc] initWithHistogramType:newHistogramType]; - [self addFilter:histogramFilter]; - - GLubyte dummyInput[4 * 256]; // NB: No way to initialise GPUImageRawDataInput without providing bytes - rawDataInputFilter = [[GPUImageRawDataInput alloc] initWithBytes:dummyInput size:CGSizeMake(256.0, 1.0) pixelFormat:GPUPixelFormatBGRA type:GPUPixelTypeUByte]; - rawDataOutputFilter = [[GPUImageRawDataOutput alloc] initWithImageSize:CGSizeMake(256.0, 3.0) resultsInBGRAFormat:YES]; - - __unsafe_unretained GPUImageRawDataOutput *_rawDataOutputFilter = rawDataOutputFilter; - __unsafe_unretained GPUImageRawDataInput *_rawDataInputFilter = rawDataInputFilter; - [rawDataOutputFilter setNewFrameAvailableBlock:^{ - - unsigned int histogramBins[3][256]; - - [_rawDataOutputFilter lockFramebufferForReading]; - - GLubyte *data = [_rawDataOutputFilter rawBytesForImage]; - data += [_rawDataOutputFilter bytesPerRowInOutput]; - - histogramBins[0][0] = *data++; - histogramBins[1][0] = *data++; - histogramBins[2][0] = *data++; - data++; - - for (unsigned int x = 1; x < 256; x++) { - histogramBins[0][x] = histogramBins[0][x-1] + *data++; - histogramBins[1][x] = histogramBins[1][x-1] + *data++; - histogramBins[2][x] = histogramBins[2][x-1] + *data++; - data++; - } - - [_rawDataOutputFilter unlockFramebufferAfterReading]; - - GLubyte colorMapping[4 * 256]; - GLubyte *_colorMapping = colorMapping; - - for (unsigned int x = 0; x < 256; x++) { - *_colorMapping++ = (GLubyte) (((histogramBins[0][x] - histogramBins[0][0]) * 255) / histogramBins[0][255]); - *_colorMapping++ = (GLubyte) (((histogramBins[1][x] - histogramBins[1][0]) * 255) / histogramBins[1][255]); - *_colorMapping++ = (GLubyte) (((histogramBins[2][x] - histogramBins[2][0]) * 255) / histogramBins[2][255]); - *_colorMapping++ = 255; - } - - _colorMapping = colorMapping; - [_rawDataInputFilter updateDataFromBytes:_colorMapping size:CGSizeMake(256.0, 1.0)]; - [_rawDataInputFilter processData]; - }]; - [histogramFilter addTarget:rawDataOutputFilter]; - - NSString *fragmentShader = nil; - switch (newHistogramType) { - case kGPUImageHistogramRed: - fragmentShader = kGPUImageRedHistogramEqualizationFragmentShaderString; - break; - case kGPUImageHistogramGreen: - fragmentShader = kGPUImageGreenHistogramEqualizationFragmentShaderString; - break; - case kGPUImageHistogramBlue: - fragmentShader = kGPUImageBlueHistogramEqualizationFragmentShaderString; - break; - default: - case kGPUImageHistogramRGB: - fragmentShader = kGPUImageRGBHistogramEqualizationFragmentShaderString; - break; - case kGPUImageHistogramLuminance: - fragmentShader = kGPUImageLuminanceHistogramEqualizationFragmentShaderString; - break; - } - GPUImageFilter *equalizationFilter = [[GPUImageTwoInputFilter alloc] initWithFragmentShaderFromString:fragmentShader]; - [rawDataInputFilter addTarget:equalizationFilter atTextureLocation:1]; - - [self addFilter:equalizationFilter]; - - self.initialFilters = [NSArray arrayWithObjects:histogramFilter, equalizationFilter, nil]; - self.terminalFilter = equalizationFilter; - - self.downsamplingFactor = 16; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setDownsamplingFactor:(NSUInteger)newValue; -{ - if (_downsamplingFactor != newValue) - { - _downsamplingFactor = newValue; - histogramFilter.downsamplingFactor = newValue; - } -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramFilter.h deleted file mode 100755 index 32004bf7..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramFilter.h +++ /dev/null @@ -1,22 +0,0 @@ -#import "GPUImageFilter.h" - -typedef enum { kGPUImageHistogramRed, kGPUImageHistogramGreen, kGPUImageHistogramBlue, kGPUImageHistogramRGB, kGPUImageHistogramLuminance} GPUImageHistogramType; - -@interface GPUImageHistogramFilter : GPUImageFilter -{ - GPUImageHistogramType histogramType; - - GLubyte *vertexSamplingCoordinates; - - GLProgram *secondFilterProgram, *thirdFilterProgram; - GLint secondFilterPositionAttribute, thirdFilterPositionAttribute; -} - -// Rather than sampling every pixel, this dictates what fraction of the image is sampled. By default, this is 16 with a minimum of 1. -@property(readwrite, nonatomic) NSUInteger downsamplingFactor; - -// Initialization and teardown -- (id)initWithHistogramType:(GPUImageHistogramType)newHistogramType; -- (void)initializeSecondaryAttributes; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramFilter.m deleted file mode 100755 index bb7acce7..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramFilter.m +++ /dev/null @@ -1,341 +0,0 @@ -#import "GPUImageHistogramFilter.h" - -// Unlike other filters, this one uses a grid of GL_POINTs to sample the incoming image in a grid. A custom vertex shader reads the color in the texture at its position -// and outputs a bin position in the final histogram as the vertex position. That point is then written into the image of the histogram using translucent pixels. -// The degree of translucency is controlled by the scalingFactor, which lets you adjust the dynamic range of the histogram. The histogram can only be generated for one -// color channel or luminance value at a time. -// -// This is based on this implementation: http://www.shaderwrangler.com/publications/histogram/histogram_cameraready.pdf -// -// Or at least that's how it would work if iOS could read from textures in a vertex shader, which it can't. Therefore, I read the texture data down from the -// incoming frame and process the texture colors as vertices. - -NSString *const kGPUImageRedHistogramSamplingVertexShaderString = SHADER_STRING -( - attribute vec4 position; - - varying vec3 colorFactor; - - void main() - { - colorFactor = vec3(1.0, 0.0, 0.0); - gl_Position = vec4(-1.0 + (position.x * 0.0078125), 0.0, 0.0, 1.0); - gl_PointSize = 1.0; - } -); - -NSString *const kGPUImageGreenHistogramSamplingVertexShaderString = SHADER_STRING -( - attribute vec4 position; - - varying vec3 colorFactor; - - void main() - { - colorFactor = vec3(0.0, 1.0, 0.0); - gl_Position = vec4(-1.0 + (position.y * 0.0078125), 0.0, 0.0, 1.0); - gl_PointSize = 1.0; - } -); - -NSString *const kGPUImageBlueHistogramSamplingVertexShaderString = SHADER_STRING -( - attribute vec4 position; - - varying vec3 colorFactor; - - void main() - { - colorFactor = vec3(0.0, 0.0, 1.0); - gl_Position = vec4(-1.0 + (position.z * 0.0078125), 0.0, 0.0, 1.0); - gl_PointSize = 1.0; - } -); - -NSString *const kGPUImageLuminanceHistogramSamplingVertexShaderString = SHADER_STRING -( - attribute vec4 position; - - varying vec3 colorFactor; - - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - float luminance = dot(position.xyz, W); - - colorFactor = vec3(1.0, 1.0, 1.0); - gl_Position = vec4(-1.0 + (luminance * 0.0078125), 0.0, 0.0, 1.0); - gl_PointSize = 1.0; - } -); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageHistogramAccumulationFragmentShaderString = SHADER_STRING -( - const lowp float scalingFactor = 1.0 / 256.0; - - varying lowp vec3 colorFactor; - - void main() - { - gl_FragColor = vec4(colorFactor * scalingFactor , 1.0); - } -); -#else -NSString *const kGPUImageHistogramAccumulationFragmentShaderString = SHADER_STRING -( - const float scalingFactor = 1.0 / 256.0; - - varying vec3 colorFactor; - - void main() - { - gl_FragColor = vec4(colorFactor * scalingFactor , 1.0); - } -); -#endif - -@implementation GPUImageHistogramFilter - -@synthesize downsamplingFactor = _downsamplingFactor; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithHistogramType:(GPUImageHistogramType)newHistogramType; -{ - switch (newHistogramType) - { - case kGPUImageHistogramRed: - { - if (!(self = [super initWithVertexShaderFromString:kGPUImageRedHistogramSamplingVertexShaderString fragmentShaderFromString:kGPUImageHistogramAccumulationFragmentShaderString])) - { - return nil; - } - }; break; - case kGPUImageHistogramGreen: - { - if (!(self = [super initWithVertexShaderFromString:kGPUImageGreenHistogramSamplingVertexShaderString fragmentShaderFromString:kGPUImageHistogramAccumulationFragmentShaderString])) - { - return nil; - } - }; break; - case kGPUImageHistogramBlue: - { - if (!(self = [super initWithVertexShaderFromString:kGPUImageBlueHistogramSamplingVertexShaderString fragmentShaderFromString:kGPUImageHistogramAccumulationFragmentShaderString])) - { - return nil; - } - }; break; - case kGPUImageHistogramLuminance: - { - if (!(self = [super initWithVertexShaderFromString:kGPUImageLuminanceHistogramSamplingVertexShaderString fragmentShaderFromString:kGPUImageHistogramAccumulationFragmentShaderString])) - { - return nil; - } - }; break; - case kGPUImageHistogramRGB: - { - if (!(self = [super initWithVertexShaderFromString:kGPUImageRedHistogramSamplingVertexShaderString fragmentShaderFromString:kGPUImageHistogramAccumulationFragmentShaderString])) - { - return nil; - } - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - - secondFilterProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:kGPUImageGreenHistogramSamplingVertexShaderString fragmentShaderString:kGPUImageHistogramAccumulationFragmentShaderString]; - thirdFilterProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:kGPUImageBlueHistogramSamplingVertexShaderString fragmentShaderString:kGPUImageHistogramAccumulationFragmentShaderString]; - - if (!secondFilterProgram.initialized) - { - [self initializeSecondaryAttributes]; - - if (![secondFilterProgram link]) - { - NSString *progLog = [secondFilterProgram programLog]; - NSLog(@"Program link log: %@", progLog); - NSString *fragLog = [secondFilterProgram fragmentShaderLog]; - NSLog(@"Fragment shader compile log: %@", fragLog); - NSString *vertLog = [secondFilterProgram vertexShaderLog]; - NSLog(@"Vertex shader compile log: %@", vertLog); - filterProgram = nil; - NSAssert(NO, @"Filter shader link failed"); - - } - - [GPUImageContext setActiveShaderProgram:secondFilterProgram]; - - glEnableVertexAttribArray(secondFilterPositionAttribute); - - if (![thirdFilterProgram link]) - { - NSString *progLog = [secondFilterProgram programLog]; - NSLog(@"Program link log: %@", progLog); - NSString *fragLog = [secondFilterProgram fragmentShaderLog]; - NSLog(@"Fragment shader compile log: %@", fragLog); - NSString *vertLog = [secondFilterProgram vertexShaderLog]; - NSLog(@"Vertex shader compile log: %@", vertLog); - filterProgram = nil; - NSAssert(NO, @"Filter shader link failed"); - } - } - - secondFilterPositionAttribute = [secondFilterProgram attributeIndex:@"position"]; - - - thirdFilterPositionAttribute = [thirdFilterProgram attributeIndex:@"position"]; - [GPUImageContext setActiveShaderProgram:thirdFilterProgram]; - - glEnableVertexAttribArray(thirdFilterPositionAttribute); - }); - }; break; - } - - histogramType = newHistogramType; - - self.downsamplingFactor = 16; - - return self; -} - -- (id)init; -{ - if (!(self = [self initWithHistogramType:kGPUImageHistogramRGB])) - { - return nil; - } - - return self; -} - -- (void)initializeSecondaryAttributes; -{ - [secondFilterProgram addAttribute:@"position"]; - [thirdFilterProgram addAttribute:@"position"]; -} - -- (void)dealloc; -{ - if (vertexSamplingCoordinates != NULL && ![GPUImageContext supportsFastTextureUpload]) - { - free(vertexSamplingCoordinates); - } -} - -#pragma mark - -#pragma mark Rendering - -- (CGSize)sizeOfFBO; -{ - return CGSizeMake(256.0, 3.0); -} - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - [self renderToTextureWithVertices:NULL textureCoordinates:NULL]; - - [self informTargetsAboutNewFrameAtTime:frameTime]; -} - -- (CGSize)outputFrameSize; -{ - return [self sizeOfFBO]; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - if (self.preventRendering) - { - return; - } - - inputTextureSize = newSize; -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - inputRotation = kGPUImageNoRotation; -} - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - // we need a normal color texture for this filter - NSAssert(self.outputTextureOptions.internalFormat == GL_RGBA, @"The output texture format for this filter must be GL_RGBA."); - NSAssert(self.outputTextureOptions.type == GL_UNSIGNED_BYTE, @"The type of the output texture of this filter must be GL_UNSIGNED_BYTE."); - - if (self.preventRendering) - { - [firstInputFramebuffer unlock]; - return; - } - - [GPUImageContext useImageProcessingContext]; - - if ([GPUImageContext supportsFastTextureUpload]) - { - glFinish(); - vertexSamplingCoordinates = [firstInputFramebuffer byteBuffer]; - } else { - if (vertexSamplingCoordinates == NULL) - { - vertexSamplingCoordinates = calloc(inputTextureSize.width * inputTextureSize.height * 4, sizeof(GLubyte)); - } - glReadPixels(0, 0, inputTextureSize.width, inputTextureSize.height, GL_RGBA, GL_UNSIGNED_BYTE, vertexSamplingCoordinates); - } - - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - if (usingNextFrameForImageCapture) - { - [outputFramebuffer lock]; - } - - [GPUImageContext setActiveShaderProgram:filterProgram]; - - glClearColor(0.0, 0.0, 0.0, 1.0); - glClear(GL_COLOR_BUFFER_BIT); - - glBlendEquation(GL_FUNC_ADD); - glBlendFunc(GL_ONE, GL_ONE); - glEnable(GL_BLEND); - - glVertexAttribPointer(filterPositionAttribute, 4, GL_UNSIGNED_BYTE, 0, ((unsigned int)_downsamplingFactor - 1) * 4, vertexSamplingCoordinates); - glDrawArrays(GL_POINTS, 0, inputTextureSize.width * inputTextureSize.height / (CGFloat)_downsamplingFactor); - - if (histogramType == kGPUImageHistogramRGB) - { - [GPUImageContext setActiveShaderProgram:secondFilterProgram]; - - glVertexAttribPointer(secondFilterPositionAttribute, 4, GL_UNSIGNED_BYTE, 0, ((unsigned int)_downsamplingFactor - 1) * 4, vertexSamplingCoordinates); - glDrawArrays(GL_POINTS, 0, inputTextureSize.width * inputTextureSize.height / (CGFloat)_downsamplingFactor); - - [GPUImageContext setActiveShaderProgram:thirdFilterProgram]; - - glVertexAttribPointer(thirdFilterPositionAttribute, 4, GL_UNSIGNED_BYTE, 0, ((unsigned int)_downsamplingFactor - 1) * 4, vertexSamplingCoordinates); - glDrawArrays(GL_POINTS, 0, inputTextureSize.width * inputTextureSize.height / (CGFloat)_downsamplingFactor); - } - - glDisable(GL_BLEND); - [firstInputFramebuffer unlock]; - - if (usingNextFrameForImageCapture) - { - dispatch_semaphore_signal(imageCaptureSemaphore); - } -} - -#pragma mark - -#pragma mark Accessors - -//- (void)setScalingFactor:(CGFloat)newValue; -//{ -// _scalingFactor = newValue; -// -// [GPUImageContext useImageProcessingContext]; -// [filterProgram use]; -// glUniform1f(scalingFactorUniform, _scalingFactor); -//} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramGenerator.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramGenerator.h deleted file mode 100755 index f80c50f3..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramGenerator.h +++ /dev/null @@ -1,8 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageHistogramGenerator : GPUImageFilter -{ - GLint backgroundColorUniform; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramGenerator.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramGenerator.m deleted file mode 100755 index 703795df..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHistogramGenerator.m +++ /dev/null @@ -1,87 +0,0 @@ -#import "GPUImageHistogramGenerator.h" - -NSString *const kGPUImageHistogramGeneratorVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - - varying vec2 textureCoordinate; - varying float height; - - void main() - { - gl_Position = position; - textureCoordinate = vec2(inputTextureCoordinate.x, 0.5); - height = 1.0 - inputTextureCoordinate.y; - } -); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageHistogramGeneratorFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp float height; - - uniform sampler2D inputImageTexture; - uniform lowp vec4 backgroundColor; - - void main() - { - lowp vec3 colorChannels = texture2D(inputImageTexture, textureCoordinate).rgb; - lowp vec4 heightTest = vec4(step(height, colorChannels), 1.0); - gl_FragColor = mix(backgroundColor, heightTest, heightTest.r + heightTest.g + heightTest.b); - } -); -#else -NSString *const kGPUImageHistogramGeneratorFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying float height; - - uniform sampler2D inputImageTexture; - uniform vec4 backgroundColor; - - void main() - { - vec3 colorChannels = texture2D(inputImageTexture, textureCoordinate).rgb; - vec4 heightTest = vec4(step(height, colorChannels), 1.0); - gl_FragColor = mix(backgroundColor, heightTest, heightTest.r + heightTest.g + heightTest.b); - } -); -#endif - -@implementation GPUImageHistogramGenerator - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithVertexShaderFromString:kGPUImageHistogramGeneratorVertexShaderString fragmentShaderFromString:kGPUImageHistogramGeneratorFragmentShaderString])) - { - return nil; - } - - backgroundColorUniform = [filterProgram uniformIndex:@"backgroundColor"]; - - [self setBackgroundColorRed:0.0 green:0.0 blue:0.0 alpha:0.0]; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent; -{ -// GLfloat backgroundColor[4]; -// backgroundColor[0] = redComponent; -// backgroundColor[1] = greenComponent; -// backgroundColor[2] = blueComponent; -// backgroundColor[3] = alphaComponent; - GPUVector4 backgroundColor = {redComponent, greenComponent, blueComponent, alphaComponent}; - - [self setVec4:backgroundColor forUniform:backgroundColorUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHoughTransformLineDetector.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHoughTransformLineDetector.h deleted file mode 100644 index 3ab6977f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHoughTransformLineDetector.h +++ /dev/null @@ -1,49 +0,0 @@ -#import "GPUImageFilterGroup.h" -#import "GPUImageThresholdEdgeDetectionFilter.h" -#import "GPUImageParallelCoordinateLineTransformFilter.h" -#import "GPUImageThresholdedNonMaximumSuppressionFilter.h" -#import "GPUImageCannyEdgeDetectionFilter.h" - -// This applies a Hough transform to detect lines in a scene. It starts with a thresholded Sobel edge detection pass, -// then takes those edge points in and applies a Hough transform to convert them to lines. The intersection of these lines -// is then determined via blending and accumulation, and a non-maximum suppression filter is applied to find local maxima. -// These local maxima are then converted back into lines in normal space and returned via a callback block. -// -// Rather than using one of the standard Hough transform types, this filter uses parallel coordinate space which is far more efficient -// to rasterize on a GPU. -// -// This approach is based entirely on the PC lines process developed by the Graph@FIT research group at the Brno University of Technology -// and described in their publications: -// -// M. Dubská, J. Havel, and A. Herout. Real-Time Detection of Lines using Parallel Coordinates and OpenGL. Proceedings of SCCG 2011, Bratislava, SK, p. 7. -// http://medusa.fit.vutbr.cz/public/data/papers/2011-SCCG-Dubska-Real-Time-Line-Detection-Using-PC-and-OpenGL.pdf -// M. Dubská, J. Havel, and A. Herout. PClines — Line detection using parallel coordinates. 2011 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), p. 1489- 1494. -// http://medusa.fit.vutbr.cz/public/data/papers/2011-CVPR-Dubska-PClines.pdf - -//#define DEBUGLINEDETECTION - -@interface GPUImageHoughTransformLineDetector : GPUImageFilterGroup -{ - GPUImageOutput *thresholdEdgeDetectionFilter; - -// GPUImageThresholdEdgeDetectionFilter *thresholdEdgeDetectionFilter; - GPUImageParallelCoordinateLineTransformFilter *parallelCoordinateLineTransformFilter; - GPUImageThresholdedNonMaximumSuppressionFilter *nonMaximumSuppressionFilter; - - GLfloat *linesArray; - GLubyte *rawImagePixels; -} - -// A threshold value for which a point is detected as belonging to an edge for determining lines. Default is 0.9. -@property(readwrite, nonatomic) CGFloat edgeThreshold; - -// A threshold value for which a local maximum is detected as belonging to a line in parallel coordinate space. Default is 0.20. -@property(readwrite, nonatomic) CGFloat lineDetectionThreshold; - -// This block is called on the detection of lines, usually on every processed frame. A C array containing normalized slopes and intercepts in m, b pairs (y=mx+b) is passed in, along with a count of the number of lines detected and the current timestamp of the video frame -@property(nonatomic, copy) void(^linesDetectedBlock)(GLfloat* lineArray, NSUInteger linesDetected, CMTime frameTime); - -// These images are only enabled when built with DEBUGLINEDETECTION defined, and are used to examine the intermediate states of the Hough transform -@property(nonatomic, readonly, strong) NSMutableArray *intermediateImages; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHoughTransformLineDetector.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHoughTransformLineDetector.m deleted file mode 100644 index 8289eb80..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHoughTransformLineDetector.m +++ /dev/null @@ -1,241 +0,0 @@ -#import "GPUImageHoughTransformLineDetector.h" - -@interface GPUImageHoughTransformLineDetector() - -- (void)extractLineParametersFromImageAtFrameTime:(CMTime)frameTime; - -@end - -@implementation GPUImageHoughTransformLineDetector - -@synthesize linesDetectedBlock; -@synthesize edgeThreshold; -@synthesize lineDetectionThreshold; -@synthesize intermediateImages = _intermediateImages; - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - // First pass: do edge detection and threshold that to just have white pixels for edges -// if ([GPUImageContext deviceSupportsFramebufferReads]) -// if ([GPUImageContext deviceSupportsFramebufferReads]) -// { -// thresholdEdgeDetectionFilter = [[GPUImageThresholdEdgeDetectionFilter alloc] init]; -// thresholdEdgeDetectionFilter = [[GPUImageSobelEdgeDetectionFilter alloc] init]; -// [(GPUImageThresholdEdgeDetectionFilter *)thresholdEdgeDetectionFilter setThreshold:0.07]; -// [(GPUImageThresholdEdgeDetectionFilter *)thresholdEdgeDetectionFilter setEdgeStrength:0.25]; -// [(GPUImageThresholdEdgeDetectionFilter *)thresholdEdgeDetectionFilter setEdgeStrength:1.0]; -// thresholdEdgeDetectionFilter = [[GPUImageCannyEdgeDetectionFilter alloc] init]; -// } -// else -// { - thresholdEdgeDetectionFilter = [[GPUImageCannyEdgeDetectionFilter alloc] init]; -// } - [self addFilter:thresholdEdgeDetectionFilter]; - - // Second pass: extract the white points and draw representative lines in parallel coordinate space - parallelCoordinateLineTransformFilter = [[GPUImageParallelCoordinateLineTransformFilter alloc] init]; - [self addFilter:parallelCoordinateLineTransformFilter]; - - // Third pass: apply non-maximum suppression - if ([GPUImageContext deviceSupportsFramebufferReads]) - { - nonMaximumSuppressionFilter = [[GPUImageThresholdedNonMaximumSuppressionFilter alloc] initWithPackedColorspace:YES]; - } - else - { - nonMaximumSuppressionFilter = [[GPUImageThresholdedNonMaximumSuppressionFilter alloc] initWithPackedColorspace:NO]; - } - [self addFilter:nonMaximumSuppressionFilter]; - - __unsafe_unretained GPUImageHoughTransformLineDetector *weakSelf = self; -#ifdef DEBUGLINEDETECTION - _intermediateImages = [[NSMutableArray alloc] init]; - __unsafe_unretained NSMutableArray *weakIntermediateImages = _intermediateImages; - -// __unsafe_unretained GPUImageOutput *weakEdgeDetectionFilter = thresholdEdgeDetectionFilter; -// [thresholdEdgeDetectionFilter setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime){ -// [weakIntermediateImages removeAllObjects]; -// UIImage *intermediateImage = [weakEdgeDetectionFilter imageFromCurrentFramebuffer]; -// [weakIntermediateImages addObject:intermediateImage]; -// }]; -// -// __unsafe_unretained GPUImageOutput *weakParallelCoordinateLineTransformFilter = parallelCoordinateLineTransformFilter; -// [parallelCoordinateLineTransformFilter setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime){ -// UIImage *intermediateImage = [weakParallelCoordinateLineTransformFilter imageFromCurrentFramebuffer]; -// [weakIntermediateImages addObject:intermediateImage]; -// }]; - - __unsafe_unretained GPUImageOutput *weakNonMaximumSuppressionFilter = nonMaximumSuppressionFilter; - [nonMaximumSuppressionFilter setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime){ - UIImage *intermediateImage = [weakNonMaximumSuppressionFilter imageFromCurrentFramebuffer]; - [weakIntermediateImages addObject:intermediateImage]; - - [weakSelf extractLineParametersFromImageAtFrameTime:frameTime]; - }]; -#else - [nonMaximumSuppressionFilter setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime) { - [weakSelf extractLineParametersFromImageAtFrameTime:frameTime]; - }]; -#endif - - [thresholdEdgeDetectionFilter addTarget:parallelCoordinateLineTransformFilter]; - [parallelCoordinateLineTransformFilter addTarget:nonMaximumSuppressionFilter]; - - self.initialFilters = [NSArray arrayWithObjects:thresholdEdgeDetectionFilter, nil]; - // self.terminalFilter = colorPackingFilter; - self.terminalFilter = nonMaximumSuppressionFilter; - -// self.edgeThreshold = 0.95; - self.lineDetectionThreshold = 0.12; - - return self; -} - -- (void)dealloc; -{ - free(rawImagePixels); - free(linesArray); -} - -#pragma mark - -#pragma mark Corner extraction - -- (void)extractLineParametersFromImageAtFrameTime:(CMTime)frameTime; -{ - // we need a normal color texture for this filter - NSAssert(self.outputTextureOptions.internalFormat == GL_RGBA, @"The output texture format for this filter must be GL_RGBA."); - NSAssert(self.outputTextureOptions.type == GL_UNSIGNED_BYTE, @"The type of the output texture of this filter must be GL_UNSIGNED_BYTE."); - - NSUInteger numberOfLines = 0; - CGSize imageSize = nonMaximumSuppressionFilter.outputFrameSize; - - unsigned int imageByteSize = imageSize.width * imageSize.height * 4; - - if (rawImagePixels == NULL) - { - rawImagePixels = (GLubyte *)malloc(imageByteSize); - linesArray = calloc(1024 * 2, sizeof(GLfloat)); - } - - glReadPixels(0, 0, (int)imageSize.width, (int)imageSize.height, GL_RGBA, GL_UNSIGNED_BYTE, rawImagePixels); - -// CFAbsoluteTime startTime = CFAbsoluteTimeGetCurrent(); - - unsigned int imageWidth = imageSize.width * 4; - - unsigned int currentByte = 0; - unsigned int cornerStorageIndex = 0; - unsigned long lineStrengthCounter = 0; - while (currentByte < imageByteSize) - { - GLubyte colorByte = rawImagePixels[currentByte]; -// NSLog(@"(%d,%d): [%d,%d,%d,%d]", xCoordinate, yCoordinate, rawImagePixels[currentByte], rawImagePixels[currentByte+1], rawImagePixels[currentByte+2], rawImagePixels[currentByte+3]); -// NSLog(@"[%d,%d,%d,%d]", rawImagePixels[currentByte], rawImagePixels[currentByte+1], rawImagePixels[currentByte+2], rawImagePixels[currentByte+3]); - - if (colorByte > 0) - { - unsigned int xCoordinate = currentByte % imageWidth; - unsigned int yCoordinate = currentByte / imageWidth; - - lineStrengthCounter += colorByte; -// NSLog(@"(%d,%d): [%d,%d,%d,%d]", xCoordinate, yCoordinate, rawImagePixels[currentByte], rawImagePixels[currentByte+1], rawImagePixels[currentByte+2], rawImagePixels[currentByte+3]); - - CGFloat normalizedXCoordinate = -1.0 + 2.0 * (CGFloat)(xCoordinate / 4) / imageSize.width; - CGFloat normalizedYCoordinate = -1.0 + 2.0 * (CGFloat)(yCoordinate) / imageSize.height; - - if (normalizedXCoordinate < 0.0) - { - // T space - // m = -1 - d/u - // b = d * v/u - if (normalizedXCoordinate > -0.05) // Test for the case right near the X axis, stamp the X intercept instead of the Y - { - linesArray[cornerStorageIndex++] = 100000.0; - linesArray[cornerStorageIndex++] = normalizedYCoordinate; - } - else - { - linesArray[cornerStorageIndex++] = -1.0 - 1.0 / normalizedXCoordinate; - linesArray[cornerStorageIndex++] = 1.0 * normalizedYCoordinate / normalizedXCoordinate; - } - } - else - { - // S space - // m = 1 - d/u - // b = d * v/u - if (normalizedXCoordinate < 0.05) // Test for the case right near the X axis, stamp the X intercept instead of the Y - { - linesArray[cornerStorageIndex++] = 100000.0; - linesArray[cornerStorageIndex++] = normalizedYCoordinate; - } - else - { - linesArray[cornerStorageIndex++] = 1.0 - 1.0 / normalizedXCoordinate; - linesArray[cornerStorageIndex++] = 1.0 * normalizedYCoordinate / normalizedXCoordinate; - } - } - - numberOfLines++; - - numberOfLines = MIN(numberOfLines, 1023); - cornerStorageIndex = MIN(cornerStorageIndex, 2040); - } - currentByte +=4; - } - -// CFAbsoluteTime currentFrameTime = (CFAbsoluteTimeGetCurrent() - startTime); -// NSLog(@"Processing time : %f ms", 1000.0 * currentFrameTime); - - if (linesDetectedBlock != NULL) - { - linesDetectedBlock(linesArray, numberOfLines, frameTime); - } -} - -- (BOOL)wantsMonochromeInput; -{ -// return YES; - return NO; -} - -#pragma mark - -#pragma mark Accessors - -//- (void)setEdgeThreshold:(CGFloat)newValue; -//{ -// [(GPUImageCannyEdgeDetectionFilter *)thresholdEdgeDetectionFilter setThreshold:newValue]; -//} -// -//- (CGFloat)edgeThreshold; -//{ -// return [(GPUImageCannyEdgeDetectionFilter *)thresholdEdgeDetectionFilter threshold]; -//} - -- (void)setLineDetectionThreshold:(CGFloat)newValue; -{ - nonMaximumSuppressionFilter.threshold = newValue; -} - -- (CGFloat)lineDetectionThreshold; -{ - return nonMaximumSuppressionFilter.threshold; -} - -#ifdef DEBUGLINEDETECTION -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ -// [thresholdEdgeDetectionFilter useNextFrameForImageCapture]; -// [parallelCoordinateLineTransformFilter useNextFrameForImageCapture]; - [nonMaximumSuppressionFilter useNextFrameForImageCapture]; - - [super newFrameReadyAtTime:frameTime atIndex:textureIndex]; -} -#endif - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHueBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHueBlendFilter.h deleted file mode 100644 index 4399ffcf..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHueBlendFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageHueBlendFilter : GPUImageTwoInputFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHueBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHueBlendFilter.m deleted file mode 100644 index f9dfbbb8..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHueBlendFilter.m +++ /dev/null @@ -1,212 +0,0 @@ -#import "GPUImageHueBlendFilter.h" - -/** - * Hue blend mode based upon pseudo code from the PDF specification. - */ -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageHueBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - highp float lum(lowp vec3 c) { - return dot(c, vec3(0.3, 0.59, 0.11)); - } - - lowp vec3 clipcolor(lowp vec3 c) { - highp float l = lum(c); - lowp float n = min(min(c.r, c.g), c.b); - lowp float x = max(max(c.r, c.g), c.b); - - if (n < 0.0) { - c.r = l + ((c.r - l) * l) / (l - n); - c.g = l + ((c.g - l) * l) / (l - n); - c.b = l + ((c.b - l) * l) / (l - n); - } - if (x > 1.0) { - c.r = l + ((c.r - l) * (1.0 - l)) / (x - l); - c.g = l + ((c.g - l) * (1.0 - l)) / (x - l); - c.b = l + ((c.b - l) * (1.0 - l)) / (x - l); - } - - return c; - } - - lowp vec3 setlum(lowp vec3 c, highp float l) { - highp float d = l - lum(c); - c = c + vec3(d); - return clipcolor(c); - } - - highp float sat(lowp vec3 c) { - lowp float n = min(min(c.r, c.g), c.b); - lowp float x = max(max(c.r, c.g), c.b); - return x - n; - } - - lowp float mid(lowp float cmin, lowp float cmid, lowp float cmax, highp float s) { - return ((cmid - cmin) * s) / (cmax - cmin); - } - - lowp vec3 setsat(lowp vec3 c, highp float s) { - if (c.r > c.g) { - if (c.r > c.b) { - if (c.g > c.b) { - /* g is mid, b is min */ - c.g = mid(c.b, c.g, c.r, s); - c.b = 0.0; - } else { - /* b is mid, g is min */ - c.b = mid(c.g, c.b, c.r, s); - c.g = 0.0; - } - c.r = s; - } else { - /* b is max, r is mid, g is min */ - c.r = mid(c.g, c.r, c.b, s); - c.b = s; - c.r = 0.0; - } - } else if (c.r > c.b) { - /* g is max, r is mid, b is min */ - c.r = mid(c.b, c.r, c.g, s); - c.g = s; - c.b = 0.0; - } else if (c.g > c.b) { - /* g is max, b is mid, r is min */ - c.b = mid(c.r, c.b, c.g, s); - c.g = s; - c.r = 0.0; - } else if (c.b > c.g) { - /* b is max, g is mid, r is min */ - c.g = mid(c.r, c.g, c.b, s); - c.b = s; - c.r = 0.0; - } else { - c = vec3(0.0); - } - return c; - } - - void main() - { - highp vec4 baseColor = texture2D(inputImageTexture, textureCoordinate); - highp vec4 overlayColor = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(baseColor.rgb * (1.0 - overlayColor.a) + setlum(setsat(overlayColor.rgb, sat(baseColor.rgb)), lum(baseColor.rgb)) * overlayColor.a, baseColor.a); - } -); -#else -NSString *const kGPUImageHueBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - float lum(vec3 c) { - return dot(c, vec3(0.3, 0.59, 0.11)); - } - - vec3 clipcolor(vec3 c) { - float l = lum(c); - float n = min(min(c.r, c.g), c.b); - float x = max(max(c.r, c.g), c.b); - - if (n < 0.0) { - c.r = l + ((c.r - l) * l) / (l - n); - c.g = l + ((c.g - l) * l) / (l - n); - c.b = l + ((c.b - l) * l) / (l - n); - } - if (x > 1.0) { - c.r = l + ((c.r - l) * (1.0 - l)) / (x - l); - c.g = l + ((c.g - l) * (1.0 - l)) / (x - l); - c.b = l + ((c.b - l) * (1.0 - l)) / (x - l); - } - - return c; - } - - vec3 setlum(vec3 c, float l) { - float d = l - lum(c); - c = c + vec3(d); - return clipcolor(c); - } - - float sat(vec3 c) { - float n = min(min(c.r, c.g), c.b); - float x = max(max(c.r, c.g), c.b); - return x - n; - } - - float mid(float cmin, float cmid, float cmax, float s) { - return ((cmid - cmin) * s) / (cmax - cmin); - } - - vec3 setsat(vec3 c, float s) { - if (c.r > c.g) { - if (c.r > c.b) { - if (c.g > c.b) { - /* g is mid, b is min */ - c.g = mid(c.b, c.g, c.r, s); - c.b = 0.0; - } else { - /* b is mid, g is min */ - c.b = mid(c.g, c.b, c.r, s); - c.g = 0.0; - } - c.r = s; - } else { - /* b is max, r is mid, g is min */ - c.r = mid(c.g, c.r, c.b, s); - c.b = s; - c.r = 0.0; - } - } else if (c.r > c.b) { - /* g is max, r is mid, b is min */ - c.r = mid(c.b, c.r, c.g, s); - c.g = s; - c.b = 0.0; - } else if (c.g > c.b) { - /* g is max, b is mid, r is min */ - c.b = mid(c.r, c.b, c.g, s); - c.g = s; - c.r = 0.0; - } else if (c.b > c.g) { - /* b is max, g is mid, r is min */ - c.g = mid(c.r, c.g, c.b, s); - c.b = s; - c.r = 0.0; - } else { - c = vec3(0.0); - } - return c; - } - - void main() - { - vec4 baseColor = texture2D(inputImageTexture, textureCoordinate); - vec4 overlayColor = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(baseColor.rgb * (1.0 - overlayColor.a) + setlum(setsat(overlayColor.rgb, sat(baseColor.rgb)), lum(baseColor.rgb)) * overlayColor.a, baseColor.a); - } -); -#endif - -@implementation GPUImageHueBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageHueBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHueFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHueFilter.h deleted file mode 100644 index eef24651..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHueFilter.h +++ /dev/null @@ -1,11 +0,0 @@ - -#import "GPUImageFilter.h" - -@interface GPUImageHueFilter : GPUImageFilter -{ - GLint hueAdjustUniform; - -} -@property (nonatomic, readwrite) CGFloat hue; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHueFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHueFilter.m deleted file mode 100644 index 5b42c86d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageHueFilter.m +++ /dev/null @@ -1,123 +0,0 @@ - -#import "GPUImageHueFilter.h" - -// Adapted from http://stackoverflow.com/questions/9234724/how-to-change-hue-of-a-texture-with-glsl - see for code and discussion -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageHueFragmentShaderString = SHADER_STRING -( - precision highp float; - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform mediump float hueAdjust; - const highp vec4 kRGBToYPrime = vec4 (0.299, 0.587, 0.114, 0.0); - const highp vec4 kRGBToI = vec4 (0.595716, -0.274453, -0.321263, 0.0); - const highp vec4 kRGBToQ = vec4 (0.211456, -0.522591, 0.31135, 0.0); - - const highp vec4 kYIQToR = vec4 (1.0, 0.9563, 0.6210, 0.0); - const highp vec4 kYIQToG = vec4 (1.0, -0.2721, -0.6474, 0.0); - const highp vec4 kYIQToB = vec4 (1.0, -1.1070, 1.7046, 0.0); - - void main () - { - // Sample the input pixel - highp vec4 color = texture2D(inputImageTexture, textureCoordinate); - - // Convert to YIQ - highp float YPrime = dot (color, kRGBToYPrime); - highp float I = dot (color, kRGBToI); - highp float Q = dot (color, kRGBToQ); - - // Calculate the hue and chroma - highp float hue = atan (Q, I); - highp float chroma = sqrt (I * I + Q * Q); - - // Make the user's adjustments - hue += (-hueAdjust); //why negative rotation? - - // Convert back to YIQ - Q = chroma * sin (hue); - I = chroma * cos (hue); - - // Convert back to RGB - highp vec4 yIQ = vec4 (YPrime, I, Q, 0.0); - color.r = dot (yIQ, kYIQToR); - color.g = dot (yIQ, kYIQToG); - color.b = dot (yIQ, kYIQToB); - - // Save the result - gl_FragColor = color; - } -); -#else -NSString *const kGPUImageHueFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float hueAdjust; - const vec4 kRGBToYPrime = vec4 (0.299, 0.587, 0.114, 0.0); - const vec4 kRGBToI = vec4 (0.595716, -0.274453, -0.321263, 0.0); - const vec4 kRGBToQ = vec4 (0.211456, -0.522591, 0.31135, 0.0); - - const vec4 kYIQToR = vec4 (1.0, 0.9563, 0.6210, 0.0); - const vec4 kYIQToG = vec4 (1.0, -0.2721, -0.6474, 0.0); - const vec4 kYIQToB = vec4 (1.0, -1.1070, 1.7046, 0.0); - - void main () - { - // Sample the input pixel - vec4 color = texture2D(inputImageTexture, textureCoordinate); - - // Convert to YIQ - float YPrime = dot (color, kRGBToYPrime); - float I = dot (color, kRGBToI); - float Q = dot (color, kRGBToQ); - - // Calculate the hue and chroma - float hue = atan (Q, I); - float chroma = sqrt (I * I + Q * Q); - - // Make the user's adjustments - hue += (-hueAdjust); //why negative rotation? - - // Convert back to YIQ - Q = chroma * sin (hue); - I = chroma * cos (hue); - - // Convert back to RGB - vec4 yIQ = vec4 (YPrime, I, Q, 0.0); - color.r = dot (yIQ, kYIQToR); - color.g = dot (yIQ, kYIQToG); - color.b = dot (yIQ, kYIQToB); - - // Save the result - gl_FragColor = color; - } -); -#endif - -@implementation GPUImageHueFilter -@synthesize hue; - -- (id)init -{ - if(! (self = [super initWithFragmentShaderFromString:kGPUImageHueFragmentShaderString]) ) - { - return nil; - } - - hueAdjustUniform = [filterProgram uniformIndex:@"hueAdjust"]; - self.hue = 90; - - return self; -} - -- (void)setHue:(CGFloat)newHue -{ - // Convert degrees to radians for hue rotation - hue = fmodf(newHue, 360.0) * M_PI/180; - [self setFloat:hue forUniform:hueAdjustUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageJFAVoronoiFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageJFAVoronoiFilter.h deleted file mode 100644 index 4c50cc37..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageJFAVoronoiFilter.h +++ /dev/null @@ -1,17 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageJFAVoronoiFilter : GPUImageFilter -{ - GLuint secondFilterOutputTexture; - GLuint secondFilterFramebuffer; - - - GLint sampleStepUniform; - GLint sizeUniform; - NSUInteger numPasses; - -} - -@property (nonatomic, readwrite) CGSize sizeInPixels; - -@end \ No newline at end of file diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageJFAVoronoiFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageJFAVoronoiFilter.m deleted file mode 100644 index 15835917..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageJFAVoronoiFilter.m +++ /dev/null @@ -1,446 +0,0 @@ -// adapted from unitzeroone - http://unitzeroone.com/labs/jfavoronoi/ - -#import "GPUImageJFAVoronoiFilter.h" - -// The shaders are mostly taken from UnitZeroOne's WebGL example here: -// http://unitzeroone.com/blog/2011/03/22/jump-flood-voronoi-for-webgl/ - -NSString *const kGPUImageJFAVoronoiVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - - uniform float sampleStep; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - void main() - { - gl_Position = position; - - vec2 widthStep = vec2(sampleStep, 0.0); - vec2 heightStep = vec2(0.0, sampleStep); - vec2 widthHeightStep = vec2(sampleStep); - vec2 widthNegativeHeightStep = vec2(sampleStep, -sampleStep); - - textureCoordinate = inputTextureCoordinate.xy; - leftTextureCoordinate = inputTextureCoordinate.xy - widthStep; - rightTextureCoordinate = inputTextureCoordinate.xy + widthStep; - - topTextureCoordinate = inputTextureCoordinate.xy - heightStep; - topLeftTextureCoordinate = inputTextureCoordinate.xy - widthHeightStep; - topRightTextureCoordinate = inputTextureCoordinate.xy + widthNegativeHeightStep; - - bottomTextureCoordinate = inputTextureCoordinate.xy + heightStep; - bottomLeftTextureCoordinate = inputTextureCoordinate.xy - widthNegativeHeightStep; - bottomRightTextureCoordinate = inputTextureCoordinate.xy + widthHeightStep; - } - ); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageJFAVoronoiFragmentShaderString = SHADER_STRING -( - - precision highp float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - uniform vec2 size; - //varying vec2 textureCoordinate; - //uniform float sampleStep; - - vec2 getCoordFromColor(vec4 color) -{ - float z = color.z * 256.0; - float yoff = floor(z / 8.0); - float xoff = mod(z, 8.0); - float x = color.x*256.0 + xoff*256.0; - float y = color.y*256.0 + yoff*256.0; - return vec2(x,y) / size; -} - - void main(void) { - - vec2 sub; - vec4 dst; - vec4 local = texture2D(inputImageTexture, textureCoordinate); - vec4 sam; - float l; - float smallestDist; - if(local.a == 0.0){ - - smallestDist = dot(1.0,1.0); - }else{ - sub = getCoordFromColor(local)-textureCoordinate; - smallestDist = dot(sub,sub); - } - dst = local; - - - sam = texture2D(inputImageTexture, topRightTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, topTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, topLeftTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, bottomRightTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, bottomTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, bottomLeftTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, leftTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, rightTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - gl_FragColor = dst; - } -); -#else -NSString *const kGPUImageJFAVoronoiFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - uniform vec2 size; - //varying vec2 textureCoordinate; - //uniform float sampleStep; - - vec2 getCoordFromColor(vec4 color) -{ - float z = color.z * 256.0; - float yoff = floor(z / 8.0); - float xoff = mod(z, 8.0); - float x = color.x*256.0 + xoff*256.0; - float y = color.y*256.0 + yoff*256.0; - return vec2(x,y) / size; -} - - void main(void) { - - vec2 sub; - vec4 dst; - vec4 local = texture2D(inputImageTexture, textureCoordinate); - vec4 sam; - float l; - float smallestDist; - if(local.a == 0.0){ - - smallestDist = dot(1.0,1.0); - }else{ - sub = getCoordFromColor(local)-textureCoordinate; - smallestDist = dot(sub,sub); - } - dst = local; - - - sam = texture2D(inputImageTexture, topRightTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, topTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, topLeftTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, bottomRightTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, bottomTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, bottomLeftTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, leftTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - - sam = texture2D(inputImageTexture, rightTextureCoordinate); - if(sam.a == 1.0){ - sub = (getCoordFromColor(sam)-textureCoordinate); - l = dot(sub,sub); - if(l < smallestDist){ - smallestDist = l; - dst = sam; - } - } - gl_FragColor = dst; - } -); -#endif - -@interface GPUImageJFAVoronoiFilter() { - int currentPass; -} - - -@end - -@implementation GPUImageJFAVoronoiFilter - -@synthesize sizeInPixels = _sizeInPixels; - -- (id)init; -{ - if (!(self = [super initWithVertexShaderFromString:kGPUImageJFAVoronoiVertexShaderString fragmentShaderFromString:kGPUImageJFAVoronoiFragmentShaderString])) - { - - NSLog(@"nil returned"); - return nil; - - } - - sampleStepUniform = [filterProgram uniformIndex:@"sampleStep"]; - sizeUniform = [filterProgram uniformIndex:@"size"]; - //[self disableSecondFrameCheck]; - - return self; -} - --(void)setSizeInPixels:(CGSize)sizeInPixels { - _sizeInPixels = sizeInPixels; - - //validate that it's a power of 2 - - float width = log2(sizeInPixels.width); - float height = log2(sizeInPixels.height); - - if (width != height) { - NSLog(@"Voronoi point texture must be square"); - return; - } - if (width != floor(width) || height != floor(height)) { - NSLog(@"Voronoi point texture must be a power of 2. Texture size: %f, %f", sizeInPixels.width, sizeInPixels.height); - return; - } - glUniform2f(sizeUniform, _sizeInPixels.width, _sizeInPixels.height); -} - -#pragma mark - -#pragma mark Managing the display FBOs - --(NSUInteger)nextPowerOfTwo:(CGPoint)input { - NSUInteger val; - if (input.x > input.y) { - val = (NSUInteger)input.x; - } else { - val = (NSUInteger)input.y; - } - - val--; - val = (val >> 1) | val; - val = (val >> 2) | val; - val = (val >> 4) | val; - val = (val >> 8) | val; - val = (val >> 16) | val; - val++; - return val; -} - -//- (void)setOutputFBO; -//{ -// if (currentPass % 2 == 1) { -// [self setSecondFilterFBO]; -// } else { -// [self setFilterFBO]; -// } -// -//} - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - // Run the first stage of the two-pass filter - [GPUImageContext setActiveShaderProgram:filterProgram]; - currentPass = 0; - - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - - glActiveTexture(GL_TEXTURE2); - - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - glUniform1f(sampleStepUniform, 0.5); - - glUniform2f(sizeUniform, _sizeInPixels.width, _sizeInPixels.height); - - glBindTexture(GL_TEXTURE_2D, [firstInputFramebuffer texture]); - - glUniform1i(filterInputTextureUniform, 2); - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - glVertexAttribPointer(filterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - for (int pass = 1; pass <= numPasses + 1; pass++) { - currentPass = pass; -// [self setOutputFBO]; - - //glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - glActiveTexture(GL_TEXTURE2); - if (pass % 2 == 0) { - glBindTexture(GL_TEXTURE_2D, secondFilterOutputTexture); - } else { - glBindTexture(GL_TEXTURE_2D, [outputFramebuffer texture]); - } - glUniform1i(filterInputTextureUniform, 2); - - float step = pow(2.0, numPasses - pass) / pow(2.0, numPasses); - glUniform1f(sampleStepUniform, step); - glUniform2f(sizeUniform, _sizeInPixels.width, _sizeInPixels.height); - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - glVertexAttribPointer(filterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - } -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageKuwaharaFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageKuwaharaFilter.h deleted file mode 100755 index 4fb0bce8..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageKuwaharaFilter.h +++ /dev/null @@ -1,13 +0,0 @@ -#import "GPUImageFilter.h" - -/** Kuwahara image abstraction, drawn from the work of Kyprianidis, et. al. in their publication "Anisotropic Kuwahara Filtering on the GPU" within the GPU Pro collection. This produces an oil-painting-like image, but it is extremely computationally expensive, so it can take seconds to render a frame on an iPad 2. This might be best used for still images. - */ -@interface GPUImageKuwaharaFilter : GPUImageFilter -{ - GLint radiusUniform; -} - -/// The radius to sample from when creating the brush-stroke effect, with a default of 3. The larger the radius, the slower the filter. -@property(readwrite, nonatomic) NSUInteger radius; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageKuwaharaFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageKuwaharaFilter.m deleted file mode 100755 index 9061dbf3..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageKuwaharaFilter.m +++ /dev/null @@ -1,223 +0,0 @@ -#import "GPUImageKuwaharaFilter.h" - -// Sourced from Kyprianidis, J. E., Kang, H., and Doellner, J. "Anisotropic Kuwahara Filtering on the GPU," GPU Pro p.247 (2010). -// -// Original header: -// -// Anisotropic Kuwahara Filtering on the GPU -// by Jan Eric Kyprianidis - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageKuwaharaFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform int radius; - - precision highp float; - - const vec2 src_size = vec2 (1.0 / 768.0, 1.0 / 1024.0); - - void main (void) - { - vec2 uv = textureCoordinate; - float n = float((radius + 1) * (radius + 1)); - int i; int j; - vec3 m0 = vec3(0.0); vec3 m1 = vec3(0.0); vec3 m2 = vec3(0.0); vec3 m3 = vec3(0.0); - vec3 s0 = vec3(0.0); vec3 s1 = vec3(0.0); vec3 s2 = vec3(0.0); vec3 s3 = vec3(0.0); - vec3 c; - - for (j = -radius; j <= 0; ++j) { - for (i = -radius; i <= 0; ++i) { - c = texture2D(inputImageTexture, uv + vec2(i,j) * src_size).rgb; - m0 += c; - s0 += c * c; - } - } - - for (j = -radius; j <= 0; ++j) { - for (i = 0; i <= radius; ++i) { - c = texture2D(inputImageTexture, uv + vec2(i,j) * src_size).rgb; - m1 += c; - s1 += c * c; - } - } - - for (j = 0; j <= radius; ++j) { - for (i = 0; i <= radius; ++i) { - c = texture2D(inputImageTexture, uv + vec2(i,j) * src_size).rgb; - m2 += c; - s2 += c * c; - } - } - - for (j = 0; j <= radius; ++j) { - for (i = -radius; i <= 0; ++i) { - c = texture2D(inputImageTexture, uv + vec2(i,j) * src_size).rgb; - m3 += c; - s3 += c * c; - } - } - - - float min_sigma2 = 1e+2; - m0 /= n; - s0 = abs(s0 / n - m0 * m0); - - float sigma2 = s0.r + s0.g + s0.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m0, 1.0); - } - - m1 /= n; - s1 = abs(s1 / n - m1 * m1); - - sigma2 = s1.r + s1.g + s1.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m1, 1.0); - } - - m2 /= n; - s2 = abs(s2 / n - m2 * m2); - - sigma2 = s2.r + s2.g + s2.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m2, 1.0); - } - - m3 /= n; - s3 = abs(s3 / n - m3 * m3); - - sigma2 = s3.r + s3.g + s3.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m3, 1.0); - } - } -); -#else -NSString *const kGPUImageKuwaharaFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform int radius; - - const vec2 src_size = vec2 (1.0 / 768.0, 1.0 / 1024.0); - - void main (void) - { - vec2 uv = textureCoordinate; - float n = float((radius + 1) * (radius + 1)); - int i; int j; - vec3 m0 = vec3(0.0); vec3 m1 = vec3(0.0); vec3 m2 = vec3(0.0); vec3 m3 = vec3(0.0); - vec3 s0 = vec3(0.0); vec3 s1 = vec3(0.0); vec3 s2 = vec3(0.0); vec3 s3 = vec3(0.0); - vec3 c; - - for (j = -radius; j <= 0; ++j) { - for (i = -radius; i <= 0; ++i) { - c = texture2D(inputImageTexture, uv + vec2(i,j) * src_size).rgb; - m0 += c; - s0 += c * c; - } - } - - for (j = -radius; j <= 0; ++j) { - for (i = 0; i <= radius; ++i) { - c = texture2D(inputImageTexture, uv + vec2(i,j) * src_size).rgb; - m1 += c; - s1 += c * c; - } - } - - for (j = 0; j <= radius; ++j) { - for (i = 0; i <= radius; ++i) { - c = texture2D(inputImageTexture, uv + vec2(i,j) * src_size).rgb; - m2 += c; - s2 += c * c; - } - } - - for (j = 0; j <= radius; ++j) { - for (i = -radius; i <= 0; ++i) { - c = texture2D(inputImageTexture, uv + vec2(i,j) * src_size).rgb; - m3 += c; - s3 += c * c; - } - } - - - float min_sigma2 = 1e+2; - m0 /= n; - s0 = abs(s0 / n - m0 * m0); - - float sigma2 = s0.r + s0.g + s0.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m0, 1.0); - } - - m1 /= n; - s1 = abs(s1 / n - m1 * m1); - - sigma2 = s1.r + s1.g + s1.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m1, 1.0); - } - - m2 /= n; - s2 = abs(s2 / n - m2 * m2); - - sigma2 = s2.r + s2.g + s2.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m2, 1.0); - } - - m3 /= n; - s3 = abs(s3 / n - m3 * m3); - - sigma2 = s3.r + s3.g + s3.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m3, 1.0); - } - } -); -#endif - -@implementation GPUImageKuwaharaFilter - -@synthesize radius = _radius; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageKuwaharaFragmentShaderString])) - { - return nil; - } - - radiusUniform = [filterProgram uniformIndex:@"radius"]; - - self.radius = 3; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setRadius:(NSUInteger)newValue; -{ - _radius = newValue; - - [self setInteger:(GLint)_radius forUniform:radiusUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageKuwaharaRadius3Filter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageKuwaharaRadius3Filter.h deleted file mode 100644 index c4591b81..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageKuwaharaRadius3Filter.h +++ /dev/null @@ -1,8 +0,0 @@ -// -// GPUImageKuwaharaRadius3Filter.h - -#import "GPUImageFilter.h" - -@interface GPUImageKuwaharaRadius3Filter : GPUImageFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageKuwaharaRadius3Filter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageKuwaharaRadius3Filter.m deleted file mode 100644 index 98b092c6..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageKuwaharaRadius3Filter.m +++ /dev/null @@ -1,547 +0,0 @@ -#import "GPUImageKuwaharaRadius3Filter.h" - -// Sourced from Kyprianidis, J. E., Kang, H., and Doellner, J. "Anisotropic Kuwahara Filtering on the GPU," GPU Pro p.247 (2010). -// -// Original header: -// -// Anisotropic Kuwahara Filtering on the GPU -// by Jan Eric Kyprianidis - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageKuwaharaRadius3FragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - - precision highp float; - - const vec2 src_size = vec2 (1.0 / 768.0, 1.0 / 1024.0); - - void main (void) - { - vec2 uv = textureCoordinate; - float n = float(16); // radius is assumed to be 3 - vec3 m0 = vec3(0.0); vec3 m1 = vec3(0.0); vec3 m2 = vec3(0.0); vec3 m3 = vec3(0.0); - vec3 s0 = vec3(0.0); vec3 s1 = vec3(0.0); vec3 s2 = vec3(0.0); vec3 s3 = vec3(0.0); - vec3 c; - vec3 cSq; - - c = texture2D(inputImageTexture, uv + vec2(-3,-3) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-3,-2) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-3,-1) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-3,0) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m1 += c; - s1 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(-2,-3) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-2,-2) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-2,-1) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-2,0) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m1 += c; - s1 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(-1,-3) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-1,-2) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-1,-1) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-1,0) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m1 += c; - s1 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(0,-3) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m3 += c; - s3 += cSq; - c = texture2D(inputImageTexture, uv + vec2(0,-2) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m3 += c; - s3 += cSq; - c = texture2D(inputImageTexture, uv + vec2(0,-1) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m3 += c; - s3 += cSq; - c = texture2D(inputImageTexture, uv + vec2(0,0) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m1 += c; - s1 += cSq; - m2 += c; - s2 += cSq; - m3 += c; - s3 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(-3,3) * src_size).rgb; - m1 += c; - s1 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-3,2) * src_size).rgb; - m1 += c; - s1 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-3,1) * src_size).rgb; - m1 += c; - s1 += c * c; - - c = texture2D(inputImageTexture, uv + vec2(-2,3) * src_size).rgb; - m1 += c; - s1 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-2,2) * src_size).rgb; - m1 += c; - s1 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-2,1) * src_size).rgb; - m1 += c; - s1 += c * c; - - c = texture2D(inputImageTexture, uv + vec2(-1,3) * src_size).rgb; - m1 += c; - s1 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-1,2) * src_size).rgb; - m1 += c; - s1 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-1,1) * src_size).rgb; - m1 += c; - s1 += c * c; - - c = texture2D(inputImageTexture, uv + vec2(0,3) * src_size).rgb; - cSq = c * c; - m1 += c; - s1 += cSq; - m2 += c; - s2 += cSq; - c = texture2D(inputImageTexture, uv + vec2(0,2) * src_size).rgb; - cSq = c * c; - m1 += c; - s1 += cSq; - m2 += c; - s2 += cSq; - c = texture2D(inputImageTexture, uv + vec2(0,1) * src_size).rgb; - cSq = c * c; - m1 += c; - s1 += cSq; - m2 += c; - s2 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(3,3) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(3,2) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(3,1) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(3,0) * src_size).rgb; - cSq = c * c; - m2 += c; - s2 += cSq; - m3 += c; - s3 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(2,3) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(2,2) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(2,1) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(2,0) * src_size).rgb; - cSq = c * c; - m2 += c; - s2 += cSq; - m3 += c; - s3 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(1,3) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(1,2) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(1,1) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(1,0) * src_size).rgb; - cSq = c * c; - m2 += c; - s2 += cSq; - m3 += c; - s3 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(3,-3) * src_size).rgb; - m3 += c; - s3 += c * c; - c = texture2D(inputImageTexture, uv + vec2(3,-2) * src_size).rgb; - m3 += c; - s3 += c * c; - c = texture2D(inputImageTexture, uv + vec2(3,-1) * src_size).rgb; - m3 += c; - s3 += c * c; - - c = texture2D(inputImageTexture, uv + vec2(2,-3) * src_size).rgb; - m3 += c; - s3 += c * c; - c = texture2D(inputImageTexture, uv + vec2(2,-2) * src_size).rgb; - m3 += c; - s3 += c * c; - c = texture2D(inputImageTexture, uv + vec2(2,-1) * src_size).rgb; - m3 += c; - s3 += c * c; - - c = texture2D(inputImageTexture, uv + vec2(1,-3) * src_size).rgb; - m3 += c; - s3 += c * c; - c = texture2D(inputImageTexture, uv + vec2(1,-2) * src_size).rgb; - m3 += c; - s3 += c * c; - c = texture2D(inputImageTexture, uv + vec2(1,-1) * src_size).rgb; - m3 += c; - s3 += c * c; - - float min_sigma2 = 1e+2; - m0 /= n; - s0 = abs(s0 / n - m0 * m0); - - float sigma2 = s0.r + s0.g + s0.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m0, 1.0); - } - - m1 /= n; - s1 = abs(s1 / n - m1 * m1); - - sigma2 = s1.r + s1.g + s1.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m1, 1.0); - } - - m2 /= n; - s2 = abs(s2 / n - m2 * m2); - - sigma2 = s2.r + s2.g + s2.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m2, 1.0); - } - - m3 /= n; - s3 = abs(s3 / n - m3 * m3); - - sigma2 = s3.r + s3.g + s3.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m3, 1.0); - } - } -); -#else -NSString *const kGPUImageKuwaharaRadius3FragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - - const vec2 src_size = vec2 (1.0 / 768.0, 1.0 / 1024.0); - - void main (void) - { - vec2 uv = textureCoordinate; - float n = float(16); // radius is assumed to be 3 - vec3 m0 = vec3(0.0); vec3 m1 = vec3(0.0); vec3 m2 = vec3(0.0); vec3 m3 = vec3(0.0); - vec3 s0 = vec3(0.0); vec3 s1 = vec3(0.0); vec3 s2 = vec3(0.0); vec3 s3 = vec3(0.0); - vec3 c; - vec3 cSq; - - c = texture2D(inputImageTexture, uv + vec2(-3,-3) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-3,-2) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-3,-1) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-3,0) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m1 += c; - s1 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(-2,-3) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-2,-2) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-2,-1) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-2,0) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m1 += c; - s1 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(-1,-3) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-1,-2) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-1,-1) * src_size).rgb; - m0 += c; - s0 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-1,0) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m1 += c; - s1 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(0,-3) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m3 += c; - s3 += cSq; - c = texture2D(inputImageTexture, uv + vec2(0,-2) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m3 += c; - s3 += cSq; - c = texture2D(inputImageTexture, uv + vec2(0,-1) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m3 += c; - s3 += cSq; - c = texture2D(inputImageTexture, uv + vec2(0,0) * src_size).rgb; - cSq = c * c; - m0 += c; - s0 += cSq; - m1 += c; - s1 += cSq; - m2 += c; - s2 += cSq; - m3 += c; - s3 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(-3,3) * src_size).rgb; - m1 += c; - s1 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-3,2) * src_size).rgb; - m1 += c; - s1 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-3,1) * src_size).rgb; - m1 += c; - s1 += c * c; - - c = texture2D(inputImageTexture, uv + vec2(-2,3) * src_size).rgb; - m1 += c; - s1 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-2,2) * src_size).rgb; - m1 += c; - s1 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-2,1) * src_size).rgb; - m1 += c; - s1 += c * c; - - c = texture2D(inputImageTexture, uv + vec2(-1,3) * src_size).rgb; - m1 += c; - s1 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-1,2) * src_size).rgb; - m1 += c; - s1 += c * c; - c = texture2D(inputImageTexture, uv + vec2(-1,1) * src_size).rgb; - m1 += c; - s1 += c * c; - - c = texture2D(inputImageTexture, uv + vec2(0,3) * src_size).rgb; - cSq = c * c; - m1 += c; - s1 += cSq; - m2 += c; - s2 += cSq; - c = texture2D(inputImageTexture, uv + vec2(0,2) * src_size).rgb; - cSq = c * c; - m1 += c; - s1 += cSq; - m2 += c; - s2 += cSq; - c = texture2D(inputImageTexture, uv + vec2(0,1) * src_size).rgb; - cSq = c * c; - m1 += c; - s1 += cSq; - m2 += c; - s2 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(3,3) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(3,2) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(3,1) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(3,0) * src_size).rgb; - cSq = c * c; - m2 += c; - s2 += cSq; - m3 += c; - s3 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(2,3) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(2,2) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(2,1) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(2,0) * src_size).rgb; - cSq = c * c; - m2 += c; - s2 += cSq; - m3 += c; - s3 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(1,3) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(1,2) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(1,1) * src_size).rgb; - m2 += c; - s2 += c * c; - c = texture2D(inputImageTexture, uv + vec2(1,0) * src_size).rgb; - cSq = c * c; - m2 += c; - s2 += cSq; - m3 += c; - s3 += cSq; - - c = texture2D(inputImageTexture, uv + vec2(3,-3) * src_size).rgb; - m3 += c; - s3 += c * c; - c = texture2D(inputImageTexture, uv + vec2(3,-2) * src_size).rgb; - m3 += c; - s3 += c * c; - c = texture2D(inputImageTexture, uv + vec2(3,-1) * src_size).rgb; - m3 += c; - s3 += c * c; - - c = texture2D(inputImageTexture, uv + vec2(2,-3) * src_size).rgb; - m3 += c; - s3 += c * c; - c = texture2D(inputImageTexture, uv + vec2(2,-2) * src_size).rgb; - m3 += c; - s3 += c * c; - c = texture2D(inputImageTexture, uv + vec2(2,-1) * src_size).rgb; - m3 += c; - s3 += c * c; - - c = texture2D(inputImageTexture, uv + vec2(1,-3) * src_size).rgb; - m3 += c; - s3 += c * c; - c = texture2D(inputImageTexture, uv + vec2(1,-2) * src_size).rgb; - m3 += c; - s3 += c * c; - c = texture2D(inputImageTexture, uv + vec2(1,-1) * src_size).rgb; - m3 += c; - s3 += c * c; - - float min_sigma2 = 1e+2; - m0 /= n; - s0 = abs(s0 / n - m0 * m0); - - float sigma2 = s0.r + s0.g + s0.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m0, 1.0); - } - - m1 /= n; - s1 = abs(s1 / n - m1 * m1); - - sigma2 = s1.r + s1.g + s1.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m1, 1.0); - } - - m2 /= n; - s2 = abs(s2 / n - m2 * m2); - - sigma2 = s2.r + s2.g + s2.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m2, 1.0); - } - - m3 /= n; - s3 = abs(s3 / n - m3 * m3); - - sigma2 = s3.r + s3.g + s3.b; - if (sigma2 < min_sigma2) { - min_sigma2 = sigma2; - gl_FragColor = vec4(m3, 1.0); - } - } -); -#endif - -@implementation GPUImageKuwaharaRadius3Filter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageKuwaharaRadius3FragmentShaderString])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLanczosResamplingFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLanczosResamplingFilter.h deleted file mode 100644 index 5d7409f5..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLanczosResamplingFilter.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "GPUImageTwoPassTextureSamplingFilter.h" - -@interface GPUImageLanczosResamplingFilter : GPUImageTwoPassTextureSamplingFilter - -@property(readwrite, nonatomic) CGSize originalImageSize; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLanczosResamplingFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLanczosResamplingFilter.m deleted file mode 100644 index a655f486..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLanczosResamplingFilter.m +++ /dev/null @@ -1,239 +0,0 @@ -#import "GPUImageLanczosResamplingFilter.h" - -NSString *const kGPUImageLanczosVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec2 inputTextureCoordinate; - - uniform float texelWidthOffset; - uniform float texelHeightOffset; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepLeftTextureCoordinate; - varying vec2 twoStepsLeftTextureCoordinate; - varying vec2 threeStepsLeftTextureCoordinate; - varying vec2 fourStepsLeftTextureCoordinate; - varying vec2 oneStepRightTextureCoordinate; - varying vec2 twoStepsRightTextureCoordinate; - varying vec2 threeStepsRightTextureCoordinate; - varying vec2 fourStepsRightTextureCoordinate; - - void main() - { - gl_Position = position; - - vec2 firstOffset = vec2(texelWidthOffset, texelHeightOffset); - vec2 secondOffset = vec2(2.0 * texelWidthOffset, 2.0 * texelHeightOffset); - vec2 thirdOffset = vec2(3.0 * texelWidthOffset, 3.0 * texelHeightOffset); - vec2 fourthOffset = vec2(4.0 * texelWidthOffset, 4.0 * texelHeightOffset); - - centerTextureCoordinate = inputTextureCoordinate; - oneStepLeftTextureCoordinate = inputTextureCoordinate - firstOffset; - twoStepsLeftTextureCoordinate = inputTextureCoordinate - secondOffset; - threeStepsLeftTextureCoordinate = inputTextureCoordinate - thirdOffset; - fourStepsLeftTextureCoordinate = inputTextureCoordinate - fourthOffset; - oneStepRightTextureCoordinate = inputTextureCoordinate + firstOffset; - twoStepsRightTextureCoordinate = inputTextureCoordinate + secondOffset; - threeStepsRightTextureCoordinate = inputTextureCoordinate + thirdOffset; - fourStepsRightTextureCoordinate = inputTextureCoordinate + fourthOffset; - } -); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLanczosFragmentShaderString = SHADER_STRING -( - precision highp float; - - uniform sampler2D inputImageTexture; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepLeftTextureCoordinate; - varying vec2 twoStepsLeftTextureCoordinate; - varying vec2 threeStepsLeftTextureCoordinate; - varying vec2 fourStepsLeftTextureCoordinate; - varying vec2 oneStepRightTextureCoordinate; - varying vec2 twoStepsRightTextureCoordinate; - varying vec2 threeStepsRightTextureCoordinate; - varying vec2 fourStepsRightTextureCoordinate; - - // sinc(x) * sinc(x/a) = (a * sin(pi * x) * sin(pi * x / a)) / (pi^2 * x^2) - // Assuming a Lanczos constant of 2.0, and scaling values to max out at x = +/- 1.5 - - void main() - { - lowp vec4 fragmentColor = texture2D(inputImageTexture, centerTextureCoordinate) * 0.38026; - - fragmentColor += texture2D(inputImageTexture, oneStepLeftTextureCoordinate) * 0.27667; - fragmentColor += texture2D(inputImageTexture, oneStepRightTextureCoordinate) * 0.27667; - - fragmentColor += texture2D(inputImageTexture, twoStepsLeftTextureCoordinate) * 0.08074; - fragmentColor += texture2D(inputImageTexture, twoStepsRightTextureCoordinate) * 0.08074; - - fragmentColor += texture2D(inputImageTexture, threeStepsLeftTextureCoordinate) * -0.02612; - fragmentColor += texture2D(inputImageTexture, threeStepsRightTextureCoordinate) * -0.02612; - - fragmentColor += texture2D(inputImageTexture, fourStepsLeftTextureCoordinate) * -0.02143; - fragmentColor += texture2D(inputImageTexture, fourStepsRightTextureCoordinate) * -0.02143; - - gl_FragColor = fragmentColor; - } -); -#else -NSString *const kGPUImageLanczosFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepLeftTextureCoordinate; - varying vec2 twoStepsLeftTextureCoordinate; - varying vec2 threeStepsLeftTextureCoordinate; - varying vec2 fourStepsLeftTextureCoordinate; - varying vec2 oneStepRightTextureCoordinate; - varying vec2 twoStepsRightTextureCoordinate; - varying vec2 threeStepsRightTextureCoordinate; - varying vec2 fourStepsRightTextureCoordinate; - - // sinc(x) * sinc(x/a) = (a * sin(pi * x) * sin(pi * x / a)) / (pi^2 * x^2) - // Assuming a Lanczos constant of 2.0, and scaling values to max out at x = +/- 1.5 - - void main() - { - vec4 fragmentColor = texture2D(inputImageTexture, centerTextureCoordinate) * 0.38026; - - fragmentColor += texture2D(inputImageTexture, oneStepLeftTextureCoordinate) * 0.27667; - fragmentColor += texture2D(inputImageTexture, oneStepRightTextureCoordinate) * 0.27667; - - fragmentColor += texture2D(inputImageTexture, twoStepsLeftTextureCoordinate) * 0.08074; - fragmentColor += texture2D(inputImageTexture, twoStepsRightTextureCoordinate) * 0.08074; - - fragmentColor += texture2D(inputImageTexture, threeStepsLeftTextureCoordinate) * -0.02612; - fragmentColor += texture2D(inputImageTexture, threeStepsRightTextureCoordinate) * -0.02612; - - fragmentColor += texture2D(inputImageTexture, fourStepsLeftTextureCoordinate) * -0.02143; - fragmentColor += texture2D(inputImageTexture, fourStepsRightTextureCoordinate) * -0.02143; - - gl_FragColor = fragmentColor; - } -); -#endif - -@implementation GPUImageLanczosResamplingFilter - -@synthesize originalImageSize = _originalImageSize; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFirstStageVertexShaderFromString:kGPUImageLanczosVertexShaderString firstStageFragmentShaderFromString:kGPUImageLanczosFragmentShaderString secondStageVertexShaderFromString:kGPUImageLanczosVertexShaderString secondStageFragmentShaderFromString:kGPUImageLanczosFragmentShaderString])) - { - return nil; - } - - return self; -} - -// Base texture sampling offset on the input image, not the final size -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - self.originalImageSize = newSize; - [super setInputSize:newSize atIndex:textureIndex]; -} - -- (void)setupFilterForSize:(CGSize)filterFrameSize; -{ - runSynchronouslyOnVideoProcessingQueue(^{ - // The first pass through the framebuffer may rotate the inbound image, so need to account for that by changing up the kernel ordering for that pass - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - verticalPassTexelWidthOffset = 1.0 / _originalImageSize.height; - verticalPassTexelHeightOffset = 0.0; - } - else - { - verticalPassTexelWidthOffset = 0.0; - verticalPassTexelHeightOffset = 1.0 / _originalImageSize.height; - } - - horizontalPassTexelWidthOffset = 1.0 / _originalImageSize.width; - horizontalPassTexelHeightOffset = 0.0; - }); -} - - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - if (self.preventRendering) - { - [firstInputFramebuffer unlock]; - return; - } - - [GPUImageContext setActiveShaderProgram:filterProgram]; - - CGSize currentFBOSize = [self sizeOfFBO]; - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - currentFBOSize.height = self.originalImageSize.height; - } - else - { - currentFBOSize.width = self.originalImageSize.width; - } - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:currentFBOSize textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - - [self setUniformsForProgramAtIndex:0]; - - glClearColor(backgroundColorRed, backgroundColorGreen, backgroundColorBlue, backgroundColorAlpha); - glClear(GL_COLOR_BUFFER_BIT); - - glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, [firstInputFramebuffer texture]); - - glUniform1i(filterInputTextureUniform, 2); - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - glVertexAttribPointer(filterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - [firstInputFramebuffer unlock]; - - // Run the second stage of the two-pass filter - [GPUImageContext setActiveShaderProgram:secondFilterProgram]; - glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, 0); - glActiveTexture(GL_TEXTURE3); - glBindTexture(GL_TEXTURE_2D, 0); - secondOutputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [secondOutputFramebuffer activateFramebuffer]; - if (usingNextFrameForImageCapture) - { - [secondOutputFramebuffer lock]; - } - - [self setUniformsForProgramAtIndex:1]; - - glActiveTexture(GL_TEXTURE3); - glBindTexture(GL_TEXTURE_2D, [outputFramebuffer texture]); - glVertexAttribPointer(secondFilterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, [[self class] textureCoordinatesForRotation:kGPUImageNoRotation]); - - glUniform1i(secondFilterInputTextureUniform, 3); - - glVertexAttribPointer(secondFilterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - [outputFramebuffer unlock]; - outputFramebuffer = nil; - if (usingNextFrameForImageCapture) - { - dispatch_semaphore_signal(imageCaptureSemaphore); - } -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLaplacianFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLaplacianFilter.h deleted file mode 100644 index 267c1bab..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLaplacianFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImage3x3ConvolutionFilter.h" - -@interface GPUImageLaplacianFilter : GPUImage3x3ConvolutionFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLaplacianFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLaplacianFilter.m deleted file mode 100644 index 98b78509..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLaplacianFilter.m +++ /dev/null @@ -1,115 +0,0 @@ -#import "GPUImageLaplacianFilter.h" -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLaplacianFragmentShaderString = SHADER_STRING -( - precision highp float; - - uniform sampler2D inputImageTexture; - - uniform mediump mat3 convolutionMatrix; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - void main() - { - mediump vec3 bottomColor = texture2D(inputImageTexture, bottomTextureCoordinate).rgb; - mediump vec3 bottomLeftColor = texture2D(inputImageTexture, bottomLeftTextureCoordinate).rgb; - mediump vec3 bottomRightColor = texture2D(inputImageTexture, bottomRightTextureCoordinate).rgb; - mediump vec4 centerColor = texture2D(inputImageTexture, textureCoordinate); - mediump vec3 leftColor = texture2D(inputImageTexture, leftTextureCoordinate).rgb; - mediump vec3 rightColor = texture2D(inputImageTexture, rightTextureCoordinate).rgb; - mediump vec3 topColor = texture2D(inputImageTexture, topTextureCoordinate).rgb; - mediump vec3 topRightColor = texture2D(inputImageTexture, topRightTextureCoordinate).rgb; - mediump vec3 topLeftColor = texture2D(inputImageTexture, topLeftTextureCoordinate).rgb; - - mediump vec3 resultColor = topLeftColor * convolutionMatrix[0][0] + topColor * convolutionMatrix[0][1] + topRightColor * convolutionMatrix[0][2]; - resultColor += leftColor * convolutionMatrix[1][0] + centerColor.rgb * convolutionMatrix[1][1] + rightColor * convolutionMatrix[1][2]; - resultColor += bottomLeftColor * convolutionMatrix[2][0] + bottomColor * convolutionMatrix[2][1] + bottomRightColor * convolutionMatrix[2][2]; - - // Normalize the results to allow for negative gradients in the 0.0-1.0 colorspace - resultColor = resultColor + 0.5; - - gl_FragColor = vec4(resultColor, centerColor.a); - } -); -#else -NSString *const kGPUImageLaplacianFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - uniform mat3 convolutionMatrix; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - void main() - { - vec3 bottomColor = texture2D(inputImageTexture, bottomTextureCoordinate).rgb; - vec3 bottomLeftColor = texture2D(inputImageTexture, bottomLeftTextureCoordinate).rgb; - vec3 bottomRightColor = texture2D(inputImageTexture, bottomRightTextureCoordinate).rgb; - vec4 centerColor = texture2D(inputImageTexture, textureCoordinate); - vec3 leftColor = texture2D(inputImageTexture, leftTextureCoordinate).rgb; - vec3 rightColor = texture2D(inputImageTexture, rightTextureCoordinate).rgb; - vec3 topColor = texture2D(inputImageTexture, topTextureCoordinate).rgb; - vec3 topRightColor = texture2D(inputImageTexture, topRightTextureCoordinate).rgb; - vec3 topLeftColor = texture2D(inputImageTexture, topLeftTextureCoordinate).rgb; - - vec3 resultColor = topLeftColor * convolutionMatrix[0][0] + topColor * convolutionMatrix[0][1] + topRightColor * convolutionMatrix[0][2]; - resultColor += leftColor * convolutionMatrix[1][0] + centerColor.rgb * convolutionMatrix[1][1] + rightColor * convolutionMatrix[1][2]; - resultColor += bottomLeftColor * convolutionMatrix[2][0] + bottomColor * convolutionMatrix[2][1] + bottomRightColor * convolutionMatrix[2][2]; - - // Normalize the results to allow for negative gradients in the 0.0-1.0 colorspace - resultColor = resultColor + 0.5; - - gl_FragColor = vec4(resultColor, centerColor.a); - } -); -#endif - -@implementation GPUImageLaplacianFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageLaplacianFragmentShaderString])) - { - return nil; - } - - GPUMatrix3x3 newConvolutionMatrix; - newConvolutionMatrix.one.one = 0.5; - newConvolutionMatrix.one.two = 1.0; - newConvolutionMatrix.one.three = 0.5; - - newConvolutionMatrix.two.one = 1.0; - newConvolutionMatrix.two.two = -6.0; - newConvolutionMatrix.two.three = 1.0; - - newConvolutionMatrix.three.one = 0.5; - newConvolutionMatrix.three.two = 1.0; - newConvolutionMatrix.three.three = 0.5; - - self.convolutionKernel = newConvolutionMatrix; - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLevelsFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLevelsFilter.h deleted file mode 100644 index d0948fbf..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLevelsFilter.h +++ /dev/null @@ -1,45 +0,0 @@ -#import "GPUImageFilter.h" - -/** - * Levels like Photoshop. - * - * The min, max, minOut and maxOut parameters are floats in the range [0, 1]. - * If you have parameters from Photoshop in the range [0, 255] you must first - * convert them to be [0, 1]. - * The gamma/mid parameter is a float >= 0. This matches the value from Photoshop. - * - * If you want to apply levels to RGB as well as individual channels you need to use - * this filter twice - first for the individual channels and then for all channels. - */ -@interface GPUImageLevelsFilter : GPUImageFilter -{ - GLint minUniform; - GLint midUniform; - GLint maxUniform; - GLint minOutputUniform; - GLint maxOutputUniform; - - GPUVector3 minVector, midVector, maxVector, minOutputVector, maxOutputVector; -} - -/** Set levels for the red channel */ -- (void)setRedMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max minOut:(CGFloat)minOut maxOut:(CGFloat)maxOut; - -- (void)setRedMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max; - -/** Set levels for the green channel */ -- (void)setGreenMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max minOut:(CGFloat)minOut maxOut:(CGFloat)maxOut; - -- (void)setGreenMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max; - -/** Set levels for the blue channel */ -- (void)setBlueMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max minOut:(CGFloat)minOut maxOut:(CGFloat)maxOut; - -- (void)setBlueMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max; - -/** Set levels for all channels at once */ -- (void)setMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max minOut:(CGFloat)minOut maxOut:(CGFloat)maxOut; -- (void)setMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max; - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLevelsFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLevelsFilter.m deleted file mode 100644 index 158815fd..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLevelsFilter.m +++ /dev/null @@ -1,152 +0,0 @@ -#import "GPUImageLevelsFilter.h" - -/* - ** Gamma correction - ** Details: http://blog.mouaif.org/2009/01/22/photoshop-gamma-correction-shader/ - */ - -#define GammaCorrection(color, gamma) pow(color, 1.0 / gamma) - -/* - ** Levels control (input (+gamma), output) - ** Details: http://blog.mouaif.org/2009/01/28/levels-control-shader/ - */ - -#define LevelsControlInputRange(color, minInput, maxInput) min(max(color - minInput, vec3(0.0)) / (maxInput - minInput), vec3(1.0)) -#define LevelsControlInput(color, minInput, gamma, maxInput) GammaCorrection(LevelsControlInputRange(color, minInput, maxInput), gamma) -#define LevelsControlOutputRange(color, minOutput, maxOutput) mix(minOutput, maxOutput, color) -#define LevelsControl(color, minInput, gamma, maxInput, minOutput, maxOutput) LevelsControlOutputRange(LevelsControlInput(color, minInput, gamma, maxInput), minOutput, maxOutput) - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLevelsFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform mediump vec3 levelMinimum; - uniform mediump vec3 levelMiddle; - uniform mediump vec3 levelMaximum; - uniform mediump vec3 minOutput; - uniform mediump vec3 maxOutput; - - void main() - { - mediump vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4(LevelsControl(textureColor.rgb, levelMinimum, levelMiddle, levelMaximum, minOutput, maxOutput), textureColor.a); - } -); -#else -NSString *const kGPUImageLevelsFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform vec3 levelMinimum; - uniform vec3 levelMiddle; - uniform vec3 levelMaximum; - uniform vec3 minOutput; - uniform vec3 maxOutput; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4(LevelsControl(textureColor.rgb, levelMinimum, levelMiddle, levelMaximum, minOutput, maxOutput), textureColor.a); - } -); -#endif - -@implementation GPUImageLevelsFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageLevelsFragmentShaderString])) - { - return nil; - } - - minUniform = [filterProgram uniformIndex:@"levelMinimum"]; - midUniform = [filterProgram uniformIndex:@"levelMiddle"]; - maxUniform = [filterProgram uniformIndex:@"levelMaximum"]; - minOutputUniform = [filterProgram uniformIndex:@"minOutput"]; - maxOutputUniform = [filterProgram uniformIndex:@"maxOutput"]; - - [self setRedMin:0.0 gamma:1.0 max:1.0 minOut:0.0 maxOut:1.0]; - [self setGreenMin:0.0 gamma:1.0 max:1.0 minOut:0.0 maxOut:1.0]; - [self setBlueMin:0.0 gamma:1.0 max:1.0 minOut:0.0 maxOut:1.0]; - - return self; -} - -#pragma mark - -#pragma mark Helpers - -- (void)updateUniforms { - [self setVec3:minVector forUniform:minUniform program:filterProgram]; - [self setVec3:midVector forUniform:midUniform program:filterProgram]; - [self setVec3:maxVector forUniform:maxUniform program:filterProgram]; - [self setVec3:minOutputVector forUniform:minOutputUniform program:filterProgram]; - [self setVec3:maxOutputVector forUniform:maxOutputUniform program:filterProgram]; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max minOut:(CGFloat)minOut maxOut:(CGFloat)maxOut { - [self setRedMin:min gamma:mid max:max minOut:minOut maxOut:maxOut]; - [self setGreenMin:min gamma:mid max:max minOut:minOut maxOut:maxOut]; - [self setBlueMin:min gamma:mid max:max minOut:minOut maxOut:maxOut]; -} - -- (void)setMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max { - [self setMin:min gamma:mid max:max minOut:0.0 maxOut:1.0]; -} - -- (void)setRedMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max minOut:(CGFloat)minOut maxOut:(CGFloat)maxOut { - minVector.one = min; - midVector.one = mid; - maxVector.one = max; - minOutputVector.one = minOut; - maxOutputVector.one = maxOut; - - [self updateUniforms]; -} - -- (void)setRedMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max { - [self setRedMin:min gamma:mid max:max minOut:0.0 maxOut:1.0]; -} - -- (void)setGreenMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max minOut:(CGFloat)minOut maxOut:(CGFloat)maxOut { - minVector.two = min; - midVector.two = mid; - maxVector.two = max; - minOutputVector.two = minOut; - maxOutputVector.two = maxOut; - - [self updateUniforms]; -} - -- (void)setGreenMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max { - [self setGreenMin:min gamma:mid max:max minOut:0.0 maxOut:1.0]; -} - -- (void)setBlueMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max minOut:(CGFloat)minOut maxOut:(CGFloat)maxOut { - minVector.three = min; - midVector.three = mid; - maxVector.three = max; - minOutputVector.three = minOut; - maxOutputVector.three = maxOut; - - [self updateUniforms]; -} - -- (void)setBlueMin:(CGFloat)min gamma:(CGFloat)mid max:(CGFloat)max { - [self setBlueMin:min gamma:mid max:max minOut:0.0 maxOut:1.0]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLightenBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLightenBlendFilter.h deleted file mode 100755 index b0287c13..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLightenBlendFilter.h +++ /dev/null @@ -1,8 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -/// Blends two images by taking the maximum value of each color component between the images -@interface GPUImageLightenBlendFilter : GPUImageTwoInputFilter -{ -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLightenBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLightenBlendFilter.m deleted file mode 100755 index 2bbd4b20..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLightenBlendFilter.m +++ /dev/null @@ -1,52 +0,0 @@ -#import "GPUImageLightenBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLightenBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = max(textureColor, textureColor2); - } -); -#else -NSString *const kGPUImageLightenBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = max(textureColor, textureColor2); - } - ); -#endif - -@implementation GPUImageLightenBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageLightenBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLineGenerator.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLineGenerator.h deleted file mode 100644 index 4c467366..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLineGenerator.h +++ /dev/null @@ -1,18 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageLineGenerator : GPUImageFilter -{ - GLint lineWidthUniform, lineColorUniform; - GLfloat *lineCoordinates; -} - -// The width of the displayed lines, in pixels. The default is 1. -@property(readwrite, nonatomic) CGFloat lineWidth; - -// The color of the lines is specified using individual red, green, and blue components (normalized to 1.0). The default is green: (0.0, 1.0, 0.0). -- (void)setLineColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; - -// Rendering -- (void)renderLinesFromArray:(GLfloat *)lineSlopeAndIntercepts count:(NSUInteger)numberOfLines frameTime:(CMTime)frameTime; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLineGenerator.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLineGenerator.m deleted file mode 100644 index 85d93bee..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLineGenerator.m +++ /dev/null @@ -1,164 +0,0 @@ -#import "GPUImageLineGenerator.h" - -NSString *const kGPUImageLineGeneratorVertexShaderString = SHADER_STRING -( - attribute vec4 position; - - void main() - { - gl_Position = position; - } -); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLineGeneratorFragmentShaderString = SHADER_STRING -( - uniform lowp vec3 lineColor; - - void main() - { - gl_FragColor = vec4(lineColor, 1.0); - } -); -#else -NSString *const kGPUImageLineGeneratorFragmentShaderString = SHADER_STRING -( - uniform vec3 lineColor; - - void main() - { - gl_FragColor = vec4(lineColor, 1.0); - } -); -#endif - -@interface GPUImageLineGenerator() - -- (void)generateLineCoordinates; - -@end - -@implementation GPUImageLineGenerator - -@synthesize lineWidth = _lineWidth; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithVertexShaderFromString:kGPUImageLineGeneratorVertexShaderString fragmentShaderFromString:kGPUImageLineGeneratorFragmentShaderString])) - { - return nil; - } - - runSynchronouslyOnVideoProcessingQueue(^{ - lineWidthUniform = [filterProgram uniformIndex:@"lineWidth"]; - lineColorUniform = [filterProgram uniformIndex:@"lineColor"]; - - self.lineWidth = 1.0; - [self setLineColorRed:0.0 green:1.0 blue:0.0]; - }); - - return self; -} - -- (void)dealloc -{ - if (lineCoordinates) - { - free(lineCoordinates); - } -} - -#pragma mark - -#pragma mark Rendering - -- (void)generateLineCoordinates; -{ - lineCoordinates = calloc(1024 * 4, sizeof(GLfloat)); -} - -- (void)renderLinesFromArray:(GLfloat *)lineSlopeAndIntercepts count:(NSUInteger)numberOfLines frameTime:(CMTime)frameTime; -{ - if (self.preventRendering) - { - return; - } - - if (lineCoordinates == NULL) - { - [self generateLineCoordinates]; - } - - // Iterate through and generate vertices from the slopes and intercepts - NSUInteger currentVertexIndex = 0; - NSUInteger currentLineIndex = 0; - NSUInteger maxLineIndex = numberOfLines *2; - while(currentLineIndex < maxLineIndex) - { - GLfloat slope = lineSlopeAndIntercepts[currentLineIndex++]; - GLfloat intercept = lineSlopeAndIntercepts[currentLineIndex++]; - - if (slope > 9000.0) // Vertical line - { - lineCoordinates[currentVertexIndex++] = intercept; - lineCoordinates[currentVertexIndex++] = -1.0; - lineCoordinates[currentVertexIndex++] = intercept; - lineCoordinates[currentVertexIndex++] = 1.0; - } - else - { - lineCoordinates[currentVertexIndex++] = -1.0; - lineCoordinates[currentVertexIndex++] = slope * -1.0 + intercept; - lineCoordinates[currentVertexIndex++] = 1.0; - lineCoordinates[currentVertexIndex++] = slope * 1.0 + intercept; - } - } - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:filterProgram]; - - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - - glClearColor(0.0, 0.0, 0.0, 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - glBlendEquation(GL_FUNC_ADD); - glBlendFunc(GL_ONE, GL_ONE); - glEnable(GL_BLEND); - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, lineCoordinates); - glDrawArrays(GL_LINES, 0, ((unsigned int)numberOfLines * 2)); - - glDisable(GL_BLEND); - - [self informTargetsAboutNewFrameAtTime:frameTime]; - }); -} - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - // Prevent rendering of the frame by normal means -} - -#pragma mark - -#pragma mark Accessors - -- (void)setLineWidth:(CGFloat)newValue; -{ - _lineWidth = newValue; - [GPUImageContext setActiveShaderProgram:filterProgram]; - glLineWidth(newValue); -} - -- (void)setLineColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; -{ - GPUVector3 lineColor = {redComponent, greenComponent, blueComponent}; - - [self setVec3:lineColor forUniform:lineColorUniform program:filterProgram]; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLinearBurnBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLinearBurnBlendFilter.h deleted file mode 100644 index 7e5e415c..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLinearBurnBlendFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageLinearBurnBlendFilter : GPUImageTwoInputFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLinearBurnBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLinearBurnBlendFilter.m deleted file mode 100644 index 47031967..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLinearBurnBlendFilter.m +++ /dev/null @@ -1,51 +0,0 @@ -#import "GPUImageLinearBurnBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLinearBurnBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - mediump vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - mediump vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(clamp(textureColor.rgb + textureColor2.rgb - vec3(1.0), vec3(0.0), vec3(1.0)), textureColor.a); - } -); -#else -NSString *const kGPUImageLinearBurnBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(clamp(textureColor.rgb + textureColor2.rgb - vec3(1.0), vec3(0.0), vec3(1.0)), textureColor.a); - } -); -#endif - -@implementation GPUImageLinearBurnBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageLinearBurnBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLocalBinaryPatternFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLocalBinaryPatternFilter.h deleted file mode 100644 index 431dbbd4..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLocalBinaryPatternFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImage3x3TextureSamplingFilter.h" - -@interface GPUImageLocalBinaryPatternFilter : GPUImage3x3TextureSamplingFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLocalBinaryPatternFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLocalBinaryPatternFilter.m deleted file mode 100644 index 1ee1f8d9..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLocalBinaryPatternFilter.m +++ /dev/null @@ -1,123 +0,0 @@ -#import "GPUImageLocalBinaryPatternFilter.h" - -// This is based on "Accelerating image recognition on mobile devices using GPGPU" by Miguel Bordallo Lopez, Henri Nykanen, Jari Hannuksela, Olli Silven and Markku Vehvilainen -// http://www.ee.oulu.fi/~jhannuks/publications/SPIE2011a.pdf - -// Right pixel is the most significant bit, traveling clockwise to get to the upper right, which is the least significant -// If the external pixel is greater than or equal to the center, set to 1, otherwise 0 -// -// 2 1 0 -// 3 7 -// 4 5 6 - -// 01101101 -// 76543210 - -@implementation GPUImageLocalBinaryPatternFilter - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLocalBinaryPatternFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - lowp float centerIntensity = texture2D(inputImageTexture, textureCoordinate).r; - lowp float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - lowp float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - lowp float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - lowp float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - lowp float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - lowp float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - lowp float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - lowp float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - - lowp float byteTally = 1.0 / 255.0 * step(centerIntensity, topRightIntensity); - byteTally += 2.0 / 255.0 * step(centerIntensity, topIntensity); - byteTally += 4.0 / 255.0 * step(centerIntensity, topLeftIntensity); - byteTally += 8.0 / 255.0 * step(centerIntensity, leftIntensity); - byteTally += 16.0 / 255.0 * step(centerIntensity, bottomLeftIntensity); - byteTally += 32.0 / 255.0 * step(centerIntensity, bottomIntensity); - byteTally += 64.0 / 255.0 * step(centerIntensity, bottomRightIntensity); - byteTally += 128.0 / 255.0 * step(centerIntensity, rightIntensity); - - // TODO: Replace the above with a dot product and two vec4s - // TODO: Apply step to a matrix, rather than individually - - gl_FragColor = vec4(byteTally, byteTally, byteTally, 1.0); - } -); -#else -NSString *const kGPUImageLocalBinaryPatternFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float centerIntensity = texture2D(inputImageTexture, textureCoordinate).r; - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - - float byteTally = 1.0 / 255.0 * step(centerIntensity, topRightIntensity); - byteTally += 2.0 / 255.0 * step(centerIntensity, topIntensity); - byteTally += 4.0 / 255.0 * step(centerIntensity, topLeftIntensity); - byteTally += 8.0 / 255.0 * step(centerIntensity, leftIntensity); - byteTally += 16.0 / 255.0 * step(centerIntensity, bottomLeftIntensity); - byteTally += 32.0 / 255.0 * step(centerIntensity, bottomIntensity); - byteTally += 64.0 / 255.0 * step(centerIntensity, bottomRightIntensity); - byteTally += 128.0 / 255.0 * step(centerIntensity, rightIntensity); - - // TODO: Replace the above with a dot product and two vec4s - // TODO: Apply step to a matrix, rather than individually - - gl_FragColor = vec4(byteTally, byteTally, byteTally, 1.0); - } -); -#endif - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageLocalBinaryPatternFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLookupFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLookupFilter.h deleted file mode 100644 index 23ebde2b..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLookupFilter.h +++ /dev/null @@ -1,34 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageLookupFilter : GPUImageTwoInputFilter -{ - GLint intensityUniform; -} - -// How To Use: -// 1) Use your favourite photo editing application to apply a filter to lookup.png from GPUImage/framework/Resources. -// For this to work properly each pixel color must not depend on other pixels (e.g. blur will not work). -// If you need more complex filter you can create as many lookup tables as required. -// E.g. color_balance_lookup_1.png -> GPUImageGaussianBlurFilter -> color_balance_lookup_2.png -// 2) Use you new lookup.png file as a second input for GPUImageLookupFilter. - -// See GPUImageAmatorkaFilter, GPUImageMissEtikateFilter, and GPUImageSoftEleganceFilter for example. - -// Additional Info: -// Lookup texture is organised as 8x8 quads of 64x64 pixels representing all possible RGB colors: -//for (int by = 0; by < 8; by++) { -// for (int bx = 0; bx < 8; bx++) { -// for (int g = 0; g < 64; g++) { -// for (int r = 0; r < 64; r++) { -// image.setPixel(r + bx * 64, g + by * 64, qRgb((int)(r * 255.0 / 63.0 + 0.5), -// (int)(g * 255.0 / 63.0 + 0.5), -// (int)((bx + by * 8.0) * 255.0 / 63.0 + 0.5))); -// } -// } -// } -//} - -// Opacity/intensity of lookup filter ranges from 0.0 to 1.0, with 1.0 as the normal setting -@property(readwrite, nonatomic) CGFloat intensity; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLookupFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLookupFilter.m deleted file mode 100644 index c098392b..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLookupFilter.m +++ /dev/null @@ -1,115 +0,0 @@ -#import "GPUImageLookupFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLookupFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; // TODO: This is not used - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; // lookup texture - - uniform lowp float intensity; - - void main() - { - highp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - highp float blueColor = textureColor.b * 63.0; - - highp vec2 quad1; - quad1.y = floor(floor(blueColor) / 8.0); - quad1.x = floor(blueColor) - (quad1.y * 8.0); - - highp vec2 quad2; - quad2.y = floor(ceil(blueColor) / 8.0); - quad2.x = ceil(blueColor) - (quad2.y * 8.0); - - highp vec2 texPos1; - texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.r); - texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.g); - - highp vec2 texPos2; - texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.r); - texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.g); - - lowp vec4 newColor1 = texture2D(inputImageTexture2, texPos1); - lowp vec4 newColor2 = texture2D(inputImageTexture2, texPos2); - - lowp vec4 newColor = mix(newColor1, newColor2, fract(blueColor)); - gl_FragColor = mix(textureColor, vec4(newColor.rgb, textureColor.w), intensity); - } -); -#else -NSString *const kGPUImageLookupFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; // TODO: This is not used - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; // lookup texture - - uniform float intensity; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - float blueColor = textureColor.b * 63.0; - - vec2 quad1; - quad1.y = floor(floor(blueColor) / 8.0); - quad1.x = floor(blueColor) - (quad1.y * 8.0); - - vec2 quad2; - quad2.y = floor(ceil(blueColor) / 8.0); - quad2.x = ceil(blueColor) - (quad2.y * 8.0); - - vec2 texPos1; - texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.r); - texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.g); - - vec2 texPos2; - texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.r); - texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * textureColor.g); - - vec4 newColor1 = texture2D(inputImageTexture2, texPos1); - vec4 newColor2 = texture2D(inputImageTexture2, texPos2); - - vec4 newColor = mix(newColor1, newColor2, fract(blueColor)); - gl_FragColor = mix(textureColor, vec4(newColor.rgb, textureColor.w), intensity); - } -); -#endif - -@implementation GPUImageLookupFilter - -@synthesize intensity = _intensity; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - intensityUniform = [filterProgram uniformIndex:@"intensity"]; - self.intensity = 1.0f; - - if (!(self = [super initWithFragmentShaderFromString:kGPUImageLookupFragmentShaderString])) - { - return nil; - } - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setIntensity:(CGFloat)intensity -{ - _intensity = intensity; - - [self setFloat:_intensity forUniform:intensityUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLowPassFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLowPassFilter.h deleted file mode 100644 index be5c397e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLowPassFilter.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "GPUImageFilterGroup.h" -#import "GPUImageBuffer.h" -#import "GPUImageDissolveBlendFilter.h" - -@interface GPUImageLowPassFilter : GPUImageFilterGroup -{ - GPUImageBuffer *bufferFilter; - GPUImageDissolveBlendFilter *dissolveBlendFilter; -} - -// This controls the degree by which the previous accumulated frames are blended with the current one. This ranges from 0.0 to 1.0, with a default of 0.5. -@property(readwrite, nonatomic) CGFloat filterStrength; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLowPassFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLowPassFilter.m deleted file mode 100644 index 39ca08f6..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLowPassFilter.m +++ /dev/null @@ -1,61 +0,0 @@ -#import "GPUImageLowPassFilter.h" - -@implementation GPUImageLowPassFilter - -@synthesize filterStrength; - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - // Take in the frame and blend it with the previous one - dissolveBlendFilter = [[GPUImageDissolveBlendFilter alloc] init]; - [self addFilter:dissolveBlendFilter]; - - // Buffer the result to be fed back into the blend - bufferFilter = [[GPUImageBuffer alloc] init]; - [self addFilter:bufferFilter]; - - // Texture location 0 needs to be the original image for the dissolve blend - [bufferFilter addTarget:dissolveBlendFilter atTextureLocation:1]; - [dissolveBlendFilter addTarget:bufferFilter]; - - [dissolveBlendFilter disableSecondFrameCheck]; - - // To prevent double updating of this filter, disable updates from the sharp image side - // self.inputFilterToIgnoreForUpdates = unsharpMaskFilter; - - self.initialFilters = [NSArray arrayWithObject:dissolveBlendFilter]; - self.terminalFilter = dissolveBlendFilter; - - self.filterStrength = 0.5; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setFilterStrength:(CGFloat)newValue; -{ - dissolveBlendFilter.mix = newValue; -} - -- (CGFloat)filterStrength; -{ - return dissolveBlendFilter.mix; -} - -- (void)addTarget:(id)newTarget atTextureLocation:(NSInteger)textureLocation; -{ - [self.terminalFilter addTarget:newTarget atTextureLocation:textureLocation]; - //if use GPUImagePipline,will cause self.termainlFilter removeAllTargets,so need add bufferFilter back - if (self.terminalFilter == dissolveBlendFilter && ![self.terminalFilter.targets containsObject:bufferFilter]) { - [self.terminalFilter addTarget:bufferFilter atTextureLocation:1]; - } -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminanceRangeFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminanceRangeFilter.h deleted file mode 100644 index 5a310370..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminanceRangeFilter.h +++ /dev/null @@ -1,12 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageLuminanceRangeFilter : GPUImageFilter -{ - GLint rangeReductionUniform; -} - -/** The degree to reduce the luminance range, from 0.0 to 1.0. Default is 0.6. - */ -@property(readwrite, nonatomic) CGFloat rangeReductionFactor; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminanceRangeFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminanceRangeFilter.m deleted file mode 100644 index 5122c958..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminanceRangeFilter.m +++ /dev/null @@ -1,76 +0,0 @@ -#import "GPUImageLuminanceRangeFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLuminanceRangeFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform lowp float rangeReduction; - - // Values from "Graphics Shaders: Theory and Practice" by Bailey and Cunningham - const mediump vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - mediump float luminance = dot(textureColor.rgb, luminanceWeighting); - mediump float luminanceRatio = ((0.5 - luminance) * rangeReduction); - - gl_FragColor = vec4((textureColor.rgb) + (luminanceRatio), textureColor.w); - } -); -#else -NSString *const kGPUImageLuminanceRangeFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float rangeReduction; - - // Values from "Graphics Shaders: Theory and Practice" by Bailey and Cunningham - const vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float luminance = dot(textureColor.rgb, luminanceWeighting); - float luminanceRatio = ((0.5 - luminance) * rangeReduction); - - gl_FragColor = vec4((textureColor.rgb) + (luminanceRatio), textureColor.w); - } -); -#endif - -@implementation GPUImageLuminanceRangeFilter - -@synthesize rangeReductionFactor = _rangeReductionFactor; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageLuminanceRangeFragmentShaderString])) - { - return nil; - } - - rangeReductionUniform = [filterProgram uniformIndex:@"rangeReduction"]; - self.rangeReductionFactor = 0.6; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setRangeReductionFactor:(CGFloat)newValue; -{ - _rangeReductionFactor = newValue; - - [self setFloat:_rangeReductionFactor forUniform:rangeReductionUniform program:filterProgram]; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminanceThresholdFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminanceThresholdFilter.h deleted file mode 100755 index 0abb9a1e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminanceThresholdFilter.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "GPUImageFilter.h" - -/** Pixels with a luminance above the threshold will appear white, and those below will be black - */ -@interface GPUImageLuminanceThresholdFilter : GPUImageFilter -{ - GLint thresholdUniform; -} - -/** Anything above this luminance will be white, and anything below black. Ranges from 0.0 to 1.0, with 0.5 as the default - */ -@property(readwrite, nonatomic) CGFloat threshold; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminanceThresholdFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminanceThresholdFilter.m deleted file mode 100755 index 368b8fbe..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminanceThresholdFilter.m +++ /dev/null @@ -1,74 +0,0 @@ -#import "GPUImageLuminanceThresholdFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLuminanceThresholdFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform highp float threshold; - - const highp vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - highp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - highp float luminance = dot(textureColor.rgb, W); - highp float thresholdResult = step(threshold, luminance); - - gl_FragColor = vec4(vec3(thresholdResult), textureColor.w); - } -); -#else -NSString *const kGPUImageLuminanceThresholdFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float threshold; - - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float luminance = dot(textureColor.rgb, W); - float thresholdResult = step(threshold, luminance); - - gl_FragColor = vec4(vec3(thresholdResult), textureColor.w); - } -); -#endif - -@implementation GPUImageLuminanceThresholdFilter - -@synthesize threshold = _threshold; - -#pragma mark - -#pragma mark Initialization - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageLuminanceThresholdFragmentShaderString])) - { - return nil; - } - - thresholdUniform = [filterProgram uniformIndex:@"threshold"]; - self.threshold = 0.5; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setThreshold:(CGFloat)newValue; -{ - _threshold = newValue; - - [self setFloat:_threshold forUniform:thresholdUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminosity.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminosity.h deleted file mode 100644 index b2d2458f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminosity.h +++ /dev/null @@ -1,17 +0,0 @@ -#import "GPUImageAverageColor.h" - -@interface GPUImageLuminosity : GPUImageAverageColor -{ - GLProgram *secondFilterProgram; - GLint secondFilterPositionAttribute, secondFilterTextureCoordinateAttribute; - GLint secondFilterInputTextureUniform, secondFilterInputTextureUniform2; - GLint secondFilterTexelWidthUniform, secondFilterTexelHeightUniform; -} - -// This block is called on the completion of color averaging for a frame -@property(nonatomic, copy) void(^luminosityProcessingFinishedBlock)(CGFloat luminosity, CMTime frameTime); - -- (void)extractLuminosityAtFrameTime:(CMTime)frameTime; -- (void)initializeSecondaryAttributes; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminosity.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminosity.m deleted file mode 100644 index 37f374ab..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminosity.m +++ /dev/null @@ -1,329 +0,0 @@ -#import "GPUImageLuminosity.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageInitialLuminosityFragmentShaderString = SHADER_STRING -( - precision highp float; - - uniform sampler2D inputImageTexture; - - varying highp vec2 outputTextureCoordinate; - - varying highp vec2 upperLeftInputTextureCoordinate; - varying highp vec2 upperRightInputTextureCoordinate; - varying highp vec2 lowerLeftInputTextureCoordinate; - varying highp vec2 lowerRightInputTextureCoordinate; - - const highp vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - highp float upperLeftLuminance = dot(texture2D(inputImageTexture, upperLeftInputTextureCoordinate).rgb, W); - highp float upperRightLuminance = dot(texture2D(inputImageTexture, upperRightInputTextureCoordinate).rgb, W); - highp float lowerLeftLuminance = dot(texture2D(inputImageTexture, lowerLeftInputTextureCoordinate).rgb, W); - highp float lowerRightLuminance = dot(texture2D(inputImageTexture, lowerRightInputTextureCoordinate).rgb, W); - - highp float luminosity = 0.25 * (upperLeftLuminance + upperRightLuminance + lowerLeftLuminance + lowerRightLuminance); - gl_FragColor = vec4(luminosity, luminosity, luminosity, 1.0); - } -); - -NSString *const kGPUImageLuminosityFragmentShaderString = SHADER_STRING -( - precision highp float; - - uniform sampler2D inputImageTexture; - - varying highp vec2 outputTextureCoordinate; - - varying highp vec2 upperLeftInputTextureCoordinate; - varying highp vec2 upperRightInputTextureCoordinate; - varying highp vec2 lowerLeftInputTextureCoordinate; - varying highp vec2 lowerRightInputTextureCoordinate; - - void main() - { - highp float upperLeftLuminance = texture2D(inputImageTexture, upperLeftInputTextureCoordinate).r; - highp float upperRightLuminance = texture2D(inputImageTexture, upperRightInputTextureCoordinate).r; - highp float lowerLeftLuminance = texture2D(inputImageTexture, lowerLeftInputTextureCoordinate).r; - highp float lowerRightLuminance = texture2D(inputImageTexture, lowerRightInputTextureCoordinate).r; - - highp float luminosity = 0.25 * (upperLeftLuminance + upperRightLuminance + lowerLeftLuminance + lowerRightLuminance); - gl_FragColor = vec4(luminosity, luminosity, luminosity, 1.0); - } -); -#else -NSString *const kGPUImageInitialLuminosityFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - varying vec2 outputTextureCoordinate; - - varying vec2 upperLeftInputTextureCoordinate; - varying vec2 upperRightInputTextureCoordinate; - varying vec2 lowerLeftInputTextureCoordinate; - varying vec2 lowerRightInputTextureCoordinate; - - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - float upperLeftLuminance = dot(texture2D(inputImageTexture, upperLeftInputTextureCoordinate).rgb, W); - float upperRightLuminance = dot(texture2D(inputImageTexture, upperRightInputTextureCoordinate).rgb, W); - float lowerLeftLuminance = dot(texture2D(inputImageTexture, lowerLeftInputTextureCoordinate).rgb, W); - float lowerRightLuminance = dot(texture2D(inputImageTexture, lowerRightInputTextureCoordinate).rgb, W); - - float luminosity = 0.25 * (upperLeftLuminance + upperRightLuminance + lowerLeftLuminance + lowerRightLuminance); - gl_FragColor = vec4(luminosity, luminosity, luminosity, 1.0); - } -); - -NSString *const kGPUImageLuminosityFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - varying vec2 outputTextureCoordinate; - - varying vec2 upperLeftInputTextureCoordinate; - varying vec2 upperRightInputTextureCoordinate; - varying vec2 lowerLeftInputTextureCoordinate; - varying vec2 lowerRightInputTextureCoordinate; - - void main() - { - float upperLeftLuminance = texture2D(inputImageTexture, upperLeftInputTextureCoordinate).r; - float upperRightLuminance = texture2D(inputImageTexture, upperRightInputTextureCoordinate).r; - float lowerLeftLuminance = texture2D(inputImageTexture, lowerLeftInputTextureCoordinate).r; - float lowerRightLuminance = texture2D(inputImageTexture, lowerRightInputTextureCoordinate).r; - - float luminosity = 0.25 * (upperLeftLuminance + upperRightLuminance + lowerLeftLuminance + lowerRightLuminance); - gl_FragColor = vec4(luminosity, luminosity, luminosity, 1.0); - } -); -#endif - -@implementation GPUImageLuminosity - -@synthesize luminosityProcessingFinishedBlock = _luminosityProcessingFinishedBlock; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithVertexShaderFromString:kGPUImageColorAveragingVertexShaderString fragmentShaderFromString:kGPUImageInitialLuminosityFragmentShaderString])) - { - return nil; - } - - texelWidthUniform = [filterProgram uniformIndex:@"texelWidth"]; - texelHeightUniform = [filterProgram uniformIndex:@"texelHeight"]; - - __unsafe_unretained GPUImageLuminosity *weakSelf = self; - [self setFrameProcessingCompletionBlock:^(GPUImageOutput *filter, CMTime frameTime) { - [weakSelf extractLuminosityAtFrameTime:frameTime]; - }]; - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - - secondFilterProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:kGPUImageColorAveragingVertexShaderString fragmentShaderString:kGPUImageLuminosityFragmentShaderString]; - - if (!secondFilterProgram.initialized) - { - [self initializeSecondaryAttributes]; - - if (![secondFilterProgram link]) - { - NSString *progLog = [secondFilterProgram programLog]; - NSLog(@"Program link log: %@", progLog); - NSString *fragLog = [secondFilterProgram fragmentShaderLog]; - NSLog(@"Fragment shader compile log: %@", fragLog); - NSString *vertLog = [secondFilterProgram vertexShaderLog]; - NSLog(@"Vertex shader compile log: %@", vertLog); - filterProgram = nil; - NSAssert(NO, @"Filter shader link failed"); - } - } - - secondFilterPositionAttribute = [secondFilterProgram attributeIndex:@"position"]; - secondFilterTextureCoordinateAttribute = [secondFilterProgram attributeIndex:@"inputTextureCoordinate"]; - secondFilterInputTextureUniform = [secondFilterProgram uniformIndex:@"inputImageTexture"]; // This does assume a name of "inputImageTexture" for the fragment shader - secondFilterInputTextureUniform2 = [secondFilterProgram uniformIndex:@"inputImageTexture2"]; // This does assume a name of "inputImageTexture2" for second input texture in the fragment shader - - secondFilterTexelWidthUniform = [secondFilterProgram uniformIndex:@"texelWidth"]; - secondFilterTexelHeightUniform = [secondFilterProgram uniformIndex:@"texelHeight"]; - - [GPUImageContext setActiveShaderProgram:secondFilterProgram]; - - glEnableVertexAttribArray(secondFilterPositionAttribute); - glEnableVertexAttribArray(secondFilterTextureCoordinateAttribute); - }); - - return self; -} - -- (void)initializeSecondaryAttributes; -{ - [secondFilterProgram addAttribute:@"position"]; - [secondFilterProgram addAttribute:@"inputTextureCoordinate"]; -} - -/* -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - if (self.preventRendering) - { - [firstInputFramebuffer unlock]; - return; - } - - // Do an initial render pass that both convert to luminance and reduces - [GPUImageContext setActiveShaderProgram:filterProgram]; - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - glVertexAttribPointer(filterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - - GLuint currentFramebuffer = [[stageFramebuffers objectAtIndex:0] intValue]; - glBindFramebuffer(GL_FRAMEBUFFER, currentFramebuffer); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - CGSize currentStageSize = [[stageSizes objectAtIndex:0] CGSizeValue]; -#else - NSSize currentStageSize = [[stageSizes objectAtIndex:0] sizeValue]; -#endif - glViewport(0, 0, (int)currentStageSize.width, (int)currentStageSize.height); - - GLuint currentTexture = [firstInputFramebuffer texture]; - - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, currentTexture); - - glUniform1i(filterInputTextureUniform, 2); - - glUniform1f(texelWidthUniform, 0.5 / currentStageSize.width); - glUniform1f(texelHeightUniform, 0.5 / currentStageSize.height); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - currentTexture = [[stageTextures objectAtIndex:0] intValue]; - - // Just perform reductions from this point on - [GPUImageContext setActiveShaderProgram:secondFilterProgram]; - glVertexAttribPointer(secondFilterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - glVertexAttribPointer(secondFilterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - - NSUInteger numberOfStageFramebuffers = [stageFramebuffers count]; - for (NSUInteger currentStage = 1; currentStage < numberOfStageFramebuffers; currentStage++) - { - currentFramebuffer = [[stageFramebuffers objectAtIndex:currentStage] intValue]; - glBindFramebuffer(GL_FRAMEBUFFER, currentFramebuffer); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - currentStageSize = [[stageSizes objectAtIndex:currentStage] CGSizeValue]; -#else - currentStageSize = [[stageSizes objectAtIndex:currentStage] sizeValue]; -#endif - glViewport(0, 0, (int)currentStageSize.width, (int)currentStageSize.height); - - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, currentTexture); - - glUniform1i(secondFilterInputTextureUniform, 2); - - glUniform1f(secondFilterTexelWidthUniform, 0.5 / currentStageSize.width); - glUniform1f(secondFilterTexelHeightUniform, 0.5 / currentStageSize.height); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - currentTexture = [[stageTextures objectAtIndex:currentStage] intValue]; - -// NSUInteger totalBytesForImage = (int)currentStageSize.width * (int)currentStageSize.height * 4; -// GLubyte *rawImagePixels2 = (GLubyte *)malloc(totalBytesForImage); -// glReadPixels(0, 0, (int)currentStageSize.width, (int)currentStageSize.height, GL_RGBA, GL_UNSIGNED_BYTE, rawImagePixels2); -// CGDataProviderRef dataProvider = CGDataProviderCreateWithData(NULL, rawImagePixels2, totalBytesForImage, NULL); -// CGColorSpaceRef defaultRGBColorSpace = CGColorSpaceCreateDeviceRGB(); -// -// CGFloat currentRedTotal = 0.0f, currentGreenTotal = 0.0f, currentBlueTotal = 0.0f, currentAlphaTotal = 0.0f; -// NSUInteger totalNumberOfPixels = totalBytesForImage / 4; -// -// for (NSUInteger currentPixel = 0; currentPixel < totalNumberOfPixels; currentPixel++) -// { -// currentRedTotal += (CGFloat)rawImagePixels2[(currentPixel * 4)] / 255.0f; -// currentGreenTotal += (CGFloat)rawImagePixels2[(currentPixel * 4) + 1] / 255.0f; -// currentBlueTotal += (CGFloat)rawImagePixels2[(currentPixel * 4 + 2)] / 255.0f; -// currentAlphaTotal += (CGFloat)rawImagePixels2[(currentPixel * 4) + 3] / 255.0f; -// } -// -// NSLog(@"Stage %d average image red: %f, green: %f, blue: %f, alpha: %f", currentStage, currentRedTotal / (CGFloat)totalNumberOfPixels, currentGreenTotal / (CGFloat)totalNumberOfPixels, currentBlueTotal / (CGFloat)totalNumberOfPixels, currentAlphaTotal / (CGFloat)totalNumberOfPixels); -// -// -// CGImageRef cgImageFromBytes = CGImageCreate((int)currentStageSize.width, (int)currentStageSize.height, 8, 32, 4 * (int)currentStageSize.width, defaultRGBColorSpace, kCGBitmapByteOrderDefault | kCGImageAlphaLast, dataProvider, NULL, NO, kCGRenderingIntentDefault); -// -// UIImage *imageToSave = [UIImage imageWithCGImage:cgImageFromBytes]; -// -// NSData *dataForPNGFile = UIImagePNGRepresentation(imageToSave); -// -// NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); -// NSString *documentsDirectory = [paths objectAtIndex:0]; -// -// NSString *imageName = [NSString stringWithFormat:@"AverageLevel%d.png", currentStage]; -// NSError *error = nil; -// if (![dataForPNGFile writeToFile:[documentsDirectory stringByAppendingPathComponent:imageName] options:NSAtomicWrite error:&error]) -// { -// return; -// } - } - - [firstInputFramebuffer unlock]; -} - */ - -#pragma mark - -#pragma mark Callbacks - -- (void)extractLuminosityAtFrameTime:(CMTime)frameTime; -{ - runSynchronouslyOnVideoProcessingQueue(^{ - - // we need a normal color texture for this filter - NSAssert(self.outputTextureOptions.internalFormat == GL_RGBA, @"The output texture format for this filter must be GL_RGBA."); - NSAssert(self.outputTextureOptions.type == GL_UNSIGNED_BYTE, @"The type of the output texture of this filter must be GL_UNSIGNED_BYTE."); - - NSUInteger totalNumberOfPixels = round(finalStageSize.width * finalStageSize.height); - - if (rawImagePixels == NULL) - { - rawImagePixels = (GLubyte *)malloc(totalNumberOfPixels * 4); - } - - [GPUImageContext useImageProcessingContext]; - [outputFramebuffer activateFramebuffer]; - - glReadPixels(0, 0, (int)finalStageSize.width, (int)finalStageSize.height, GL_RGBA, GL_UNSIGNED_BYTE, rawImagePixels); - - NSUInteger luminanceTotal = 0; - NSUInteger byteIndex = 0; - for (NSUInteger currentPixel = 0; currentPixel < totalNumberOfPixels; currentPixel++) - { - luminanceTotal += rawImagePixels[byteIndex]; - byteIndex += 4; - } - - CGFloat normalizedLuminosityTotal = (CGFloat)luminanceTotal / (CGFloat)totalNumberOfPixels / 255.0; - - if (_luminosityProcessingFinishedBlock != NULL) - { - _luminosityProcessingFinishedBlock(normalizedLuminosityTotal, frameTime); - } - }); -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminosityBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminosityBlendFilter.h deleted file mode 100644 index 03b5e4c9..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminosityBlendFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageLuminosityBlendFilter : GPUImageTwoInputFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminosityBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminosityBlendFilter.m deleted file mode 100644 index 7e399746..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageLuminosityBlendFilter.m +++ /dev/null @@ -1,113 +0,0 @@ -#import "GPUImageLuminosityBlendFilter.h" - -/** - * Luminosity blend mode based upon pseudo code from the PDF specification. - */ -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageLuminosityBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - highp float lum(lowp vec3 c) { - return dot(c, vec3(0.3, 0.59, 0.11)); - } - - lowp vec3 clipcolor(lowp vec3 c) { - highp float l = lum(c); - lowp float n = min(min(c.r, c.g), c.b); - lowp float x = max(max(c.r, c.g), c.b); - - if (n < 0.0) { - c.r = l + ((c.r - l) * l) / (l - n); - c.g = l + ((c.g - l) * l) / (l - n); - c.b = l + ((c.b - l) * l) / (l - n); - } - if (x > 1.0) { - c.r = l + ((c.r - l) * (1.0 - l)) / (x - l); - c.g = l + ((c.g - l) * (1.0 - l)) / (x - l); - c.b = l + ((c.b - l) * (1.0 - l)) / (x - l); - } - - return c; - } - - lowp vec3 setlum(lowp vec3 c, highp float l) { - highp float d = l - lum(c); - c = c + vec3(d); - return clipcolor(c); - } - - void main() - { - highp vec4 baseColor = texture2D(inputImageTexture, textureCoordinate); - highp vec4 overlayColor = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(baseColor.rgb * (1.0 - overlayColor.a) + setlum(baseColor.rgb, lum(overlayColor.rgb)) * overlayColor.a, baseColor.a); - } -); -#else -NSString *const kGPUImageLuminosityBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - float lum(vec3 c) { - return dot(c, vec3(0.3, 0.59, 0.11)); - } - - vec3 clipcolor(vec3 c) { - float l = lum(c); - float n = min(min(c.r, c.g), c.b); - float x = max(max(c.r, c.g), c.b); - - if (n < 0.0) { - c.r = l + ((c.r - l) * l) / (l - n); - c.g = l + ((c.g - l) * l) / (l - n); - c.b = l + ((c.b - l) * l) / (l - n); - } - if (x > 1.0) { - c.r = l + ((c.r - l) * (1.0 - l)) / (x - l); - c.g = l + ((c.g - l) * (1.0 - l)) / (x - l); - c.b = l + ((c.b - l) * (1.0 - l)) / (x - l); - } - - return c; - } - - vec3 setlum(vec3 c, float l) { - float d = l - lum(c); - c = c + vec3(d); - return clipcolor(c); - } - - void main() - { - vec4 baseColor = texture2D(inputImageTexture, textureCoordinate); - vec4 overlayColor = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(baseColor.rgb * (1.0 - overlayColor.a) + setlum(baseColor.rgb, lum(overlayColor.rgb)) * overlayColor.a, baseColor.a); - } -); -#endif - - -@implementation GPUImageLuminosityBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageLuminosityBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMaskFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMaskFilter.h deleted file mode 100755 index 94cf0648..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMaskFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageMaskFilter : GPUImageTwoInputFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMaskFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMaskFilter.m deleted file mode 100755 index 24503b3b..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMaskFilter.m +++ /dev/null @@ -1,76 +0,0 @@ -#import "GPUImageMaskFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageMaskShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - //Averages mask's the RGB values, and scales that value by the mask's alpha - // - //The dot product should take fewer cycles than doing an average normally - // - //Typical/ideal case, R,G, and B will be the same, and Alpha will be 1.0 - lowp float newAlpha = dot(textureColor2.rgb, vec3(.33333334, .33333334, .33333334)) * textureColor2.a; - - gl_FragColor = vec4(textureColor.xyz, newAlpha); -// gl_FragColor = vec4(textureColor2); - } -); -#else -NSString *const kGPUImageMaskShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - //Averages mask's the RGB values, and scales that value by the mask's alpha - // - //The dot product should take fewer cycles than doing an average normally - // - //Typical/ideal case, R,G, and B will be the same, and Alpha will be 1.0 - float newAlpha = dot(textureColor2.rgb, vec3(.33333334, .33333334, .33333334)) * textureColor2.a; - - gl_FragColor = vec4(textureColor.xyz, newAlpha); - // gl_FragColor = vec4(textureColor2); - } -); -#endif - -@implementation GPUImageMaskFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageMaskShaderString])) - { - return nil; - } - - return self; -} - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - [super renderToTextureWithVertices:vertices textureCoordinates:textureCoordinates]; - glDisable(GL_BLEND); -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMedianFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMedianFilter.h deleted file mode 100644 index 80225789..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMedianFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImage3x3TextureSamplingFilter.h" - -@interface GPUImageMedianFilter : GPUImage3x3TextureSamplingFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMedianFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMedianFilter.m deleted file mode 100644 index 78c11805..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMedianFilter.m +++ /dev/null @@ -1,178 +0,0 @@ -#import "GPUImageMedianFilter.h" - -/* - 3x3 median filter, adapted from "A Fast, Small-Radius GPU Median Filter" by Morgan McGuire in ShaderX6 - http://graphics.cs.williams.edu/papers/MedianShaderX6/ - - Morgan McGuire and Kyle Whitson - Williams College - - Register allocation tips by Victor Huang Xiaohuang - University of Illinois at Urbana-Champaign - - http://graphics.cs.williams.edu - - - Copyright (c) Morgan McGuire and Williams College, 2006 - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageMedianFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - -#define s2(a, b) temp = a; a = min(a, b); b = max(temp, b); -#define mn3(a, b, c) s2(a, b); s2(a, c); -#define mx3(a, b, c) s2(b, c); s2(a, c); - -#define mnmx3(a, b, c) mx3(a, b, c); s2(a, b); // 3 exchanges -#define mnmx4(a, b, c, d) s2(a, b); s2(c, d); s2(a, c); s2(b, d); // 4 exchanges -#define mnmx5(a, b, c, d, e) s2(a, b); s2(c, d); mn3(a, c, e); mx3(b, d, e); // 6 exchanges -#define mnmx6(a, b, c, d, e, f) s2(a, d); s2(b, e); s2(c, f); mn3(a, b, c); mx3(d, e, f); // 7 exchanges - - void main() - { - vec3 v[6]; - - v[0] = texture2D(inputImageTexture, bottomLeftTextureCoordinate).rgb; - v[1] = texture2D(inputImageTexture, topRightTextureCoordinate).rgb; - v[2] = texture2D(inputImageTexture, topLeftTextureCoordinate).rgb; - v[3] = texture2D(inputImageTexture, bottomRightTextureCoordinate).rgb; - v[4] = texture2D(inputImageTexture, leftTextureCoordinate).rgb; - v[5] = texture2D(inputImageTexture, rightTextureCoordinate).rgb; -// v[6] = texture2D(inputImageTexture, bottomTextureCoordinate).rgb; -// v[7] = texture2D(inputImageTexture, topTextureCoordinate).rgb; - vec3 temp; - - mnmx6(v[0], v[1], v[2], v[3], v[4], v[5]); - - v[5] = texture2D(inputImageTexture, bottomTextureCoordinate).rgb; - - mnmx5(v[1], v[2], v[3], v[4], v[5]); - - v[5] = texture2D(inputImageTexture, topTextureCoordinate).rgb; - - mnmx4(v[2], v[3], v[4], v[5]); - - v[5] = texture2D(inputImageTexture, textureCoordinate).rgb; - - mnmx3(v[3], v[4], v[5]); - - gl_FragColor = vec4(v[4], 1.0); - } -); -#else -NSString *const kGPUImageMedianFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - -#define s2(a, b) temp = a; a = min(a, b); b = max(temp, b); -#define mn3(a, b, c) s2(a, b); s2(a, c); -#define mx3(a, b, c) s2(b, c); s2(a, c); - -#define mnmx3(a, b, c) mx3(a, b, c); s2(a, b); // 3 exchanges -#define mnmx4(a, b, c, d) s2(a, b); s2(c, d); s2(a, c); s2(b, d); // 4 exchanges -#define mnmx5(a, b, c, d, e) s2(a, b); s2(c, d); mn3(a, c, e); mx3(b, d, e); // 6 exchanges -#define mnmx6(a, b, c, d, e, f) s2(a, d); s2(b, e); s2(c, f); mn3(a, b, c); mx3(d, e, f); // 7 exchanges - - void main() - { - vec3 v[6]; - - v[0] = texture2D(inputImageTexture, bottomLeftTextureCoordinate).rgb; - v[1] = texture2D(inputImageTexture, topRightTextureCoordinate).rgb; - v[2] = texture2D(inputImageTexture, topLeftTextureCoordinate).rgb; - v[3] = texture2D(inputImageTexture, bottomRightTextureCoordinate).rgb; - v[4] = texture2D(inputImageTexture, leftTextureCoordinate).rgb; - v[5] = texture2D(inputImageTexture, rightTextureCoordinate).rgb; - // v[6] = texture2D(inputImageTexture, bottomTextureCoordinate).rgb; - // v[7] = texture2D(inputImageTexture, topTextureCoordinate).rgb; - vec3 temp; - - mnmx6(v[0], v[1], v[2], v[3], v[4], v[5]); - - v[5] = texture2D(inputImageTexture, bottomTextureCoordinate).rgb; - - mnmx5(v[1], v[2], v[3], v[4], v[5]); - - v[5] = texture2D(inputImageTexture, topTextureCoordinate).rgb; - - mnmx4(v[2], v[3], v[4], v[5]); - - v[5] = texture2D(inputImageTexture, textureCoordinate).rgb; - - mnmx3(v[3], v[4], v[5]); - - gl_FragColor = vec4(v[4], 1.0); - } -); -#endif - -@implementation GPUImageMedianFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageMedianFragmentShaderString])) - { - return nil; - } - - hasOverriddenImageSizeFactor = NO; - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMissEtikateFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMissEtikateFilter.h deleted file mode 100755 index de170647..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMissEtikateFilter.h +++ /dev/null @@ -1,17 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImagePicture; - -/** A photo filter based on Photoshop action by Miss Etikate: - http://miss-etikate.deviantart.com/art/Photoshop-Action-15-120151961 - */ - -// Note: If you want to use this effect you have to add lookup_miss_etikate.png -// from Resources folder to your application bundle. - -@interface GPUImageMissEtikateFilter : GPUImageFilterGroup -{ - GPUImagePicture *lookupImageSource; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMissEtikateFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMissEtikateFilter.m deleted file mode 100755 index 1810b707..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMissEtikateFilter.m +++ /dev/null @@ -1,38 +0,0 @@ -#import "GPUImageMissEtikateFilter.h" -#import "GPUImagePicture.h" -#import "GPUImageLookupFilter.h" - -@implementation GPUImageMissEtikateFilter - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - UIImage *image = [UIImage imageNamed:@"lookup_miss_etikate.png"]; -#else - NSImage *image = [NSImage imageNamed:@"lookup_miss_etikate.png"]; -#endif - - NSAssert(image, @"To use GPUImageMissEtikateFilter you need to add lookup_miss_etikate.png from GPUImage/framework/Resources to your application bundle."); - - lookupImageSource = [[GPUImagePicture alloc] initWithImage:image]; - GPUImageLookupFilter *lookupFilter = [[GPUImageLookupFilter alloc] init]; - [self addFilter:lookupFilter]; - - [lookupImageSource addTarget:lookupFilter atTextureLocation:1]; - [lookupImageSource processImage]; - - self.initialFilters = [NSArray arrayWithObjects:lookupFilter, nil]; - self.terminalFilter = lookupFilter; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMonochromeFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMonochromeFilter.h deleted file mode 100644 index 66a0e773..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMonochromeFilter.h +++ /dev/null @@ -1,13 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageMonochromeFilter : GPUImageFilter -{ - GLint intensityUniform, filterColorUniform; -} - -@property(readwrite, nonatomic) CGFloat intensity; -@property(readwrite, nonatomic) GPUVector4 color; - -- (void)setColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMonochromeFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMonochromeFilter.m deleted file mode 100644 index 70cef872..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMonochromeFilter.m +++ /dev/null @@ -1,115 +0,0 @@ -#import "GPUImageMonochromeFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUMonochromeFragmentShaderString = SHADER_STRING -( - precision lowp float; - - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float intensity; - uniform vec3 filterColor; - - const mediump vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - //desat, then apply overlay blend - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float luminance = dot(textureColor.rgb, luminanceWeighting); - - lowp vec4 desat = vec4(vec3(luminance), 1.0); - - //overlay - lowp vec4 outputColor = vec4( - (desat.r < 0.5 ? (2.0 * desat.r * filterColor.r) : (1.0 - 2.0 * (1.0 - desat.r) * (1.0 - filterColor.r))), - (desat.g < 0.5 ? (2.0 * desat.g * filterColor.g) : (1.0 - 2.0 * (1.0 - desat.g) * (1.0 - filterColor.g))), - (desat.b < 0.5 ? (2.0 * desat.b * filterColor.b) : (1.0 - 2.0 * (1.0 - desat.b) * (1.0 - filterColor.b))), - 1.0 - ); - - //which is better, or are they equal? - gl_FragColor = vec4( mix(textureColor.rgb, outputColor.rgb, intensity), textureColor.a); - } -); -#else -NSString *const kGPUMonochromeFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float intensity; - uniform vec3 filterColor; - - const vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - //desat, then apply overlay blend - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float luminance = dot(textureColor.rgb, luminanceWeighting); - - vec4 desat = vec4(vec3(luminance), 1.0); - - //overlay - vec4 outputColor = vec4( - (desat.r < 0.5 ? (2.0 * desat.r * filterColor.r) : (1.0 - 2.0 * (1.0 - desat.r) * (1.0 - filterColor.r))), - (desat.g < 0.5 ? (2.0 * desat.g * filterColor.g) : (1.0 - 2.0 * (1.0 - desat.g) * (1.0 - filterColor.g))), - (desat.b < 0.5 ? (2.0 * desat.b * filterColor.b) : (1.0 - 2.0 * (1.0 - desat.b) * (1.0 - filterColor.b))), - 1.0 - ); - - //which is better, or are they equal? - gl_FragColor = vec4( mix(textureColor.rgb, outputColor.rgb, intensity), textureColor.a); - } -); -#endif - -@implementation GPUImageMonochromeFilter - -@synthesize intensity = _intensity; -@synthesize color = _color; - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUMonochromeFragmentShaderString])) - { - return nil; - } - - intensityUniform = [filterProgram uniformIndex:@"intensity"]; - filterColorUniform = [filterProgram uniformIndex:@"filterColor"]; - - self.intensity = 1.0; - self.color = (GPUVector4){0.6f, 0.45f, 0.3f, 1.f}; - //self.color = [CIColor colorWithRed:0.6 green:0.45 blue:0.3 alpha:1.]; - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setColor:(GPUVector4)color; -{ - - _color = color; - - [self setColorRed:color.one green:color.two blue:color.three]; -} - -- (void)setColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent; -{ - GPUVector3 filterColor = {redComponent, greenComponent, blueComponent}; - - [self setVec3:filterColor forUniform:filterColorUniform program:filterProgram]; -} - -- (void)setIntensity:(CGFloat)newValue; -{ - _intensity = newValue; - - [self setFloat:_intensity forUniform:intensityUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMosaicFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMosaicFilter.h deleted file mode 100644 index 5f72d3c9..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMosaicFilter.h +++ /dev/null @@ -1,22 +0,0 @@ - -// This needs a little more work, it's rotating the input tileset and there are some artifacts (I think from GL_LINEAR interpolation), but it's working - -#import "GPUImageTwoInputFilter.h" -#import "GPUImagePicture.h" - -@interface GPUImageMosaicFilter : GPUImageTwoInputFilter { - GLint inputTileSizeUniform, numTilesUniform, displayTileSizeUniform, colorOnUniform; - GPUImagePicture *pic; -} - -// This filter takes an input tileset, the tiles must ascend in luminance -// It looks at the input image and replaces each display tile with an input tile -// according to the luminance of that tile. The idea was to replicate the ASCII -// video filters seen in other apps, but the tileset can be anything. -@property(readwrite, nonatomic) CGSize inputTileSize; -@property(readwrite, nonatomic) float numTiles; -@property(readwrite, nonatomic) CGSize displayTileSize; -@property(readwrite, nonatomic) BOOL colorOn; -@property(readwrite, nonatomic, copy) NSString *tileSet; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMosaicFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMosaicFilter.m deleted file mode 100644 index b017ca97..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMosaicFilter.m +++ /dev/null @@ -1,188 +0,0 @@ -// -// GPUImageMosaicFilter.m - - -#import "GPUImageMosaicFilter.h" -#import "GPUImagePicture.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageMosaicFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform vec2 inputTileSize; - uniform vec2 displayTileSize; - uniform float numTiles; - uniform int colorOn; - - void main() - { - vec2 xy = textureCoordinate; - xy = xy - mod(xy, displayTileSize); - - vec4 lumcoeff = vec4(0.299,0.587,0.114,0.0); - - vec4 inputColor = texture2D(inputImageTexture2, xy); - float lum = dot(inputColor,lumcoeff); - lum = 1.0 - lum; - - float stepsize = 1.0 / numTiles; - float lumStep = (lum - mod(lum, stepsize)) / stepsize; - - float rowStep = 1.0 / inputTileSize.x; - float x = mod(lumStep, rowStep); - float y = floor(lumStep / rowStep); - - vec2 startCoord = vec2(float(x) * inputTileSize.x, float(y) * inputTileSize.y); - vec2 finalCoord = startCoord + ((textureCoordinate - xy) * (inputTileSize / displayTileSize)); - - vec4 color = texture2D(inputImageTexture, finalCoord); - if (colorOn == 1) { - color = color * inputColor; - } - gl_FragColor = color; - - } -); -#else -NSString *const kGPUImageMosaicFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform vec2 inputTileSize; - uniform vec2 displayTileSize; - uniform float numTiles; - uniform int colorOn; - - void main() - { - vec2 xy = textureCoordinate; - xy = xy - mod(xy, displayTileSize); - - vec4 lumcoeff = vec4(0.299,0.587,0.114,0.0); - - vec4 inputColor = texture2D(inputImageTexture2, xy); - float lum = dot(inputColor,lumcoeff); - lum = 1.0 - lum; - - float stepsize = 1.0 / numTiles; - float lumStep = (lum - mod(lum, stepsize)) / stepsize; - - float rowStep = 1.0 / inputTileSize.x; - float x = mod(lumStep, rowStep); - float y = floor(lumStep / rowStep); - - vec2 startCoord = vec2(float(x) * inputTileSize.x, float(y) * inputTileSize.y); - vec2 finalCoord = startCoord + ((textureCoordinate - xy) * (inputTileSize / displayTileSize)); - - vec4 color = texture2D(inputImageTexture, finalCoord); - if (colorOn == 1) { - color = color * inputColor; - } - gl_FragColor = color; - } -); -#endif - -@implementation GPUImageMosaicFilter - -@synthesize inputTileSize = _inputTileSize, numTiles = _numTiles, displayTileSize = _displayTileSize, colorOn = _colorOn; -@synthesize tileSet = _tileSet; - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageMosaicFragmentShaderString])) - { - return nil; - } - - inputTileSizeUniform = [filterProgram uniformIndex:@"inputTileSize"]; - displayTileSizeUniform = [filterProgram uniformIndex:@"displayTileSize"]; - numTilesUniform = [filterProgram uniformIndex:@"numTiles"]; - colorOnUniform = [filterProgram uniformIndex:@"colorOn"]; - - CGSize its = CGSizeMake(0.125, 0.125); - CGSize dts = CGSizeMake(0.025, 0.025); - [self setDisplayTileSize:dts]; - [self setInputTileSize:its]; - [self setNumTiles:64.0]; - [self setColorOn:YES]; - //[self setTileSet:@"squares.png"]; - return self; -} - -- (void)setColorOn:(BOOL)yes -{ - glUniform1i(colorOnUniform, yes); -} - -- (void)setNumTiles:(float)numTiles -{ - - _numTiles = numTiles; - [self setFloat:_numTiles forUniformName:@"numTiles"]; -} - -- (void)setInputTileSize:(CGSize)inputTileSize -{ - if (inputTileSize.width > 1.0) { - _inputTileSize.width = 1.0; - } - if (inputTileSize.height > 1.0) { - _inputTileSize.height = 1.0; - } - if (inputTileSize.width < 0.0) { - _inputTileSize.width = 0.0; - } - if (inputTileSize.height < 0.0) { - _inputTileSize.height = 0.0; - } - - - _inputTileSize = inputTileSize; - - [self setSize:_inputTileSize forUniform:inputTileSizeUniform program:filterProgram]; -} - --(void)setDisplayTileSize:(CGSize)displayTileSize -{ - if (displayTileSize.width > 1.0) { - _displayTileSize.width = 1.0; - } - if (displayTileSize.height > 1.0) { - _displayTileSize.height = 1.0; - } - if (displayTileSize.width < 0.0) { - _displayTileSize.width = 0.0; - } - if (displayTileSize.height < 0.0) { - _displayTileSize.height = 0.0; - } - - - _displayTileSize = displayTileSize; - - [self setSize:_displayTileSize forUniform:displayTileSizeUniform program:filterProgram]; -} - --(void)setTileSet:(NSString *)tileSet -{ -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - UIImage *img = [UIImage imageNamed:tileSet]; -#else - NSImage *img = [NSImage imageNamed:tileSet]; -#endif - pic = [[GPUImagePicture alloc] initWithImage:img smoothlyScaleOutput:YES]; - [pic addTarget:self]; - [pic processImage]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMotionBlurFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMotionBlurFilter.h deleted file mode 100644 index dcca712f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMotionBlurFilter.h +++ /dev/null @@ -1,13 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageMotionBlurFilter : GPUImageFilter - -/** A multiplier for the blur size, ranging from 0.0 on up, with a default of 1.0 - */ -@property (readwrite, nonatomic) CGFloat blurSize; - -/** The angular direction of the blur, in degrees. 0 degrees by default - */ -@property (readwrite, nonatomic) CGFloat blurAngle; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMotionBlurFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMotionBlurFilter.m deleted file mode 100644 index 5a2c20b6..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMotionBlurFilter.m +++ /dev/null @@ -1,209 +0,0 @@ -#import "GPUImageMotionBlurFilter.h" - -// Override vertex shader to remove dependent texture reads -NSString *const kGPUImageTiltedTexelSamplingVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - - uniform vec2 directionalTexelStep; - - varying vec2 textureCoordinate; - varying vec2 oneStepBackTextureCoordinate; - varying vec2 twoStepsBackTextureCoordinate; - varying vec2 threeStepsBackTextureCoordinate; - varying vec2 fourStepsBackTextureCoordinate; - varying vec2 oneStepForwardTextureCoordinate; - varying vec2 twoStepsForwardTextureCoordinate; - varying vec2 threeStepsForwardTextureCoordinate; - varying vec2 fourStepsForwardTextureCoordinate; - - void main() - { - gl_Position = position; - - textureCoordinate = inputTextureCoordinate.xy; - oneStepBackTextureCoordinate = inputTextureCoordinate.xy - directionalTexelStep; - twoStepsBackTextureCoordinate = inputTextureCoordinate.xy - 2.0 * directionalTexelStep; - threeStepsBackTextureCoordinate = inputTextureCoordinate.xy - 3.0 * directionalTexelStep; - fourStepsBackTextureCoordinate = inputTextureCoordinate.xy - 4.0 * directionalTexelStep; - oneStepForwardTextureCoordinate = inputTextureCoordinate.xy + directionalTexelStep; - twoStepsForwardTextureCoordinate = inputTextureCoordinate.xy + 2.0 * directionalTexelStep; - threeStepsForwardTextureCoordinate = inputTextureCoordinate.xy + 3.0 * directionalTexelStep; - fourStepsForwardTextureCoordinate = inputTextureCoordinate.xy + 4.0 * directionalTexelStep; - } -); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageMotionBlurFragmentShaderString = SHADER_STRING -( - precision highp float; - - uniform sampler2D inputImageTexture; - - varying vec2 textureCoordinate; - varying vec2 oneStepBackTextureCoordinate; - varying vec2 twoStepsBackTextureCoordinate; - varying vec2 threeStepsBackTextureCoordinate; - varying vec2 fourStepsBackTextureCoordinate; - varying vec2 oneStepForwardTextureCoordinate; - varying vec2 twoStepsForwardTextureCoordinate; - varying vec2 threeStepsForwardTextureCoordinate; - varying vec2 fourStepsForwardTextureCoordinate; - - void main() - { - // Box weights -// lowp vec4 fragmentColor = texture2D(inputImageTexture, textureCoordinate) * 0.1111111; -// fragmentColor += texture2D(inputImageTexture, oneStepBackTextureCoordinate) * 0.1111111; -// fragmentColor += texture2D(inputImageTexture, twoStepsBackTextureCoordinate) * 0.1111111; -// fragmentColor += texture2D(inputImageTexture, threeStepsBackTextureCoordinate) * 0.1111111; -// fragmentColor += texture2D(inputImageTexture, fourStepsBackTextureCoordinate) * 0.1111111; -// fragmentColor += texture2D(inputImageTexture, oneStepForwardTextureCoordinate) * 0.1111111; -// fragmentColor += texture2D(inputImageTexture, twoStepsForwardTextureCoordinate) * 0.1111111; -// fragmentColor += texture2D(inputImageTexture, threeStepsForwardTextureCoordinate) * 0.1111111; -// fragmentColor += texture2D(inputImageTexture, fourStepsForwardTextureCoordinate) * 0.1111111; - - lowp vec4 fragmentColor = texture2D(inputImageTexture, textureCoordinate) * 0.18; - fragmentColor += texture2D(inputImageTexture, oneStepBackTextureCoordinate) * 0.15; - fragmentColor += texture2D(inputImageTexture, twoStepsBackTextureCoordinate) * 0.12; - fragmentColor += texture2D(inputImageTexture, threeStepsBackTextureCoordinate) * 0.09; - fragmentColor += texture2D(inputImageTexture, fourStepsBackTextureCoordinate) * 0.05; - fragmentColor += texture2D(inputImageTexture, oneStepForwardTextureCoordinate) * 0.15; - fragmentColor += texture2D(inputImageTexture, twoStepsForwardTextureCoordinate) * 0.12; - fragmentColor += texture2D(inputImageTexture, threeStepsForwardTextureCoordinate) * 0.09; - fragmentColor += texture2D(inputImageTexture, fourStepsForwardTextureCoordinate) * 0.05; - - gl_FragColor = fragmentColor; - } -); -#else -NSString *const kGPUImageMotionBlurFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - varying vec2 textureCoordinate; - varying vec2 oneStepBackTextureCoordinate; - varying vec2 twoStepsBackTextureCoordinate; - varying vec2 threeStepsBackTextureCoordinate; - varying vec2 fourStepsBackTextureCoordinate; - varying vec2 oneStepForwardTextureCoordinate; - varying vec2 twoStepsForwardTextureCoordinate; - varying vec2 threeStepsForwardTextureCoordinate; - varying vec2 fourStepsForwardTextureCoordinate; - - void main() - { - // Box weights - // vec4 fragmentColor = texture2D(inputImageTexture, textureCoordinate) * 0.1111111; - // fragmentColor += texture2D(inputImageTexture, oneStepBackTextureCoordinate) * 0.1111111; - // fragmentColor += texture2D(inputImageTexture, twoStepsBackTextureCoordinate) * 0.1111111; - // fragmentColor += texture2D(inputImageTexture, threeStepsBackTextureCoordinate) * 0.1111111; - // fragmentColor += texture2D(inputImageTexture, fourStepsBackTextureCoordinate) * 0.1111111; - // fragmentColor += texture2D(inputImageTexture, oneStepForwardTextureCoordinate) * 0.1111111; - // fragmentColor += texture2D(inputImageTexture, twoStepsForwardTextureCoordinate) * 0.1111111; - // fragmentColor += texture2D(inputImageTexture, threeStepsForwardTextureCoordinate) * 0.1111111; - // fragmentColor += texture2D(inputImageTexture, fourStepsForwardTextureCoordinate) * 0.1111111; - - vec4 fragmentColor = texture2D(inputImageTexture, textureCoordinate) * 0.18; - fragmentColor += texture2D(inputImageTexture, oneStepBackTextureCoordinate) * 0.15; - fragmentColor += texture2D(inputImageTexture, twoStepsBackTextureCoordinate) * 0.12; - fragmentColor += texture2D(inputImageTexture, threeStepsBackTextureCoordinate) * 0.09; - fragmentColor += texture2D(inputImageTexture, fourStepsBackTextureCoordinate) * 0.05; - fragmentColor += texture2D(inputImageTexture, oneStepForwardTextureCoordinate) * 0.15; - fragmentColor += texture2D(inputImageTexture, twoStepsForwardTextureCoordinate) * 0.12; - fragmentColor += texture2D(inputImageTexture, threeStepsForwardTextureCoordinate) * 0.09; - fragmentColor += texture2D(inputImageTexture, fourStepsForwardTextureCoordinate) * 0.05; - - gl_FragColor = fragmentColor; - } -); -#endif - -@interface GPUImageMotionBlurFilter() -{ - GLint directionalTexelStepUniform; -} - -- (void)recalculateTexelOffsets; - -@end - -@implementation GPUImageMotionBlurFilter - -@synthesize blurSize = _blurSize; -@synthesize blurAngle = _blurAngle; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithVertexShaderFromString:kGPUImageTiltedTexelSamplingVertexShaderString fragmentShaderFromString:kGPUImageMotionBlurFragmentShaderString])) - { - return nil; - } - - directionalTexelStepUniform = [filterProgram uniformIndex:@"directionalTexelStep"]; - - self.blurSize = 2.5; - self.blurAngle = 0.0; - - return self; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - CGSize oldInputSize = inputTextureSize; - [super setInputSize:newSize atIndex:textureIndex]; - - if (!CGSizeEqualToSize(oldInputSize, inputTextureSize) && (!CGSizeEqualToSize(newSize, CGSizeZero)) ) - { - [self recalculateTexelOffsets]; - } -} - -- (void)recalculateTexelOffsets; -{ - CGFloat aspectRatio = 1.0; - CGPoint texelOffsets; - - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - aspectRatio = (inputTextureSize.width / inputTextureSize.height); - texelOffsets.x = _blurSize * sin(_blurAngle * M_PI / 180.0) * aspectRatio / inputTextureSize.height; - texelOffsets.y = _blurSize * cos(_blurAngle * M_PI / 180.0) / inputTextureSize.height; - } - else - { - aspectRatio = (inputTextureSize.height / inputTextureSize.width); - texelOffsets.x = _blurSize * cos(_blurAngle * M_PI / 180.0) * aspectRatio / inputTextureSize.width; - texelOffsets.y = _blurSize * sin(_blurAngle * M_PI / 180.0) / inputTextureSize.width; - } - - [self setPoint:texelOffsets forUniform:directionalTexelStepUniform program:filterProgram]; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - [super setInputRotation:newInputRotation atIndex:textureIndex]; - [self recalculateTexelOffsets]; -} - -- (void)setBlurAngle:(CGFloat)newValue; -{ - _blurAngle = newValue; - [self recalculateTexelOffsets]; -} - -- (void)setBlurSize:(CGFloat)newValue; -{ - _blurSize = newValue; - [self recalculateTexelOffsets]; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMotionDetector.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMotionDetector.h deleted file mode 100644 index 01329145..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMotionDetector.h +++ /dev/null @@ -1,18 +0,0 @@ -#import "GPUImageFilterGroup.h" -#import "GPUImageLowPassFilter.h" -#import "GPUImageAverageColor.h" - -@interface GPUImageMotionDetector : GPUImageFilterGroup -{ - GPUImageLowPassFilter *lowPassFilter; - GPUImageTwoInputFilter *frameComparisonFilter; - GPUImageAverageColor *averageColor; -} - -// This controls the low pass filter strength used to compare the current frame with previous ones to detect motion. This ranges from 0.0 to 1.0, with a default of 0.5. -@property(readwrite, nonatomic) CGFloat lowPassFilterStrength; - -// For every frame, this will feed back the calculated centroid of the motion, as well as a relative intensity. -@property(nonatomic, copy) void(^motionDetectionBlock)(CGPoint motionCentroid, CGFloat motionIntensity, CMTime frameTime); - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMotionDetector.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMotionDetector.m deleted file mode 100644 index 0e204ad7..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMotionDetector.m +++ /dev/null @@ -1,112 +0,0 @@ -#import "GPUImageMotionDetector.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageMotionComparisonFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform highp float intensity; - - void main() - { - lowp vec3 currentImageColor = texture2D(inputImageTexture, textureCoordinate).rgb; - lowp vec3 lowPassImageColor = texture2D(inputImageTexture2, textureCoordinate2).rgb; - - mediump float colorDistance = distance(currentImageColor, lowPassImageColor); // * 0.57735 - lowp float movementThreshold = step(0.2, colorDistance); - - gl_FragColor = movementThreshold * vec4(textureCoordinate2.x, textureCoordinate2.y, 1.0, 1.0); - } -); -#else -NSString *const kGPUImageMotionComparisonFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform float intensity; - - void main() - { - vec3 currentImageColor = texture2D(inputImageTexture, textureCoordinate).rgb; - vec3 lowPassImageColor = texture2D(inputImageTexture2, textureCoordinate2).rgb; - - float colorDistance = distance(currentImageColor, lowPassImageColor); // * 0.57735 - float movementThreshold = step(0.2, colorDistance); - - gl_FragColor = movementThreshold * vec4(textureCoordinate2.x, textureCoordinate2.y, 1.0, 1.0); - } -); -#endif - - -@implementation GPUImageMotionDetector - -@synthesize lowPassFilterStrength, motionDetectionBlock; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - // Start with a low pass filter to define the component to be removed - lowPassFilter = [[GPUImageLowPassFilter alloc] init]; - [self addFilter:lowPassFilter]; - - // Take the difference of the current frame from the low pass filtered result to get the high pass - frameComparisonFilter = [[GPUImageTwoInputFilter alloc] initWithFragmentShaderFromString:kGPUImageMotionComparisonFragmentShaderString]; - [self addFilter:frameComparisonFilter]; - - // Texture location 0 needs to be the original image for the difference blend - [lowPassFilter addTarget:frameComparisonFilter atTextureLocation:1]; - - // End with the average color for the scene to determine the centroid - averageColor = [[GPUImageAverageColor alloc] init]; - - __unsafe_unretained GPUImageMotionDetector *weakSelf = self; - - [averageColor setColorAverageProcessingFinishedBlock:^(CGFloat redComponent, CGFloat greenComponent, CGFloat blueComponent, CGFloat alphaComponent, CMTime frameTime) { - if (weakSelf.motionDetectionBlock != NULL) - { - weakSelf.motionDetectionBlock(CGPointMake(redComponent / alphaComponent, greenComponent / alphaComponent), alphaComponent, frameTime); - } -// NSLog(@"Average X: %f, Y: %f total: %f", redComponent / alphaComponent, greenComponent / alphaComponent, alphaComponent); - }]; - - [frameComparisonFilter addTarget:averageColor]; - - self.initialFilters = [NSArray arrayWithObjects:lowPassFilter, frameComparisonFilter, nil]; - self.terminalFilter = frameComparisonFilter; - - self.lowPassFilterStrength = 0.5; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setLowPassFilterStrength:(CGFloat)newValue; -{ - lowPassFilter.filterStrength = newValue; -} - -- (CGFloat)lowPassFilterStrength; -{ - return lowPassFilter.filterStrength; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMovie.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMovie.h deleted file mode 100755 index f61e56ef..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMovie.h +++ /dev/null @@ -1,61 +0,0 @@ -#import -#import -#import "GPUImageContext.h" -#import "GPUImageOutput.h" - -/** Protocol for getting Movie played callback. - */ -@protocol GPUImageMovieDelegate - -- (void)didCompletePlayingMovie; -@end - -/** Source object for filtering movies - */ -@interface GPUImageMovie : GPUImageOutput - -@property (readwrite, retain) AVAsset *asset; -@property (readwrite, retain) AVPlayerItem *playerItem; -@property(readwrite, retain) NSURL *url; - -/** This enables the benchmarking mode, which logs out instantaneous and average frame times to the console - */ -@property(readwrite, nonatomic) BOOL runBenchmark; - -/** This determines whether to play back a movie as fast as the frames can be processed, or if the original speed of the movie should be respected. Defaults to NO. - */ -@property(readwrite, nonatomic) BOOL playAtActualSpeed; - -/** This determines whether the video should repeat (loop) at the end and restart from the beginning. Defaults to NO. - */ -@property(readwrite, nonatomic) BOOL shouldRepeat; - -/** This specifies the progress of the process on a scale from 0 to 1.0. A value of 0 means the process has not yet begun, A value of 1.0 means the conversaion is complete. - This property is not key-value observable. - */ -@property(readonly, nonatomic) float progress; - -/** This is used to send the delete Movie did complete playing alert - */ -@property (readwrite, nonatomic, assign) id delegate; - -@property (readonly, nonatomic) AVAssetReader *assetReader; -@property (readonly, nonatomic) BOOL audioEncodingIsFinished; -@property (readonly, nonatomic) BOOL videoEncodingIsFinished; - -/// @name Initialization and teardown -- (id)initWithAsset:(AVAsset *)asset; -- (id)initWithPlayerItem:(AVPlayerItem *)playerItem; -- (id)initWithURL:(NSURL *)url; -- (void)yuvConversionSetup; - -/// @name Movie processing -- (void)enableSynchronizedEncodingUsingMovieWriter:(GPUImageMovieWriter *)movieWriter; -- (BOOL)readNextVideoFrameFromOutput:(AVAssetReaderOutput *)readerVideoTrackOutput; -- (BOOL)readNextAudioSampleFromOutput:(AVAssetReaderOutput *)readerAudioTrackOutput; -- (void)startProcessing; -- (void)endProcessing; -- (void)cancelProcessing; -- (void)processMovieFrame:(CMSampleBufferRef)movieSampleBuffer; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMovie.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMovie.m deleted file mode 100755 index d096b03e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMovie.m +++ /dev/null @@ -1,761 +0,0 @@ -#import "GPUImageMovie.h" -#import "GPUImageMovieWriter.h" -#import "GPUImageFilter.h" -#import "GPUImageVideoCamera.h" - -@interface GPUImageMovie () -{ - BOOL audioEncodingIsFinished, videoEncodingIsFinished; - GPUImageMovieWriter *synchronizedMovieWriter; - AVAssetReader *reader; - AVPlayerItemVideoOutput *playerItemOutput; - CADisplayLink *displayLink; - CMTime previousFrameTime, processingFrameTime; - CFAbsoluteTime previousActualFrameTime; - BOOL keepLooping; - - GLuint luminanceTexture, chrominanceTexture; - - GLProgram *yuvConversionProgram; - GLint yuvConversionPositionAttribute, yuvConversionTextureCoordinateAttribute; - GLint yuvConversionLuminanceTextureUniform, yuvConversionChrominanceTextureUniform; - GLint yuvConversionMatrixUniform; - const GLfloat *_preferredConversion; - - BOOL isFullYUVRange; - - int imageBufferWidth, imageBufferHeight; -} - -- (void)processAsset; - -@end - -@implementation GPUImageMovie - -@synthesize url = _url; -@synthesize asset = _asset; -@synthesize runBenchmark = _runBenchmark; -@synthesize playAtActualSpeed = _playAtActualSpeed; -@synthesize delegate = _delegate; -@synthesize shouldRepeat = _shouldRepeat; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithURL:(NSURL *)url; -{ - if (!(self = [super init])) - { - return nil; - } - - [self yuvConversionSetup]; - - self.url = url; - self.asset = nil; - - return self; -} - -- (id)initWithAsset:(AVAsset *)asset; -{ - if (!(self = [super init])) - { - return nil; - } - - [self yuvConversionSetup]; - - self.url = nil; - self.asset = asset; - - return self; -} - -- (id)initWithPlayerItem:(AVPlayerItem *)playerItem; -{ - if (!(self = [super init])) - { - return nil; - } - - [self yuvConversionSetup]; - - self.url = nil; - self.asset = nil; - self.playerItem = playerItem; - - return self; -} - -- (void)yuvConversionSetup; -{ - if ([GPUImageContext supportsFastTextureUpload]) - { - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - - _preferredConversion = kColorConversion709; - isFullYUVRange = YES; - yuvConversionProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:kGPUImageVertexShaderString fragmentShaderString:kGPUImageYUVFullRangeConversionForLAFragmentShaderString]; - - if (!yuvConversionProgram.initialized) - { - [yuvConversionProgram addAttribute:@"position"]; - [yuvConversionProgram addAttribute:@"inputTextureCoordinate"]; - - if (![yuvConversionProgram link]) - { - NSString *progLog = [yuvConversionProgram programLog]; - NSLog(@"Program link log: %@", progLog); - NSString *fragLog = [yuvConversionProgram fragmentShaderLog]; - NSLog(@"Fragment shader compile log: %@", fragLog); - NSString *vertLog = [yuvConversionProgram vertexShaderLog]; - NSLog(@"Vertex shader compile log: %@", vertLog); - yuvConversionProgram = nil; - NSAssert(NO, @"Filter shader link failed"); - } - } - - yuvConversionPositionAttribute = [yuvConversionProgram attributeIndex:@"position"]; - yuvConversionTextureCoordinateAttribute = [yuvConversionProgram attributeIndex:@"inputTextureCoordinate"]; - yuvConversionLuminanceTextureUniform = [yuvConversionProgram uniformIndex:@"luminanceTexture"]; - yuvConversionChrominanceTextureUniform = [yuvConversionProgram uniformIndex:@"chrominanceTexture"]; - yuvConversionMatrixUniform = [yuvConversionProgram uniformIndex:@"colorConversionMatrix"]; - - [GPUImageContext setActiveShaderProgram:yuvConversionProgram]; - - glEnableVertexAttribArray(yuvConversionPositionAttribute); - glEnableVertexAttribArray(yuvConversionTextureCoordinateAttribute); - }); - } -} - -- (void)dealloc -{ - // Moved into endProcessing - //if (self.playerItem && (displayLink != nil)) - //{ - // [displayLink invalidate]; // remove from all run loops - // displayLink = nil; - //} -} - -#pragma mark - -#pragma mark Movie processing - -- (void)enableSynchronizedEncodingUsingMovieWriter:(GPUImageMovieWriter *)movieWriter; -{ - synchronizedMovieWriter = movieWriter; - movieWriter.encodingLiveVideo = NO; -} - -- (void)startProcessing -{ - if( self.playerItem ) { - [self processPlayerItem]; - return; - } - if(self.url == nil) - { - [self processAsset]; - return; - } - - if (_shouldRepeat) keepLooping = YES; - - previousFrameTime = kCMTimeZero; - previousActualFrameTime = CFAbsoluteTimeGetCurrent(); - - NSDictionary *inputOptions = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:AVURLAssetPreferPreciseDurationAndTimingKey]; - AVURLAsset *inputAsset = [[AVURLAsset alloc] initWithURL:self.url options:inputOptions]; - - GPUImageMovie __block *blockSelf = self; - - [inputAsset loadValuesAsynchronouslyForKeys:[NSArray arrayWithObject:@"tracks"] completionHandler: ^{ - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - NSError *error = nil; - AVKeyValueStatus tracksStatus = [inputAsset statusOfValueForKey:@"tracks" error:&error]; - if (tracksStatus != AVKeyValueStatusLoaded) - { - return; - } - blockSelf.asset = inputAsset; - [blockSelf processAsset]; - blockSelf = nil; - }); - }]; -} - -- (AVAssetReader*)createAssetReader -{ - NSError *error = nil; - AVAssetReader *assetReader = [AVAssetReader assetReaderWithAsset:self.asset error:&error]; - - NSMutableDictionary *outputSettings = [NSMutableDictionary dictionary]; - if ([GPUImageContext supportsFastTextureUpload]) { - [outputSettings setObject:@(kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) forKey:(id)kCVPixelBufferPixelFormatTypeKey]; - isFullYUVRange = YES; - } - else { - [outputSettings setObject:@(kCVPixelFormatType_32BGRA) forKey:(id)kCVPixelBufferPixelFormatTypeKey]; - isFullYUVRange = NO; - } - - // Maybe set alwaysCopiesSampleData to NO on iOS 5.0 for faster video decoding - AVAssetReaderTrackOutput *readerVideoTrackOutput = [AVAssetReaderTrackOutput assetReaderTrackOutputWithTrack:[[self.asset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0] outputSettings:outputSettings]; - readerVideoTrackOutput.alwaysCopiesSampleData = NO; - [assetReader addOutput:readerVideoTrackOutput]; - - NSArray *audioTracks = [self.asset tracksWithMediaType:AVMediaTypeAudio]; - BOOL shouldRecordAudioTrack = (([audioTracks count] > 0) && (self.audioEncodingTarget != nil) ); - AVAssetReaderTrackOutput *readerAudioTrackOutput = nil; - - if (shouldRecordAudioTrack) - { - [self.audioEncodingTarget setShouldInvalidateAudioSampleWhenDone:YES]; - - // This might need to be extended to handle movies with more than one audio track - AVAssetTrack* audioTrack = [audioTracks objectAtIndex:0]; - readerAudioTrackOutput = [AVAssetReaderTrackOutput assetReaderTrackOutputWithTrack:audioTrack outputSettings:nil]; - readerAudioTrackOutput.alwaysCopiesSampleData = NO; - [assetReader addOutput:readerAudioTrackOutput]; - } - - return assetReader; -} - -- (void)processAsset -{ - reader = [self createAssetReader]; - - AVAssetReaderOutput *readerVideoTrackOutput = nil; - AVAssetReaderOutput *readerAudioTrackOutput = nil; - - audioEncodingIsFinished = YES; - for( AVAssetReaderOutput *output in reader.outputs ) { - if( [output.mediaType isEqualToString:AVMediaTypeAudio] ) { - audioEncodingIsFinished = NO; - readerAudioTrackOutput = output; - } - else if( [output.mediaType isEqualToString:AVMediaTypeVideo] ) { - readerVideoTrackOutput = output; - } - } - - if ([reader startReading] == NO) - { - NSLog(@"Error reading from file at URL: %@", self.url); - return; - } - - __unsafe_unretained GPUImageMovie *weakSelf = self; - - if (synchronizedMovieWriter != nil) - { - [synchronizedMovieWriter setVideoInputReadyCallback:^{ - return [weakSelf readNextVideoFrameFromOutput:readerVideoTrackOutput]; - }]; - - [synchronizedMovieWriter setAudioInputReadyCallback:^{ - return [weakSelf readNextAudioSampleFromOutput:readerAudioTrackOutput]; - }]; - - [synchronizedMovieWriter enableSynchronizationCallbacks]; - } - else - { - while (reader.status == AVAssetReaderStatusReading && (!_shouldRepeat || keepLooping)) - { - [weakSelf readNextVideoFrameFromOutput:readerVideoTrackOutput]; - - if ( (readerAudioTrackOutput) && (!audioEncodingIsFinished) ) - { - [weakSelf readNextAudioSampleFromOutput:readerAudioTrackOutput]; - } - - } - - if (reader.status == AVAssetReaderStatusCompleted) { - - [reader cancelReading]; - - if (keepLooping) { - reader = nil; - dispatch_async(dispatch_get_main_queue(), ^{ - [self startProcessing]; - }); - } else { - [weakSelf endProcessing]; - } - - } - } -} - -- (void)processPlayerItem -{ - runSynchronouslyOnVideoProcessingQueue(^{ - displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(displayLinkCallback:)]; - [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; - [displayLink setPaused:YES]; - - dispatch_queue_t videoProcessingQueue = [GPUImageContext sharedContextQueue]; - NSMutableDictionary *pixBuffAttributes = [NSMutableDictionary dictionary]; - if ([GPUImageContext supportsFastTextureUpload]) { - [pixBuffAttributes setObject:@(kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) forKey:(id)kCVPixelBufferPixelFormatTypeKey]; - } - else { - [pixBuffAttributes setObject:@(kCVPixelFormatType_32BGRA) forKey:(id)kCVPixelBufferPixelFormatTypeKey]; - } - playerItemOutput = [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:pixBuffAttributes]; - [playerItemOutput setDelegate:self queue:videoProcessingQueue]; - - [_playerItem addOutput:playerItemOutput]; - [playerItemOutput requestNotificationOfMediaDataChangeWithAdvanceInterval:0.1]; - }); -} - -- (void)outputMediaDataWillChange:(AVPlayerItemOutput *)sender -{ - // Restart display link. - [displayLink setPaused:NO]; -} - -- (void)displayLinkCallback:(CADisplayLink *)sender -{ - /* - The callback gets called once every Vsync. - Using the display link's timestamp and duration we can compute the next time the screen will be refreshed, and copy the pixel buffer for that time - This pixel buffer can then be processed and later rendered on screen. - */ - // Calculate the nextVsync time which is when the screen will be refreshed next. - CFTimeInterval nextVSync = ([sender timestamp] + [sender duration]); - - CMTime outputItemTime = [playerItemOutput itemTimeForHostTime:nextVSync]; - - if ([playerItemOutput hasNewPixelBufferForItemTime:outputItemTime]) { - __unsafe_unretained GPUImageMovie *weakSelf = self; - CVPixelBufferRef pixelBuffer = [playerItemOutput copyPixelBufferForItemTime:outputItemTime itemTimeForDisplay:NULL]; - if( pixelBuffer ) - runSynchronouslyOnVideoProcessingQueue(^{ - [weakSelf processMovieFrame:pixelBuffer withSampleTime:outputItemTime]; - CFRelease(pixelBuffer); - }); - } -} - -- (BOOL)readNextVideoFrameFromOutput:(AVAssetReaderOutput *)readerVideoTrackOutput; -{ - if (reader.status == AVAssetReaderStatusReading && ! videoEncodingIsFinished) - { - CMSampleBufferRef sampleBufferRef = [readerVideoTrackOutput copyNextSampleBuffer]; - if (sampleBufferRef) - { - //NSLog(@"read a video frame: %@", CFBridgingRelease(CMTimeCopyDescription(kCFAllocatorDefault, CMSampleBufferGetOutputPresentationTimeStamp(sampleBufferRef)))); - if (_playAtActualSpeed) - { - // Do this outside of the video processing queue to not slow that down while waiting - CMTime currentSampleTime = CMSampleBufferGetOutputPresentationTimeStamp(sampleBufferRef); - CMTime differenceFromLastFrame = CMTimeSubtract(currentSampleTime, previousFrameTime); - CFAbsoluteTime currentActualTime = CFAbsoluteTimeGetCurrent(); - - CGFloat frameTimeDifference = CMTimeGetSeconds(differenceFromLastFrame); - CGFloat actualTimeDifference = currentActualTime - previousActualFrameTime; - - if (frameTimeDifference > actualTimeDifference) - { - usleep(1000000.0 * (frameTimeDifference - actualTimeDifference)); - } - - previousFrameTime = currentSampleTime; - previousActualFrameTime = CFAbsoluteTimeGetCurrent(); - } - - __unsafe_unretained GPUImageMovie *weakSelf = self; - runSynchronouslyOnVideoProcessingQueue(^{ - [weakSelf processMovieFrame:sampleBufferRef]; - CMSampleBufferInvalidate(sampleBufferRef); - CFRelease(sampleBufferRef); - }); - - return YES; - } - else - { - if (!keepLooping) { - videoEncodingIsFinished = YES; - if( videoEncodingIsFinished && audioEncodingIsFinished ) - [self endProcessing]; - } - } - } - else if (synchronizedMovieWriter != nil) - { - if (reader.status == AVAssetReaderStatusCompleted) - { - [self endProcessing]; - } - } - return NO; -} - -- (BOOL)readNextAudioSampleFromOutput:(AVAssetReaderOutput *)readerAudioTrackOutput; -{ - if (reader.status == AVAssetReaderStatusReading && ! audioEncodingIsFinished) - { - CMSampleBufferRef audioSampleBufferRef = [readerAudioTrackOutput copyNextSampleBuffer]; - if (audioSampleBufferRef) - { - //NSLog(@"read an audio frame: %@", CFBridgingRelease(CMTimeCopyDescription(kCFAllocatorDefault, CMSampleBufferGetOutputPresentationTimeStamp(audioSampleBufferRef)))); - [self.audioEncodingTarget processAudioBuffer:audioSampleBufferRef]; - CFRelease(audioSampleBufferRef); - return YES; - } - else - { - if (!keepLooping) { - audioEncodingIsFinished = YES; - if( videoEncodingIsFinished && audioEncodingIsFinished ) - [self endProcessing]; - } - } - } - else if (synchronizedMovieWriter != nil) - { - if (reader.status == AVAssetReaderStatusCompleted || reader.status == AVAssetReaderStatusFailed || - reader.status == AVAssetReaderStatusCancelled) - { - [self endProcessing]; - } - } - return NO; -} - -- (void)processMovieFrame:(CMSampleBufferRef)movieSampleBuffer; -{ -// CMTimeGetSeconds -// CMTimeSubtract - - CMTime currentSampleTime = CMSampleBufferGetOutputPresentationTimeStamp(movieSampleBuffer); - CVImageBufferRef movieFrame = CMSampleBufferGetImageBuffer(movieSampleBuffer); - - processingFrameTime = currentSampleTime; - [self processMovieFrame:movieFrame withSampleTime:currentSampleTime]; -} - -- (float)progress -{ - if ( AVAssetReaderStatusReading == reader.status ) - { - float current = processingFrameTime.value * 1.0f / processingFrameTime.timescale; - float duration = self.asset.duration.value * 1.0f / self.asset.duration.timescale; - return current / duration; - } - else if ( AVAssetReaderStatusCompleted == reader.status ) - { - return 1.f; - } - else - { - return 0.f; - } -} - -- (void)processMovieFrame:(CVPixelBufferRef)movieFrame withSampleTime:(CMTime)currentSampleTime -{ - int bufferHeight = (int) CVPixelBufferGetHeight(movieFrame); - int bufferWidth = (int) CVPixelBufferGetWidth(movieFrame); - - CFTypeRef colorAttachments = CVBufferGetAttachment(movieFrame, kCVImageBufferYCbCrMatrixKey, NULL); - if (colorAttachments != NULL) - { - if(CFStringCompare(colorAttachments, kCVImageBufferYCbCrMatrix_ITU_R_601_4, 0) == kCFCompareEqualTo) - { - if (isFullYUVRange) - { - _preferredConversion = kColorConversion601FullRange; - } - else - { - _preferredConversion = kColorConversion601; - } - } - else - { - _preferredConversion = kColorConversion709; - } - } - else - { - if (isFullYUVRange) - { - _preferredConversion = kColorConversion601FullRange; - } - else - { - _preferredConversion = kColorConversion601; - } - - } - - CFAbsoluteTime startTime = CFAbsoluteTimeGetCurrent(); - - // Fix issue 1580 - [GPUImageContext useImageProcessingContext]; - - if ([GPUImageContext supportsFastTextureUpload]) - { - CVOpenGLESTextureRef luminanceTextureRef = NULL; - CVOpenGLESTextureRef chrominanceTextureRef = NULL; - - // if (captureAsYUV && [GPUImageContext deviceSupportsRedTextures]) - if (CVPixelBufferGetPlaneCount(movieFrame) > 0) // Check for YUV planar inputs to do RGB conversion - { - - if ( (imageBufferWidth != bufferWidth) && (imageBufferHeight != bufferHeight) ) - { - imageBufferWidth = bufferWidth; - imageBufferHeight = bufferHeight; - } - - CVReturn err; - // Y-plane - glActiveTexture(GL_TEXTURE4); - if ([GPUImageContext deviceSupportsRedTextures]) - { - err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, [[GPUImageContext sharedImageProcessingContext] coreVideoTextureCache], movieFrame, NULL, GL_TEXTURE_2D, GL_LUMINANCE, bufferWidth, bufferHeight, GL_LUMINANCE, GL_UNSIGNED_BYTE, 0, &luminanceTextureRef); - } - else - { - err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, [[GPUImageContext sharedImageProcessingContext] coreVideoTextureCache], movieFrame, NULL, GL_TEXTURE_2D, GL_LUMINANCE, bufferWidth, bufferHeight, GL_LUMINANCE, GL_UNSIGNED_BYTE, 0, &luminanceTextureRef); - } - if (err) - { - NSLog(@"Error at CVOpenGLESTextureCacheCreateTextureFromImage %d", err); - } - - luminanceTexture = CVOpenGLESTextureGetName(luminanceTextureRef); - glBindTexture(GL_TEXTURE_2D, luminanceTexture); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - - // UV-plane - glActiveTexture(GL_TEXTURE5); - if ([GPUImageContext deviceSupportsRedTextures]) - { - err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, [[GPUImageContext sharedImageProcessingContext] coreVideoTextureCache], movieFrame, NULL, GL_TEXTURE_2D, GL_LUMINANCE_ALPHA, bufferWidth/2, bufferHeight/2, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, 1, &chrominanceTextureRef); - } - else - { - err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, [[GPUImageContext sharedImageProcessingContext] coreVideoTextureCache], movieFrame, NULL, GL_TEXTURE_2D, GL_LUMINANCE_ALPHA, bufferWidth/2, bufferHeight/2, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, 1, &chrominanceTextureRef); - } - if (err) - { - NSLog(@"Error at CVOpenGLESTextureCacheCreateTextureFromImage %d", err); - } - - chrominanceTexture = CVOpenGLESTextureGetName(chrominanceTextureRef); - glBindTexture(GL_TEXTURE_2D, chrominanceTexture); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - -// if (!allTargetsWantMonochromeData) -// { - [self convertYUVToRGBOutput]; -// } - - for (id currentTarget in targets) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger targetTextureIndex = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - [currentTarget setInputSize:CGSizeMake(bufferWidth, bufferHeight) atIndex:targetTextureIndex]; - [currentTarget setInputFramebuffer:outputFramebuffer atIndex:targetTextureIndex]; - } - - [outputFramebuffer unlock]; - - for (id currentTarget in targets) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger targetTextureIndex = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - [currentTarget newFrameReadyAtTime:currentSampleTime atIndex:targetTextureIndex]; - } - - CVPixelBufferUnlockBaseAddress(movieFrame, 0); - CFRelease(luminanceTextureRef); - CFRelease(chrominanceTextureRef); - } - else - { - // TODO: Mesh this with the new framebuffer cache -// CVPixelBufferLockBaseAddress(movieFrame, 0); -// -// CVReturn err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, coreVideoTextureCache, movieFrame, NULL, GL_TEXTURE_2D, GL_RGBA, bufferWidth, bufferHeight, GL_BGRA, GL_UNSIGNED_BYTE, 0, &texture); -// -// if (!texture || err) { -// NSLog(@"Movie CVOpenGLESTextureCacheCreateTextureFromImage failed (error: %d)", err); -// NSAssert(NO, @"Camera failure"); -// return; -// } -// -// outputTexture = CVOpenGLESTextureGetName(texture); -// // glBindTexture(CVOpenGLESTextureGetTarget(texture), outputTexture); -// glBindTexture(GL_TEXTURE_2D, outputTexture); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); -// -// for (id currentTarget in targets) -// { -// NSInteger indexOfObject = [targets indexOfObject:currentTarget]; -// NSInteger targetTextureIndex = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; -// -// [currentTarget setInputSize:CGSizeMake(bufferWidth, bufferHeight) atIndex:targetTextureIndex]; -// [currentTarget setInputTexture:outputTexture atIndex:targetTextureIndex]; -// -// [currentTarget newFrameReadyAtTime:currentSampleTime atIndex:targetTextureIndex]; -// } -// -// CVPixelBufferUnlockBaseAddress(movieFrame, 0); -// CVOpenGLESTextureCacheFlush(coreVideoTextureCache, 0); -// CFRelease(texture); -// -// outputTexture = 0; - } - } - else - { - // Upload to texture - CVPixelBufferLockBaseAddress(movieFrame, 0); - - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:CGSizeMake(bufferWidth, bufferHeight) textureOptions:self.outputTextureOptions onlyTexture:YES]; - - glBindTexture(GL_TEXTURE_2D, [outputFramebuffer texture]); - // Using BGRA extension to pull in video frame data directly - glTexImage2D(GL_TEXTURE_2D, - 0, - self.outputTextureOptions.internalFormat, - bufferWidth, - bufferHeight, - 0, - self.outputTextureOptions.format, - self.outputTextureOptions.type, - CVPixelBufferGetBaseAddress(movieFrame)); - - for (id currentTarget in targets) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger targetTextureIndex = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - [currentTarget setInputSize:CGSizeMake(bufferWidth, bufferHeight) atIndex:targetTextureIndex]; - [currentTarget setInputFramebuffer:outputFramebuffer atIndex:targetTextureIndex]; - } - - [outputFramebuffer unlock]; - - for (id currentTarget in targets) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger targetTextureIndex = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - [currentTarget newFrameReadyAtTime:currentSampleTime atIndex:targetTextureIndex]; - } - CVPixelBufferUnlockBaseAddress(movieFrame, 0); - } - - if (_runBenchmark) - { - CFAbsoluteTime currentFrameTime = (CFAbsoluteTimeGetCurrent() - startTime); - NSLog(@"Current frame time : %f ms", 1000.0 * currentFrameTime); - } -} - -- (void)endProcessing; -{ - keepLooping = NO; - [displayLink setPaused:YES]; - - for (id currentTarget in targets) - { - [currentTarget endProcessing]; - } - - if (synchronizedMovieWriter != nil) - { - [synchronizedMovieWriter setVideoInputReadyCallback:^{return NO;}]; - [synchronizedMovieWriter setAudioInputReadyCallback:^{return NO;}]; - } - - if (self.playerItem && (displayLink != nil)) - { - [displayLink invalidate]; // remove from all run loops - displayLink = nil; - } - - if ([self.delegate respondsToSelector:@selector(didCompletePlayingMovie)]) { - [self.delegate didCompletePlayingMovie]; - } - self.delegate = nil; -} - -- (void)cancelProcessing -{ - if (reader) { - [reader cancelReading]; - } - [self endProcessing]; -} - -- (void)convertYUVToRGBOutput; -{ - [GPUImageContext setActiveShaderProgram:yuvConversionProgram]; - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:CGSizeMake(imageBufferWidth, imageBufferHeight) onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - static const GLfloat squareVertices[] = { - -1.0f, -1.0f, - 1.0f, -1.0f, - -1.0f, 1.0f, - 1.0f, 1.0f, - }; - - static const GLfloat textureCoordinates[] = { - 0.0f, 0.0f, - 1.0f, 0.0f, - 0.0f, 1.0f, - 1.0f, 1.0f, - }; - - glActiveTexture(GL_TEXTURE4); - glBindTexture(GL_TEXTURE_2D, luminanceTexture); - glUniform1i(yuvConversionLuminanceTextureUniform, 4); - - glActiveTexture(GL_TEXTURE5); - glBindTexture(GL_TEXTURE_2D, chrominanceTexture); - glUniform1i(yuvConversionChrominanceTextureUniform, 5); - - glUniformMatrix3fv(yuvConversionMatrixUniform, 1, GL_FALSE, _preferredConversion); - - glVertexAttribPointer(yuvConversionPositionAttribute, 2, GL_FLOAT, 0, 0, squareVertices); - glVertexAttribPointer(yuvConversionTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); -} - -- (AVAssetReader*)assetReader { - return reader; -} - -- (BOOL)audioEncodingIsFinished { - return audioEncodingIsFinished; -} - -- (BOOL)videoEncodingIsFinished { - return videoEncodingIsFinished; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMovieComposition.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMovieComposition.h deleted file mode 100644 index 00e43814..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMovieComposition.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// GPUImageMovieComposition.h -// Givit -// -// Created by Sean Meiners on 2013/01/25. -// -// - -#import "GPUImageMovie.h" - -@interface GPUImageMovieComposition : GPUImageMovie - -@property (readwrite, retain) AVComposition *compositon; -@property (readwrite, retain) AVVideoComposition *videoComposition; -@property (readwrite, retain) AVAudioMix *audioMix; - -- (id)initWithComposition:(AVComposition*)compositon - andVideoComposition:(AVVideoComposition*)videoComposition - andAudioMix:(AVAudioMix*)audioMix; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMovieComposition.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMovieComposition.m deleted file mode 100644 index 6138fffe..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMovieComposition.m +++ /dev/null @@ -1,70 +0,0 @@ -// -// GPUImageMovieComposition.m -// Givit -// -// Created by Sean Meiners on 2013/01/25. -// -// - -#import "GPUImageMovieComposition.h" -#import "GPUImageMovieWriter.h" - -@implementation GPUImageMovieComposition - -@synthesize compositon = _compositon; -@synthesize videoComposition = _videoComposition; -@synthesize audioMix = _audioMix; - -- (id)initWithComposition:(AVComposition*)compositon - andVideoComposition:(AVVideoComposition*)videoComposition - andAudioMix:(AVAudioMix*)audioMix { - if (!(self = [super init])) - { - return nil; - } - - [self yuvConversionSetup]; - - self.compositon = compositon; - self.videoComposition = videoComposition; - self.audioMix = audioMix; - - return self; -} - -- (AVAssetReader*)createAssetReader - { - //NSLog(@"creating reader from composition: %@, video: %@, audio: %@ with duration: %@", _compositon, _videoComposition, _audioMix, CFBridgingRelease(CMTimeCopyDescription(kCFAllocatorDefault, _compositon.duration))); - - NSError *error = nil; - AVAssetReader *assetReader = [AVAssetReader assetReaderWithAsset:self.compositon error:&error]; - - NSDictionary *outputSettings = @{(id)kCVPixelBufferPixelFormatTypeKey: @(kCVPixelFormatType_420YpCbCr8BiPlanarFullRange)}; - AVAssetReaderVideoCompositionOutput *readerVideoOutput = [AVAssetReaderVideoCompositionOutput assetReaderVideoCompositionOutputWithVideoTracks:[_compositon tracksWithMediaType:AVMediaTypeVideo] - videoSettings:outputSettings]; -#if ! TARGET_IPHONE_SIMULATOR - if( [_videoComposition isKindOfClass:[AVMutableVideoComposition class]] ) - [(AVMutableVideoComposition*)_videoComposition setRenderScale:1.0]; -#endif - readerVideoOutput.videoComposition = self.videoComposition; - readerVideoOutput.alwaysCopiesSampleData = NO; - [assetReader addOutput:readerVideoOutput]; - - NSArray *audioTracks = [_compositon tracksWithMediaType:AVMediaTypeAudio]; - BOOL shouldRecordAudioTrack = (([audioTracks count] > 0) && (self.audioEncodingTarget != nil) ); - AVAssetReaderAudioMixOutput *readerAudioOutput = nil; - - if (shouldRecordAudioTrack) - { - [self.audioEncodingTarget setShouldInvalidateAudioSampleWhenDone:YES]; - - readerAudioOutput = [AVAssetReaderAudioMixOutput assetReaderAudioMixOutputWithAudioTracks:audioTracks audioSettings:nil]; - readerAudioOutput.audioMix = self.audioMix; - readerAudioOutput.alwaysCopiesSampleData = NO; - [assetReader addOutput:readerAudioOutput]; - } - - return assetReader; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMultiplyBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMultiplyBlendFilter.h deleted file mode 100755 index 5ebc28bb..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMultiplyBlendFilter.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageMultiplyBlendFilter : GPUImageTwoInputFilter -{ -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMultiplyBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMultiplyBlendFilter.m deleted file mode 100755 index ed647072..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageMultiplyBlendFilter.m +++ /dev/null @@ -1,52 +0,0 @@ -#import "GPUImageMultiplyBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageMultiplyBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - lowp vec4 base = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 overlayer = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = overlayer * base + overlayer * (1.0 - base.a) + base * (1.0 - overlayer.a); - } -); -#else -NSString *const kGPUImageMultiplyBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 base = texture2D(inputImageTexture, textureCoordinate); - vec4 overlayer = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = overlayer * base + overlayer * (1.0 - base.a) + base * (1.0 - overlayer.a); - } -); -#endif - -@implementation GPUImageMultiplyBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageMultiplyBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNobleCornerDetectionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNobleCornerDetectionFilter.h deleted file mode 100644 index 963fd66a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNobleCornerDetectionFilter.h +++ /dev/null @@ -1,12 +0,0 @@ -#import "GPUImageHarrisCornerDetectionFilter.h" - -/** Noble corner detector - - This is the Noble variant on the Harris detector, from - Alison Noble, "Descriptions of Image Surfaces", PhD thesis, Department of Engineering Science, Oxford University 1989, p45. -*/ - - -@interface GPUImageNobleCornerDetectionFilter : GPUImageHarrisCornerDetectionFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNobleCornerDetectionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNobleCornerDetectionFilter.m deleted file mode 100644 index aa6b3041..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNobleCornerDetectionFilter.m +++ /dev/null @@ -1,74 +0,0 @@ -#import "GPUImageNobleCornerDetectionFilter.h" - -@implementation GPUImageNobleCornerDetectionFilter - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageNobleCornerDetectionFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform lowp float sensitivity; - - void main() - { - mediump vec3 derivativeElements = texture2D(inputImageTexture, textureCoordinate).rgb; - - mediump float derivativeSum = derivativeElements.x + derivativeElements.y; - - // R = (Ix^2 * Iy^2 - Ixy * Ixy) / (Ix^2 + Iy^2) - mediump float zElement = (derivativeElements.z * 2.0) - 1.0; - // mediump float harrisIntensity = (derivativeElements.x * derivativeElements.y - (derivativeElements.z * derivativeElements.z)) / (derivativeSum); - mediump float cornerness = (derivativeElements.x * derivativeElements.y - (zElement * zElement)) / (derivativeSum); - - // Original Harris detector - // R = Ix^2 * Iy^2 - Ixy * Ixy - k * (Ix^2 + Iy^2)^2 - // highp float harrisIntensity = derivativeElements.x * derivativeElements.y - (derivativeElements.z * derivativeElements.z) - harrisConstant * derivativeSum * derivativeSum; - - // gl_FragColor = vec4(vec3(harrisIntensity * 7.0), 1.0); - gl_FragColor = vec4(vec3(cornerness * sensitivity), 1.0); - } -); -#else -NSString *const kGPUImageNobleCornerDetectionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float sensitivity; - - void main() - { - vec3 derivativeElements = texture2D(inputImageTexture, textureCoordinate).rgb; - - float derivativeSum = derivativeElements.x + derivativeElements.y; - - // R = (Ix^2 * Iy^2 - Ixy * Ixy) / (Ix^2 + Iy^2) - float zElement = (derivativeElements.z * 2.0) - 1.0; - // mediump float harrisIntensity = (derivativeElements.x * derivativeElements.y - (derivativeElements.z * derivativeElements.z)) / (derivativeSum); - float cornerness = (derivativeElements.x * derivativeElements.y - (zElement * zElement)) / (derivativeSum); - - // Original Harris detector - // R = Ix^2 * Iy^2 - Ixy * Ixy - k * (Ix^2 + Iy^2)^2 - // highp float harrisIntensity = derivativeElements.x * derivativeElements.y - (derivativeElements.z * derivativeElements.z) - harrisConstant * derivativeSum * derivativeSum; - - // gl_FragColor = vec4(vec3(harrisIntensity * 7.0), 1.0); - gl_FragColor = vec4(vec3(cornerness * sensitivity), 1.0); - } -); -#endif - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithCornerDetectionFragmentShader:kGPUImageNobleCornerDetectionFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNonMaximumSuppressionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNonMaximumSuppressionFilter.h deleted file mode 100644 index fd8fe6d6..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNonMaximumSuppressionFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImage3x3TextureSamplingFilter.h" - -@interface GPUImageNonMaximumSuppressionFilter : GPUImage3x3TextureSamplingFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNonMaximumSuppressionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNonMaximumSuppressionFilter.m deleted file mode 100644 index eaf7ce56..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNonMaximumSuppressionFilter.m +++ /dev/null @@ -1,107 +0,0 @@ -#import "GPUImageNonMaximumSuppressionFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageNonMaximumSuppressionFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - varying highp vec2 textureCoordinate; - varying highp vec2 leftTextureCoordinate; - varying highp vec2 rightTextureCoordinate; - - varying highp vec2 topTextureCoordinate; - varying highp vec2 topLeftTextureCoordinate; - varying highp vec2 topRightTextureCoordinate; - - varying highp vec2 bottomTextureCoordinate; - varying highp vec2 bottomLeftTextureCoordinate; - varying highp vec2 bottomRightTextureCoordinate; - - void main() - { - lowp float bottomColor = texture2D(inputImageTexture, bottomTextureCoordinate).r; - lowp float bottomLeftColor = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - lowp float bottomRightColor = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - lowp vec4 centerColor = texture2D(inputImageTexture, textureCoordinate); - lowp float leftColor = texture2D(inputImageTexture, leftTextureCoordinate).r; - lowp float rightColor = texture2D(inputImageTexture, rightTextureCoordinate).r; - lowp float topColor = texture2D(inputImageTexture, topTextureCoordinate).r; - lowp float topRightColor = texture2D(inputImageTexture, topRightTextureCoordinate).r; - lowp float topLeftColor = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - - // Use a tiebreaker for pixels to the left and immediately above this one - lowp float multiplier = 1.0 - step(centerColor.r, topColor); - multiplier = multiplier * (1.0 - step(centerColor.r, topLeftColor)); - multiplier = multiplier * (1.0 - step(centerColor.r, leftColor)); - multiplier = multiplier * (1.0 - step(centerColor.r, bottomLeftColor)); - - lowp float maxValue = max(centerColor.r, bottomColor); - maxValue = max(maxValue, bottomRightColor); - maxValue = max(maxValue, rightColor); - maxValue = max(maxValue, topRightColor); - - gl_FragColor = vec4((centerColor.rgb * step(maxValue, centerColor.r) * multiplier), 1.0); - } -); -#else -NSString *const kGPUImageNonMaximumSuppressionFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - void main() - { - float bottomColor = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float bottomLeftColor = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float bottomRightColor = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - vec4 centerColor = texture2D(inputImageTexture, textureCoordinate); - float leftColor = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightColor = texture2D(inputImageTexture, rightTextureCoordinate).r; - float topColor = texture2D(inputImageTexture, topTextureCoordinate).r; - float topRightColor = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftColor = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - - // Use a tiebreaker for pixels to the left and immediately above this one - float multiplier = 1.0 - step(centerColor.r, topColor); - multiplier = multiplier * (1.0 - step(centerColor.r, topLeftColor)); - multiplier = multiplier * (1.0 - step(centerColor.r, leftColor)); - multiplier = multiplier * (1.0 - step(centerColor.r, bottomLeftColor)); - - float maxValue = max(centerColor.r, bottomColor); - maxValue = max(maxValue, bottomRightColor); - maxValue = max(maxValue, rightColor); - maxValue = max(maxValue, topRightColor); - - gl_FragColor = vec4((centerColor.rgb * step(maxValue, centerColor.r) * multiplier), 1.0); - } -); -#endif - -@implementation GPUImageNonMaximumSuppressionFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageNonMaximumSuppressionFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNormalBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNormalBlendFilter.h deleted file mode 100644 index ce5e22b4..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNormalBlendFilter.h +++ /dev/null @@ -1,8 +0,0 @@ -// Created by Jorge Garcia on 9/5/12. -// - -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageNormalBlendFilter : GPUImageTwoInputFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNormalBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNormalBlendFilter.m deleted file mode 100644 index f5b5069d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageNormalBlendFilter.m +++ /dev/null @@ -1,96 +0,0 @@ -// Created by Jorge Garcia on 9/5/12. - -#import "GPUImageNormalBlendFilter.h" -/* - This equation is a simplification of the general blending equation. It assumes the destination color is opaque, and therefore drops the destination color's alpha term. - - D = C1 * C1a + C2 * C2a * (1 - C1a) - where D is the resultant color, C1 is the color of the first element, C1a is the alpha of the first element, C2 is the second element color, C2a is the alpha of the second element. The destination alpha is calculated with: - - Da = C1a + C2a * (1 - C1a) - The resultant color is premultiplied with the alpha. To restore the color to the unmultiplied values, just divide by Da, the resultant alpha. - - http://stackoverflow.com/questions/1724946/blend-mode-on-a-transparent-and-semi-transparent-background - - For some reason Photoshop behaves - D = C1 + C2 * C2a * (1 - C1a) - */ -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageNormalBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - lowp vec4 c2 = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 c1 = texture2D(inputImageTexture2, textureCoordinate2); - - lowp vec4 outputColor; - -// outputColor.r = c1.r + c2.r * c2.a * (1.0 - c1.a); -// outputColor.g = c1.g + c2.g * c2.a * (1.0 - c1.a); -// outputColor.b = c1.b + c2.b * c2.a * (1.0 - c1.a); -// outputColor.a = c1.a + c2.a * (1.0 - c1.a); - - lowp float a = c1.a + c2.a * (1.0 - c1.a); - lowp float alphaDivisor = a + step(a, 0.0); // Protect against a divide-by-zero blacking out things in the output - - outputColor.r = (c1.r * c1.a + c2.r * c2.a * (1.0 - c1.a))/alphaDivisor; - outputColor.g = (c1.g * c1.a + c2.g * c2.a * (1.0 - c1.a))/alphaDivisor; - outputColor.b = (c1.b * c1.a + c2.b * c2.a * (1.0 - c1.a))/alphaDivisor; - outputColor.a = a; - - gl_FragColor = outputColor; - } -); -#else -NSString *const kGPUImageNormalBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 c2 = texture2D(inputImageTexture, textureCoordinate); - vec4 c1 = texture2D(inputImageTexture2, textureCoordinate2); - - vec4 outputColor; - - // outputColor.r = c1.r + c2.r * c2.a * (1.0 - c1.a); - // outputColor.g = c1.g + c2.g * c2.a * (1.0 - c1.a); - // outputColor.b = c1.b + c2.b * c2.a * (1.0 - c1.a); - // outputColor.a = c1.a + c2.a * (1.0 - c1.a); - - float a = c1.a + c2.a * (1.0 - c1.a); - float alphaDivisor = a + step(a, 0.0); // Protect against a divide-by-zero blacking out things in the output - - outputColor.r = (c1.r * c1.a + c2.r * c2.a * (1.0 - c1.a))/alphaDivisor; - outputColor.g = (c1.g * c1.a + c2.g * c2.a * (1.0 - c1.a))/alphaDivisor; - outputColor.b = (c1.b * c1.a + c2.b * c2.a * (1.0 - c1.a))/alphaDivisor; - outputColor.a = a; - - gl_FragColor = outputColor; - } -); -#endif - -@implementation GPUImageNormalBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageNormalBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end \ No newline at end of file diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOpacityFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOpacityFilter.h deleted file mode 100644 index 826749fb..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOpacityFilter.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageOpacityFilter : GPUImageFilter -{ - GLint opacityUniform; -} - -// Opacity ranges from 0.0 to 1.0, with 1.0 as the normal setting -@property(readwrite, nonatomic) CGFloat opacity; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOpacityFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOpacityFilter.m deleted file mode 100644 index b74acb60..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOpacityFilter.m +++ /dev/null @@ -1,65 +0,0 @@ -#import "GPUImageOpacityFilter.h" - -@implementation GPUImageOpacityFilter - -@synthesize opacity = _opacity; - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageOpacityFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform lowp float opacity; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4(textureColor.rgb, textureColor.a * opacity); - } -); -#else -NSString *const kGPUImageOpacityFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float opacity; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4(textureColor.rgb, textureColor.a * opacity); - } -); -#endif - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageOpacityFragmentShaderString])) - { - return nil; - } - - opacityUniform = [filterProgram uniformIndex:@"opacity"]; - self.opacity = 1.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setOpacity:(CGFloat)newValue; -{ - _opacity = newValue; - - [self setFloat:_opacity forUniform:opacityUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOpeningFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOpeningFilter.h deleted file mode 100644 index 3e4f7545..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOpeningFilter.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImageErosionFilter; -@class GPUImageDilationFilter; - -// A filter that first performs an erosion on the red channel of an image, followed by a dilation of the same radius. -// This helps to filter out smaller bright elements. - -@interface GPUImageOpeningFilter : GPUImageFilterGroup -{ - GPUImageErosionFilter *erosionFilter; - GPUImageDilationFilter *dilationFilter; -} - -@property(readwrite, nonatomic) CGFloat verticalTexelSpacing, horizontalTexelSpacing; - -- (id)initWithRadius:(NSUInteger)radius; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOpeningFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOpeningFilter.m deleted file mode 100644 index 4e7a5653..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOpeningFilter.m +++ /dev/null @@ -1,57 +0,0 @@ -#import "GPUImageOpeningFilter.h" -#import "GPUImageErosionFilter.h" -#import "GPUImageDilationFilter.h" - -@implementation GPUImageOpeningFilter - -@synthesize verticalTexelSpacing = _verticalTexelSpacing; -@synthesize horizontalTexelSpacing = _horizontalTexelSpacing; - -- (id)init; -{ - if (!(self = [self initWithRadius:1])) - { - return nil; - } - - return self; -} - -- (id)initWithRadius:(NSUInteger)radius; -{ - if (!(self = [super init])) - { - return nil; - } - - // First pass: erosion - erosionFilter = [[GPUImageErosionFilter alloc] initWithRadius:radius]; - [self addFilter:erosionFilter]; - - // Second pass: dilation - dilationFilter = [[GPUImageDilationFilter alloc] initWithRadius:radius]; - [self addFilter:dilationFilter]; - - [erosionFilter addTarget:dilationFilter]; - - self.initialFilters = [NSArray arrayWithObjects:erosionFilter, nil]; - self.terminalFilter = dilationFilter; - - return self; -} - -- (void)setVerticalTexelSpacing:(CGFloat)newValue; -{ - _verticalTexelSpacing = newValue; - erosionFilter.verticalTexelSpacing = newValue; - dilationFilter.verticalTexelSpacing = newValue; -} - -- (void)setHorizontalTexelSpacing:(CGFloat)newValue; -{ - _horizontalTexelSpacing = newValue; - erosionFilter.horizontalTexelSpacing = newValue; - dilationFilter.horizontalTexelSpacing = newValue; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOutput.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOutput.h deleted file mode 100755 index a1af54d7..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOutput.h +++ /dev/null @@ -1,127 +0,0 @@ -#import "GPUImageContext.h" -#import "GPUImageFramebuffer.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -#import -#else -// For now, just redefine this on the Mac -typedef NS_ENUM(NSInteger, UIImageOrientation) { - UIImageOrientationUp, // default orientation - UIImageOrientationDown, // 180 deg rotation - UIImageOrientationLeft, // 90 deg CCW - UIImageOrientationRight, // 90 deg CW - UIImageOrientationUpMirrored, // as above but image mirrored along other axis. horizontal flip - UIImageOrientationDownMirrored, // horizontal flip - UIImageOrientationLeftMirrored, // vertical flip - UIImageOrientationRightMirrored, // vertical flip -}; -#endif - -void runOnMainQueueWithoutDeadlocking(void (^block)(void)); -void runSynchronouslyOnVideoProcessingQueue(void (^block)(void)); -void runAsynchronouslyOnVideoProcessingQueue(void (^block)(void)); -void runSynchronouslyOnContextQueue(GPUImageContext *context, void (^block)(void)); -void runAsynchronouslyOnContextQueue(GPUImageContext *context, void (^block)(void)); -void reportAvailableMemoryForGPUImage(NSString *tag); - -@class GPUImageMovieWriter; - -/** GPUImage's base source object - - Images or frames of video are uploaded from source objects, which are subclasses of GPUImageOutput. These include: - - - GPUImageVideoCamera (for live video from an iOS camera) - - GPUImageStillCamera (for taking photos with the camera) - - GPUImagePicture (for still images) - - GPUImageMovie (for movies) - - Source objects upload still image frames to OpenGL ES as textures, then hand those textures off to the next objects in the processing chain. - */ -@interface GPUImageOutput : NSObject -{ - GPUImageFramebuffer *outputFramebuffer; - - NSMutableArray *targets, *targetTextureIndices; - - CGSize inputTextureSize, cachedMaximumOutputSize, forcedMaximumSize; - - BOOL overrideInputSize; - - BOOL allTargetsWantMonochromeData; - BOOL usingNextFrameForImageCapture; -} - -@property(readwrite, nonatomic) BOOL shouldSmoothlyScaleOutput; -@property(readwrite, nonatomic) BOOL shouldIgnoreUpdatesToThisTarget; -@property(readwrite, nonatomic, retain) GPUImageMovieWriter *audioEncodingTarget; -@property(readwrite, nonatomic, unsafe_unretained) id targetToIgnoreForUpdates; -@property(nonatomic, copy) void(^frameProcessingCompletionBlock)(GPUImageOutput*, CMTime); -@property(nonatomic) BOOL enabled; -@property(readwrite, nonatomic) GPUTextureOptions outputTextureOptions; - -/// @name Managing targets -- (void)setInputFramebufferForTarget:(id)target atIndex:(NSInteger)inputTextureIndex; -- (GPUImageFramebuffer *)framebufferForOutput; -- (void)removeOutputFramebuffer; -- (void)notifyTargetsAboutNewOutputTexture; - -/** Returns an array of the current targets. - */ -- (NSArray*)targets; - -/** Adds a target to receive notifications when new frames are available. - - The target will be asked for its next available texture. - - See [GPUImageInput newFrameReadyAtTime:] - - @param newTarget Target to be added - */ -- (void)addTarget:(id)newTarget; - -/** Adds a target to receive notifications when new frames are available. - - See [GPUImageInput newFrameReadyAtTime:] - - @param newTarget Target to be added - */ -- (void)addTarget:(id)newTarget atTextureLocation:(NSInteger)textureLocation; - -/** Removes a target. The target will no longer receive notifications when new frames are available. - - @param targetToRemove Target to be removed - */ -- (void)removeTarget:(id)targetToRemove; - -/** Removes all targets. - */ -- (void)removeAllTargets; - -/// @name Manage the output texture - -- (void)forceProcessingAtSize:(CGSize)frameSize; -- (void)forceProcessingAtSizeRespectingAspectRatio:(CGSize)frameSize; - -/// @name Still image processing - -- (void)useNextFrameForImageCapture; -- (CGImageRef)newCGImageFromCurrentlyProcessedOutput; -- (CGImageRef)newCGImageByFilteringCGImage:(CGImageRef)imageToFilter; - -// Platform-specific image output methods -// If you're trying to use these methods, remember that you need to set -useNextFrameForImageCapture before running -processImage or running video and calling any of these methods, or you will get a nil image -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -- (UIImage *)imageFromCurrentFramebuffer; -- (UIImage *)imageFromCurrentFramebufferWithOrientation:(UIImageOrientation)imageOrientation; -- (UIImage *)imageByFilteringImage:(UIImage *)imageToFilter; -- (CGImageRef)newCGImageByFilteringImage:(UIImage *)imageToFilter; -#else -- (NSImage *)imageFromCurrentFramebuffer; -- (NSImage *)imageFromCurrentFramebufferWithOrientation:(UIImageOrientation)imageOrientation; -- (NSImage *)imageByFilteringImage:(NSImage *)imageToFilter; -- (CGImageRef)newCGImageByFilteringImage:(NSImage *)imageToFilter; -#endif - -- (BOOL)providesMonochromeOutput; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOutput.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOutput.m deleted file mode 100755 index 2817a445..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOutput.m +++ /dev/null @@ -1,428 +0,0 @@ -#import "GPUImageOutput.h" -#import "GPUImageMovieWriter.h" -#import "GPUImagePicture.h" -#import - -void runOnMainQueueWithoutDeadlocking(void (^block)(void)) -{ - if ([NSThread isMainThread]) - { - block(); - } - else - { - dispatch_sync(dispatch_get_main_queue(), block); - } -} - -void runSynchronouslyOnVideoProcessingQueue(void (^block)(void)) -{ - dispatch_queue_t videoProcessingQueue = [GPUImageContext sharedContextQueue]; -#if !OS_OBJECT_USE_OBJC -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - if (dispatch_get_current_queue() == videoProcessingQueue) -#pragma clang diagnostic pop -#else - if (dispatch_get_specific([GPUImageContext contextKey])) -#endif - { - block(); - }else - { - dispatch_sync(videoProcessingQueue, block); - } -} - -void runAsynchronouslyOnVideoProcessingQueue(void (^block)(void)) -{ - dispatch_queue_t videoProcessingQueue = [GPUImageContext sharedContextQueue]; - -#if !OS_OBJECT_USE_OBJC -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - if (dispatch_get_current_queue() == videoProcessingQueue) -#pragma clang diagnostic pop -#else - if (dispatch_get_specific([GPUImageContext contextKey])) -#endif - { - block(); - }else - { - dispatch_async(videoProcessingQueue, block); - } -} - -void runSynchronouslyOnContextQueue(GPUImageContext *context, void (^block)(void)) -{ - dispatch_queue_t videoProcessingQueue = [context contextQueue]; -#if !OS_OBJECT_USE_OBJC -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - if (dispatch_get_current_queue() == videoProcessingQueue) -#pragma clang diagnostic pop -#else - if (dispatch_get_specific([GPUImageContext contextKey])) -#endif - { - block(); - }else - { - dispatch_sync(videoProcessingQueue, block); - } -} - -void runAsynchronouslyOnContextQueue(GPUImageContext *context, void (^block)(void)) -{ - dispatch_queue_t videoProcessingQueue = [context contextQueue]; - -#if !OS_OBJECT_USE_OBJC -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - if (dispatch_get_current_queue() == videoProcessingQueue) -#pragma clang diagnostic pop -#else - if (dispatch_get_specific([GPUImageContext contextKey])) -#endif - { - block(); - }else - { - dispatch_async(videoProcessingQueue, block); - } -} - -void reportAvailableMemoryForGPUImage(NSString *tag) -{ - if (!tag) - tag = @"Default"; - - struct task_basic_info info; - - mach_msg_type_number_t size = sizeof(info); - - kern_return_t kerr = task_info(mach_task_self(), - - TASK_BASIC_INFO, - - (task_info_t)&info, - - &size); - if( kerr == KERN_SUCCESS ) { - NSLog(@"%@ - Memory used: %u", tag, (unsigned int)info.resident_size); //in bytes - } else { - NSLog(@"%@ - Error: %s", tag, mach_error_string(kerr)); - } -} - -@implementation GPUImageOutput - -@synthesize shouldSmoothlyScaleOutput = _shouldSmoothlyScaleOutput; -@synthesize shouldIgnoreUpdatesToThisTarget = _shouldIgnoreUpdatesToThisTarget; -@synthesize audioEncodingTarget = _audioEncodingTarget; -@synthesize targetToIgnoreForUpdates = _targetToIgnoreForUpdates; -@synthesize frameProcessingCompletionBlock = _frameProcessingCompletionBlock; -@synthesize enabled = _enabled; -@synthesize outputTextureOptions = _outputTextureOptions; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - targets = [[NSMutableArray alloc] init]; - targetTextureIndices = [[NSMutableArray alloc] init]; - _enabled = YES; - allTargetsWantMonochromeData = YES; - usingNextFrameForImageCapture = NO; - - // set default texture options - _outputTextureOptions.minFilter = GL_LINEAR; - _outputTextureOptions.magFilter = GL_LINEAR; - _outputTextureOptions.wrapS = GL_CLAMP_TO_EDGE; - _outputTextureOptions.wrapT = GL_CLAMP_TO_EDGE; - _outputTextureOptions.internalFormat = GL_RGBA; - _outputTextureOptions.format = GL_BGRA; - _outputTextureOptions.type = GL_UNSIGNED_BYTE; - - return self; -} - -- (void)dealloc -{ - [self removeAllTargets]; -} - -#pragma mark - -#pragma mark Managing targets - -- (void)setInputFramebufferForTarget:(id)target atIndex:(NSInteger)inputTextureIndex; -{ - [target setInputFramebuffer:[self framebufferForOutput] atIndex:inputTextureIndex]; -} - -- (GPUImageFramebuffer *)framebufferForOutput; -{ - return outputFramebuffer; -} - -- (void)removeOutputFramebuffer; -{ - outputFramebuffer = nil; -} - -- (void)notifyTargetsAboutNewOutputTexture; -{ - for (id currentTarget in targets) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger textureIndex = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - - [self setInputFramebufferForTarget:currentTarget atIndex:textureIndex]; - } -} - -- (NSArray*)targets; -{ - return [NSArray arrayWithArray:targets]; -} - -- (void)addTarget:(id)newTarget; -{ - NSInteger nextAvailableTextureIndex = [newTarget nextAvailableTextureIndex]; - [self addTarget:newTarget atTextureLocation:nextAvailableTextureIndex]; - - if ([newTarget shouldIgnoreUpdatesToThisTarget]) - { - _targetToIgnoreForUpdates = newTarget; - } -} - -- (void)addTarget:(id)newTarget atTextureLocation:(NSInteger)textureLocation; -{ - if([targets containsObject:newTarget]) - { - return; - } - - cachedMaximumOutputSize = CGSizeZero; - runSynchronouslyOnVideoProcessingQueue(^{ - [self setInputFramebufferForTarget:newTarget atIndex:textureLocation]; - [targets addObject:newTarget]; - [targetTextureIndices addObject:[NSNumber numberWithInteger:textureLocation]]; - - allTargetsWantMonochromeData = allTargetsWantMonochromeData && [newTarget wantsMonochromeInput]; - }); -} - -- (void)removeTarget:(id)targetToRemove; -{ - if(![targets containsObject:targetToRemove]) - { - return; - } - - if (_targetToIgnoreForUpdates == targetToRemove) - { - _targetToIgnoreForUpdates = nil; - } - - cachedMaximumOutputSize = CGSizeZero; - - NSInteger indexOfObject = [targets indexOfObject:targetToRemove]; - NSInteger textureIndexOfTarget = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - - runSynchronouslyOnVideoProcessingQueue(^{ - [targetToRemove setInputSize:CGSizeZero atIndex:textureIndexOfTarget]; - [targetToRemove setInputRotation:kGPUImageNoRotation atIndex:textureIndexOfTarget]; - - [targetTextureIndices removeObjectAtIndex:indexOfObject]; - [targets removeObject:targetToRemove]; - [targetToRemove endProcessing]; - }); -} - -- (void)removeAllTargets; -{ - cachedMaximumOutputSize = CGSizeZero; - runSynchronouslyOnVideoProcessingQueue(^{ - for (id targetToRemove in targets) - { - NSInteger indexOfObject = [targets indexOfObject:targetToRemove]; - NSInteger textureIndexOfTarget = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - - [targetToRemove setInputSize:CGSizeZero atIndex:textureIndexOfTarget]; - [targetToRemove setInputRotation:kGPUImageNoRotation atIndex:textureIndexOfTarget]; - } - [targets removeAllObjects]; - [targetTextureIndices removeAllObjects]; - - allTargetsWantMonochromeData = YES; - }); -} - -#pragma mark - -#pragma mark Manage the output texture - -- (void)forceProcessingAtSize:(CGSize)frameSize; -{ - -} - -- (void)forceProcessingAtSizeRespectingAspectRatio:(CGSize)frameSize; -{ -} - -#pragma mark - -#pragma mark Still image processing - -- (void)useNextFrameForImageCapture; -{ - -} - -- (CGImageRef)newCGImageFromCurrentlyProcessedOutput; -{ - return nil; -} - -- (CGImageRef)newCGImageByFilteringCGImage:(CGImageRef)imageToFilter; -{ - GPUImagePicture *stillImageSource = [[GPUImagePicture alloc] initWithCGImage:imageToFilter]; - - [self useNextFrameForImageCapture]; - [stillImageSource addTarget:(id)self]; - [stillImageSource processImage]; - - CGImageRef processedImage = [self newCGImageFromCurrentlyProcessedOutput]; - - [stillImageSource removeTarget:(id)self]; - return processedImage; -} - -- (BOOL)providesMonochromeOutput; -{ - return NO; -} - -#pragma mark - -#pragma mark Platform-specific image output methods - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - -- (UIImage *)imageFromCurrentFramebuffer; -{ - UIDeviceOrientation deviceOrientation = [[UIDevice currentDevice] orientation]; - UIImageOrientation imageOrientation = UIImageOrientationLeft; - switch (deviceOrientation) - { - case UIDeviceOrientationPortrait: - imageOrientation = UIImageOrientationUp; - break; - case UIDeviceOrientationPortraitUpsideDown: - imageOrientation = UIImageOrientationDown; - break; - case UIDeviceOrientationLandscapeLeft: - imageOrientation = UIImageOrientationLeft; - break; - case UIDeviceOrientationLandscapeRight: - imageOrientation = UIImageOrientationRight; - break; - default: - imageOrientation = UIImageOrientationUp; - break; - } - - return [self imageFromCurrentFramebufferWithOrientation:imageOrientation]; -} - -- (UIImage *)imageFromCurrentFramebufferWithOrientation:(UIImageOrientation)imageOrientation; -{ - CGImageRef cgImageFromBytes = [self newCGImageFromCurrentlyProcessedOutput]; - UIImage *finalImage = [UIImage imageWithCGImage:cgImageFromBytes scale:1.0 orientation:imageOrientation]; - CGImageRelease(cgImageFromBytes); - - return finalImage; -} - -- (UIImage *)imageByFilteringImage:(UIImage *)imageToFilter; -{ - CGImageRef image = [self newCGImageByFilteringCGImage:[imageToFilter CGImage]]; - UIImage *processedImage = [UIImage imageWithCGImage:image scale:[imageToFilter scale] orientation:[imageToFilter imageOrientation]]; - CGImageRelease(image); - return processedImage; -} - -- (CGImageRef)newCGImageByFilteringImage:(UIImage *)imageToFilter -{ - return [self newCGImageByFilteringCGImage:[imageToFilter CGImage]]; -} - -#else - -- (NSImage *)imageFromCurrentFramebuffer; -{ - return [self imageFromCurrentFramebufferWithOrientation:UIImageOrientationLeft]; -} - -- (NSImage *)imageFromCurrentFramebufferWithOrientation:(UIImageOrientation)imageOrientation; -{ - CGImageRef cgImageFromBytes = [self newCGImageFromCurrentlyProcessedOutput]; - NSImage *finalImage = [[NSImage alloc] initWithCGImage:cgImageFromBytes size:NSZeroSize]; - CGImageRelease(cgImageFromBytes); - - return finalImage; -} - -- (NSImage *)imageByFilteringImage:(NSImage *)imageToFilter; -{ - CGImageRef image = [self newCGImageByFilteringCGImage:[imageToFilter CGImageForProposedRect:NULL context:[NSGraphicsContext currentContext] hints:nil]]; - NSImage *processedImage = [[NSImage alloc] initWithCGImage:image size:NSZeroSize]; - CGImageRelease(image); - return processedImage; -} - -- (CGImageRef)newCGImageByFilteringImage:(NSImage *)imageToFilter -{ - return [self newCGImageByFilteringCGImage:[imageToFilter CGImageForProposedRect:NULL context:[NSGraphicsContext currentContext] hints:nil]]; -} - -#endif - -#pragma mark - -#pragma mark Accessors - -- (void)setAudioEncodingTarget:(GPUImageMovieWriter *)newValue; -{ - _audioEncodingTarget = newValue; - if( ! _audioEncodingTarget.hasAudioTrack ) - { - _audioEncodingTarget.hasAudioTrack = YES; - } -} - --(void)setOutputTextureOptions:(GPUTextureOptions)outputTextureOptions -{ - _outputTextureOptions = outputTextureOptions; - - if( outputFramebuffer.texture ) - { - glBindTexture(GL_TEXTURE_2D, outputFramebuffer.texture); - //_outputTextureOptions.format - //_outputTextureOptions.internalFormat - //_outputTextureOptions.magFilter - //_outputTextureOptions.minFilter - //_outputTextureOptions.type - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, _outputTextureOptions.wrapS); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, _outputTextureOptions.wrapT); - glBindTexture(GL_TEXTURE_2D, 0); - } -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOverlayBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOverlayBlendFilter.h deleted file mode 100755 index 57eb8402..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOverlayBlendFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageOverlayBlendFilter : GPUImageTwoInputFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOverlayBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOverlayBlendFilter.m deleted file mode 100755 index c8c5185d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageOverlayBlendFilter.m +++ /dev/null @@ -1,94 +0,0 @@ -#import "GPUImageOverlayBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageOverlayBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - mediump vec4 base = texture2D(inputImageTexture, textureCoordinate); - mediump vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - mediump float ra; - if (2.0 * base.r < base.a) { - ra = 2.0 * overlay.r * base.r + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - } else { - ra = overlay.a * base.a - 2.0 * (base.a - base.r) * (overlay.a - overlay.r) + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - } - - mediump float ga; - if (2.0 * base.g < base.a) { - ga = 2.0 * overlay.g * base.g + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - } else { - ga = overlay.a * base.a - 2.0 * (base.a - base.g) * (overlay.a - overlay.g) + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - } - - mediump float ba; - if (2.0 * base.b < base.a) { - ba = 2.0 * overlay.b * base.b + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - } else { - ba = overlay.a * base.a - 2.0 * (base.a - base.b) * (overlay.a - overlay.b) + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - } - - gl_FragColor = vec4(ra, ga, ba, 1.0); - } -); -#else -NSString *const kGPUImageOverlayBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 base = texture2D(inputImageTexture, textureCoordinate); - vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - float ra; - if (2.0 * base.r < base.a) { - ra = 2.0 * overlay.r * base.r + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - } else { - ra = overlay.a * base.a - 2.0 * (base.a - base.r) * (overlay.a - overlay.r) + overlay.r * (1.0 - base.a) + base.r * (1.0 - overlay.a); - } - - float ga; - if (2.0 * base.g < base.a) { - ga = 2.0 * overlay.g * base.g + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - } else { - ga = overlay.a * base.a - 2.0 * (base.a - base.g) * (overlay.a - overlay.g) + overlay.g * (1.0 - base.a) + base.g * (1.0 - overlay.a); - } - - float ba; - if (2.0 * base.b < base.a) { - ba = 2.0 * overlay.b * base.b + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - } else { - ba = overlay.a * base.a - 2.0 * (base.a - base.b) * (overlay.a - overlay.b) + overlay.b * (1.0 - base.a) + base.b * (1.0 - overlay.a); - } - - gl_FragColor = vec4(ra, ga, ba, 1.0); - } -); -#endif - -@implementation GPUImageOverlayBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageOverlayBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageParallelCoordinateLineTransformFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageParallelCoordinateLineTransformFilter.h deleted file mode 100644 index aa8f3f47..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageParallelCoordinateLineTransformFilter.h +++ /dev/null @@ -1,16 +0,0 @@ -#import "GPUImageFilter.h" - -// This is an accumulator that uses a Hough transform in parallel coordinate space to identify probable lines in a scene. -// -// It is entirely based on the work of the Graph@FIT research group at the Brno University of Technology and their publications: -// M. Dubská, J. Havel, and A. Herout. Real-Time Detection of Lines using Parallel Coordinates and OpenGL. Proceedings of SCCG 2011, Bratislava, SK, p. 7. -// M. Dubská, J. Havel, and A. Herout. PClines — Line detection using parallel coordinates. 2011 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), p. 1489- 1494. - -@interface GPUImageParallelCoordinateLineTransformFilter : GPUImageFilter -{ - GLubyte *rawImagePixels; - GLfloat *lineCoordinates; - unsigned int maxLinePairsToRender, linePairsToRender; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageParallelCoordinateLineTransformFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageParallelCoordinateLineTransformFilter.m deleted file mode 100644 index 0a2f6e49..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageParallelCoordinateLineTransformFilter.m +++ /dev/null @@ -1,266 +0,0 @@ -#import "GPUImageParallelCoordinateLineTransformFilter.h" - -NSString *const kGPUImageHoughAccumulationVertexShaderString = SHADER_STRING -( - attribute vec4 position; - - void main() - { - gl_Position = position; - } -); - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageHoughAccumulationFragmentShaderString = SHADER_STRING -( - const lowp float scalingFactor = 1.0 / 256.0; - - void main() - { - gl_FragColor = vec4(0.004, 0.004, 0.004, 1.0); - } -); - -// highp - 16-bit, floating point range: -2^62 to 2^62, integer range: -2^16 to 2^16 -// NOTE: See below for where I'm tacking on the required extension as a prefix -NSString *const kGPUImageHoughAccumulationFBOReadFragmentShaderString = SHADER_STRING -( - const lowp float scalingFactor = 0.004; -// const lowp float scalingFactor = 0.1; - - void main() - { - mediump vec4 fragmentData = gl_LastFragData[0]; - - fragmentData.r = fragmentData.r + scalingFactor; - fragmentData.g = scalingFactor * floor(fragmentData.r) + fragmentData.g; - fragmentData.b = scalingFactor * floor(fragmentData.g) + fragmentData.b; - fragmentData.a = scalingFactor * floor(fragmentData.b) + fragmentData.a; - - fragmentData = fract(fragmentData); - - gl_FragColor = vec4(fragmentData.rgb, 1.0); - } -); - -#else -NSString *const kGPUImageHoughAccumulationFragmentShaderString = SHADER_STRING -( - const float scalingFactor = 1.0 / 256.0; - - void main() - { - gl_FragColor = vec4(0.004, 0.004, 0.004, 1.0); - } -); - -NSString *const kGPUImageHoughAccumulationFBOReadFragmentShaderString = SHADER_STRING -( - const float scalingFactor = 1.0 / 256.0; - - void main() - { - // gl_FragColor = vec4(scalingFactor, scalingFactor, scalingFactor, 1.0); - gl_FragColor = vec4(0.004, 0.004, 0.004, 1.0); - } -); -#endif - -@interface GPUImageParallelCoordinateLineTransformFilter() -// Rendering -- (void)generateLineCoordinates; - -@end - -@implementation GPUImageParallelCoordinateLineTransformFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - NSString *fragmentShaderToUse = nil; - - if ([GPUImageContext deviceSupportsFramebufferReads]) - { - fragmentShaderToUse = [NSString stringWithFormat:@"#extension GL_EXT_shader_framebuffer_fetch : require\n %@",kGPUImageHoughAccumulationFBOReadFragmentShaderString]; - } - else - { - fragmentShaderToUse = kGPUImageHoughAccumulationFragmentShaderString; - } - - if (!(self = [super initWithVertexShaderFromString:kGPUImageHoughAccumulationVertexShaderString fragmentShaderFromString:fragmentShaderToUse])) - { - return nil; - } - - - return self; -} - -// TODO: have this be regenerated on change of image size -- (void)dealloc; -{ - free(rawImagePixels); - free(lineCoordinates); -} - -- (void)initializeAttributes; -{ - [filterProgram addAttribute:@"position"]; -} - -#pragma mark - -#pragma mark Rendering - -#define MAXLINESCALINGFACTOR 4 - -- (void)generateLineCoordinates; -{ - unsigned int imageByteSize = inputTextureSize.width * inputTextureSize.height * 4; - rawImagePixels = (GLubyte *)malloc(imageByteSize); - - maxLinePairsToRender = (inputTextureSize.width * inputTextureSize.height) / MAXLINESCALINGFACTOR; - lineCoordinates = calloc(maxLinePairsToRender * 8, sizeof(GLfloat)); -} - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - if (lineCoordinates == NULL) - { - [self generateLineCoordinates]; - } - - [self renderToTextureWithVertices:NULL textureCoordinates:NULL]; - - [self informTargetsAboutNewFrameAtTime:frameTime]; -} - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - // we need a normal color texture for this filter - NSAssert(self.outputTextureOptions.internalFormat == GL_RGBA, @"The output texture format for this filter must be GL_RGBA."); - NSAssert(self.outputTextureOptions.type == GL_UNSIGNED_BYTE, @"The type of the output texture of this filter must be GL_UNSIGNED_BYTE."); - - if (self.preventRendering) - { - [firstInputFramebuffer unlock]; - return; - } - - // Grab the edge points from the previous frame and create the parallel coordinate lines for them - // This would be a great place to have a working histogram pyramid implementation - - [GPUImageContext useImageProcessingContext]; - [firstInputFramebuffer activateFramebuffer]; - - glFinish(); - glReadPixels(0, 0, inputTextureSize.width, inputTextureSize.height, GL_RGBA, GL_UNSIGNED_BYTE, rawImagePixels); - - CGFloat xAspectMultiplier = 1.0, yAspectMultiplier = 1.0; - -// if (inputTextureSize.width > inputTextureSize.height) -// { -// yAspectMultiplier = inputTextureSize.height / inputTextureSize.width; -// } -// else -// { -// xAspectMultiplier = inputTextureSize.width / inputTextureSize.height; -// } - -// CFAbsoluteTime startTime = CFAbsoluteTimeGetCurrent(); - - unsigned int imageByteSize = inputTextureSize.width * inputTextureSize.height * 4; - unsigned int imageWidth = inputTextureSize.width * 4; - - linePairsToRender = 0; - unsigned int currentByte = 0; - unsigned int lineStorageIndex = 0; - unsigned int maxLineStorageIndex = maxLinePairsToRender * 8 - 8; - - GLfloat minY = 100, maxY = -100, minX = 100, maxX = -100; - while (currentByte < imageByteSize) - { - GLubyte colorByte = rawImagePixels[currentByte]; - - if (colorByte > 0) - { - unsigned int xCoordinate = currentByte % imageWidth; - unsigned int yCoordinate = currentByte / imageWidth; - - CGFloat normalizedXCoordinate = (-1.0 + 2.0 * (CGFloat)(xCoordinate / 4) / inputTextureSize.width) * xAspectMultiplier; - CGFloat normalizedYCoordinate = (-1.0 + 2.0 * (CGFloat)(yCoordinate) / inputTextureSize.height) * yAspectMultiplier; - - minY = MIN(minY, normalizedYCoordinate); - maxY = MAX(maxY, normalizedYCoordinate); - minX = MIN(minX, normalizedXCoordinate); - maxX = MAX(maxX, normalizedXCoordinate); - -// NSLog(@"Parallel line coordinates: (%f, %f) - (%f, %f) - (%f, %f)", -1.0, -normalizedYCoordinate, 0.0, normalizedXCoordinate, 1.0, normalizedYCoordinate); - // T space coordinates, (-d, -y) to (0, x) - lineCoordinates[lineStorageIndex++] = -1.0; - lineCoordinates[lineStorageIndex++] = -normalizedYCoordinate; - lineCoordinates[lineStorageIndex++] = 0.0; - lineCoordinates[lineStorageIndex++] = normalizedXCoordinate; - - // S space coordinates, (0, x) to (d, y) - lineCoordinates[lineStorageIndex++] = 0.0; - lineCoordinates[lineStorageIndex++] = normalizedXCoordinate; - lineCoordinates[lineStorageIndex++] = 1.0; - lineCoordinates[lineStorageIndex++] = normalizedYCoordinate; - - linePairsToRender++; - - linePairsToRender = MIN(linePairsToRender, maxLinePairsToRender); - lineStorageIndex = MIN(lineStorageIndex, maxLineStorageIndex); - } - currentByte +=8; - } - -// NSLog(@"Line pairs to render: %d out of max: %d", linePairsToRender, maxLinePairsToRender); - -// CFAbsoluteTime currentFrameTime = (CFAbsoluteTimeGetCurrent() - startTime); -// NSLog(@"Line generation processing time : %f ms", 1000.0 * currentFrameTime); - - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - - if (usingNextFrameForImageCapture) - { - [outputFramebuffer lock]; - } - - [GPUImageContext setActiveShaderProgram:filterProgram]; - [self setUniformsForProgramAtIndex:0]; - - glClearColor(0.0, 0.0, 0.0, 1.0); - glClear(GL_COLOR_BUFFER_BIT); - - if (![GPUImageContext deviceSupportsFramebufferReads]) - { - glBlendEquation(GL_FUNC_ADD); - glBlendFunc(GL_ONE, GL_ONE); - glEnable(GL_BLEND); - } - else - { - } - - glLineWidth(1); - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, lineCoordinates); - glDrawArrays(GL_LINES, 0, (linePairsToRender * 4)); - - if (![GPUImageContext deviceSupportsFramebufferReads]) - { - glDisable(GL_BLEND); - } - [firstInputFramebuffer unlock]; - if (usingNextFrameForImageCapture) - { - dispatch_semaphore_signal(imageCaptureSemaphore); - } -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePerlinNoiseFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePerlinNoiseFilter.h deleted file mode 100644 index 922f4d30..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePerlinNoiseFilter.h +++ /dev/null @@ -1,13 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImagePerlinNoiseFilter : GPUImageFilter -{ - GLint scaleUniform, colorStartUniform, colorFinishUniform; -} - -@property (readwrite, nonatomic) GPUVector4 colorStart; -@property (readwrite, nonatomic) GPUVector4 colorFinish; - -@property (readwrite, nonatomic) float scale; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePerlinNoiseFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePerlinNoiseFilter.m deleted file mode 100644 index 9ca7cbad..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePerlinNoiseFilter.m +++ /dev/null @@ -1,239 +0,0 @@ -#import "GPUImagePerlinNoiseFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImagePerlinNoiseFragmentShaderString = SHADER_STRING -( - precision highp float; - varying highp vec2 textureCoordinate; - uniform float scale; - - uniform vec4 colorStart; - uniform vec4 colorFinish; - - // - // Description : Array and textureless GLSL 2D/3D/4D simplex - // noise functions. - // Author : Ian McEwan, Ashima Arts. - // Maintainer : ijm - // Lastmod : 20110822 (ijm) - // License : Copyright (C) 2011 Ashima Arts. All rights reserved. - // Distributed under the MIT License. See LICENSE file. - // https://github.com/ashima/webgl-noise - // - - vec4 mod289(vec4 x) -{ - return x - floor(x * (1.0 / 289.0)) * 289.0; -} - - vec4 permute(vec4 x) -{ - return mod289(((x*34.0)+1.0)*x); -} - - vec4 taylorInvSqrt(vec4 r) -{ - return 1.79284291400159 - 0.85373472095314 * r; -} - - vec2 fade(vec2 t) { - return t*t*t*(t*(t*6.0-15.0)+10.0); - } - - // Classic Perlin noise - float cnoise(vec2 P) -{ - vec4 Pi = floor(P.xyxy) + vec4(0.0, 0.0, 1.0, 1.0); - vec4 Pf = fract(P.xyxy) - vec4(0.0, 0.0, 1.0, 1.0); - Pi = mod289(Pi); // To avoid truncation effects in permutation - vec4 ix = Pi.xzxz; - vec4 iy = Pi.yyww; - vec4 fx = Pf.xzxz; - vec4 fy = Pf.yyww; - - vec4 i = permute(permute(ix) + iy); - - vec4 gx = fract(i * (1.0 / 41.0)) * 2.0 - 1.0 ; - vec4 gy = abs(gx) - 0.5 ; - vec4 tx = floor(gx + 0.5); - gx = gx - tx; - - vec2 g00 = vec2(gx.x,gy.x); - vec2 g10 = vec2(gx.y,gy.y); - vec2 g01 = vec2(gx.z,gy.z); - vec2 g11 = vec2(gx.w,gy.w); - - vec4 norm = taylorInvSqrt(vec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); - g00 *= norm.x; - g01 *= norm.y; - g10 *= norm.z; - g11 *= norm.w; - - float n00 = dot(g00, vec2(fx.x, fy.x)); - float n10 = dot(g10, vec2(fx.y, fy.y)); - float n01 = dot(g01, vec2(fx.z, fy.z)); - float n11 = dot(g11, vec2(fx.w, fy.w)); - - vec2 fade_xy = fade(Pf.xy); - vec2 n_x = mix(vec2(n00, n01), vec2(n10, n11), fade_xy.x); - float n_xy = mix(n_x.x, n_x.y, fade_xy.y); - return 2.3 * n_xy; -} - - - void main() - { - - float n1 = (cnoise(textureCoordinate * scale) + 1.0) / 2.0; - - vec4 colorDiff = colorFinish - colorStart; - vec4 color = colorStart + colorDiff * n1; - - gl_FragColor = color; - } -); -#else -NSString *const kGPUImagePerlinNoiseFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - uniform float scale; - - uniform vec4 colorStart; - uniform vec4 colorFinish; - - // - // Description : Array and textureless GLSL 2D/3D/4D simplex - // noise functions. - // Author : Ian McEwan, Ashima Arts. - // Maintainer : ijm - // Lastmod : 20110822 (ijm) - // License : Copyright (C) 2011 Ashima Arts. All rights reserved. - // Distributed under the MIT License. See LICENSE file. - // https://github.com/ashima/webgl-noise - // - - vec4 mod289(vec4 x) -{ - return x - floor(x * (1.0 / 289.0)) * 289.0; -} - - vec4 permute(vec4 x) -{ - return mod289(((x*34.0)+1.0)*x); -} - - vec4 taylorInvSqrt(vec4 r) -{ - return 1.79284291400159 - 0.85373472095314 * r; -} - - vec2 fade(vec2 t) { - return t*t*t*(t*(t*6.0-15.0)+10.0); - } - - // Classic Perlin noise - float cnoise(vec2 P) -{ - vec4 Pi = floor(P.xyxy) + vec4(0.0, 0.0, 1.0, 1.0); - vec4 Pf = fract(P.xyxy) - vec4(0.0, 0.0, 1.0, 1.0); - Pi = mod289(Pi); // To avoid truncation effects in permutation - vec4 ix = Pi.xzxz; - vec4 iy = Pi.yyww; - vec4 fx = Pf.xzxz; - vec4 fy = Pf.yyww; - - vec4 i = permute(permute(ix) + iy); - - vec4 gx = fract(i * (1.0 / 41.0)) * 2.0 - 1.0 ; - vec4 gy = abs(gx) - 0.5 ; - vec4 tx = floor(gx + 0.5); - gx = gx - tx; - - vec2 g00 = vec2(gx.x,gy.x); - vec2 g10 = vec2(gx.y,gy.y); - vec2 g01 = vec2(gx.z,gy.z); - vec2 g11 = vec2(gx.w,gy.w); - - vec4 norm = taylorInvSqrt(vec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); - g00 *= norm.x; - g01 *= norm.y; - g10 *= norm.z; - g11 *= norm.w; - - float n00 = dot(g00, vec2(fx.x, fy.x)); - float n10 = dot(g10, vec2(fx.y, fy.y)); - float n01 = dot(g01, vec2(fx.z, fy.z)); - float n11 = dot(g11, vec2(fx.w, fy.w)); - - vec2 fade_xy = fade(Pf.xy); - vec2 n_x = mix(vec2(n00, n01), vec2(n10, n11), fade_xy.x); - float n_xy = mix(n_x.x, n_x.y, fade_xy.y); - return 2.3 * n_xy; - } - - void main() - { - - float n1 = (cnoise(textureCoordinate * scale) + 1.0) / 2.0; - - vec4 colorDiff = colorFinish - colorStart; - vec4 color = colorStart + colorDiff * n1; - - gl_FragColor = color; - } -); -#endif - - -@implementation GPUImagePerlinNoiseFilter - -@synthesize scale = _scale, colorStart = _colorStart, colorFinish = _colorFinish; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImagePerlinNoiseFragmentShaderString])) - { - return nil; - } - - scaleUniform = [filterProgram uniformIndex:@"scale"]; - - colorStartUniform = [filterProgram uniformIndex:@"colorStart"]; - colorFinishUniform = [filterProgram uniformIndex:@"colorFinish"]; - - [self setScale:8.0]; - - [self setColorStart:(GPUVector4){0.0, 0.0, 0.0, 1.0}]; - [self setColorFinish:(GPUVector4){1.0, 1.0, 1.0, 1.0}]; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setScale:(float)scale -{ - _scale = scale; - - [self setFloat:_scale forUniform:scaleUniform program:filterProgram]; -} - -- (void)setColorStart:(GPUVector4)colorStart -{ - _colorStart = colorStart; - - [self setVec4:_colorStart forUniform:colorStartUniform program:filterProgram]; -} - -- (void)setColorFinish:(GPUVector4)colorFinish -{ - _colorFinish = colorFinish; - - [self setVec4:_colorFinish forUniform:colorFinishUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePinchDistortionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePinchDistortionFilter.h deleted file mode 100755 index 994774fd..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePinchDistortionFilter.h +++ /dev/null @@ -1,20 +0,0 @@ -#import "GPUImageFilter.h" - -/** Creates a pinch distortion of the image - */ -@interface GPUImagePinchDistortionFilter : GPUImageFilter -{ - GLint aspectRatioUniform, radiusUniform, centerUniform, scaleUniform; -} - -/** The center about which to apply the distortion, with a default of (0.5, 0.5) - */ -@property(readwrite, nonatomic) CGPoint center; -/** The radius of the distortion, ranging from 0.0 to 2.0, with a default of 1.0 - */ -@property(readwrite, nonatomic) CGFloat radius; -/** The amount of distortion to apply, from -2.0 to 2.0, with a default of 0.5 - */ -@property(readwrite, nonatomic) CGFloat scale; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePinchDistortionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePinchDistortionFilter.m deleted file mode 100755 index 76d79096..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePinchDistortionFilter.m +++ /dev/null @@ -1,176 +0,0 @@ -#import "GPUImagePinchDistortionFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImagePinchDistortionFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp float aspectRatio; - uniform highp vec2 center; - uniform highp float radius; - uniform highp float scale; - - void main() - { - highp vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - highp float dist = distance(center, textureCoordinateToUse); - textureCoordinateToUse = textureCoordinate; - - if (dist < radius) - { - textureCoordinateToUse -= center; - highp float percent = 1.0 + ((0.5 - dist) / 0.5) * scale; - textureCoordinateToUse = textureCoordinateToUse * percent; - textureCoordinateToUse += center; - - gl_FragColor = texture2D(inputImageTexture, textureCoordinateToUse ); - } - else - { - gl_FragColor = texture2D(inputImageTexture, textureCoordinate ); - } - } -); -#else -NSString *const kGPUImagePinchDistortionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform float aspectRatio; - uniform vec2 center; - uniform float radius; - uniform float scale; - - void main() - { - vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - float dist = distance(center, textureCoordinateToUse); - textureCoordinateToUse = textureCoordinate; - - if (dist < radius) - { - textureCoordinateToUse -= center; - float percent = 1.0 + ((0.5 - dist) / 0.5) * scale; - textureCoordinateToUse = textureCoordinateToUse * percent; - textureCoordinateToUse += center; - - gl_FragColor = texture2D(inputImageTexture, textureCoordinateToUse ); - } - else - { - gl_FragColor = texture2D(inputImageTexture, textureCoordinate ); - } - } -); -#endif - -@interface GPUImagePinchDistortionFilter () - -- (void)adjustAspectRatio; - -@property (readwrite, nonatomic) CGFloat aspectRatio; - -@end - -@implementation GPUImagePinchDistortionFilter - -@synthesize aspectRatio = _aspectRatio; -@synthesize center = _center; -@synthesize radius = _radius; -@synthesize scale = _scale; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImagePinchDistortionFragmentShaderString])) - { - return nil; - } - - aspectRatioUniform = [filterProgram uniformIndex:@"aspectRatio"]; - radiusUniform = [filterProgram uniformIndex:@"radius"]; - scaleUniform = [filterProgram uniformIndex:@"scale"]; - centerUniform = [filterProgram uniformIndex:@"center"]; - - self.radius = 1.0; - self.scale = 0.5; - self.center = CGPointMake(0.5, 0.5); - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)adjustAspectRatio; -{ - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - [self setAspectRatio:(inputTextureSize.width / inputTextureSize.height)]; - } - else - { - [self setAspectRatio:(inputTextureSize.height / inputTextureSize.width)]; - } -} - -- (void)forceProcessingAtSize:(CGSize)frameSize; -{ - [super forceProcessingAtSize:frameSize]; - [self adjustAspectRatio]; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - CGSize oldInputSize = inputTextureSize; - [super setInputSize:newSize atIndex:textureIndex]; - - if ( (!CGSizeEqualToSize(oldInputSize, inputTextureSize)) && (!CGSizeEqualToSize(newSize, CGSizeZero)) ) - { - [self adjustAspectRatio]; - } -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - [super setInputRotation:newInputRotation atIndex:textureIndex]; - [self setCenter:self.center]; - [self adjustAspectRatio]; -} - -- (void)setAspectRatio:(CGFloat)newValue; -{ - _aspectRatio = newValue; - - [self setFloat:_aspectRatio forUniform:aspectRatioUniform program:filterProgram]; -} - -- (void)setRadius:(CGFloat)newValue; -{ - _radius = newValue; - - [self setFloat:_radius forUniform:radiusUniform program:filterProgram]; -} - -- (void)setScale:(CGFloat)newValue; -{ - _scale = newValue; - - [self setFloat:_scale forUniform:scaleUniform program:filterProgram]; -} - -- (void)setCenter:(CGPoint)newValue; -{ - _center = newValue; - - CGPoint rotatedPoint = [self rotatedPoint:_center forRotation:inputRotation]; - [self setPoint:rotatedPoint forUniform:centerUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePixellateFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePixellateFilter.h deleted file mode 100755 index d0f6ae04..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePixellateFilter.h +++ /dev/null @@ -1,12 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImagePixellateFilter : GPUImageFilter -{ - GLint fractionalWidthOfAPixelUniform, aspectRatioUniform; -} - -// The fractional width of the image to use as a size for the pixels in the resulting image. Values below one pixel width in the source image are ignored. -@property(readwrite, nonatomic) CGFloat fractionalWidthOfAPixel; - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePixellateFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePixellateFilter.m deleted file mode 100755 index 88430d09..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePixellateFilter.m +++ /dev/null @@ -1,151 +0,0 @@ -#import "GPUImagePixellateFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImagePixellationFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp float fractionalWidthOfPixel; - uniform highp float aspectRatio; - - void main() - { - highp vec2 sampleDivisor = vec2(fractionalWidthOfPixel, fractionalWidthOfPixel / aspectRatio); - - highp vec2 samplePos = textureCoordinate - mod(textureCoordinate, sampleDivisor) + 0.5 * sampleDivisor; - gl_FragColor = texture2D(inputImageTexture, samplePos ); - } -); -#else -NSString *const kGPUImagePixellationFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform float fractionalWidthOfPixel; - uniform float aspectRatio; - - void main() - { - vec2 sampleDivisor = vec2(fractionalWidthOfPixel, fractionalWidthOfPixel / aspectRatio); - - vec2 samplePos = textureCoordinate - mod(textureCoordinate, sampleDivisor) + 0.5 * sampleDivisor; - gl_FragColor = texture2D(inputImageTexture, samplePos ); - } -); -#endif - -@interface GPUImagePixellateFilter () - -@property (readwrite, nonatomic) CGFloat aspectRatio; - -- (void)adjustAspectRatio; - -@end - -@implementation GPUImagePixellateFilter - -@synthesize fractionalWidthOfAPixel = _fractionalWidthOfAPixel; -@synthesize aspectRatio = _aspectRatio; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImagePixellationFragmentShaderString])) - { - return nil; - } - - return self; -} - -- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [super initWithFragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - fractionalWidthOfAPixelUniform = [filterProgram uniformIndex:@"fractionalWidthOfPixel"]; - aspectRatioUniform = [filterProgram uniformIndex:@"aspectRatio"]; - - self.fractionalWidthOfAPixel = 0.05; - - return self; -} - -- (void)adjustAspectRatio; -{ - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - [self setAspectRatio:(inputTextureSize.width / inputTextureSize.height)]; - } - else - { - [self setAspectRatio:(inputTextureSize.height / inputTextureSize.width)]; - } -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - [super setInputRotation:newInputRotation atIndex:textureIndex]; - [self adjustAspectRatio]; -} - -- (void)forceProcessingAtSize:(CGSize)frameSize; -{ - [super forceProcessingAtSize:frameSize]; - [self adjustAspectRatio]; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - CGSize oldInputSize = inputTextureSize; - [super setInputSize:newSize atIndex:textureIndex]; - - if ( (!CGSizeEqualToSize(oldInputSize, inputTextureSize)) && (!CGSizeEqualToSize(newSize, CGSizeZero)) ) - { - [self adjustAspectRatio]; - } -} - -#pragma mark - -#pragma mark Accessors - -- (void)setFractionalWidthOfAPixel:(CGFloat)newValue; -{ - CGFloat singlePixelSpacing; - if (inputTextureSize.width != 0.0) - { - singlePixelSpacing = 1.0 / inputTextureSize.width; - } - else - { - singlePixelSpacing = 1.0 / 2048.0; - } - - if (newValue < singlePixelSpacing) - { - _fractionalWidthOfAPixel = singlePixelSpacing; - } - else - { - _fractionalWidthOfAPixel = newValue; - } - - [self setFloat:_fractionalWidthOfAPixel forUniform:fractionalWidthOfAPixelUniform program:filterProgram]; -} - -- (void)setAspectRatio:(CGFloat)newValue; -{ - _aspectRatio = newValue; - - [self setFloat:_aspectRatio forUniform:aspectRatioUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePixellatePositionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePixellatePositionFilter.h deleted file mode 100755 index 9d304c93..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePixellatePositionFilter.h +++ /dev/null @@ -1,17 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImagePixellatePositionFilter : GPUImageFilter -{ - GLint fractionalWidthOfAPixelUniform, aspectRatioUniform, centerUniform, radiusUniform; -} - -// The fractional width of the image to use as a size for the pixels in the resulting image. Values below one pixel width in the source image are ignored. -@property(readwrite, nonatomic) CGFloat fractionalWidthOfAPixel; - -// the center point to start pixelation in texture coordinates, default 0.5, 0.5 -@property(readwrite, nonatomic) CGPoint center; - -// the radius (0.0 - 1.0) in which to pixelate, default 1.0 -@property(readwrite, nonatomic) CGFloat radius; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePixellatePositionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePixellatePositionFilter.m deleted file mode 100755 index f1bd09cc..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePixellatePositionFilter.m +++ /dev/null @@ -1,194 +0,0 @@ -#import "GPUImagePixellatePositionFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImagePixellationPositionFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp float fractionalWidthOfPixel; - uniform highp float aspectRatio; - uniform lowp vec2 pixelateCenter; - uniform highp float pixelateRadius; - - void main() - { - highp vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - highp float dist = distance(pixelateCenter, textureCoordinateToUse); - - if (dist < pixelateRadius) - { - highp vec2 sampleDivisor = vec2(fractionalWidthOfPixel, fractionalWidthOfPixel / aspectRatio); - highp vec2 samplePos = textureCoordinate - mod(textureCoordinate, sampleDivisor) + 0.5 * sampleDivisor; - gl_FragColor = texture2D(inputImageTexture, samplePos ); - } - else - { - gl_FragColor = texture2D(inputImageTexture, textureCoordinate ); - } - } -); -#else -NSString *const kGPUImagePixellationPositionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform float fractionalWidthOfPixel; - uniform float aspectRatio; - uniform vec2 pixelateCenter; - uniform float pixelateRadius; - - void main() - { - vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - float dist = distance(pixelateCenter, textureCoordinateToUse); - - if (dist < pixelateRadius) - { - vec2 sampleDivisor = vec2(fractionalWidthOfPixel, fractionalWidthOfPixel / aspectRatio); - vec2 samplePos = textureCoordinate - mod(textureCoordinate, sampleDivisor) + 0.5 * sampleDivisor; - gl_FragColor = texture2D(inputImageTexture, samplePos ); - } - else - { - gl_FragColor = texture2D(inputImageTexture, textureCoordinate ); - } - } -); -#endif - -@interface GPUImagePixellatePositionFilter () - -- (void)adjustAspectRatio; - -@property (readwrite, nonatomic) CGFloat aspectRatio; - -@end - -@implementation GPUImagePixellatePositionFilter - -@synthesize fractionalWidthOfAPixel = _fractionalWidthOfAPixel; -@synthesize aspectRatio = _aspectRatio; -@synthesize center = _center; -@synthesize radius = _radius; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImagePixellationPositionFragmentShaderString])) - { - return nil; - } - - return self; -} - -- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [super initWithFragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - fractionalWidthOfAPixelUniform = [filterProgram uniformIndex:@"fractionalWidthOfPixel"]; - aspectRatioUniform = [filterProgram uniformIndex:@"aspectRatio"]; - centerUniform = [filterProgram uniformIndex:@"pixelateCenter"]; - radiusUniform = [filterProgram uniformIndex:@"pixelateRadius"]; - - self.fractionalWidthOfAPixel = 0.05; - self.center = CGPointMake(0.5f, 0.5f); - self.radius = 0.25f; - - return self; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - CGSize oldInputSize = inputTextureSize; - [super setInputSize:newSize atIndex:textureIndex]; - - if ( (!CGSizeEqualToSize(oldInputSize, inputTextureSize)) && (!CGSizeEqualToSize(newSize, CGSizeZero)) ) - { - [self adjustAspectRatio]; - } -} - -#pragma mark - -#pragma mark Accessors - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - [super setInputRotation:newInputRotation atIndex:textureIndex]; - [self setCenter:self.center]; - [self adjustAspectRatio]; -} - -- (void)adjustAspectRatio; -{ - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - [self setAspectRatio:(inputTextureSize.width / inputTextureSize.height)]; - } - else - { - [self setAspectRatio:(inputTextureSize.height / inputTextureSize.width)]; - } -} - -- (void)forceProcessingAtSize:(CGSize)frameSize; -{ - [super forceProcessingAtSize:frameSize]; - [self adjustAspectRatio]; -} - -- (void)setFractionalWidthOfAPixel:(CGFloat)newValue; -{ - CGFloat singlePixelSpacing; - if (inputTextureSize.width != 0.0) - { - singlePixelSpacing = 1.0 / inputTextureSize.width; - } - else - { - singlePixelSpacing = 1.0 / 2048.0; - } - - if (newValue < singlePixelSpacing) - { - _fractionalWidthOfAPixel = singlePixelSpacing; - } - else - { - _fractionalWidthOfAPixel = newValue; - } - - [self setFloat:_fractionalWidthOfAPixel forUniform:fractionalWidthOfAPixelUniform program:filterProgram]; -} - -- (void)setAspectRatio:(CGFloat)newValue; -{ - _aspectRatio = newValue; - - [self setFloat:_aspectRatio forUniform:aspectRatioUniform program:filterProgram]; -} - -- (void)setCenter:(CGPoint)center -{ - _center = center; - CGPoint rotatedPoint = [self rotatedPoint:center forRotation:inputRotation]; - [self setPoint:rotatedPoint forUniform:centerUniform program:filterProgram]; -} - -- (void)setRadius:(CGFloat)radius -{ - _radius = radius; - - [self setFloat:_radius forUniform:radiusUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePoissonBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePoissonBlendFilter.h deleted file mode 100644 index 58eff225..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePoissonBlendFilter.h +++ /dev/null @@ -1,18 +0,0 @@ -#import "GPUImageTwoInputCrossTextureSamplingFilter.h" -#import "GPUImageFilterGroup.h" - -@interface GPUImagePoissonBlendFilter : GPUImageTwoInputCrossTextureSamplingFilter -{ - GLint mixUniform; - - GPUImageFramebuffer *secondOutputFramebuffer; -} - -// Mix ranges from 0.0 (only image 1) to 1.0 (only image 2 gradients), with 1.0 as the normal level -@property(readwrite, nonatomic) CGFloat mix; - -// The number of times to propagate the gradients. -// Crank this up to 100 or even 1000 if you want to get anywhere near convergence. Yes, this will be slow. -@property(readwrite, nonatomic) NSUInteger numIterations; - -@end \ No newline at end of file diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePoissonBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePoissonBlendFilter.m deleted file mode 100644 index 0167e024..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePoissonBlendFilter.m +++ /dev/null @@ -1,175 +0,0 @@ -#import "GPUImagePoissonBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImagePoissonBlendFragmentShaderString = SHADER_STRING -( - precision mediump float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - varying vec2 topTextureCoordinate; - varying vec2 bottomTextureCoordinate; - - varying vec2 textureCoordinate2; - varying vec2 leftTextureCoordinate2; - varying vec2 rightTextureCoordinate2; - varying vec2 topTextureCoordinate2; - varying vec2 bottomTextureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform lowp float mixturePercent; - - void main() - { - vec4 centerColor = texture2D(inputImageTexture, textureCoordinate); - vec3 bottomColor = texture2D(inputImageTexture, bottomTextureCoordinate).rgb; - vec3 leftColor = texture2D(inputImageTexture, leftTextureCoordinate).rgb; - vec3 rightColor = texture2D(inputImageTexture, rightTextureCoordinate).rgb; - vec3 topColor = texture2D(inputImageTexture, topTextureCoordinate).rgb; - - vec4 centerColor2 = texture2D(inputImageTexture2, textureCoordinate2); - vec3 bottomColor2 = texture2D(inputImageTexture2, bottomTextureCoordinate2).rgb; - vec3 leftColor2 = texture2D(inputImageTexture2, leftTextureCoordinate2).rgb; - vec3 rightColor2 = texture2D(inputImageTexture2, rightTextureCoordinate2).rgb; - vec3 topColor2 = texture2D(inputImageTexture2, topTextureCoordinate2).rgb; - - vec3 meanColor = (bottomColor + leftColor + rightColor + topColor) / 4.0; - vec3 diffColor = centerColor.rgb - meanColor; - - vec3 meanColor2 = (bottomColor2 + leftColor2 + rightColor2 + topColor2) / 4.0; - vec3 diffColor2 = centerColor2.rgb - meanColor2; - - vec3 gradColor = (meanColor + diffColor2); - - gl_FragColor = vec4(mix(centerColor.rgb, gradColor, centerColor2.a * mixturePercent), centerColor.a); - } -); -#else -NSString *const kGPUImagePoissonBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - varying vec2 topTextureCoordinate; - varying vec2 bottomTextureCoordinate; - - varying vec2 textureCoordinate2; - varying vec2 leftTextureCoordinate2; - varying vec2 rightTextureCoordinate2; - varying vec2 topTextureCoordinate2; - varying vec2 bottomTextureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform float mixturePercent; - - void main() - { - vec4 centerColor = texture2D(inputImageTexture, textureCoordinate); - vec3 bottomColor = texture2D(inputImageTexture, bottomTextureCoordinate).rgb; - vec3 leftColor = texture2D(inputImageTexture, leftTextureCoordinate).rgb; - vec3 rightColor = texture2D(inputImageTexture, rightTextureCoordinate).rgb; - vec3 topColor = texture2D(inputImageTexture, topTextureCoordinate).rgb; - - vec4 centerColor2 = texture2D(inputImageTexture2, textureCoordinate2); - vec3 bottomColor2 = texture2D(inputImageTexture2, bottomTextureCoordinate2).rgb; - vec3 leftColor2 = texture2D(inputImageTexture2, leftTextureCoordinate2).rgb; - vec3 rightColor2 = texture2D(inputImageTexture2, rightTextureCoordinate2).rgb; - vec3 topColor2 = texture2D(inputImageTexture2, topTextureCoordinate2).rgb; - - vec3 meanColor = (bottomColor + leftColor + rightColor + topColor) / 4.0; - vec3 diffColor = centerColor.rgb - meanColor; - - vec3 meanColor2 = (bottomColor2 + leftColor2 + rightColor2 + topColor2) / 4.0; - vec3 diffColor2 = centerColor2.rgb - meanColor2; - - vec3 gradColor = (meanColor + diffColor2); - - gl_FragColor = vec4(mix(centerColor.rgb, gradColor, centerColor2.a * mixturePercent), centerColor.a); - } -); -#endif - -@implementation GPUImagePoissonBlendFilter - -@synthesize mix = _mix; -@synthesize numIterations = _numIterations; - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImagePoissonBlendFragmentShaderString])) - { - return nil; - } - - mixUniform = [filterProgram uniformIndex:@"mixturePercent"]; - self.mix = 0.5; - - self.numIterations = 10; - - return self; -} - -- (void)setMix:(CGFloat)newValue; -{ - _mix = newValue; - - [self setFloat:_mix forUniform:mixUniform program:filterProgram]; -} - -//- (void)setOutputFBO; -//{ -// if (self.numIterations % 2 == 1) { -// [self setSecondFilterFBO]; -// } else { -// [self setFilterFBO]; -// } -//} - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - // Run the first stage of the two-pass filter - [GPUImageContext setActiveShaderProgram:filterProgram]; - - [super renderToTextureWithVertices:vertices textureCoordinates:textureCoordinates]; - - for (int pass = 1; pass < self.numIterations; pass++) { - - if (pass % 2 == 0) { - - [GPUImageContext setActiveShaderProgram:filterProgram]; - - // TODO: This will over-unlock the incoming framebuffer - [super renderToTextureWithVertices:vertices textureCoordinates:[[self class] textureCoordinatesForRotation:kGPUImageNoRotation]]; - } else { - // Run the second stage of the two-pass filter - secondOutputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [secondOutputFramebuffer activateFramebuffer]; - - [GPUImageContext setActiveShaderProgram:filterProgram]; - - glClearColor(backgroundColorRed, backgroundColorGreen, backgroundColorBlue, backgroundColorAlpha); - glClear(GL_COLOR_BUFFER_BIT); - - glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, [outputFramebuffer texture]); - glUniform1i(filterInputTextureUniform, 2); - - glActiveTexture(GL_TEXTURE3); - glBindTexture(GL_TEXTURE_2D, [secondInputFramebuffer texture]); - glUniform1i(filterInputTextureUniform2, 3); - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - glVertexAttribPointer(filterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, [[self class] textureCoordinatesForRotation:kGPUImageNoRotation]); - glVertexAttribPointer(filterSecondTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, [[self class] textureCoordinatesForRotation:inputRotation2]); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - } - } -} - -@end \ No newline at end of file diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePolarPixellateFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePolarPixellateFilter.h deleted file mode 100755 index 3de6a4d3..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePolarPixellateFilter.h +++ /dev/null @@ -1,13 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImagePolarPixellateFilter : GPUImageFilter { - GLint centerUniform, pixelSizeUniform; -} - -// The center about which to apply the distortion, with a default of (0.5, 0.5) -@property(readwrite, nonatomic) CGPoint center; -// The amount of distortion to apply, from (-2.0, -2.0) to (2.0, 2.0), with a default of (0.05, 0.05) -@property(readwrite, nonatomic) CGSize pixelSize; - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePolarPixellateFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePolarPixellateFilter.m deleted file mode 100755 index 5677db48..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePolarPixellateFilter.m +++ /dev/null @@ -1,128 +0,0 @@ -#import "GPUImagePolarPixellateFilter.h" - -// @fattjake based on vid by toneburst - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImagePolarPixellateFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp vec2 center; - uniform highp vec2 pixelSize; - - - void main() - { - highp vec2 normCoord = 2.0 * textureCoordinate - 1.0; - highp vec2 normCenter = 2.0 * center - 1.0; - - normCoord -= normCenter; - - highp float r = length(normCoord); // to polar coords - highp float phi = atan(normCoord.y, normCoord.x); // to polar coords - - r = r - mod(r, pixelSize.x) + 0.03; - phi = phi - mod(phi, pixelSize.y); - - normCoord.x = r * cos(phi); - normCoord.y = r * sin(phi); - - normCoord += normCenter; - - mediump vec2 textureCoordinateToUse = normCoord / 2.0 + 0.5; - - gl_FragColor = texture2D(inputImageTexture, textureCoordinateToUse ); - - } -); -#else -NSString *const kGPUImagePolarPixellateFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform vec2 center; - uniform vec2 pixelSize; - - - void main() - { - vec2 normCoord = 2.0 * textureCoordinate - 1.0; - vec2 normCenter = 2.0 * center - 1.0; - - normCoord -= normCenter; - - float r = length(normCoord); // to polar coords - float phi = atan(normCoord.y, normCoord.x); // to polar coords - - r = r - mod(r, pixelSize.x) + 0.03; - phi = phi - mod(phi, pixelSize.y); - - normCoord.x = r * cos(phi); - normCoord.y = r * sin(phi); - - normCoord += normCenter; - - vec2 textureCoordinateToUse = normCoord / 2.0 + 0.5; - - gl_FragColor = texture2D(inputImageTexture, textureCoordinateToUse ); - - } -); -#endif - - -@implementation GPUImagePolarPixellateFilter - -@synthesize center = _center; - -@synthesize pixelSize = _pixelSize; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImagePolarPixellateFragmentShaderString])) - { - return nil; - } - - pixelSizeUniform = [filterProgram uniformIndex:@"pixelSize"]; - centerUniform = [filterProgram uniformIndex:@"center"]; - - - self.pixelSize = CGSizeMake(0.05, 0.05); - self.center = CGPointMake(0.5, 0.5); - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - [super setInputRotation:newInputRotation atIndex:textureIndex]; - [self setCenter:self.center]; -} - -- (void)setPixelSize:(CGSize)pixelSize -{ - _pixelSize = pixelSize; - - [self setSize:_pixelSize forUniform:pixelSizeUniform program:filterProgram]; -} - -- (void)setCenter:(CGPoint)newValue; -{ - _center = newValue; - - CGPoint rotatedPoint = [self rotatedPoint:_center forRotation:inputRotation]; - [self setPoint:rotatedPoint forUniform:centerUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePolkaDotFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePolkaDotFilter.h deleted file mode 100644 index 369b7737..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePolkaDotFilter.h +++ /dev/null @@ -1,10 +0,0 @@ -#import "GPUImagePixellateFilter.h" - -@interface GPUImagePolkaDotFilter : GPUImagePixellateFilter -{ - GLint dotScalingUniform; -} - -@property(readwrite, nonatomic) CGFloat dotScaling; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePolkaDotFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePolkaDotFilter.m deleted file mode 100644 index a439a043..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePolkaDotFilter.m +++ /dev/null @@ -1,85 +0,0 @@ -#import "GPUImagePolkaDotFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImagePolkaDotFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp float fractionalWidthOfPixel; - uniform highp float aspectRatio; - uniform highp float dotScaling; - - void main() - { - highp vec2 sampleDivisor = vec2(fractionalWidthOfPixel, fractionalWidthOfPixel / aspectRatio); - - highp vec2 samplePos = textureCoordinate - mod(textureCoordinate, sampleDivisor) + 0.5 * sampleDivisor; - highp vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - highp vec2 adjustedSamplePos = vec2(samplePos.x, (samplePos.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - highp float distanceFromSamplePoint = distance(adjustedSamplePos, textureCoordinateToUse); - lowp float checkForPresenceWithinDot = step(distanceFromSamplePoint, (fractionalWidthOfPixel * 0.5) * dotScaling); - - lowp vec4 inputColor = texture2D(inputImageTexture, samplePos); - - gl_FragColor = vec4(inputColor.rgb * checkForPresenceWithinDot, inputColor.a); - } -); -#else -NSString *const kGPUImagePolkaDotFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform float fractionalWidthOfPixel; - uniform float aspectRatio; - uniform float dotScaling; - - void main() - { - vec2 sampleDivisor = vec2(fractionalWidthOfPixel, fractionalWidthOfPixel / aspectRatio); - - vec2 samplePos = textureCoordinate - mod(textureCoordinate, sampleDivisor) + 0.5 * sampleDivisor; - vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - vec2 adjustedSamplePos = vec2(samplePos.x, (samplePos.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - float distanceFromSamplePoint = distance(adjustedSamplePos, textureCoordinateToUse); - float checkForPresenceWithinDot = step(distanceFromSamplePoint, (fractionalWidthOfPixel * 0.5) * dotScaling); - - vec4 inputColor = texture2D(inputImageTexture, samplePos); - - gl_FragColor = vec4(inputColor.rgb * checkForPresenceWithinDot, inputColor.a); - } -); -#endif - -@implementation GPUImagePolkaDotFilter - -@synthesize dotScaling = _dotScaling; - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImagePolkaDotFragmentShaderString])) - { - return nil; - } - - dotScalingUniform = [filterProgram uniformIndex:@"dotScaling"]; - - self.dotScaling = 0.90; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setDotScaling:(CGFloat)newValue; -{ - _dotScaling = newValue; - - [self setFloat:_dotScaling forUniform:dotScalingUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePosterizeFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePosterizeFilter.h deleted file mode 100755 index 6f655b3e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePosterizeFilter.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "GPUImageFilter.h" - -/** This reduces the color dynamic range into the number of steps specified, leading to a cartoon-like simple shading of the image. - */ -@interface GPUImagePosterizeFilter : GPUImageFilter -{ - GLint colorLevelsUniform; -} - -/** The number of color levels to reduce the image space to. This ranges from 1 to 256, with a default of 10. - */ -@property(readwrite, nonatomic) NSUInteger colorLevels; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePosterizeFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePosterizeFilter.m deleted file mode 100755 index a438cea5..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePosterizeFilter.m +++ /dev/null @@ -1,66 +0,0 @@ -#import "GPUImagePosterizeFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImagePosterizeFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform highp float colorLevels; - - void main() - { - highp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = floor((textureColor * colorLevels) + vec4(0.5)) / colorLevels; - } -); -#else -NSString *const kGPUImagePosterizeFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float colorLevels; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = floor((textureColor * colorLevels) + vec4(0.5)) / colorLevels; - } -); -#endif - -@implementation GPUImagePosterizeFilter - -@synthesize colorLevels = _colorLevels; - -#pragma mark - -#pragma mark Initialization - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImagePosterizeFragmentShaderString])) - { - return nil; - } - - colorLevelsUniform = [filterProgram uniformIndex:@"colorLevels"]; - self.colorLevels = 10; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setColorLevels:(NSUInteger)newValue; -{ - _colorLevels = newValue; - - [self setFloat:_colorLevels forUniform:colorLevelsUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePrewittEdgeDetectionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePrewittEdgeDetectionFilter.h deleted file mode 100755 index 141f8c5f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePrewittEdgeDetectionFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageSobelEdgeDetectionFilter.h" - -@interface GPUImagePrewittEdgeDetectionFilter : GPUImageSobelEdgeDetectionFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePrewittEdgeDetectionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePrewittEdgeDetectionFilter.m deleted file mode 100755 index a9906930..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImagePrewittEdgeDetectionFilter.m +++ /dev/null @@ -1,97 +0,0 @@ -#import "GPUImagePrewittEdgeDetectionFilter.h" - -@implementation GPUImagePrewittEdgeDetectionFilter - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImagePrewittFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float edgeStrength; - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float h = -topLeftIntensity - topIntensity - topRightIntensity + bottomLeftIntensity + bottomIntensity + bottomRightIntensity; - float v = -bottomLeftIntensity - leftIntensity - topLeftIntensity + bottomRightIntensity + rightIntensity + topRightIntensity; - - float mag = length(vec2(h, v)) * edgeStrength; - - gl_FragColor = vec4(vec3(mag), 1.0); - } -); -#else -NSString *const kGPUImagePrewittFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float edgeStrength; - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float h = -topLeftIntensity - topIntensity - topRightIntensity + bottomLeftIntensity + bottomIntensity + bottomRightIntensity; - float v = -bottomLeftIntensity - leftIntensity - topLeftIntensity + bottomRightIntensity + rightIntensity + topRightIntensity; - - float mag = length(vec2(h, v)) * edgeStrength; - - gl_FragColor = vec4(vec3(mag), 1.0); - } -); -#endif - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImagePrewittFragmentShaderString])) - { - return nil; - } - - self.edgeStrength = 1.0; - - return self; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBClosingFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBClosingFilter.h deleted file mode 100644 index 08d13f88..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBClosingFilter.h +++ /dev/null @@ -1,18 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImageRGBErosionFilter; -@class GPUImageRGBDilationFilter; - -// A filter that first performs a dilation on each color channel of an image, followed by an erosion of the same radius. -// This helps to filter out smaller dark elements. - -@interface GPUImageRGBClosingFilter : GPUImageFilterGroup -{ - GPUImageRGBErosionFilter *erosionFilter; - GPUImageRGBDilationFilter *dilationFilter; -} - -- (id)initWithRadius:(NSUInteger)radius; - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBClosingFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBClosingFilter.m deleted file mode 100644 index c5bb1c8d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBClosingFilter.m +++ /dev/null @@ -1,41 +0,0 @@ -#import "GPUImageRGBClosingFilter.h" -#import "GPUImageRGBErosionFilter.h" -#import "GPUImageRGBDilationFilter.h" - -@implementation GPUImageRGBClosingFilter - -- (id)init; -{ - if (!(self = [self initWithRadius:1])) - { - return nil; - } - - return self; -} - -- (id)initWithRadius:(NSUInteger)radius; -{ - if (!(self = [super init])) - { - return nil; - } - - // First pass: dilation - dilationFilter = [[GPUImageRGBDilationFilter alloc] initWithRadius:radius]; - [self addFilter:dilationFilter]; - - // Second pass: erosion - erosionFilter = [[GPUImageRGBErosionFilter alloc] initWithRadius:radius]; - [self addFilter:erosionFilter]; - - [dilationFilter addTarget:erosionFilter]; - - self.initialFilters = [NSArray arrayWithObjects:dilationFilter, nil]; - self.terminalFilter = erosionFilter; - - return self; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBDilationFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBDilationFilter.h deleted file mode 100644 index 68276f84..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBDilationFilter.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "GPUImageTwoPassTextureSamplingFilter.h" - -// For each pixel, this sets it to the maximum value of each color channel in a rectangular neighborhood extending out dilationRadius pixels from the center. -// This extends out brighter colors, and can be used for abstraction of color images. - -@interface GPUImageRGBDilationFilter : GPUImageTwoPassTextureSamplingFilter - -// Acceptable values for dilationRadius, which sets the distance in pixels to sample out from the center, are 1, 2, 3, and 4. -- (id)initWithRadius:(NSUInteger)dilationRadius; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBDilationFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBDilationFilter.m deleted file mode 100644 index 9702c783..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBDilationFilter.m +++ /dev/null @@ -1,306 +0,0 @@ -#import "GPUImageRGBDilationFilter.h" -#import "GPUImageDilationFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageRGBDilationRadiusOneFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - lowp vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - lowp vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - lowp vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - - lowp vec4 maxValue = max(centerIntensity, oneStepPositiveIntensity); - - gl_FragColor = max(maxValue, oneStepNegativeIntensity); - } -); - -NSString *const kGPUImageRGBDilationRadiusTwoFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - lowp vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - lowp vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - lowp vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - lowp vec4 twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate); - lowp vec4 twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate); - - lowp vec4 maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - maxValue = max(maxValue, twoStepsPositiveIntensity); - maxValue = max(maxValue, twoStepsNegativeIntensity); - - gl_FragColor = max(maxValue, twoStepsNegativeIntensity); - } -); - -NSString *const kGPUImageRGBDilationRadiusThreeFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - lowp vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - lowp vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - lowp vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - lowp vec4 twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate); - lowp vec4 twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate); - lowp vec4 threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate); - lowp vec4 threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate); - - lowp vec4 maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - maxValue = max(maxValue, twoStepsPositiveIntensity); - maxValue = max(maxValue, twoStepsNegativeIntensity); - maxValue = max(maxValue, threeStepsPositiveIntensity); - - gl_FragColor = max(maxValue, threeStepsNegativeIntensity); - } -); - -NSString *const kGPUImageRGBDilationRadiusFourFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - varying vec2 fourStepsPositiveTextureCoordinate; - varying vec2 fourStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - lowp vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - lowp vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - lowp vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - lowp vec4 twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate); - lowp vec4 twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate); - lowp vec4 threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate); - lowp vec4 threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate); - lowp vec4 fourStepsPositiveIntensity = texture2D(inputImageTexture, fourStepsPositiveTextureCoordinate); - lowp vec4 fourStepsNegativeIntensity = texture2D(inputImageTexture, fourStepsNegativeTextureCoordinate); - - lowp vec4 maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - maxValue = max(maxValue, twoStepsPositiveIntensity); - maxValue = max(maxValue, twoStepsNegativeIntensity); - maxValue = max(maxValue, threeStepsPositiveIntensity); - maxValue = max(maxValue, threeStepsNegativeIntensity); - maxValue = max(maxValue, fourStepsPositiveIntensity); - - gl_FragColor = max(maxValue, fourStepsNegativeIntensity); - } -); -#else -NSString *const kGPUImageRGBDilationRadiusOneFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - - vec4 maxValue = max(centerIntensity, oneStepPositiveIntensity); - - gl_FragColor = max(maxValue, oneStepNegativeIntensity); - } - ); - -NSString *const kGPUImageRGBDilationRadiusTwoFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - vec4 twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate); - vec4 twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate); - - vec4 maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - maxValue = max(maxValue, twoStepsPositiveIntensity); - maxValue = max(maxValue, twoStepsNegativeIntensity); - - gl_FragColor = max(maxValue, twoStepsNegativeIntensity); - } - ); - -NSString *const kGPUImageRGBDilationRadiusThreeFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - vec4 twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate); - vec4 twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate); - vec4 threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate); - vec4 threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate); - - vec4 maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - maxValue = max(maxValue, twoStepsPositiveIntensity); - maxValue = max(maxValue, twoStepsNegativeIntensity); - maxValue = max(maxValue, threeStepsPositiveIntensity); - - gl_FragColor = max(maxValue, threeStepsNegativeIntensity); - } -); - -NSString *const kGPUImageRGBDilationRadiusFourFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - varying vec2 fourStepsPositiveTextureCoordinate; - varying vec2 fourStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - vec4 twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate); - vec4 twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate); - vec4 threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate); - vec4 threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate); - vec4 fourStepsPositiveIntensity = texture2D(inputImageTexture, fourStepsPositiveTextureCoordinate); - vec4 fourStepsNegativeIntensity = texture2D(inputImageTexture, fourStepsNegativeTextureCoordinate); - - vec4 maxValue = max(centerIntensity, oneStepPositiveIntensity); - maxValue = max(maxValue, oneStepNegativeIntensity); - maxValue = max(maxValue, twoStepsPositiveIntensity); - maxValue = max(maxValue, twoStepsNegativeIntensity); - maxValue = max(maxValue, threeStepsPositiveIntensity); - maxValue = max(maxValue, threeStepsNegativeIntensity); - maxValue = max(maxValue, fourStepsPositiveIntensity); - - gl_FragColor = max(maxValue, fourStepsNegativeIntensity); - } -); -#endif - -@implementation GPUImageRGBDilationFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithRadius:(NSUInteger)dilationRadius; -{ - NSString *fragmentShaderForThisRadius = nil; - NSString *vertexShaderForThisRadius = nil; - - switch (dilationRadius) - { - case 0: - case 1: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusOneVertexShaderString; - fragmentShaderForThisRadius = kGPUImageRGBDilationRadiusOneFragmentShaderString; - }; break; - case 2: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusTwoVertexShaderString; - fragmentShaderForThisRadius = kGPUImageRGBDilationRadiusTwoFragmentShaderString; - }; break; - case 3: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusThreeVertexShaderString; - fragmentShaderForThisRadius = kGPUImageRGBDilationRadiusThreeFragmentShaderString; - }; break; - case 4: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusFourVertexShaderString; - fragmentShaderForThisRadius = kGPUImageRGBDilationRadiusFourFragmentShaderString; - }; break; - default: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusFourVertexShaderString; - fragmentShaderForThisRadius = kGPUImageRGBDilationRadiusFourFragmentShaderString; - }; break; - } - - if (!(self = [super initWithFirstStageVertexShaderFromString:vertexShaderForThisRadius firstStageFragmentShaderFromString:fragmentShaderForThisRadius secondStageVertexShaderFromString:vertexShaderForThisRadius secondStageFragmentShaderFromString:fragmentShaderForThisRadius])) - { - return nil; - } - - return self; -} - -- (id)init; -{ - if (!(self = [self initWithRadius:1])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBErosionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBErosionFilter.h deleted file mode 100644 index 5979cb7e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBErosionFilter.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "GPUImageTwoPassTextureSamplingFilter.h" - -// For each pixel, this sets it to the minimum value of each color channel in a rectangular neighborhood extending out dilationRadius pixels from the center. -// This extends out dark features, and can be used for abstraction of color images. - -@interface GPUImageRGBErosionFilter : GPUImageTwoPassTextureSamplingFilter - -// Acceptable values for erosionRadius, which sets the distance in pixels to sample out from the center, are 1, 2, 3, and 4. -- (id)initWithRadius:(NSUInteger)erosionRadius; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBErosionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBErosionFilter.m deleted file mode 100644 index 91e5f33d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBErosionFilter.m +++ /dev/null @@ -1,304 +0,0 @@ -#import "GPUImageRGBErosionFilter.h" -#import "GPUImageDilationFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageRGBErosionRadiusOneFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - lowp vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - lowp vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - lowp vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - - lowp vec4 minValue = min(centerIntensity, oneStepPositiveIntensity); - - gl_FragColor = min(minValue, oneStepNegativeIntensity); - } -); - -NSString *const kGPUImageRGBErosionRadiusTwoFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - lowp vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - lowp vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - lowp vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - lowp vec4 twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate); - lowp vec4 twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate); - - lowp vec4 minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - minValue = min(minValue, twoStepsPositiveIntensity); - - gl_FragColor = min(minValue, twoStepsNegativeIntensity); - } - ); - -NSString *const kGPUImageRGBErosionRadiusThreeFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - lowp vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - lowp vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - lowp vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - lowp vec4 twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate); - lowp vec4 twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate); - lowp vec4 threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate); - lowp vec4 threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate); - - lowp vec4 minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - minValue = min(minValue, twoStepsPositiveIntensity); - minValue = min(minValue, twoStepsNegativeIntensity); - minValue = min(minValue, threeStepsPositiveIntensity); - - gl_FragColor = min(minValue, threeStepsNegativeIntensity); - } - ); - -NSString *const kGPUImageRGBErosionRadiusFourFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - varying vec2 fourStepsPositiveTextureCoordinate; - varying vec2 fourStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - lowp vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - lowp vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - lowp vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - lowp vec4 twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate); - lowp vec4 twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate); - lowp vec4 threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate); - lowp vec4 threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate); - lowp vec4 fourStepsPositiveIntensity = texture2D(inputImageTexture, fourStepsPositiveTextureCoordinate); - lowp vec4 fourStepsNegativeIntensity = texture2D(inputImageTexture, fourStepsNegativeTextureCoordinate); - - lowp vec4 minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - minValue = min(minValue, twoStepsPositiveIntensity); - minValue = min(minValue, twoStepsNegativeIntensity); - minValue = min(minValue, threeStepsPositiveIntensity); - minValue = min(minValue, threeStepsNegativeIntensity); - minValue = min(minValue, fourStepsPositiveIntensity); - - gl_FragColor = min(minValue, fourStepsNegativeIntensity); - } -); -#else -NSString *const kGPUImageRGBErosionRadiusOneFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - - vec4 minValue = min(centerIntensity, oneStepPositiveIntensity); - - gl_FragColor = min(minValue, oneStepNegativeIntensity); - } -); - -NSString *const kGPUImageRGBErosionRadiusTwoFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - vec4 twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate); - vec4 twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate); - - vec4 minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - minValue = min(minValue, twoStepsPositiveIntensity); - - gl_FragColor = min(minValue, twoStepsNegativeIntensity); - } -); - -NSString *const kGPUImageRGBErosionRadiusThreeFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - vec4 twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate); - vec4 twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate); - vec4 threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate); - vec4 threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate); - - vec4 minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - minValue = min(minValue, twoStepsPositiveIntensity); - minValue = min(minValue, twoStepsNegativeIntensity); - minValue = min(minValue, threeStepsPositiveIntensity); - - gl_FragColor = min(minValue, threeStepsNegativeIntensity); - } -); - -NSString *const kGPUImageRGBErosionRadiusFourFragmentShaderString = SHADER_STRING -( - varying vec2 centerTextureCoordinate; - varying vec2 oneStepPositiveTextureCoordinate; - varying vec2 oneStepNegativeTextureCoordinate; - varying vec2 twoStepsPositiveTextureCoordinate; - varying vec2 twoStepsNegativeTextureCoordinate; - varying vec2 threeStepsPositiveTextureCoordinate; - varying vec2 threeStepsNegativeTextureCoordinate; - varying vec2 fourStepsPositiveTextureCoordinate; - varying vec2 fourStepsNegativeTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); - vec4 oneStepPositiveIntensity = texture2D(inputImageTexture, oneStepPositiveTextureCoordinate); - vec4 oneStepNegativeIntensity = texture2D(inputImageTexture, oneStepNegativeTextureCoordinate); - vec4 twoStepsPositiveIntensity = texture2D(inputImageTexture, twoStepsPositiveTextureCoordinate); - vec4 twoStepsNegativeIntensity = texture2D(inputImageTexture, twoStepsNegativeTextureCoordinate); - vec4 threeStepsPositiveIntensity = texture2D(inputImageTexture, threeStepsPositiveTextureCoordinate); - vec4 threeStepsNegativeIntensity = texture2D(inputImageTexture, threeStepsNegativeTextureCoordinate); - vec4 fourStepsPositiveIntensity = texture2D(inputImageTexture, fourStepsPositiveTextureCoordinate); - vec4 fourStepsNegativeIntensity = texture2D(inputImageTexture, fourStepsNegativeTextureCoordinate); - - vec4 minValue = min(centerIntensity, oneStepPositiveIntensity); - minValue = min(minValue, oneStepNegativeIntensity); - minValue = min(minValue, twoStepsPositiveIntensity); - minValue = min(minValue, twoStepsNegativeIntensity); - minValue = min(minValue, threeStepsPositiveIntensity); - minValue = min(minValue, threeStepsNegativeIntensity); - minValue = min(minValue, fourStepsPositiveIntensity); - - gl_FragColor = min(minValue, fourStepsNegativeIntensity); - } -); -#endif - -@implementation GPUImageRGBErosionFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithRadius:(NSUInteger)erosionRadius; -{ - NSString *fragmentShaderForThisRadius = nil; - NSString *vertexShaderForThisRadius = nil; - - switch (erosionRadius) - { - case 0: - case 1: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusOneVertexShaderString; - fragmentShaderForThisRadius = kGPUImageRGBErosionRadiusOneFragmentShaderString; - }; break; - case 2: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusTwoVertexShaderString; - fragmentShaderForThisRadius = kGPUImageRGBErosionRadiusTwoFragmentShaderString; - }; break; - case 3: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusThreeVertexShaderString; - fragmentShaderForThisRadius = kGPUImageRGBErosionRadiusThreeFragmentShaderString; - }; break; - case 4: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusFourVertexShaderString; - fragmentShaderForThisRadius = kGPUImageRGBErosionRadiusFourFragmentShaderString; - }; break; - default: - { - vertexShaderForThisRadius = kGPUImageDilationRadiusFourVertexShaderString; - fragmentShaderForThisRadius = kGPUImageRGBErosionRadiusFourFragmentShaderString; - }; break; - } - - if (!(self = [super initWithFirstStageVertexShaderFromString:vertexShaderForThisRadius firstStageFragmentShaderFromString:fragmentShaderForThisRadius secondStageVertexShaderFromString:vertexShaderForThisRadius secondStageFragmentShaderFromString:fragmentShaderForThisRadius])) - { - return nil; - } - - return self; -} - -- (id)init; -{ - if (!(self = [self initWithRadius:1])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBFilter.h deleted file mode 100755 index 18966b1b..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBFilter.h +++ /dev/null @@ -1,15 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageRGBFilter : GPUImageFilter -{ - GLint redUniform; - GLint greenUniform; - GLint blueUniform; -} - -// Normalized values by which each color channel is multiplied. The range is from 0.0 up, with 1.0 as the default. -@property (readwrite, nonatomic) CGFloat red; -@property (readwrite, nonatomic) CGFloat green; -@property (readwrite, nonatomic) CGFloat blue; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBFilter.m deleted file mode 100755 index 7a2e5681..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBFilter.m +++ /dev/null @@ -1,89 +0,0 @@ -#import "GPUImageRGBFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageRGBFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform highp float redAdjustment; - uniform highp float greenAdjustment; - uniform highp float blueAdjustment; - - void main() - { - highp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4(textureColor.r * redAdjustment, textureColor.g * greenAdjustment, textureColor.b * blueAdjustment, textureColor.a); - } -); -#else -NSString *const kGPUImageRGBFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float redAdjustment; - uniform float greenAdjustment; - uniform float blueAdjustment; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - gl_FragColor = vec4(textureColor.r * redAdjustment, textureColor.g * greenAdjustment, textureColor.b * blueAdjustment, textureColor.a); - } - ); -#endif - -@implementation GPUImageRGBFilter - -@synthesize red = _red, blue = _blue, green = _green; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageRGBFragmentShaderString])) - { - return nil; - } - - redUniform = [filterProgram uniformIndex:@"redAdjustment"]; - self.red = 1.0; - - greenUniform = [filterProgram uniformIndex:@"greenAdjustment"]; - self.green = 1.0; - - blueUniform = [filterProgram uniformIndex:@"blueAdjustment"]; - self.blue = 1.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setRed:(CGFloat)newValue; -{ - _red = newValue; - - [self setFloat:_red forUniform:redUniform program:filterProgram]; -} - -- (void)setGreen:(CGFloat)newValue; -{ - _green = newValue; - - [self setFloat:_green forUniform:greenUniform program:filterProgram]; -} - -- (void)setBlue:(CGFloat)newValue; -{ - _blue = newValue; - - [self setFloat:_blue forUniform:blueUniform program:filterProgram]; -} - -@end \ No newline at end of file diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBOpeningFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBOpeningFilter.h deleted file mode 100644 index dbec75fb..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBOpeningFilter.h +++ /dev/null @@ -1,17 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImageRGBErosionFilter; -@class GPUImageRGBDilationFilter; - -// A filter that first performs an erosion on each color channel of an image, followed by a dilation of the same radius. -// This helps to filter out smaller bright elements. - -@interface GPUImageRGBOpeningFilter : GPUImageFilterGroup -{ - GPUImageRGBErosionFilter *erosionFilter; - GPUImageRGBDilationFilter *dilationFilter; -} - -- (id)initWithRadius:(NSUInteger)radius; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBOpeningFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBOpeningFilter.m deleted file mode 100644 index 9d53021e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRGBOpeningFilter.m +++ /dev/null @@ -1,41 +0,0 @@ -#import "GPUImageRGBOpeningFilter.h" -#import "GPUImageRGBErosionFilter.h" -#import "GPUImageRGBDilationFilter.h" - -@implementation GPUImageRGBOpeningFilter - -- (id)init; -{ - if (!(self = [self initWithRadius:1])) - { - return nil; - } - - return self; -} - -- (id)initWithRadius:(NSUInteger)radius; -{ - if (!(self = [super init])) - { - return nil; - } - - // First pass: erosion - erosionFilter = [[GPUImageRGBErosionFilter alloc] initWithRadius:radius]; - [self addFilter:erosionFilter]; - - // Second pass: dilation - dilationFilter = [[GPUImageRGBDilationFilter alloc] initWithRadius:radius]; - [self addFilter:dilationFilter]; - - [erosionFilter addTarget:dilationFilter]; - - self.initialFilters = [NSArray arrayWithObjects:erosionFilter, nil]; - self.terminalFilter = dilationFilter; - - return self; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRawDataInput.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRawDataInput.h deleted file mode 100644 index 6ec4720f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRawDataInput.h +++ /dev/null @@ -1,43 +0,0 @@ -#import "GPUImageOutput.h" - -// The bytes passed into this input are not copied or retained, but you are free to deallocate them after they are used by this filter. -// The bytes are uploaded and stored within a texture, so nothing is kept locally. -// The default format for input bytes is GPUPixelFormatBGRA, unless specified with pixelFormat: -// The default type for input bytes is GPUPixelTypeUByte, unless specified with pixelType: - -typedef enum { - GPUPixelFormatBGRA = GL_BGRA, - GPUPixelFormatRGBA = GL_RGBA, - GPUPixelFormatRGB = GL_RGB, - GPUPixelFormatLuminance = GL_LUMINANCE -} GPUPixelFormat; - -typedef enum { - GPUPixelTypeUByte = GL_UNSIGNED_BYTE, - GPUPixelTypeFloat = GL_FLOAT -} GPUPixelType; - -@interface GPUImageRawDataInput : GPUImageOutput -{ - CGSize uploadedImageSize; - - dispatch_semaphore_t dataUpdateSemaphore; -} - -// Initialization and teardown -- (id)initWithBytes:(GLubyte *)bytesToUpload size:(CGSize)imageSize; -- (id)initWithBytes:(GLubyte *)bytesToUpload size:(CGSize)imageSize pixelFormat:(GPUPixelFormat)pixelFormat; -- (id)initWithBytes:(GLubyte *)bytesToUpload size:(CGSize)imageSize pixelFormat:(GPUPixelFormat)pixelFormat type:(GPUPixelType)pixelType; - -/** Input data pixel format - */ -@property (readwrite, nonatomic) GPUPixelFormat pixelFormat; -@property (readwrite, nonatomic) GPUPixelType pixelType; - -// Image rendering -- (void)updateDataFromBytes:(GLubyte *)bytesToUpload size:(CGSize)imageSize; -- (void)processData; -- (void)processDataForTimestamp:(CMTime)frameTime; -- (CGSize)outputImageSize; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRawDataInput.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRawDataInput.m deleted file mode 100644 index 4b6bfa74..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRawDataInput.m +++ /dev/null @@ -1,139 +0,0 @@ -#import "GPUImageRawDataInput.h" - -@interface GPUImageRawDataInput() -- (void)uploadBytes:(GLubyte *)bytesToUpload; -@end - -@implementation GPUImageRawDataInput - -@synthesize pixelFormat = _pixelFormat; -@synthesize pixelType = _pixelType; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithBytes:(GLubyte *)bytesToUpload size:(CGSize)imageSize; -{ - if (!(self = [self initWithBytes:bytesToUpload size:imageSize pixelFormat:GPUPixelFormatBGRA type:GPUPixelTypeUByte])) - { - return nil; - } - - return self; -} - -- (id)initWithBytes:(GLubyte *)bytesToUpload size:(CGSize)imageSize pixelFormat:(GPUPixelFormat)pixelFormat; -{ - if (!(self = [self initWithBytes:bytesToUpload size:imageSize pixelFormat:pixelFormat type:GPUPixelTypeUByte])) - { - return nil; - } - - return self; -} - -- (id)initWithBytes:(GLubyte *)bytesToUpload size:(CGSize)imageSize pixelFormat:(GPUPixelFormat)pixelFormat type:(GPUPixelType)pixelType; -{ - if (!(self = [super init])) - { - return nil; - } - - dataUpdateSemaphore = dispatch_semaphore_create(1); - - uploadedImageSize = imageSize; - self.pixelFormat = pixelFormat; - self.pixelType = pixelType; - - [self uploadBytes:bytesToUpload]; - - return self; -} - -// ARC forbids explicit message send of 'release'; since iOS 6 even for dispatch_release() calls: stripping it out in that case is required. -- (void)dealloc; -{ -#if !OS_OBJECT_USE_OBJC - if (dataUpdateSemaphore != NULL) - { - dispatch_release(dataUpdateSemaphore); - } -#endif -} - -#pragma mark - -#pragma mark Image rendering - -- (void)uploadBytes:(GLubyte *)bytesToUpload; -{ - [GPUImageContext useImageProcessingContext]; - - // TODO: This probably isn't right, and will need to be corrected - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:uploadedImageSize textureOptions:self.outputTextureOptions onlyTexture:YES]; - - glBindTexture(GL_TEXTURE_2D, [outputFramebuffer texture]); - glTexImage2D(GL_TEXTURE_2D, 0, _pixelFormat==GPUPixelFormatRGB ? GL_RGB : GL_RGBA, (int)uploadedImageSize.width, (int)uploadedImageSize.height, 0, (GLint)_pixelFormat, (GLenum)_pixelType, bytesToUpload); -} - -- (void)updateDataFromBytes:(GLubyte *)bytesToUpload size:(CGSize)imageSize; -{ - uploadedImageSize = imageSize; - - [self uploadBytes:bytesToUpload]; -} - -- (void)processData; -{ - if (dispatch_semaphore_wait(dataUpdateSemaphore, DISPATCH_TIME_NOW) != 0) - { - return; - } - - runAsynchronouslyOnVideoProcessingQueue(^{ - - CGSize pixelSizeOfImage = [self outputImageSize]; - - for (id currentTarget in targets) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger textureIndexOfTarget = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - - [currentTarget setInputSize:pixelSizeOfImage atIndex:textureIndexOfTarget]; - [currentTarget setInputFramebuffer:outputFramebuffer atIndex:textureIndexOfTarget]; - [currentTarget newFrameReadyAtTime:kCMTimeInvalid atIndex:textureIndexOfTarget]; - } - - dispatch_semaphore_signal(dataUpdateSemaphore); - }); -} - -- (void)processDataForTimestamp:(CMTime)frameTime; -{ - if (dispatch_semaphore_wait(dataUpdateSemaphore, DISPATCH_TIME_NOW) != 0) - { - return; - } - - runAsynchronouslyOnVideoProcessingQueue(^{ - - CGSize pixelSizeOfImage = [self outputImageSize]; - - for (id currentTarget in targets) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger textureIndexOfTarget = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - - [currentTarget setInputSize:pixelSizeOfImage atIndex:textureIndexOfTarget]; - [currentTarget newFrameReadyAtTime:frameTime atIndex:textureIndexOfTarget]; - } - - dispatch_semaphore_signal(dataUpdateSemaphore); - }); -} - -- (CGSize)outputImageSize; -{ - return uploadedImageSize; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRawDataOutput.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRawDataOutput.h deleted file mode 100755 index 5a4538c1..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRawDataOutput.h +++ /dev/null @@ -1,44 +0,0 @@ -#import -#import "GPUImageContext.h" - -struct GPUByteColorVector { - GLubyte red; - GLubyte green; - GLubyte blue; - GLubyte alpha; -}; -typedef struct GPUByteColorVector GPUByteColorVector; - -@protocol GPUImageRawDataProcessor; - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -@interface GPUImageRawDataOutput : NSObject { - CGSize imageSize; - GPUImageRotationMode inputRotation; - BOOL outputBGRA; -} -#else -@interface GPUImageRawDataOutput : NSObject { - CGSize imageSize; - GPUImageRotationMode inputRotation; - BOOL outputBGRA; -} -#endif - -@property(readonly) GLubyte *rawBytesForImage; -@property(nonatomic, copy) void(^newFrameAvailableBlock)(void); -@property(nonatomic) BOOL enabled; - -// Initialization and teardown -- (id)initWithImageSize:(CGSize)newImageSize resultsInBGRAFormat:(BOOL)resultsInBGRAFormat; - -// Data access -- (GPUByteColorVector)colorAtLocation:(CGPoint)locationInImage; -- (NSUInteger)bytesPerRowInOutput; - -- (void)setImageSize:(CGSize)newImageSize; - -- (void)lockFramebufferForReading; -- (void)unlockFramebufferAfterReading; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRawDataOutput.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRawDataOutput.m deleted file mode 100755 index 18101e2c..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageRawDataOutput.m +++ /dev/null @@ -1,307 +0,0 @@ -#import "GPUImageRawDataOutput.h" - -#import "GPUImageContext.h" -#import "GLProgram.h" -#import "GPUImageFilter.h" -#import "GPUImageMovieWriter.h" - -@interface GPUImageRawDataOutput () -{ - GPUImageFramebuffer *firstInputFramebuffer, *outputFramebuffer, *retainedFramebuffer; - - BOOL hasReadFromTheCurrentFrame; - - GLProgram *dataProgram; - GLint dataPositionAttribute, dataTextureCoordinateAttribute; - GLint dataInputTextureUniform; - - GLubyte *_rawBytesForImage; - - BOOL lockNextFramebuffer; -} - -// Frame rendering -- (void)renderAtInternalSize; - -@end - -@implementation GPUImageRawDataOutput - -@synthesize rawBytesForImage = _rawBytesForImage; -@synthesize newFrameAvailableBlock = _newFrameAvailableBlock; -@synthesize enabled; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithImageSize:(CGSize)newImageSize resultsInBGRAFormat:(BOOL)resultsInBGRAFormat; -{ - if (!(self = [super init])) - { - return nil; - } - - self.enabled = YES; - lockNextFramebuffer = NO; - outputBGRA = resultsInBGRAFormat; - imageSize = newImageSize; - hasReadFromTheCurrentFrame = NO; - _rawBytesForImage = NULL; - inputRotation = kGPUImageNoRotation; - - [GPUImageContext useImageProcessingContext]; - if ( (outputBGRA && ![GPUImageContext supportsFastTextureUpload]) || (!outputBGRA && [GPUImageContext supportsFastTextureUpload]) ) - { - dataProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:kGPUImageVertexShaderString fragmentShaderString:kGPUImageColorSwizzlingFragmentShaderString]; - } - else - { - dataProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:kGPUImageVertexShaderString fragmentShaderString:kGPUImagePassthroughFragmentShaderString]; - } - - if (!dataProgram.initialized) - { - [dataProgram addAttribute:@"position"]; - [dataProgram addAttribute:@"inputTextureCoordinate"]; - - if (![dataProgram link]) - { - NSString *progLog = [dataProgram programLog]; - NSLog(@"Program link log: %@", progLog); - NSString *fragLog = [dataProgram fragmentShaderLog]; - NSLog(@"Fragment shader compile log: %@", fragLog); - NSString *vertLog = [dataProgram vertexShaderLog]; - NSLog(@"Vertex shader compile log: %@", vertLog); - dataProgram = nil; - NSAssert(NO, @"Filter shader link failed"); - } - } - - dataPositionAttribute = [dataProgram attributeIndex:@"position"]; - dataTextureCoordinateAttribute = [dataProgram attributeIndex:@"inputTextureCoordinate"]; - dataInputTextureUniform = [dataProgram uniformIndex:@"inputImageTexture"]; - - return self; -} - -- (void)dealloc -{ - if (_rawBytesForImage != NULL && (![GPUImageContext supportsFastTextureUpload])) - { - free(_rawBytesForImage); - _rawBytesForImage = NULL; - } -} - -#pragma mark - -#pragma mark Data access - -- (void)renderAtInternalSize; -{ - [GPUImageContext setActiveShaderProgram:dataProgram]; - - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:imageSize onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - - if(lockNextFramebuffer) - { - retainedFramebuffer = outputFramebuffer; - [retainedFramebuffer lock]; - [retainedFramebuffer lockForReading]; - lockNextFramebuffer = NO; - } - - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - static const GLfloat squareVertices[] = { - -1.0f, -1.0f, - 1.0f, -1.0f, - -1.0f, 1.0f, - 1.0f, 1.0f, - }; - - static const GLfloat textureCoordinates[] = { - 0.0f, 0.0f, - 1.0f, 0.0f, - 0.0f, 1.0f, - 1.0f, 1.0f, - }; - - glActiveTexture(GL_TEXTURE4); - glBindTexture(GL_TEXTURE_2D, [firstInputFramebuffer texture]); - glUniform1i(dataInputTextureUniform, 4); - - glVertexAttribPointer(dataPositionAttribute, 2, GL_FLOAT, 0, 0, squareVertices); - glVertexAttribPointer(dataTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - - glEnableVertexAttribArray(dataPositionAttribute); - glEnableVertexAttribArray(dataTextureCoordinateAttribute); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - [firstInputFramebuffer unlock]; -} - -- (GPUByteColorVector)colorAtLocation:(CGPoint)locationInImage; -{ - GPUByteColorVector *imageColorBytes = (GPUByteColorVector *)self.rawBytesForImage; -// NSLog(@"Row start"); -// for (unsigned int currentXPosition = 0; currentXPosition < (imageSize.width * 2.0); currentXPosition++) -// { -// GPUByteColorVector byteAtPosition = imageColorBytes[currentXPosition]; -// NSLog(@"%d - %d, %d, %d", currentXPosition, byteAtPosition.red, byteAtPosition.green, byteAtPosition.blue); -// } -// NSLog(@"Row end"); - -// GPUByteColorVector byteAtOne = imageColorBytes[1]; -// GPUByteColorVector byteAtWidth = imageColorBytes[(int)imageSize.width - 3]; -// GPUByteColorVector byteAtHeight = imageColorBytes[(int)(imageSize.height - 1) * (int)imageSize.width]; -// NSLog(@"Byte 1: %d, %d, %d, byte 2: %d, %d, %d, byte 3: %d, %d, %d", byteAtOne.red, byteAtOne.green, byteAtOne.blue, byteAtWidth.red, byteAtWidth.green, byteAtWidth.blue, byteAtHeight.red, byteAtHeight.green, byteAtHeight.blue); - - CGPoint locationToPickFrom = CGPointZero; - locationToPickFrom.x = MIN(MAX(locationInImage.x, 0.0), (imageSize.width - 1.0)); - locationToPickFrom.y = MIN(MAX((imageSize.height - locationInImage.y), 0.0), (imageSize.height - 1.0)); - - if (outputBGRA) - { - GPUByteColorVector flippedColor = imageColorBytes[(int)(round((locationToPickFrom.y * imageSize.width) + locationToPickFrom.x))]; - GLubyte temporaryRed = flippedColor.red; - - flippedColor.red = flippedColor.blue; - flippedColor.blue = temporaryRed; - - return flippedColor; - } - else - { - return imageColorBytes[(int)(round((locationToPickFrom.y * imageSize.width) + locationToPickFrom.x))]; - } -} - -#pragma mark - -#pragma mark GPUImageInput protocol - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - hasReadFromTheCurrentFrame = NO; - - if (_newFrameAvailableBlock != NULL) - { - _newFrameAvailableBlock(); - } -} - -- (NSInteger)nextAvailableTextureIndex; -{ - return 0; -} - -- (void)setInputFramebuffer:(GPUImageFramebuffer *)newInputFramebuffer atIndex:(NSInteger)textureIndex; -{ - firstInputFramebuffer = newInputFramebuffer; - [firstInputFramebuffer lock]; -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - inputRotation = newInputRotation; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ -} - -- (CGSize)maximumOutputSize; -{ - return imageSize; -} - -- (void)endProcessing; -{ -} - -- (BOOL)shouldIgnoreUpdatesToThisTarget; -{ - return NO; -} - -- (BOOL)wantsMonochromeInput; -{ - return NO; -} - -- (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; -{ - -} - -#pragma mark - -#pragma mark Accessors - -- (GLubyte *)rawBytesForImage; -{ - if ( (_rawBytesForImage == NULL) && (![GPUImageContext supportsFastTextureUpload]) ) - { - _rawBytesForImage = (GLubyte *) calloc(imageSize.width * imageSize.height * 4, sizeof(GLubyte)); - hasReadFromTheCurrentFrame = NO; - } - - if (hasReadFromTheCurrentFrame) - { - return _rawBytesForImage; - } - else - { - runSynchronouslyOnVideoProcessingQueue(^{ - // Note: the fast texture caches speed up 640x480 frame reads from 9.6 ms to 3.1 ms on iPhone 4S - - [GPUImageContext useImageProcessingContext]; - [self renderAtInternalSize]; - - if ([GPUImageContext supportsFastTextureUpload]) - { - glFinish(); - _rawBytesForImage = [outputFramebuffer byteBuffer]; - } - else - { - glReadPixels(0, 0, imageSize.width, imageSize.height, GL_RGBA, GL_UNSIGNED_BYTE, _rawBytesForImage); - // GL_EXT_read_format_bgra - // glReadPixels(0, 0, imageSize.width, imageSize.height, GL_BGRA_EXT, GL_UNSIGNED_BYTE, _rawBytesForImage); - } - - hasReadFromTheCurrentFrame = YES; - - }); - - return _rawBytesForImage; - } -} - -- (NSUInteger)bytesPerRowInOutput; -{ - return [retainedFramebuffer bytesPerRow]; -} - -- (void)setImageSize:(CGSize)newImageSize { - imageSize = newImageSize; - if (_rawBytesForImage != NULL && (![GPUImageContext supportsFastTextureUpload])) - { - free(_rawBytesForImage); - _rawBytesForImage = NULL; - } -} - -- (void)lockFramebufferForReading; -{ - lockNextFramebuffer = YES; -} - -- (void)unlockFramebufferAfterReading; -{ - [retainedFramebuffer unlockAfterReading]; - [retainedFramebuffer unlock]; - retainedFramebuffer = nil; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSaturationBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSaturationBlendFilter.h deleted file mode 100644 index 767892a5..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSaturationBlendFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageSaturationBlendFilter : GPUImageTwoInputFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSaturationBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSaturationBlendFilter.m deleted file mode 100644 index da37f6aa..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSaturationBlendFilter.m +++ /dev/null @@ -1,213 +0,0 @@ -#import "GPUImageSaturationBlendFilter.h" - -/** - * Saturation blend mode based upon pseudo code from the PDF specification. - */ -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageSaturationBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - highp float lum(lowp vec3 c) { - return dot(c, vec3(0.3, 0.59, 0.11)); - } - - lowp vec3 clipcolor(lowp vec3 c) { - highp float l = lum(c); - lowp float n = min(min(c.r, c.g), c.b); - lowp float x = max(max(c.r, c.g), c.b); - - if (n < 0.0) { - c.r = l + ((c.r - l) * l) / (l - n); - c.g = l + ((c.g - l) * l) / (l - n); - c.b = l + ((c.b - l) * l) / (l - n); - } - if (x > 1.0) { - c.r = l + ((c.r - l) * (1.0 - l)) / (x - l); - c.g = l + ((c.g - l) * (1.0 - l)) / (x - l); - c.b = l + ((c.b - l) * (1.0 - l)) / (x - l); - } - - return c; - } - - lowp vec3 setlum(lowp vec3 c, highp float l) { - highp float d = l - lum(c); - c = c + vec3(d); - return clipcolor(c); - } - - highp float sat(lowp vec3 c) { - lowp float n = min(min(c.r, c.g), c.b); - lowp float x = max(max(c.r, c.g), c.b); - return x - n; - } - - lowp float mid(lowp float cmin, lowp float cmid, lowp float cmax, highp float s) { - return ((cmid - cmin) * s) / (cmax - cmin); - } - - lowp vec3 setsat(lowp vec3 c, highp float s) { - if (c.r > c.g) { - if (c.r > c.b) { - if (c.g > c.b) { - /* g is mid, b is min */ - c.g = mid(c.b, c.g, c.r, s); - c.b = 0.0; - } else { - /* b is mid, g is min */ - c.b = mid(c.g, c.b, c.r, s); - c.g = 0.0; - } - c.r = s; - } else { - /* b is max, r is mid, g is min */ - c.r = mid(c.g, c.r, c.b, s); - c.b = s; - c.r = 0.0; - } - } else if (c.r > c.b) { - /* g is max, r is mid, b is min */ - c.r = mid(c.b, c.r, c.g, s); - c.g = s; - c.b = 0.0; - } else if (c.g > c.b) { - /* g is max, b is mid, r is min */ - c.b = mid(c.r, c.b, c.g, s); - c.g = s; - c.r = 0.0; - } else if (c.b > c.g) { - /* b is max, g is mid, r is min */ - c.g = mid(c.r, c.g, c.b, s); - c.b = s; - c.r = 0.0; - } else { - c = vec3(0.0); - } - return c; - } - - void main() - { - highp vec4 baseColor = texture2D(inputImageTexture, textureCoordinate); - highp vec4 overlayColor = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(baseColor.rgb * (1.0 - overlayColor.a) + setlum(setsat(baseColor.rgb, sat(overlayColor.rgb)), lum(baseColor.rgb)) * overlayColor.a, baseColor.a); - } -); -#else -NSString *const kGPUImageSaturationBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - float lum(vec3 c) { - return dot(c, vec3(0.3, 0.59, 0.11)); - } - - vec3 clipcolor(vec3 c) { - float l = lum(c); - float n = min(min(c.r, c.g), c.b); - float x = max(max(c.r, c.g), c.b); - - if (n < 0.0) { - c.r = l + ((c.r - l) * l) / (l - n); - c.g = l + ((c.g - l) * l) / (l - n); - c.b = l + ((c.b - l) * l) / (l - n); - } - if (x > 1.0) { - c.r = l + ((c.r - l) * (1.0 - l)) / (x - l); - c.g = l + ((c.g - l) * (1.0 - l)) / (x - l); - c.b = l + ((c.b - l) * (1.0 - l)) / (x - l); - } - - return c; - } - - vec3 setlum(vec3 c, float l) { - float d = l - lum(c); - c = c + vec3(d); - return clipcolor(c); - } - - float sat(vec3 c) { - float n = min(min(c.r, c.g), c.b); - float x = max(max(c.r, c.g), c.b); - return x - n; - } - - float mid(float cmin, float cmid, float cmax, float s) { - return ((cmid - cmin) * s) / (cmax - cmin); - } - - vec3 setsat(vec3 c, float s) { - if (c.r > c.g) { - if (c.r > c.b) { - if (c.g > c.b) { - /* g is mid, b is min */ - c.g = mid(c.b, c.g, c.r, s); - c.b = 0.0; - } else { - /* b is mid, g is min */ - c.b = mid(c.g, c.b, c.r, s); - c.g = 0.0; - } - c.r = s; - } else { - /* b is max, r is mid, g is min */ - c.r = mid(c.g, c.r, c.b, s); - c.b = s; - c.r = 0.0; - } - } else if (c.r > c.b) { - /* g is max, r is mid, b is min */ - c.r = mid(c.b, c.r, c.g, s); - c.g = s; - c.b = 0.0; - } else if (c.g > c.b) { - /* g is max, b is mid, r is min */ - c.b = mid(c.r, c.b, c.g, s); - c.g = s; - c.r = 0.0; - } else if (c.b > c.g) { - /* b is max, g is mid, r is min */ - c.g = mid(c.r, c.g, c.b, s); - c.b = s; - c.r = 0.0; - } else { - c = vec3(0.0); - } - return c; - } - - void main() - { - vec4 baseColor = texture2D(inputImageTexture, textureCoordinate); - vec4 overlayColor = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(baseColor.rgb * (1.0 - overlayColor.a) + setlum(setsat(baseColor.rgb, sat(overlayColor.rgb)), lum(baseColor.rgb)) * overlayColor.a, baseColor.a); - } -); -#endif - - -@implementation GPUImageSaturationBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageSaturationBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSaturationFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSaturationFilter.h deleted file mode 100755 index 1c6ff5bd..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSaturationFilter.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "GPUImageFilter.h" - -/** Adjusts the saturation of an image - */ -@interface GPUImageSaturationFilter : GPUImageFilter -{ - GLint saturationUniform; -} - -/** Saturation ranges from 0.0 (fully desaturated) to 2.0 (max saturation), with 1.0 as the normal level - */ -@property(readwrite, nonatomic) CGFloat saturation; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSaturationFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSaturationFilter.m deleted file mode 100755 index fc373d4a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSaturationFilter.m +++ /dev/null @@ -1,78 +0,0 @@ -#import "GPUImageSaturationFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageSaturationFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform lowp float saturation; - - // Values from "Graphics Shaders: Theory and Practice" by Bailey and Cunningham - const mediump vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp float luminance = dot(textureColor.rgb, luminanceWeighting); - lowp vec3 greyScaleColor = vec3(luminance); - - gl_FragColor = vec4(mix(greyScaleColor, textureColor.rgb, saturation), textureColor.w); - - } -); -#else -NSString *const kGPUImageSaturationFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float saturation; - - // Values from "Graphics Shaders: Theory and Practice" by Bailey and Cunningham - const vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - float luminance = dot(textureColor.rgb, luminanceWeighting); - vec3 greyScaleColor = vec3(luminance); - - gl_FragColor = vec4(mix(greyScaleColor, textureColor.rgb, saturation), textureColor.w); - - } - ); -#endif - -@implementation GPUImageSaturationFilter - -@synthesize saturation = _saturation; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageSaturationFragmentShaderString])) - { - return nil; - } - - saturationUniform = [filterProgram uniformIndex:@"saturation"]; - self.saturation = 1.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setSaturation:(CGFloat)newValue; -{ - _saturation = newValue; - - [self setFloat:_saturation forUniform:saturationUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageScreenBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageScreenBlendFilter.h deleted file mode 100755 index 2df3abf3..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageScreenBlendFilter.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageScreenBlendFilter : GPUImageTwoInputFilter -{ -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageScreenBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageScreenBlendFilter.m deleted file mode 100755 index d871e7db..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageScreenBlendFilter.m +++ /dev/null @@ -1,52 +0,0 @@ -#import "GPUImageScreenBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageScreenBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - mediump vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - mediump vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - mediump vec4 whiteColor = vec4(1.0); - gl_FragColor = whiteColor - ((whiteColor - textureColor2) * (whiteColor - textureColor)); - } -); -#else -NSString *const kGPUImageScreenBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - vec4 whiteColor = vec4(1.0); - gl_FragColor = whiteColor - ((whiteColor - textureColor2) * (whiteColor - textureColor)); - } -); -#endif - -@implementation GPUImageScreenBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageScreenBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSepiaFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSepiaFilter.h deleted file mode 100755 index a45164fe..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSepiaFilter.h +++ /dev/null @@ -1,6 +0,0 @@ -#import "GPUImageColorMatrixFilter.h" - -/// Simple sepia tone filter -@interface GPUImageSepiaFilter : GPUImageColorMatrixFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSepiaFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSepiaFilter.m deleted file mode 100755 index 71668d63..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSepiaFilter.m +++ /dev/null @@ -1,24 +0,0 @@ -#import "GPUImageSepiaFilter.h" - -@implementation GPUImageSepiaFilter - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - self.intensity = 1.0; - self.colorMatrix = (GPUMatrix4x4){ - {0.3588, 0.7044, 0.1368, 0.0}, - {0.2990, 0.5870, 0.1140, 0.0}, - {0.2392, 0.4696, 0.0912 ,0.0}, - {0,0,0,1.0}, - }; - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSharpenFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSharpenFilter.h deleted file mode 100755 index 739df503..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSharpenFilter.h +++ /dev/null @@ -1,12 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageSharpenFilter : GPUImageFilter -{ - GLint sharpnessUniform; - GLint imageWidthFactorUniform, imageHeightFactorUniform; -} - -// Sharpness ranges from -4.0 to 4.0, with 0.0 as the normal level -@property(readwrite, nonatomic) CGFloat sharpness; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSharpenFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSharpenFilter.m deleted file mode 100755 index 6d7367a9..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSharpenFilter.m +++ /dev/null @@ -1,147 +0,0 @@ -#import "GPUImageSharpenFilter.h" - -NSString *const kGPUImageSharpenVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - - uniform float imageWidthFactor; - uniform float imageHeightFactor; - uniform float sharpness; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - varying vec2 topTextureCoordinate; - varying vec2 bottomTextureCoordinate; - - varying float centerMultiplier; - varying float edgeMultiplier; - - void main() - { - gl_Position = position; - - vec2 widthStep = vec2(imageWidthFactor, 0.0); - vec2 heightStep = vec2(0.0, imageHeightFactor); - - textureCoordinate = inputTextureCoordinate.xy; - leftTextureCoordinate = inputTextureCoordinate.xy - widthStep; - rightTextureCoordinate = inputTextureCoordinate.xy + widthStep; - topTextureCoordinate = inputTextureCoordinate.xy + heightStep; - bottomTextureCoordinate = inputTextureCoordinate.xy - heightStep; - - centerMultiplier = 1.0 + 4.0 * sharpness; - edgeMultiplier = sharpness; - } -); - - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageSharpenFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying highp vec2 textureCoordinate; - varying highp vec2 leftTextureCoordinate; - varying highp vec2 rightTextureCoordinate; - varying highp vec2 topTextureCoordinate; - varying highp vec2 bottomTextureCoordinate; - - varying highp float centerMultiplier; - varying highp float edgeMultiplier; - - uniform sampler2D inputImageTexture; - - void main() - { - mediump vec3 textureColor = texture2D(inputImageTexture, textureCoordinate).rgb; - mediump vec3 leftTextureColor = texture2D(inputImageTexture, leftTextureCoordinate).rgb; - mediump vec3 rightTextureColor = texture2D(inputImageTexture, rightTextureCoordinate).rgb; - mediump vec3 topTextureColor = texture2D(inputImageTexture, topTextureCoordinate).rgb; - mediump vec3 bottomTextureColor = texture2D(inputImageTexture, bottomTextureCoordinate).rgb; - - gl_FragColor = vec4((textureColor * centerMultiplier - (leftTextureColor * edgeMultiplier + rightTextureColor * edgeMultiplier + topTextureColor * edgeMultiplier + bottomTextureColor * edgeMultiplier)), texture2D(inputImageTexture, bottomTextureCoordinate).w); - } -); -#else -NSString *const kGPUImageSharpenFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - varying vec2 topTextureCoordinate; - varying vec2 bottomTextureCoordinate; - - varying float centerMultiplier; - varying float edgeMultiplier; - - uniform sampler2D inputImageTexture; - - void main() - { - vec3 textureColor = texture2D(inputImageTexture, textureCoordinate).rgb; - vec3 leftTextureColor = texture2D(inputImageTexture, leftTextureCoordinate).rgb; - vec3 rightTextureColor = texture2D(inputImageTexture, rightTextureCoordinate).rgb; - vec3 topTextureColor = texture2D(inputImageTexture, topTextureCoordinate).rgb; - vec3 bottomTextureColor = texture2D(inputImageTexture, bottomTextureCoordinate).rgb; - - gl_FragColor = vec4((textureColor * centerMultiplier - (leftTextureColor * edgeMultiplier + rightTextureColor * edgeMultiplier + topTextureColor * edgeMultiplier + bottomTextureColor * edgeMultiplier)), texture2D(inputImageTexture, bottomTextureCoordinate).w); - } -); -#endif - - -@implementation GPUImageSharpenFilter - -@synthesize sharpness = _sharpness; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithVertexShaderFromString:kGPUImageSharpenVertexShaderString fragmentShaderFromString:kGPUImageSharpenFragmentShaderString])) - { - return nil; - } - - sharpnessUniform = [filterProgram uniformIndex:@"sharpness"]; - self.sharpness = 0.0; - - imageWidthFactorUniform = [filterProgram uniformIndex:@"imageWidthFactor"]; - imageHeightFactorUniform = [filterProgram uniformIndex:@"imageHeightFactor"]; - - return self; -} - -- (void)setupFilterForSize:(CGSize)filterFrameSize; -{ - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:filterProgram]; - - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - glUniform1f(imageWidthFactorUniform, 1.0 / filterFrameSize.height); - glUniform1f(imageHeightFactorUniform, 1.0 / filterFrameSize.width); - } - else - { - glUniform1f(imageWidthFactorUniform, 1.0 / filterFrameSize.width); - glUniform1f(imageHeightFactorUniform, 1.0 / filterFrameSize.height); - } - }); -} - -#pragma mark - -#pragma mark Accessors - -- (void)setSharpness:(CGFloat)newValue; -{ - _sharpness = newValue; - - [self setFloat:_sharpness forUniform:sharpnessUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageShiTomasiFeatureDetectionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageShiTomasiFeatureDetectionFilter.h deleted file mode 100644 index b16ebc01..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageShiTomasiFeatureDetectionFilter.h +++ /dev/null @@ -1,13 +0,0 @@ -#import "GPUImageHarrisCornerDetectionFilter.h" - -/** Shi-Tomasi feature detector - - This is the Shi-Tomasi feature detector, as described in - J. Shi and C. Tomasi. Good features to track. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 593-600, June 1994. - */ - -@interface GPUImageShiTomasiFeatureDetectionFilter : GPUImageHarrisCornerDetectionFilter - -// Compared to the Harris corner detector, the default sensitivity value for this detector is set to 1.5 - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageShiTomasiFeatureDetectionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageShiTomasiFeatureDetectionFilter.m deleted file mode 100644 index e58cbb4f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageShiTomasiFeatureDetectionFilter.m +++ /dev/null @@ -1,65 +0,0 @@ -#import "GPUImageShiTomasiFeatureDetectionFilter.h" - -@implementation GPUImageShiTomasiFeatureDetectionFilter - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageShiTomasiCornerDetectionFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform lowp float sensitivity; - - void main() - { - mediump vec3 derivativeElements = texture2D(inputImageTexture, textureCoordinate).rgb; - - mediump float derivativeDifference = derivativeElements.x - derivativeElements.y; - mediump float zElement = (derivativeElements.z * 2.0) - 1.0; - - // R = Ix^2 + Iy^2 - sqrt( (Ix^2 - Iy^2)^2 + 4 * Ixy * Ixy) - mediump float cornerness = derivativeElements.x + derivativeElements.y - sqrt(derivativeDifference * derivativeDifference + 4.0 * zElement * zElement); - - gl_FragColor = vec4(vec3(cornerness * sensitivity), 1.0); - } -); -#else -NSString *const kGPUImageShiTomasiCornerDetectionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float sensitivity; - - void main() - { - vec3 derivativeElements = texture2D(inputImageTexture, textureCoordinate).rgb; - - float derivativeDifference = derivativeElements.x - derivativeElements.y; - float zElement = (derivativeElements.z * 2.0) - 1.0; - - // R = Ix^2 + Iy^2 - sqrt( (Ix^2 - Iy^2)^2 + 4 * Ixy * Ixy) - float cornerness = derivativeElements.x + derivativeElements.y - sqrt(derivativeDifference * derivativeDifference + 4.0 * zElement * zElement); - - gl_FragColor = vec4(vec3(cornerness * sensitivity), 1.0); - } -); -#endif - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithCornerDetectionFragmentShader:kGPUImageShiTomasiCornerDetectionFragmentShaderString])) - { - return nil; - } - - self.sensitivity = 1.5; - - return self; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSingleComponentGaussianBlurFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSingleComponentGaussianBlurFilter.h deleted file mode 100644 index 934b1e3a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSingleComponentGaussianBlurFilter.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "GPUImageGaussianBlurFilter.h" - -// This filter merely performs the standard Gaussian blur on the red color channel (assuming a luminance image) - -@interface GPUImageSingleComponentGaussianBlurFilter : GPUImageGaussianBlurFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSingleComponentGaussianBlurFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSingleComponentGaussianBlurFilter.m deleted file mode 100644 index 4ff0d91d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSingleComponentGaussianBlurFilter.m +++ /dev/null @@ -1,189 +0,0 @@ -#import "GPUImageSingleComponentGaussianBlurFilter.h" - -@implementation GPUImageSingleComponentGaussianBlurFilter - -+ (NSString *)vertexShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; -{ - if (blurRadius < 1) - { - return kGPUImageVertexShaderString; - } - - // First, generate the normal Gaussian weights for a given sigma - GLfloat *standardGaussianWeights = calloc(blurRadius + 1, sizeof(GLfloat)); - GLfloat sumOfWeights = 0.0; - for (NSUInteger currentGaussianWeightIndex = 0; currentGaussianWeightIndex < blurRadius + 1; currentGaussianWeightIndex++) - { - standardGaussianWeights[currentGaussianWeightIndex] = (1.0 / sqrt(2.0 * M_PI * pow(sigma, 2.0))) * exp(-pow(currentGaussianWeightIndex, 2.0) / (2.0 * pow(sigma, 2.0))); - - if (currentGaussianWeightIndex == 0) - { - sumOfWeights += standardGaussianWeights[currentGaussianWeightIndex]; - } - else - { - sumOfWeights += 2.0 * standardGaussianWeights[currentGaussianWeightIndex]; - } - } - - // Next, normalize these weights to prevent the clipping of the Gaussian curve at the end of the discrete samples from reducing luminance - for (NSUInteger currentGaussianWeightIndex = 0; currentGaussianWeightIndex < blurRadius + 1; currentGaussianWeightIndex++) - { - standardGaussianWeights[currentGaussianWeightIndex] = standardGaussianWeights[currentGaussianWeightIndex] / sumOfWeights; - } - - // From these weights we calculate the offsets to read interpolated values from - NSUInteger numberOfOptimizedOffsets = MIN(blurRadius / 2 + (blurRadius % 2), 7); - GLfloat *optimizedGaussianOffsets = calloc(numberOfOptimizedOffsets, sizeof(GLfloat)); - - for (NSUInteger currentOptimizedOffset = 0; currentOptimizedOffset < numberOfOptimizedOffsets; currentOptimizedOffset++) - { - GLfloat firstWeight = standardGaussianWeights[currentOptimizedOffset*2 + 1]; - GLfloat secondWeight = standardGaussianWeights[currentOptimizedOffset*2 + 2]; - - GLfloat optimizedWeight = firstWeight + secondWeight; - - optimizedGaussianOffsets[currentOptimizedOffset] = (firstWeight * (currentOptimizedOffset*2 + 1) + secondWeight * (currentOptimizedOffset*2 + 2)) / optimizedWeight; - } - - NSMutableString *shaderString = [[NSMutableString alloc] init]; - // Header - [shaderString appendFormat:@"\ - attribute vec4 position;\n\ - attribute vec4 inputTextureCoordinate;\n\ - \n\ - uniform float texelWidthOffset;\n\ - uniform float texelHeightOffset;\n\ - \n\ - varying vec2 blurCoordinates[%lu];\n\ - \n\ - void main()\n\ - {\n\ - gl_Position = position;\n\ - \n\ - vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset);\n", (unsigned long)(1 + (numberOfOptimizedOffsets * 2))]; - - // Inner offset loop - [shaderString appendString:@"blurCoordinates[0] = inputTextureCoordinate.xy;\n"]; - for (NSUInteger currentOptimizedOffset = 0; currentOptimizedOffset < numberOfOptimizedOffsets; currentOptimizedOffset++) - { - [shaderString appendFormat:@"\ - blurCoordinates[%lu] = inputTextureCoordinate.xy + singleStepOffset * %f;\n\ - blurCoordinates[%lu] = inputTextureCoordinate.xy - singleStepOffset * %f;\n", (unsigned long)((currentOptimizedOffset * 2) + 1), optimizedGaussianOffsets[currentOptimizedOffset], (unsigned long)((currentOptimizedOffset * 2) + 2), optimizedGaussianOffsets[currentOptimizedOffset]]; - } - - // Footer - [shaderString appendString:@"}\n"]; - - free(optimizedGaussianOffsets); - free(standardGaussianWeights); - return shaderString; -} - -+ (NSString *)fragmentShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma; -{ - if (blurRadius < 1) - { - return kGPUImagePassthroughFragmentShaderString; - } - - // First, generate the normal Gaussian weights for a given sigma - GLfloat *standardGaussianWeights = calloc(blurRadius + 1, sizeof(GLfloat)); - GLfloat sumOfWeights = 0.0; - for (NSUInteger currentGaussianWeightIndex = 0; currentGaussianWeightIndex < blurRadius + 1; currentGaussianWeightIndex++) - { - standardGaussianWeights[currentGaussianWeightIndex] = (1.0 / sqrt(2.0 * M_PI * pow(sigma, 2.0))) * exp(-pow(currentGaussianWeightIndex, 2.0) / (2.0 * pow(sigma, 2.0))); - - if (currentGaussianWeightIndex == 0) - { - sumOfWeights += standardGaussianWeights[currentGaussianWeightIndex]; - } - else - { - sumOfWeights += 2.0 * standardGaussianWeights[currentGaussianWeightIndex]; - } - } - - // Next, normalize these weights to prevent the clipping of the Gaussian curve at the end of the discrete samples from reducing luminance - for (NSUInteger currentGaussianWeightIndex = 0; currentGaussianWeightIndex < blurRadius + 1; currentGaussianWeightIndex++) - { - standardGaussianWeights[currentGaussianWeightIndex] = standardGaussianWeights[currentGaussianWeightIndex] / sumOfWeights; - } - - // From these weights we calculate the offsets to read interpolated values from - NSUInteger numberOfOptimizedOffsets = MIN(blurRadius / 2 + (blurRadius % 2), 7); - NSUInteger trueNumberOfOptimizedOffsets = blurRadius / 2 + (blurRadius % 2); - - NSMutableString *shaderString = [[NSMutableString alloc] init]; - - // Header -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - [shaderString appendFormat:@"\ - uniform sampler2D inputImageTexture;\n\ - uniform highp float texelWidthOffset;\n\ - uniform highp float texelHeightOffset;\n\ - \n\ - varying highp vec2 blurCoordinates[%lu];\n\ - \n\ - void main()\n\ - {\n\ - lowp float sum = 0.0;\n", (unsigned long)(1 + (numberOfOptimizedOffsets * 2)) ]; -#else - [shaderString appendFormat:@"\ - uniform sampler2D inputImageTexture;\n\ - uniform float texelWidthOffset;\n\ - uniform float texelHeightOffset;\n\ - \n\ - varying vec2 blurCoordinates[%lu];\n\ - \n\ - void main()\n\ - {\n\ - float sum = 0.0;\n", 1 + (numberOfOptimizedOffsets * 2) ]; -#endif - - // Inner texture loop - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[0]).r * %f;\n", standardGaussianWeights[0]]; - - for (NSUInteger currentBlurCoordinateIndex = 0; currentBlurCoordinateIndex < numberOfOptimizedOffsets; currentBlurCoordinateIndex++) - { - GLfloat firstWeight = standardGaussianWeights[currentBlurCoordinateIndex * 2 + 1]; - GLfloat secondWeight = standardGaussianWeights[currentBlurCoordinateIndex * 2 + 2]; - GLfloat optimizedWeight = firstWeight + secondWeight; - - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[%lu]).r * %f;\n", (unsigned long)((currentBlurCoordinateIndex * 2) + 1), optimizedWeight]; - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[%lu]).r * %f;\n", (unsigned long)((currentBlurCoordinateIndex * 2) + 2), optimizedWeight]; - } - - // If the number of required samples exceeds the amount we can pass in via varyings, we have to do dependent texture reads in the fragment shader - if (trueNumberOfOptimizedOffsets > numberOfOptimizedOffsets) - { -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - [shaderString appendString:@"highp vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset);\n"]; -#else - [shaderString appendString:@"highp vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset);\n"]; -#endif - - for (NSUInteger currentOverlowTextureRead = numberOfOptimizedOffsets; currentOverlowTextureRead < trueNumberOfOptimizedOffsets; currentOverlowTextureRead++) - { - GLfloat firstWeight = standardGaussianWeights[currentOverlowTextureRead * 2 + 1]; - GLfloat secondWeight = standardGaussianWeights[currentOverlowTextureRead * 2 + 2]; - - GLfloat optimizedWeight = firstWeight + secondWeight; - GLfloat optimizedOffset = (firstWeight * (currentOverlowTextureRead * 2 + 1) + secondWeight * (currentOverlowTextureRead * 2 + 2)) / optimizedWeight; - - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[0] + singleStepOffset * %f).r * %f;\n", optimizedOffset, optimizedWeight]; - [shaderString appendFormat:@"sum += texture2D(inputImageTexture, blurCoordinates[0] - singleStepOffset * %f).r * %f;\n", optimizedOffset, optimizedWeight]; - } - } - - // Footer - [shaderString appendString:@"\ - gl_FragColor = vec4(sum, sum, sum, 1.0);\n\ - }\n"]; - - free(standardGaussianWeights); - return shaderString; -} - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSketchFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSketchFilter.h deleted file mode 100755 index 598145ae..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSketchFilter.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "GPUImageSobelEdgeDetectionFilter.h" - -/** Converts video to look like a sketch. - - This is just the Sobel edge detection filter with the colors inverted. - */ -@interface GPUImageSketchFilter : GPUImageSobelEdgeDetectionFilter -{ -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSketchFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSketchFilter.m deleted file mode 100755 index 3cda2203..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSketchFilter.m +++ /dev/null @@ -1,98 +0,0 @@ -#import "GPUImageSketchFilter.h" - -@implementation GPUImageSketchFilter - -// Invert the colorspace for a sketch -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageSketchFragmentShaderString = SHADER_STRING -( - precision mediump float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform float edgeStrength; - - uniform sampler2D inputImageTexture; - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float h = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity; - float v = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity; - - float mag = 1.0 - (length(vec2(h, v)) * edgeStrength); - - gl_FragColor = vec4(vec3(mag), 1.0); - } -); -#else -NSString *const kGPUImageSketchFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform float edgeStrength; - - uniform sampler2D inputImageTexture; - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float h = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity; - float v = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity; - - float mag = 1.0 - (length(vec2(h, v)) * edgeStrength); - - gl_FragColor = vec4(vec3(mag), 1.0); - } -); -#endif - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImageSketchFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSmoothToonFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSmoothToonFilter.h deleted file mode 100755 index f89caac5..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSmoothToonFilter.h +++ /dev/null @@ -1,28 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImageGaussianBlurFilter; -@class GPUImageToonFilter; - -/** This uses a similar process as the GPUImageToonFilter, only it precedes the toon effect with a Gaussian blur to smooth out noise. - */ -@interface GPUImageSmoothToonFilter : GPUImageFilterGroup -{ - GPUImageGaussianBlurFilter *blurFilter; - GPUImageToonFilter *toonFilter; -} - -/// The image width and height factors tweak the appearance of the edges. By default, they match the filter size in pixels -@property(readwrite, nonatomic) CGFloat texelWidth; -/// The image width and height factors tweak the appearance of the edges. By default, they match the filter size in pixels -@property(readwrite, nonatomic) CGFloat texelHeight; - -/// The radius of the underlying Gaussian blur. The default is 2.0. -@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; - -/// The threshold at which to apply the edges, default of 0.2 -@property(readwrite, nonatomic) CGFloat threshold; - -/// The levels of quantization for the posterization of colors within the scene, with a default of 10.0 -@property(readwrite, nonatomic) CGFloat quantizationLevels; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSmoothToonFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSmoothToonFilter.m deleted file mode 100755 index 03828f48..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSmoothToonFilter.m +++ /dev/null @@ -1,94 +0,0 @@ -#import "GPUImageSmoothToonFilter.h" -#import "GPUImageGaussianBlurFilter.h" -#import "GPUImageToonFilter.h" - -@implementation GPUImageSmoothToonFilter - -@synthesize threshold; -@synthesize blurRadiusInPixels; -@synthesize quantizationLevels; -@synthesize texelWidth; -@synthesize texelHeight; - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - // First pass: apply a variable Gaussian blur - blurFilter = [[GPUImageGaussianBlurFilter alloc] init]; - [self addFilter:blurFilter]; - - // Second pass: run the Sobel edge detection on this blurred image, along with a posterization effect - toonFilter = [[GPUImageToonFilter alloc] init]; - [self addFilter:toonFilter]; - - // Texture location 0 needs to be the sharp image for both the blur and the second stage processing - [blurFilter addTarget:toonFilter]; - - self.initialFilters = [NSArray arrayWithObject:blurFilter]; - self.terminalFilter = toonFilter; - - self.blurRadiusInPixels = 2.0; - self.threshold = 0.2; - self.quantizationLevels = 10.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setBlurRadiusInPixels:(CGFloat)newValue; -{ - blurFilter.blurRadiusInPixels = newValue; -} - -- (CGFloat)blurRadiusInPixels; -{ - return blurFilter.blurRadiusInPixels; -} - -- (void)setTexelWidth:(CGFloat)newValue; -{ - toonFilter.texelWidth = newValue; -} - -- (CGFloat)texelWidth; -{ - return toonFilter.texelWidth; -} - -- (void)setTexelHeight:(CGFloat)newValue; -{ - toonFilter.texelHeight = newValue; -} - -- (CGFloat)texelHeight; -{ - return toonFilter.texelHeight; -} - -- (void)setThreshold:(CGFloat)newValue; -{ - toonFilter.threshold = newValue; -} - -- (CGFloat)threshold; -{ - return toonFilter.threshold; -} - -- (void)setQuantizationLevels:(CGFloat)newValue; -{ - toonFilter.quantizationLevels = newValue; -} - -- (CGFloat)quantizationLevels; -{ - return toonFilter.quantizationLevels; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSobelEdgeDetectionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSobelEdgeDetectionFilter.h deleted file mode 100755 index d6b2c13a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSobelEdgeDetectionFilter.h +++ /dev/null @@ -1,16 +0,0 @@ -#import "GPUImageTwoPassFilter.h" - -@interface GPUImageSobelEdgeDetectionFilter : GPUImageTwoPassFilter -{ - GLint texelWidthUniform, texelHeightUniform, edgeStrengthUniform; - BOOL hasOverriddenImageSizeFactor; -} - -// The texel width and height factors tweak the appearance of the edges. By default, they match the inverse of the filter size in pixels -@property(readwrite, nonatomic) CGFloat texelWidth; -@property(readwrite, nonatomic) CGFloat texelHeight; - -// The filter strength property affects the dynamic range of the filter. High values can make edges more visible, but can lead to saturation. Default of 1.0. -@property(readwrite, nonatomic) CGFloat edgeStrength; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSobelEdgeDetectionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSobelEdgeDetectionFilter.m deleted file mode 100755 index e193f027..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSobelEdgeDetectionFilter.m +++ /dev/null @@ -1,188 +0,0 @@ -#import "GPUImageSobelEdgeDetectionFilter.h" -#import "GPUImageGrayscaleFilter.h" -#import "GPUImage3x3ConvolutionFilter.h" - -// Code from "Graphics Shaders: Theory and Practice" by M. Bailey and S. Cunningham -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageSobelEdgeDetectionFragmentShaderString = SHADER_STRING -( - precision mediump float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float edgeStrength; - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float h = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity; - float v = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity; - - float mag = length(vec2(h, v)) * edgeStrength; - - gl_FragColor = vec4(vec3(mag), 1.0); - } -); -#else -NSString *const kGPUImageSobelEdgeDetectionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float edgeStrength; - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float h = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity; - float v = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity; - - float mag = length(vec2(h, v)) * edgeStrength; - - gl_FragColor = vec4(vec3(mag), 1.0); - } -); -#endif - -@implementation GPUImageSobelEdgeDetectionFilter - -@synthesize texelWidth = _texelWidth; -@synthesize texelHeight = _texelHeight; -@synthesize edgeStrength = _edgeStrength; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImageSobelEdgeDetectionFragmentShaderString])) - { - return nil; - } - - return self; -} - -- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; -{ - // Do a luminance pass first to reduce the calculations performed at each fragment in the edge detection phase - - if (!(self = [super initWithFirstStageVertexShaderFromString:kGPUImageVertexShaderString firstStageFragmentShaderFromString:kGPUImageLuminanceFragmentShaderString secondStageVertexShaderFromString:kGPUImageNearbyTexelSamplingVertexShaderString secondStageFragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - hasOverriddenImageSizeFactor = NO; - - texelWidthUniform = [secondFilterProgram uniformIndex:@"texelWidth"]; - texelHeightUniform = [secondFilterProgram uniformIndex:@"texelHeight"]; - edgeStrengthUniform = [secondFilterProgram uniformIndex:@"edgeStrength"]; - - self.edgeStrength = 1.0; - return self; -} - -- (void)setupFilterForSize:(CGSize)filterFrameSize; -{ - if (!hasOverriddenImageSizeFactor) - { - _texelWidth = 1.0 / filterFrameSize.width; - _texelHeight = 1.0 / filterFrameSize.height; - - runSynchronouslyOnVideoProcessingQueue(^{ - GLProgram *previousProgram = [GPUImageContext sharedImageProcessingContext].currentShaderProgram; - [GPUImageContext setActiveShaderProgram:secondFilterProgram]; - glUniform1f(texelWidthUniform, _texelWidth); - glUniform1f(texelHeightUniform, _texelHeight); - [GPUImageContext setActiveShaderProgram:previousProgram]; - }); - } -} - -- (void)setUniformsForProgramAtIndex:(NSUInteger)programIndex; -{ - [super setUniformsForProgramAtIndex:programIndex]; - - if (programIndex == 1) - { - glUniform1f(texelWidthUniform, _texelWidth); - glUniform1f(texelHeightUniform, _texelHeight); - } -} - -- (BOOL)wantsMonochromeInput; -{ -// return YES; - return NO; -} - -- (BOOL)providesMonochromeOutput; -{ -// return YES; - return NO; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setTexelWidth:(CGFloat)newValue; -{ - hasOverriddenImageSizeFactor = YES; - _texelWidth = newValue; - - [self setFloat:_texelWidth forUniform:texelWidthUniform program:secondFilterProgram]; -} - -- (void)setTexelHeight:(CGFloat)newValue; -{ - hasOverriddenImageSizeFactor = YES; - _texelHeight = newValue; - - [self setFloat:_texelHeight forUniform:texelHeightUniform program:secondFilterProgram]; -} - -- (void)setEdgeStrength:(CGFloat)newValue; -{ - _edgeStrength = newValue; - - [self setFloat:_edgeStrength forUniform:edgeStrengthUniform program:secondFilterProgram]; -} - - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSoftEleganceFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSoftEleganceFilter.h deleted file mode 100755 index 596e1567..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSoftEleganceFilter.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImagePicture; - -/** A photo filter based on Soft Elegance Photoshop action - http://h-d-stock.deviantart.com/art/H-D-A-soft-elegance-70107603 - */ - -// Note: If you want to use this effect you have to add -// lookup_soft_elegance_1.png and lookup_soft_elegance_2.png -// from Resources folder to your application bundle. - -@interface GPUImageSoftEleganceFilter : GPUImageFilterGroup -{ - GPUImagePicture *lookupImageSource1; - GPUImagePicture *lookupImageSource2; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSoftEleganceFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSoftEleganceFilter.m deleted file mode 100755 index e1d4e02d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSoftEleganceFilter.m +++ /dev/null @@ -1,62 +0,0 @@ -#import "GPUImageSoftEleganceFilter.h" -#import "GPUImagePicture.h" -#import "GPUImageLookupFilter.h" -#import "GPUImageGaussianBlurFilter.h" -#import "GPUImageAlphaBlendFilter.h" - -@implementation GPUImageSoftEleganceFilter - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - UIImage *image1 = [UIImage imageNamed:@"lookup_soft_elegance_1.png"]; - UIImage *image2 = [UIImage imageNamed:@"lookup_soft_elegance_2.png"]; -#else - NSImage *image1 = [NSImage imageNamed:@"lookup_soft_elegance_1.png"]; - NSImage *image2 = [NSImage imageNamed:@"lookup_soft_elegance_2.png"]; -#endif - - NSAssert(image1 && image2, - @"To use GPUImageSoftEleganceFilter you need to add lookup_soft_elegance_1.png and lookup_soft_elegance_2.png from GPUImage/framework/Resources to your application bundle."); - - lookupImageSource1 = [[GPUImagePicture alloc] initWithImage:image1]; - GPUImageLookupFilter *lookupFilter1 = [[GPUImageLookupFilter alloc] init]; - [self addFilter:lookupFilter1]; - - [lookupImageSource1 addTarget:lookupFilter1 atTextureLocation:1]; - [lookupImageSource1 processImage]; - - GPUImageGaussianBlurFilter *gaussianBlur = [[GPUImageGaussianBlurFilter alloc] init]; - gaussianBlur.blurRadiusInPixels = 10.0; - [lookupFilter1 addTarget:gaussianBlur]; - [self addFilter:gaussianBlur]; - - GPUImageAlphaBlendFilter *alphaBlend = [[GPUImageAlphaBlendFilter alloc] init]; - alphaBlend.mix = 0.14; - [lookupFilter1 addTarget:alphaBlend]; - [gaussianBlur addTarget:alphaBlend]; - [self addFilter:alphaBlend]; - - lookupImageSource2 = [[GPUImagePicture alloc] initWithImage:image2]; - - GPUImageLookupFilter *lookupFilter2 = [[GPUImageLookupFilter alloc] init]; - [alphaBlend addTarget:lookupFilter2]; - [lookupImageSource2 addTarget:lookupFilter2]; - [lookupImageSource2 processImage]; - [self addFilter:lookupFilter2]; - - self.initialFilters = [NSArray arrayWithObjects:lookupFilter1, nil]; - self.terminalFilter = lookupFilter2; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSoftLightBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSoftLightBlendFilter.h deleted file mode 100755 index 13fc877c..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSoftLightBlendFilter.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageSoftLightBlendFilter : GPUImageTwoInputFilter -{ -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSoftLightBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSoftLightBlendFilter.m deleted file mode 100755 index 368bce0a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSoftLightBlendFilter.m +++ /dev/null @@ -1,54 +0,0 @@ -#import "GPUImageSoftLightBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageSoftLightBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - mediump vec4 base = texture2D(inputImageTexture, textureCoordinate); - mediump vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - lowp float alphaDivisor = base.a + step(base.a, 0.0); // Protect against a divide-by-zero blacking out things in the output - gl_FragColor = base * (overlay.a * (base / alphaDivisor) + (2.0 * overlay * (1.0 - (base / alphaDivisor)))) + overlay * (1.0 - base.a) + base * (1.0 - overlay.a); - } -); -#else -NSString *const kGPUImageSoftLightBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 base = texture2D(inputImageTexture, textureCoordinate); - vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); - - float alphaDivisor = base.a + step(base.a, 0.0); // Protect against a divide-by-zero blacking out things in the output - gl_FragColor = base * (overlay.a * (base / alphaDivisor) + (2.0 * overlay * (1.0 - (base / alphaDivisor)))) + overlay * (1.0 - base.a) + base * (1.0 - overlay.a); - } -); -#endif - -@implementation GPUImageSoftLightBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageSoftLightBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSolidColorGenerator.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSolidColorGenerator.h deleted file mode 100644 index 58b1383e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSolidColorGenerator.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "GPUImageFilter.h" - -// This outputs an image with a constant color. You need to use -forceProcessingAtSize: in order to set the output image -// dimensions, or this won't work correctly - - -@interface GPUImageSolidColorGenerator : GPUImageFilter -{ - GLint colorUniform; - GLint useExistingAlphaUniform; -} - -// This color dictates what the output image will be filled with -@property(readwrite, nonatomic) GPUVector4 color; -@property(readwrite, nonatomic, assign) BOOL useExistingAlpha; // whether to use the alpha of the existing image or not, default is NO - -- (void)setColorRed:(CGFloat)redComponent green:(CGFloat)greenComponent blue:(CGFloat)blueComponent alpha:(CGFloat)alphaComponent; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSolidColorGenerator.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSolidColorGenerator.m deleted file mode 100644 index 9b555ce0..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSolidColorGenerator.m +++ /dev/null @@ -1,123 +0,0 @@ -#import "GPUImageSolidColorGenerator.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUSolidColorFragmentShaderString = SHADER_STRING -( - precision lowp float; - - varying highp vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform vec4 color; - uniform float useExistingAlpha; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - gl_FragColor = vec4(color.rgb, max(textureColor.a, 1.0 - useExistingAlpha)); - } - ); -#else -NSString *const kGPUSolidColorFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - uniform sampler2D inputImageTexture; - uniform vec4 color; - uniform float useExistingAlpha; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - gl_FragColor = vec4(color.rgb, max(textureColor.a, 1.0 - useExistingAlpha)); - } - ); -#endif - -@implementation GPUImageSolidColorGenerator - -@synthesize color = _color; - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUSolidColorFragmentShaderString])) - { - return nil; - } - - colorUniform = [filterProgram uniformIndex:@"color"]; - useExistingAlphaUniform = [filterProgram uniformIndex:@"useExistingAlpha"]; - - _color = (GPUVector4){0.0f, 0.0f, 0.5f, 1.0f}; - self.useExistingAlpha = NO; - - return self; -} - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - if (self.preventRendering) - { - return; - } - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:filterProgram]; - - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - - glClearColor(_color.one, _color.two, _color.three, _color.four); - glClear(GL_COLOR_BUFFER_BIT); - }); -} - - -#pragma mark - -#pragma mark Accessors - -- (void)forceProcessingAtSize:(CGSize)frameSize; -{ - [super forceProcessingAtSize:frameSize]; - - if (!CGSizeEqualToSize(inputTextureSize, CGSizeZero)) - { - [self newFrameReadyAtTime:kCMTimeIndefinite atIndex:0]; - } -} - -- (void)addTarget:(id)newTarget atTextureLocation:(NSInteger)textureLocation; -{ - [super addTarget:newTarget atTextureLocation:textureLocation]; - - if (!CGSizeEqualToSize(inputTextureSize, CGSizeZero)) - { - [newTarget setInputSize:inputTextureSize atIndex:textureLocation]; - [newTarget newFrameReadyAtTime:kCMTimeIndefinite atIndex:textureLocation]; - } -} - -- (void)setColor:(GPUVector4)newValue; -{ - [self setColorRed:newValue.one green:newValue.two blue:newValue.three alpha:newValue.four]; -} - -- (void)setColorRed:(CGFloat)redComponent green:(CGFloat)greenComponent blue:(CGFloat)blueComponent alpha:(CGFloat)alphaComponent; -{ - _color.one = (GLfloat)redComponent; - _color.two = (GLfloat)greenComponent; - _color.three = (GLfloat)blueComponent; - _color.four = (GLfloat)alphaComponent; - -// [self setVec4:_color forUniform:colorUniform program:filterProgram]; - runAsynchronouslyOnVideoProcessingQueue(^{ - [self newFrameReadyAtTime:kCMTimeIndefinite atIndex:0]; - }); -} - -- (void)setUseExistingAlpha:(BOOL)useExistingAlpha; -{ - _useExistingAlpha = useExistingAlpha; - - [self setInteger:(useExistingAlpha ? 1 : 0) forUniform:useExistingAlphaUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSourceOverBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSourceOverBlendFilter.h deleted file mode 100644 index 29e30635..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSourceOverBlendFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageSourceOverBlendFilter : GPUImageTwoInputFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSourceOverBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSourceOverBlendFilter.m deleted file mode 100644 index 432adc4b..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSourceOverBlendFilter.m +++ /dev/null @@ -1,51 +0,0 @@ -#import "GPUImageSourceOverBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageSourceOverBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate); - - gl_FragColor = mix(textureColor, textureColor2, textureColor2.a); - } -); -#else -NSString *const kGPUImageSourceOverBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate); - - gl_FragColor = mix(textureColor, textureColor2, textureColor2.a); - } - ); -#endif - -@implementation GPUImageSourceOverBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageSourceOverBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSphereRefractionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSphereRefractionFilter.h deleted file mode 100644 index cbbd2afa..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSphereRefractionFilter.h +++ /dev/null @@ -1,15 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageSphereRefractionFilter : GPUImageFilter -{ - GLint radiusUniform, centerUniform, aspectRatioUniform, refractiveIndexUniform; -} - -/// The center about which to apply the distortion, with a default of (0.5, 0.5) -@property(readwrite, nonatomic) CGPoint center; -/// The radius of the distortion, ranging from 0.0 to 1.0, with a default of 0.25 -@property(readwrite, nonatomic) CGFloat radius; -/// The index of refraction for the sphere, with a default of 0.71 -@property(readwrite, nonatomic) CGFloat refractiveIndex; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSphereRefractionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSphereRefractionFilter.m deleted file mode 100644 index b0f54042..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSphereRefractionFilter.m +++ /dev/null @@ -1,179 +0,0 @@ -#import "GPUImageSphereRefractionFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageSphereRefractionFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp vec2 center; - uniform highp float radius; - uniform highp float aspectRatio; - uniform highp float refractiveIndex; - - void main() - { - highp vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - highp float distanceFromCenter = distance(center, textureCoordinateToUse); - lowp float checkForPresenceWithinSphere = step(distanceFromCenter, radius); - - distanceFromCenter = distanceFromCenter / radius; - - highp float normalizedDepth = radius * sqrt(1.0 - distanceFromCenter * distanceFromCenter); - highp vec3 sphereNormal = normalize(vec3(textureCoordinateToUse - center, normalizedDepth)); - - highp vec3 refractedVector = refract(vec3(0.0, 0.0, -1.0), sphereNormal, refractiveIndex); - - gl_FragColor = texture2D(inputImageTexture, (refractedVector.xy + 1.0) * 0.5) * checkForPresenceWithinSphere; - } -); -#else -NSString *const kGPUImageSphereRefractionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform vec2 center; - uniform float radius; - uniform float aspectRatio; - uniform float refractiveIndex; - - void main() - { - vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0.5 - 0.5 * aspectRatio)); - float distanceFromCenter = distance(center, textureCoordinateToUse); - float checkForPresenceWithinSphere = step(distanceFromCenter, radius); - - distanceFromCenter = distanceFromCenter / radius; - - float normalizedDepth = radius * sqrt(1.0 - distanceFromCenter * distanceFromCenter); - vec3 sphereNormal = normalize(vec3(textureCoordinateToUse - center, normalizedDepth)); - - vec3 refractedVector = refract(vec3(0.0, 0.0, -1.0), sphereNormal, refractiveIndex); - - gl_FragColor = texture2D(inputImageTexture, (refractedVector.xy + 1.0) * 0.5) * checkForPresenceWithinSphere; - } -); -#endif - -@interface GPUImageSphereRefractionFilter () - -- (void)adjustAspectRatio; - -@property (readwrite, nonatomic) CGFloat aspectRatio; - -@end - - -@implementation GPUImageSphereRefractionFilter - -@synthesize center = _center; -@synthesize radius = _radius; -@synthesize aspectRatio = _aspectRatio; -@synthesize refractiveIndex = _refractiveIndex; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImageSphereRefractionFragmentShaderString])) - { - return nil; - } - - return self; -} - -- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [super initWithFragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - radiusUniform = [filterProgram uniformIndex:@"radius"]; - aspectRatioUniform = [filterProgram uniformIndex:@"aspectRatio"]; - centerUniform = [filterProgram uniformIndex:@"center"]; - refractiveIndexUniform = [filterProgram uniformIndex:@"refractiveIndex"]; - - self.radius = 0.25; - self.center = CGPointMake(0.5, 0.5); - self.refractiveIndex = 0.71; - - [self setBackgroundColorRed:0.0 green:0.0 blue:0.0 alpha:0.0]; - - return self; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - CGSize oldInputSize = inputTextureSize; - [super setInputSize:newSize atIndex:textureIndex]; - - if (!CGSizeEqualToSize(oldInputSize, inputTextureSize) && (!CGSizeEqualToSize(newSize, CGSizeZero)) ) - { - [self adjustAspectRatio]; - } -} - -#pragma mark - -#pragma mark Accessors - -- (void)adjustAspectRatio; -{ - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - [self setAspectRatio:(inputTextureSize.width / inputTextureSize.height)]; - } - else - { - [self setAspectRatio:(inputTextureSize.height / inputTextureSize.width)]; - } -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - [super setInputRotation:newInputRotation atIndex:textureIndex]; - [self setCenter:self.center]; - [self adjustAspectRatio]; -} - -- (void)forceProcessingAtSize:(CGSize)frameSize; -{ - [super forceProcessingAtSize:frameSize]; - [self adjustAspectRatio]; -} - -- (void)setRadius:(CGFloat)newValue; -{ - _radius = newValue; - - [self setFloat:_radius forUniform:radiusUniform program:filterProgram]; -} - -- (void)setCenter:(CGPoint)newValue; -{ - _center = newValue; - - CGPoint rotatedPoint = [self rotatedPoint:_center forRotation:inputRotation]; - [self setPoint:rotatedPoint forUniform:centerUniform program:filterProgram]; -} - -- (void)setAspectRatio:(CGFloat)newValue; -{ - _aspectRatio = newValue; - - [self setFloat:_aspectRatio forUniform:aspectRatioUniform program:filterProgram]; -} - -- (void)setRefractiveIndex:(CGFloat)newValue; -{ - _refractiveIndex = newValue; - - [self setFloat:_refractiveIndex forUniform:refractiveIndexUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageStillCamera.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageStillCamera.h deleted file mode 100755 index e4db59b2..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageStillCamera.h +++ /dev/null @@ -1,24 +0,0 @@ -#import "GPUImageVideoCamera.h" - -void stillImageDataReleaseCallback(void *releaseRefCon, const void *baseAddress); -void GPUImageCreateResizedSampleBuffer(CVPixelBufferRef cameraFrame, CGSize finalSize, CMSampleBufferRef *sampleBuffer); - -@interface GPUImageStillCamera : GPUImageVideoCamera - -/** The JPEG compression quality to use when capturing a photo as a JPEG. - */ -@property CGFloat jpegCompressionQuality; - -// Only reliably set inside the context of the completion handler of one of the capture methods -@property (readonly) NSDictionary *currentCaptureMetadata; - -// Photography controls -- (void)capturePhotoAsSampleBufferWithCompletionHandler:(void (^)(CMSampleBufferRef imageSampleBuffer, NSError *error))block; -- (void)capturePhotoAsImageProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withCompletionHandler:(void (^)(UIImage *processedImage, NSError *error))block; -- (void)capturePhotoAsImageProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withOrientation:(UIImageOrientation)orientation withCompletionHandler:(void (^)(UIImage *processedImage, NSError *error))block; -- (void)capturePhotoAsJPEGProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withCompletionHandler:(void (^)(NSData *processedJPEG, NSError *error))block; -- (void)capturePhotoAsJPEGProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withOrientation:(UIImageOrientation)orientation withCompletionHandler:(void (^)(NSData *processedJPEG, NSError *error))block; -- (void)capturePhotoAsPNGProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withCompletionHandler:(void (^)(NSData *processedPNG, NSError *error))block; -- (void)capturePhotoAsPNGProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withOrientation:(UIImageOrientation)orientation withCompletionHandler:(void (^)(NSData *processedPNG, NSError *error))block; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageStillCamera.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageStillCamera.m deleted file mode 100755 index 447f79f6..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageStillCamera.m +++ /dev/null @@ -1,338 +0,0 @@ -// 2448x3264 pixel image = 31,961,088 bytes for uncompressed RGBA - -#import "GPUImageStillCamera.h" - -void stillImageDataReleaseCallback(void *releaseRefCon, const void *baseAddress) -{ - free((void *)baseAddress); -} - -void GPUImageCreateResizedSampleBuffer(CVPixelBufferRef cameraFrame, CGSize finalSize, CMSampleBufferRef *sampleBuffer) -{ - // CVPixelBufferCreateWithPlanarBytes for YUV input - - CGSize originalSize = CGSizeMake(CVPixelBufferGetWidth(cameraFrame), CVPixelBufferGetHeight(cameraFrame)); - - CVPixelBufferLockBaseAddress(cameraFrame, 0); - GLubyte *sourceImageBytes = CVPixelBufferGetBaseAddress(cameraFrame); - CGDataProviderRef dataProvider = CGDataProviderCreateWithData(NULL, sourceImageBytes, CVPixelBufferGetBytesPerRow(cameraFrame) * originalSize.height, NULL); - CGColorSpaceRef genericRGBColorspace = CGColorSpaceCreateDeviceRGB(); - CGImageRef cgImageFromBytes = CGImageCreate((int)originalSize.width, (int)originalSize.height, 8, 32, CVPixelBufferGetBytesPerRow(cameraFrame), genericRGBColorspace, kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst, dataProvider, NULL, NO, kCGRenderingIntentDefault); - - GLubyte *imageData = (GLubyte *) calloc(1, (int)finalSize.width * (int)finalSize.height * 4); - - CGContextRef imageContext = CGBitmapContextCreate(imageData, (int)finalSize.width, (int)finalSize.height, 8, (int)finalSize.width * 4, genericRGBColorspace, kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst); - CGContextDrawImage(imageContext, CGRectMake(0.0, 0.0, finalSize.width, finalSize.height), cgImageFromBytes); - CGImageRelease(cgImageFromBytes); - CGContextRelease(imageContext); - CGColorSpaceRelease(genericRGBColorspace); - CGDataProviderRelease(dataProvider); - - CVPixelBufferRef pixel_buffer = NULL; - CVPixelBufferCreateWithBytes(kCFAllocatorDefault, finalSize.width, finalSize.height, kCVPixelFormatType_32BGRA, imageData, finalSize.width * 4, stillImageDataReleaseCallback, NULL, NULL, &pixel_buffer); - CMVideoFormatDescriptionRef videoInfo = NULL; - CMVideoFormatDescriptionCreateForImageBuffer(NULL, pixel_buffer, &videoInfo); - - CMTime frameTime = CMTimeMake(1, 30); - CMSampleTimingInfo timing = {frameTime, frameTime, kCMTimeInvalid}; - - CMSampleBufferCreateForImageBuffer(kCFAllocatorDefault, pixel_buffer, YES, NULL, NULL, videoInfo, &timing, sampleBuffer); - CVPixelBufferUnlockBaseAddress(cameraFrame, 0); - CFRelease(videoInfo); - CVPixelBufferRelease(pixel_buffer); -} - -@interface GPUImageStillCamera () -{ - AVCaptureStillImageOutput *photoOutput; -} - -// Methods calling this are responsible for calling dispatch_semaphore_signal(frameRenderingSemaphore) somewhere inside the block -- (void)capturePhotoProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withImageOnGPUHandler:(void (^)(NSError *error))block; - -@end - -@implementation GPUImageStillCamera { - BOOL requiresFrontCameraTextureCacheCorruptionWorkaround; -} - -@synthesize currentCaptureMetadata = _currentCaptureMetadata; -@synthesize jpegCompressionQuality = _jpegCompressionQuality; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithSessionPreset:(NSString *)sessionPreset cameraPosition:(AVCaptureDevicePosition)cameraPosition; -{ - if (!(self = [super initWithSessionPreset:sessionPreset cameraPosition:cameraPosition])) - { - return nil; - } - - /* Detect iOS version < 6 which require a texture cache corruption workaround */ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - requiresFrontCameraTextureCacheCorruptionWorkaround = [[[UIDevice currentDevice] systemVersion] compare:@"6.0" options:NSNumericSearch] == NSOrderedAscending; -#pragma clang diagnostic pop - - [self.captureSession beginConfiguration]; - - photoOutput = [[AVCaptureStillImageOutput alloc] init]; - - // Having a still photo input set to BGRA and video to YUV doesn't work well, so since I don't have YUV resizing for iPhone 4 yet, kick back to BGRA for that device -// if (captureAsYUV && [GPUImageContext supportsFastTextureUpload]) - if (captureAsYUV && [GPUImageContext deviceSupportsRedTextures]) - { - BOOL supportsFullYUVRange = NO; - NSArray *supportedPixelFormats = photoOutput.availableImageDataCVPixelFormatTypes; - for (NSNumber *currentPixelFormat in supportedPixelFormats) - { - if ([currentPixelFormat intValue] == kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) - { - supportsFullYUVRange = YES; - } - } - - if (supportsFullYUVRange) - { - [photoOutput setOutputSettings:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_420YpCbCr8BiPlanarFullRange] forKey:(id)kCVPixelBufferPixelFormatTypeKey]]; - } - else - { - [photoOutput setOutputSettings:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange] forKey:(id)kCVPixelBufferPixelFormatTypeKey]]; - } - } - else - { - captureAsYUV = NO; - [photoOutput setOutputSettings:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_32BGRA] forKey:(id)kCVPixelBufferPixelFormatTypeKey]]; - [videoOutput setVideoSettings:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_32BGRA] forKey:(id)kCVPixelBufferPixelFormatTypeKey]]; - } - - [self.captureSession addOutput:photoOutput]; - - [self.captureSession commitConfiguration]; - - self.jpegCompressionQuality = 0.8; - - return self; -} - -- (id)init; -{ - if (!(self = [self initWithSessionPreset:AVCaptureSessionPresetPhoto cameraPosition:AVCaptureDevicePositionBack])) - { - return nil; - } - return self; -} - -- (void)removeInputsAndOutputs; -{ - [self.captureSession removeOutput:photoOutput]; - [super removeInputsAndOutputs]; -} - -#pragma mark - -#pragma mark Photography controls - -- (void)capturePhotoAsSampleBufferWithCompletionHandler:(void (^)(CMSampleBufferRef imageSampleBuffer, NSError *error))block -{ - NSLog(@"If you want to use the method capturePhotoAsSampleBufferWithCompletionHandler:, you must comment out the line in GPUImageStillCamera.m in the method initWithSessionPreset:cameraPosition: which sets the CVPixelBufferPixelFormatTypeKey, as well as uncomment the rest of the method capturePhotoAsSampleBufferWithCompletionHandler:. However, if you do this you cannot use any of the photo capture methods to take a photo if you also supply a filter."); - - /*dispatch_semaphore_wait(frameRenderingSemaphore, DISPATCH_TIME_FOREVER); - - [photoOutput captureStillImageAsynchronouslyFromConnection:[[photoOutput connections] objectAtIndex:0] completionHandler:^(CMSampleBufferRef imageSampleBuffer, NSError *error) { - block(imageSampleBuffer, error); - }]; - - dispatch_semaphore_signal(frameRenderingSemaphore); - - */ - - return; -} - -- (void)capturePhotoAsImageProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withCompletionHandler:(void (^)(UIImage *processedImage, NSError *error))block; -{ - [self capturePhotoProcessedUpToFilter:finalFilterInChain withImageOnGPUHandler:^(NSError *error) { - UIImage *filteredPhoto = nil; - - if(!error){ - filteredPhoto = [finalFilterInChain imageFromCurrentFramebuffer]; - } - dispatch_semaphore_signal(frameRenderingSemaphore); - - block(filteredPhoto, error); - }]; -} - -- (void)capturePhotoAsImageProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withOrientation:(UIImageOrientation)orientation withCompletionHandler:(void (^)(UIImage *processedImage, NSError *error))block { - [self capturePhotoProcessedUpToFilter:finalFilterInChain withImageOnGPUHandler:^(NSError *error) { - UIImage *filteredPhoto = nil; - - if(!error) { - filteredPhoto = [finalFilterInChain imageFromCurrentFramebufferWithOrientation:orientation]; - } - dispatch_semaphore_signal(frameRenderingSemaphore); - - block(filteredPhoto, error); - }]; -} - -- (void)capturePhotoAsJPEGProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withCompletionHandler:(void (^)(NSData *processedJPEG, NSError *error))block; -{ -// reportAvailableMemoryForGPUImage(@"Before Capture"); - - [self capturePhotoProcessedUpToFilter:finalFilterInChain withImageOnGPUHandler:^(NSError *error) { - NSData *dataForJPEGFile = nil; - - if(!error){ - @autoreleasepool { - UIImage *filteredPhoto = [finalFilterInChain imageFromCurrentFramebuffer]; - dispatch_semaphore_signal(frameRenderingSemaphore); -// reportAvailableMemoryForGPUImage(@"After UIImage generation"); - - dataForJPEGFile = UIImageJPEGRepresentation(filteredPhoto,self.jpegCompressionQuality); -// reportAvailableMemoryForGPUImage(@"After JPEG generation"); - } - -// reportAvailableMemoryForGPUImage(@"After autorelease pool"); - }else{ - dispatch_semaphore_signal(frameRenderingSemaphore); - } - - block(dataForJPEGFile, error); - }]; -} - -- (void)capturePhotoAsJPEGProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withOrientation:(UIImageOrientation)orientation withCompletionHandler:(void (^)(NSData *processedImage, NSError *error))block { - [self capturePhotoProcessedUpToFilter:finalFilterInChain withImageOnGPUHandler:^(NSError *error) { - NSData *dataForJPEGFile = nil; - - if(!error) { - @autoreleasepool { - UIImage *filteredPhoto = [finalFilterInChain imageFromCurrentFramebufferWithOrientation:orientation]; - dispatch_semaphore_signal(frameRenderingSemaphore); - - dataForJPEGFile = UIImageJPEGRepresentation(filteredPhoto, self.jpegCompressionQuality); - } - } else { - dispatch_semaphore_signal(frameRenderingSemaphore); - } - - block(dataForJPEGFile, error); - }]; -} - -- (void)capturePhotoAsPNGProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withCompletionHandler:(void (^)(NSData *processedPNG, NSError *error))block; -{ - - [self capturePhotoProcessedUpToFilter:finalFilterInChain withImageOnGPUHandler:^(NSError *error) { - NSData *dataForPNGFile = nil; - - if(!error){ - @autoreleasepool { - UIImage *filteredPhoto = [finalFilterInChain imageFromCurrentFramebuffer]; - dispatch_semaphore_signal(frameRenderingSemaphore); - dataForPNGFile = UIImagePNGRepresentation(filteredPhoto); - } - }else{ - dispatch_semaphore_signal(frameRenderingSemaphore); - } - - block(dataForPNGFile, error); - }]; - - return; -} - -- (void)capturePhotoAsPNGProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withOrientation:(UIImageOrientation)orientation withCompletionHandler:(void (^)(NSData *processedPNG, NSError *error))block; -{ - - [self capturePhotoProcessedUpToFilter:finalFilterInChain withImageOnGPUHandler:^(NSError *error) { - NSData *dataForPNGFile = nil; - - if(!error){ - @autoreleasepool { - UIImage *filteredPhoto = [finalFilterInChain imageFromCurrentFramebufferWithOrientation:orientation]; - dispatch_semaphore_signal(frameRenderingSemaphore); - dataForPNGFile = UIImagePNGRepresentation(filteredPhoto); - } - }else{ - dispatch_semaphore_signal(frameRenderingSemaphore); - } - - block(dataForPNGFile, error); - }]; - - return; -} - -#pragma mark - Private Methods - -- (void)capturePhotoProcessedUpToFilter:(GPUImageOutput *)finalFilterInChain withImageOnGPUHandler:(void (^)(NSError *error))block -{ - dispatch_semaphore_wait(frameRenderingSemaphore, DISPATCH_TIME_FOREVER); - - if(photoOutput.isCapturingStillImage){ - block([NSError errorWithDomain:AVFoundationErrorDomain code:AVErrorMaximumStillImageCaptureRequestsExceeded userInfo:nil]); - return; - } - - [photoOutput captureStillImageAsynchronouslyFromConnection:[[photoOutput connections] objectAtIndex:0] completionHandler:^(CMSampleBufferRef imageSampleBuffer, NSError *error) { - if(imageSampleBuffer == NULL){ - block(error); - return; - } - - // For now, resize photos to fix within the max texture size of the GPU - CVImageBufferRef cameraFrame = CMSampleBufferGetImageBuffer(imageSampleBuffer); - - CGSize sizeOfPhoto = CGSizeMake(CVPixelBufferGetWidth(cameraFrame), CVPixelBufferGetHeight(cameraFrame)); - CGSize scaledImageSizeToFitOnGPU = [GPUImageContext sizeThatFitsWithinATextureForSize:sizeOfPhoto]; - if (!CGSizeEqualToSize(sizeOfPhoto, scaledImageSizeToFitOnGPU)) - { - CMSampleBufferRef sampleBuffer = NULL; - - if (CVPixelBufferGetPlaneCount(cameraFrame) > 0) - { - NSAssert(NO, @"Error: no downsampling for YUV input in the framework yet"); - } - else - { - GPUImageCreateResizedSampleBuffer(cameraFrame, scaledImageSizeToFitOnGPU, &sampleBuffer); - } - - dispatch_semaphore_signal(frameRenderingSemaphore); - [finalFilterInChain useNextFrameForImageCapture]; - [self captureOutput:photoOutput didOutputSampleBuffer:sampleBuffer fromConnection:[[photoOutput connections] objectAtIndex:0]]; - dispatch_semaphore_wait(frameRenderingSemaphore, DISPATCH_TIME_FOREVER); - if (sampleBuffer != NULL) - CFRelease(sampleBuffer); - } - else - { - // This is a workaround for the corrupt images that are sometimes returned when taking a photo with the front camera and using the iOS 5.0 texture caches - AVCaptureDevicePosition currentCameraPosition = [[videoInput device] position]; - if ( (currentCameraPosition != AVCaptureDevicePositionFront) || (![GPUImageContext supportsFastTextureUpload]) || !requiresFrontCameraTextureCacheCorruptionWorkaround) - { - dispatch_semaphore_signal(frameRenderingSemaphore); - [finalFilterInChain useNextFrameForImageCapture]; - [self captureOutput:photoOutput didOutputSampleBuffer:imageSampleBuffer fromConnection:[[photoOutput connections] objectAtIndex:0]]; - dispatch_semaphore_wait(frameRenderingSemaphore, DISPATCH_TIME_FOREVER); - } - } - - CFDictionaryRef metadata = CMCopyDictionaryOfAttachments(NULL, imageSampleBuffer, kCMAttachmentMode_ShouldPropagate); - _currentCaptureMetadata = (__bridge_transfer NSDictionary *)metadata; - - block(nil); - - _currentCaptureMetadata = nil; - }]; -} - - - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageStretchDistortionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageStretchDistortionFilter.h deleted file mode 100755 index 07803095..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageStretchDistortionFilter.h +++ /dev/null @@ -1,13 +0,0 @@ -#import "GPUImageFilter.h" - -/** Creates a stretch distortion of the image - */ -@interface GPUImageStretchDistortionFilter : GPUImageFilter { - GLint centerUniform; -} - -/** The center about which to apply the distortion, with a default of (0.5, 0.5) - */ -@property(readwrite, nonatomic) CGPoint center; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageStretchDistortionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageStretchDistortionFilter.m deleted file mode 100755 index d38cac34..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageStretchDistortionFilter.m +++ /dev/null @@ -1,99 +0,0 @@ -#import "GPUImageStretchDistortionFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageStretchDistortionFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp vec2 center; - - void main() - { - highp vec2 normCoord = 2.0 * textureCoordinate - 1.0; - highp vec2 normCenter = 2.0 * center - 1.0; - - normCoord -= normCenter; - mediump vec2 s = sign(normCoord); - normCoord = abs(normCoord); - normCoord = 0.5 * normCoord + 0.5 * smoothstep(0.25, 0.5, normCoord) * normCoord; - normCoord = s * normCoord; - - normCoord += normCenter; - - mediump vec2 textureCoordinateToUse = normCoord / 2.0 + 0.5; - - - gl_FragColor = texture2D(inputImageTexture, textureCoordinateToUse ); - - } -); -#else -NSString *const kGPUImageStretchDistortionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform vec2 center; - - void main() - { - vec2 normCoord = 2.0 * textureCoordinate - 1.0; - vec2 normCenter = 2.0 * center - 1.0; - - normCoord -= normCenter; - vec2 s = sign(normCoord); - normCoord = abs(normCoord); - normCoord = 0.5 * normCoord + 0.5 * smoothstep(0.25, 0.5, normCoord) * normCoord; - normCoord = s * normCoord; - - normCoord += normCenter; - - vec2 textureCoordinateToUse = normCoord / 2.0 + 0.5; - - gl_FragColor = texture2D(inputImageTexture, textureCoordinateToUse); - } -); -#endif - -@implementation GPUImageStretchDistortionFilter - -@synthesize center = _center; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageStretchDistortionFragmentShaderString])) - { - return nil; - } - - centerUniform = [filterProgram uniformIndex:@"center"]; - - self.center = CGPointMake(0.5, 0.5); - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - [super setInputRotation:newInputRotation atIndex:textureIndex]; - [self setCenter:self.center]; -} - -- (void)setCenter:(CGPoint)newValue; -{ - _center = newValue; - - CGPoint rotatedPoint = [self rotatedPoint:_center forRotation:inputRotation]; - [self setPoint:rotatedPoint forUniform:centerUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSubtractBlendFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSubtractBlendFilter.h deleted file mode 100755 index 8dee8215..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSubtractBlendFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageSubtractBlendFilter : GPUImageTwoInputFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSubtractBlendFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSubtractBlendFilter.m deleted file mode 100755 index 8938baea..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSubtractBlendFilter.m +++ /dev/null @@ -1,52 +0,0 @@ -#import "GPUImageSubtractBlendFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageSubtractBlendFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(textureColor.rgb - textureColor2.rgb, textureColor.a); - } -); -#else -NSString *const kGPUImageSubtractBlendFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); - - gl_FragColor = vec4(textureColor.rgb - textureColor2.rgb, textureColor.a); - } -); -#endif - -@implementation GPUImageSubtractBlendFilter - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageSubtractBlendFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSwirlFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSwirlFilter.h deleted file mode 100755 index ed7d0122..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSwirlFilter.h +++ /dev/null @@ -1,17 +0,0 @@ -#import "GPUImageFilter.h" - -/** Creates a swirl distortion on the image - */ -@interface GPUImageSwirlFilter : GPUImageFilter -{ - GLint radiusUniform, centerUniform, angleUniform; -} - -/// The center about which to apply the distortion, with a default of (0.5, 0.5) -@property(readwrite, nonatomic) CGPoint center; -/// The radius of the distortion, ranging from 0.0 to 1.0, with a default of 0.5 -@property(readwrite, nonatomic) CGFloat radius; -/// The amount of distortion to apply, with a minimum of 0.0 and a default of 1.0 -@property(readwrite, nonatomic) CGFloat angle; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSwirlFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSwirlFilter.m deleted file mode 100755 index 5462bc65..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageSwirlFilter.m +++ /dev/null @@ -1,123 +0,0 @@ -#import "GPUImageSwirlFilter.h" - -// Adapted from the shader example here: http://www.geeks3d.com/20110428/shader-library-swirl-post-processing-filter-in-glsl/ -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageSwirlFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp vec2 center; - uniform highp float radius; - uniform highp float angle; - - void main() - { - highp vec2 textureCoordinateToUse = textureCoordinate; - highp float dist = distance(center, textureCoordinate); - if (dist < radius) - { - textureCoordinateToUse -= center; - highp float percent = (radius - dist) / radius; - highp float theta = percent * percent * angle * 8.0; - highp float s = sin(theta); - highp float c = cos(theta); - textureCoordinateToUse = vec2(dot(textureCoordinateToUse, vec2(c, -s)), dot(textureCoordinateToUse, vec2(s, c))); - textureCoordinateToUse += center; - } - - gl_FragColor = texture2D(inputImageTexture, textureCoordinateToUse ); - - } -); -#else -NSString *const kGPUImageSwirlFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform vec2 center; - uniform float radius; - uniform float angle; - - void main() - { - vec2 textureCoordinateToUse = textureCoordinate; - float dist = distance(center, textureCoordinate); - if (dist < radius) - { - textureCoordinateToUse -= center; - float percent = (radius - dist) / radius; - float theta = percent * percent * angle * 8.0; - float s = sin(theta); - float c = cos(theta); - textureCoordinateToUse = vec2(dot(textureCoordinateToUse, vec2(c, -s)), dot(textureCoordinateToUse, vec2(s, c))); - textureCoordinateToUse += center; - } - - gl_FragColor = texture2D(inputImageTexture, textureCoordinateToUse ); - } -); -#endif - -@implementation GPUImageSwirlFilter - -@synthesize center = _center; -@synthesize radius = _radius; -@synthesize angle = _angle; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageSwirlFragmentShaderString])) - { - return nil; - } - - radiusUniform = [filterProgram uniformIndex:@"radius"]; - angleUniform = [filterProgram uniformIndex:@"angle"]; - centerUniform = [filterProgram uniformIndex:@"center"]; - - self.radius = 0.5; - self.angle = 1.0; - self.center = CGPointMake(0.5, 0.5); - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - [super setInputRotation:newInputRotation atIndex:textureIndex]; - [self setCenter:self.center]; -} - -- (void)setRadius:(CGFloat)newValue; -{ - _radius = newValue; - - [self setFloat:_radius forUniform:radiusUniform program:filterProgram]; -} - -- (void)setAngle:(CGFloat)newValue; -{ - _angle = newValue; - - [self setFloat:_angle forUniform:angleUniform program:filterProgram]; -} - -- (void)setCenter:(CGPoint)newValue; -{ - _center = newValue; - - CGPoint rotatedPoint = [self rotatedPoint:_center forRotation:inputRotation]; - [self setPoint:rotatedPoint forUniform:centerUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTextureInput.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTextureInput.h deleted file mode 100755 index 8190305d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTextureInput.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "GPUImageOutput.h" - -@interface GPUImageTextureInput : GPUImageOutput -{ - CGSize textureSize; -} - -// Initialization and teardown -- (id)initWithTexture:(GLuint)newInputTexture size:(CGSize)newTextureSize; - -// Image rendering -- (void)processTextureWithFrameTime:(CMTime)frameTime; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTextureInput.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTextureInput.m deleted file mode 100755 index ad3ca1d1..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTextureInput.m +++ /dev/null @@ -1,46 +0,0 @@ -#import "GPUImageTextureInput.h" - -@implementation GPUImageTextureInput - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithTexture:(GLuint)newInputTexture size:(CGSize)newTextureSize; -{ - if (!(self = [super init])) - { - return nil; - } - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - }); - - textureSize = newTextureSize; - - runSynchronouslyOnVideoProcessingQueue(^{ - outputFramebuffer = [[GPUImageFramebuffer alloc] initWithSize:newTextureSize overriddenTexture:newInputTexture]; - }); - - return self; -} - -#pragma mark - -#pragma mark Image rendering - -- (void)processTextureWithFrameTime:(CMTime)frameTime; -{ - runAsynchronouslyOnVideoProcessingQueue(^{ - for (id currentTarget in targets) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger targetTextureIndex = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - - [currentTarget setInputSize:textureSize atIndex:targetTextureIndex]; - [currentTarget setInputFramebuffer:outputFramebuffer atIndex:targetTextureIndex]; - [currentTarget newFrameReadyAtTime:frameTime atIndex:targetTextureIndex]; - } - }); -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTextureOutput.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTextureOutput.h deleted file mode 100755 index 05e1f36e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTextureOutput.h +++ /dev/null @@ -1,21 +0,0 @@ -#import -#import "GPUImageContext.h" - -@protocol GPUImageTextureOutputDelegate; - -@interface GPUImageTextureOutput : NSObject -{ - GPUImageFramebuffer *firstInputFramebuffer; -} - -@property(readwrite, unsafe_unretained, nonatomic) id delegate; -@property(readonly) GLuint texture; -@property(nonatomic) BOOL enabled; - -- (void)doneWithTexture; - -@end - -@protocol GPUImageTextureOutputDelegate -- (void)newFrameReadyFromTextureOutput:(GPUImageTextureOutput *)callbackTextureOutput; -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTextureOutput.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTextureOutput.m deleted file mode 100755 index 1e1f24f2..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTextureOutput.m +++ /dev/null @@ -1,83 +0,0 @@ -#import "GPUImageTextureOutput.h" - -@implementation GPUImageTextureOutput - -@synthesize delegate = _delegate; -@synthesize texture = _texture; -@synthesize enabled; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - self.enabled = YES; - - return self; -} - -- (void)doneWithTexture; -{ - [firstInputFramebuffer unlock]; -} - -#pragma mark - -#pragma mark GPUImageInput protocol - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - [_delegate newFrameReadyFromTextureOutput:self]; -} - -- (NSInteger)nextAvailableTextureIndex; -{ - return 0; -} - -// TODO: Deal with the fact that the texture changes regularly as a result of the caching -- (void)setInputFramebuffer:(GPUImageFramebuffer *)newInputFramebuffer atIndex:(NSInteger)textureIndex; -{ - firstInputFramebuffer = newInputFramebuffer; - [firstInputFramebuffer lock]; - - _texture = [firstInputFramebuffer texture]; -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ -} - -- (CGSize)maximumOutputSize; -{ - return CGSizeZero; -} - -- (void)endProcessing -{ -} - -- (BOOL)shouldIgnoreUpdatesToThisTarget; -{ - return NO; -} - -- (BOOL)wantsMonochromeInput; -{ - return NO; -} - -- (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; -{ - -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThreeInputFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThreeInputFilter.h deleted file mode 100644 index 5ecd53e0..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThreeInputFilter.h +++ /dev/null @@ -1,21 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -extern NSString *const kGPUImageThreeInputTextureVertexShaderString; - -@interface GPUImageThreeInputFilter : GPUImageTwoInputFilter -{ - GPUImageFramebuffer *thirdInputFramebuffer; - - GLint filterThirdTextureCoordinateAttribute; - GLint filterInputTextureUniform3; - GPUImageRotationMode inputRotation3; - GLuint filterSourceTexture3; - CMTime thirdFrameTime; - - BOOL hasSetSecondTexture, hasReceivedThirdFrame, thirdFrameWasVideo; - BOOL thirdFrameCheckDisabled; -} - -- (void)disableThirdFrameCheck; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThreeInputFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThreeInputFilter.m deleted file mode 100644 index 2f4f113f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThreeInputFilter.m +++ /dev/null @@ -1,328 +0,0 @@ -#import "GPUImageThreeInputFilter.h" - - -NSString *const kGPUImageThreeInputTextureVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - attribute vec4 inputTextureCoordinate2; - attribute vec4 inputTextureCoordinate3; - - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - varying vec2 textureCoordinate3; - - void main() - { - gl_Position = position; - textureCoordinate = inputTextureCoordinate.xy; - textureCoordinate2 = inputTextureCoordinate2.xy; - textureCoordinate3 = inputTextureCoordinate3.xy; - } -); - -@implementation GPUImageThreeInputFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [self initWithVertexShaderFromString:kGPUImageThreeInputTextureVertexShaderString fragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - return self; -} - -- (id)initWithVertexShaderFromString:(NSString *)vertexShaderString fragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [super initWithVertexShaderFromString:vertexShaderString fragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - inputRotation3 = kGPUImageNoRotation; - - hasSetSecondTexture = NO; - - hasReceivedThirdFrame = NO; - thirdFrameWasVideo = NO; - thirdFrameCheckDisabled = NO; - - thirdFrameTime = kCMTimeInvalid; - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - filterThirdTextureCoordinateAttribute = [filterProgram attributeIndex:@"inputTextureCoordinate3"]; - - filterInputTextureUniform3 = [filterProgram uniformIndex:@"inputImageTexture3"]; // This does assume a name of "inputImageTexture3" for the third input texture in the fragment shader - glEnableVertexAttribArray(filterThirdTextureCoordinateAttribute); - }); - - return self; -} - -- (void)initializeAttributes; -{ - [super initializeAttributes]; - [filterProgram addAttribute:@"inputTextureCoordinate3"]; -} - -- (void)disableThirdFrameCheck; -{ - thirdFrameCheckDisabled = YES; -} - -#pragma mark - -#pragma mark Rendering - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - if (self.preventRendering) - { - [firstInputFramebuffer unlock]; - [secondInputFramebuffer unlock]; - [thirdInputFramebuffer unlock]; - return; - } - - [GPUImageContext setActiveShaderProgram:filterProgram]; - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - if (usingNextFrameForImageCapture) - { - [outputFramebuffer lock]; - } - - [self setUniformsForProgramAtIndex:0]; - - glClearColor(backgroundColorRed, backgroundColorGreen, backgroundColorBlue, backgroundColorAlpha); - glClear(GL_COLOR_BUFFER_BIT); - - glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, [firstInputFramebuffer texture]); - glUniform1i(filterInputTextureUniform, 2); - - glActiveTexture(GL_TEXTURE3); - glBindTexture(GL_TEXTURE_2D, [secondInputFramebuffer texture]); - glUniform1i(filterInputTextureUniform2, 3); - - glActiveTexture(GL_TEXTURE4); - glBindTexture(GL_TEXTURE_2D, [thirdInputFramebuffer texture]); - glUniform1i(filterInputTextureUniform3, 4); - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - glVertexAttribPointer(filterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - glVertexAttribPointer(filterSecondTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, [[self class] textureCoordinatesForRotation:inputRotation2]); - glVertexAttribPointer(filterThirdTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, [[self class] textureCoordinatesForRotation:inputRotation3]); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - [firstInputFramebuffer unlock]; - [secondInputFramebuffer unlock]; - [thirdInputFramebuffer unlock]; - if (usingNextFrameForImageCapture) - { - dispatch_semaphore_signal(imageCaptureSemaphore); - } -} - -#pragma mark - -#pragma mark GPUImageInput - -- (NSInteger)nextAvailableTextureIndex; -{ - if (hasSetSecondTexture) - { - return 2; - } - else if (hasSetFirstTexture) - { - return 1; - } - else - { - return 0; - } -} - -- (void)setInputFramebuffer:(GPUImageFramebuffer *)newInputFramebuffer atIndex:(NSInteger)textureIndex; -{ - if (textureIndex == 0) - { - firstInputFramebuffer = newInputFramebuffer; - hasSetFirstTexture = YES; - [firstInputFramebuffer lock]; - } - else if (textureIndex == 1) - { - secondInputFramebuffer = newInputFramebuffer; - hasSetSecondTexture = YES; - [secondInputFramebuffer lock]; - } - else - { - thirdInputFramebuffer = newInputFramebuffer; - [thirdInputFramebuffer lock]; - } -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - if (textureIndex == 0) - { - [super setInputSize:newSize atIndex:textureIndex]; - - if (CGSizeEqualToSize(newSize, CGSizeZero)) - { - hasSetFirstTexture = NO; - } - } - else if (textureIndex == 1) - { - if (CGSizeEqualToSize(newSize, CGSizeZero)) - { - hasSetSecondTexture = NO; - } - } -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - if (textureIndex == 0) - { - inputRotation = newInputRotation; - } - else if (textureIndex == 1) - { - inputRotation2 = newInputRotation; - } - else - { - inputRotation3 = newInputRotation; - } -} - -- (CGSize)rotatedSize:(CGSize)sizeToRotate forIndex:(NSInteger)textureIndex; -{ - CGSize rotatedSize = sizeToRotate; - - GPUImageRotationMode rotationToCheck; - if (textureIndex == 0) - { - rotationToCheck = inputRotation; - } - else if (textureIndex == 1) - { - rotationToCheck = inputRotation2; - } - else - { - rotationToCheck = inputRotation3; - } - - if (GPUImageRotationSwapsWidthAndHeight(rotationToCheck)) - { - rotatedSize.width = sizeToRotate.height; - rotatedSize.height = sizeToRotate.width; - } - - return rotatedSize; -} - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - // You can set up infinite update loops, so this helps to short circuit them - if (hasReceivedFirstFrame && hasReceivedSecondFrame && hasReceivedThirdFrame) - { - return; - } - - BOOL updatedMovieFrameOppositeStillImage = NO; - - if (textureIndex == 0) - { - hasReceivedFirstFrame = YES; - firstFrameTime = frameTime; - if (secondFrameCheckDisabled) - { - hasReceivedSecondFrame = YES; - } - if (thirdFrameCheckDisabled) - { - hasReceivedThirdFrame = YES; - } - - if (!CMTIME_IS_INDEFINITE(frameTime)) - { - if CMTIME_IS_INDEFINITE(secondFrameTime) - { - updatedMovieFrameOppositeStillImage = YES; - } - } - } - else if (textureIndex == 1) - { - hasReceivedSecondFrame = YES; - secondFrameTime = frameTime; - if (firstFrameCheckDisabled) - { - hasReceivedFirstFrame = YES; - } - if (thirdFrameCheckDisabled) - { - hasReceivedThirdFrame = YES; - } - - if (!CMTIME_IS_INDEFINITE(frameTime)) - { - if CMTIME_IS_INDEFINITE(firstFrameTime) - { - updatedMovieFrameOppositeStillImage = YES; - } - } - } - else - { - hasReceivedThirdFrame = YES; - thirdFrameTime = frameTime; - if (firstFrameCheckDisabled) - { - hasReceivedFirstFrame = YES; - } - if (secondFrameCheckDisabled) - { - hasReceivedSecondFrame = YES; - } - - if (!CMTIME_IS_INDEFINITE(frameTime)) - { - if CMTIME_IS_INDEFINITE(firstFrameTime) - { - updatedMovieFrameOppositeStillImage = YES; - } - } - } - - // || (hasReceivedFirstFrame && secondFrameCheckDisabled) || (hasReceivedSecondFrame && firstFrameCheckDisabled) - if ((hasReceivedFirstFrame && hasReceivedSecondFrame && hasReceivedThirdFrame) || updatedMovieFrameOppositeStillImage) - { - static const GLfloat imageVertices[] = { - -1.0f, -1.0f, - 1.0f, -1.0f, - -1.0f, 1.0f, - 1.0f, 1.0f, - }; - - [self renderToTextureWithVertices:imageVertices textureCoordinates:[[self class] textureCoordinatesForRotation:inputRotation]]; - - [self informTargetsAboutNewFrameAtTime:frameTime]; - - hasReceivedFirstFrame = NO; - hasReceivedSecondFrame = NO; - hasReceivedThirdFrame = NO; - } -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdEdgeDetectionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdEdgeDetectionFilter.h deleted file mode 100755 index 2036030c..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdEdgeDetectionFilter.h +++ /dev/null @@ -1,12 +0,0 @@ -#import "GPUImageSobelEdgeDetectionFilter.h" - -@interface GPUImageThresholdEdgeDetectionFilter : GPUImageSobelEdgeDetectionFilter -{ - GLint thresholdUniform; -} - -/** Any edge above this threshold will be black, and anything below white. Ranges from 0.0 to 1.0, with 0.8 as the default - */ -@property(readwrite, nonatomic) CGFloat threshold; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdEdgeDetectionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdEdgeDetectionFilter.m deleted file mode 100755 index 553c600f..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdEdgeDetectionFilter.m +++ /dev/null @@ -1,145 +0,0 @@ -#import "GPUImageThresholdEdgeDetectionFilter.h" - -@implementation GPUImageThresholdEdgeDetectionFilter - -// Invert the colorspace for a sketch -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageThresholdEdgeDetectionFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - uniform lowp float threshold; - - uniform float edgeStrength; - - void main() - { -// float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; -// float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; -// float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; -// float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float centerIntensity = texture2D(inputImageTexture, textureCoordinate).r; -// float h = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity; -// float v = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity; -// float h = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + leftIntensity + 2.0 * centerIntensity + rightIntensity; -// float v = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomIntensity + 2.0 * centerIntensity + topIntensity; - float h = (centerIntensity - topIntensity) + (bottomIntensity - centerIntensity); - float v = (centerIntensity - leftIntensity) + (rightIntensity - centerIntensity); -// float h = (centerIntensity - topIntensity); -// float j = (topIntensity - centerIntensity); -// h = max(h,j); -// j = abs(h); -// float v = (centerIntensity - leftIntensity); - - float mag = length(vec2(h, v)) * edgeStrength; - mag = step(threshold, mag); - -// float mag = abs(h); - -// gl_FragColor = vec4(h, h, h, 1.0); -// gl_FragColor = vec4(texture2D(inputImageTexture, textureCoordinate)); -// gl_FragColor = vec4(h, centerIntensity, j, 1.0); - gl_FragColor = vec4(mag, mag, mag, 1.0); - } -); -#else -NSString *const kGPUImageThresholdEdgeDetectionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float threshold; - - uniform float edgeStrength; - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float h = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity; - h = max(0.0, h); - float v = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity; - v = max(0.0, v); - - float mag = length(vec2(h, v)) * edgeStrength; - mag = step(threshold, mag); - - gl_FragColor = vec4(vec3(mag), 1.0); - } -); -#endif - -#pragma mark - -#pragma mark Initialization and teardown - -@synthesize threshold = _threshold; - -- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [super initWithFragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - thresholdUniform = [secondFilterProgram uniformIndex:@"threshold"]; - self.threshold = 0.25; - self.edgeStrength = 1.0; - - return self; -} - - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImageThresholdEdgeDetectionFragmentShaderString])) - { - return nil; - } - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setThreshold:(CGFloat)newValue; -{ - _threshold = newValue; - - [self setFloat:_threshold forUniform:thresholdUniform program:secondFilterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdSketchFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdSketchFilter.h deleted file mode 100644 index fda58979..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdSketchFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageThresholdEdgeDetectionFilter.h" - -@interface GPUImageThresholdSketchFilter : GPUImageThresholdEdgeDetectionFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdSketchFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdSketchFilter.m deleted file mode 100644 index d24e9dea..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdSketchFilter.m +++ /dev/null @@ -1,103 +0,0 @@ -#import "GPUImageThresholdSketchFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageThresholdSketchFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - uniform lowp float threshold; - uniform float edgeStrength; - - const highp vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float h = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity; - float v = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity; - - float mag = (length(vec2(h, v)) * edgeStrength); - mag = step(threshold, mag); - mag = 1.0 - mag; - - gl_FragColor = vec4(vec3(mag), 1.0); - } -); -#else -NSString *const kGPUImageThresholdSketchFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - uniform float threshold; - uniform float edgeStrength; - - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float h = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity; - float v = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity; - - float mag = 1.0 - length(vec2(h, v) * edgeStrength); - mag = step(threshold, mag); - - gl_FragColor = vec4(vec3(mag), 1.0); - } -); -#endif - -@implementation GPUImageThresholdSketchFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImageThresholdSketchFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdedNonMaximumSuppressionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdedNonMaximumSuppressionFilter.h deleted file mode 100644 index 9c6e5d72..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdedNonMaximumSuppressionFilter.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "GPUImage3x3TextureSamplingFilter.h" - -@interface GPUImageThresholdedNonMaximumSuppressionFilter : GPUImage3x3TextureSamplingFilter -{ - GLint thresholdUniform; -} - -/** Any local maximum above this threshold will be white, and anything below black. Ranges from 0.0 to 1.0, with 0.8 as the default - */ -@property(readwrite, nonatomic) CGFloat threshold; - -- (id)initWithPackedColorspace:(BOOL)inputUsesPackedColorspace; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdedNonMaximumSuppressionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdedNonMaximumSuppressionFilter.m deleted file mode 100644 index 439d3119..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageThresholdedNonMaximumSuppressionFilter.m +++ /dev/null @@ -1,297 +0,0 @@ -#import "GPUImageThresholdedNonMaximumSuppressionFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageThresholdedNonMaximumSuppressionFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - varying highp vec2 textureCoordinate; - varying highp vec2 leftTextureCoordinate; - varying highp vec2 rightTextureCoordinate; - - varying highp vec2 topTextureCoordinate; - varying highp vec2 topLeftTextureCoordinate; - varying highp vec2 topRightTextureCoordinate; - - varying highp vec2 bottomTextureCoordinate; - varying highp vec2 bottomLeftTextureCoordinate; - varying highp vec2 bottomRightTextureCoordinate; - - uniform lowp float threshold; - - void main() - { - lowp float bottomColor = texture2D(inputImageTexture, bottomTextureCoordinate).r; - lowp float bottomLeftColor = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - lowp float bottomRightColor = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - lowp vec4 centerColor = texture2D(inputImageTexture, textureCoordinate); - lowp float leftColor = texture2D(inputImageTexture, leftTextureCoordinate).r; - lowp float rightColor = texture2D(inputImageTexture, rightTextureCoordinate).r; - lowp float topColor = texture2D(inputImageTexture, topTextureCoordinate).r; - lowp float topRightColor = texture2D(inputImageTexture, topRightTextureCoordinate).r; - lowp float topLeftColor = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - - // Use a tiebreaker for pixels to the left and immediately above this one - lowp float multiplier = 1.0 - step(centerColor.r, topColor); - multiplier = multiplier * (1.0 - step(centerColor.r, topLeftColor)); - multiplier = multiplier * (1.0 - step(centerColor.r, leftColor)); - multiplier = multiplier * (1.0 - step(centerColor.r, bottomLeftColor)); - - lowp float maxValue = max(centerColor.r, bottomColor); - maxValue = max(maxValue, bottomRightColor); - maxValue = max(maxValue, rightColor); - maxValue = max(maxValue, topRightColor); - - lowp float finalValue = centerColor.r * step(maxValue, centerColor.r) * multiplier; - finalValue = step(threshold, finalValue); - - gl_FragColor = vec4(finalValue, finalValue, finalValue, 1.0); -// -// gl_FragColor = vec4((centerColor.rgb * step(maxValue, step(threshold, centerColor.r)) * multiplier), 1.0); - } -); - -NSString *const kGPUImageThresholdedNonMaximumSuppressionPackedColorspaceFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - varying highp vec2 textureCoordinate; - varying highp vec2 leftTextureCoordinate; - varying highp vec2 rightTextureCoordinate; - - varying highp vec2 topTextureCoordinate; - varying highp vec2 topLeftTextureCoordinate; - varying highp vec2 topRightTextureCoordinate; - - varying highp vec2 bottomTextureCoordinate; - varying highp vec2 bottomLeftTextureCoordinate; - varying highp vec2 bottomRightTextureCoordinate; - - uniform lowp float threshold; - uniform highp float texelWidth; - uniform highp float texelHeight; - - highp float encodedIntensity(highp vec3 sourceColor) - { - return (sourceColor.b * 256.0 * 256.0 + sourceColor.g * 256.0 + sourceColor.r); - } - - void main() - { - highp float bottomColor = encodedIntensity(texture2D(inputImageTexture, bottomTextureCoordinate).rgb); - highp float bottomLeftColor = encodedIntensity(texture2D(inputImageTexture, bottomLeftTextureCoordinate).rgb); - highp float bottomRightColor = encodedIntensity(texture2D(inputImageTexture, bottomRightTextureCoordinate).rgb); - highp float centerColor = encodedIntensity(texture2D(inputImageTexture, textureCoordinate).rgb); - highp float leftColor = encodedIntensity(texture2D(inputImageTexture, leftTextureCoordinate).rgb); - highp float rightColor = encodedIntensity(texture2D(inputImageTexture, rightTextureCoordinate).rgb); - highp float topColor = encodedIntensity(texture2D(inputImageTexture, topTextureCoordinate).rgb); - highp float topRightColor = encodedIntensity(texture2D(inputImageTexture, topRightTextureCoordinate).rgb); - highp float topLeftColor = encodedIntensity(texture2D(inputImageTexture, topLeftTextureCoordinate).rgb); - - highp float secondStageColor1 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(-2.0 * texelWidth, -2.0 * texelHeight)).rgb); - highp float secondStageColor2 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(-2.0 * texelWidth, -1.0 * texelHeight)).rgb); - highp float secondStageColor3 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(-2.0 * texelWidth, 0.0)).rgb); - highp float secondStageColor4 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(-2.0 * texelWidth, 1.0 * texelHeight)).rgb); - highp float secondStageColor5 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(-2.0 * texelWidth, 2.0 * texelHeight)).rgb); - highp float secondStageColor6 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(-1.0 * texelWidth, 2.0 * texelHeight)).rgb); - highp float secondStageColor7 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(0.0, 2.0 * texelHeight)).rgb); - highp float secondStageColor8 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(1.0 * texelWidth, 2.0 * texelHeight)).rgb); - - highp float thirdStageColor1 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(-1.0 * texelWidth, -2.0 * texelHeight)).rgb); - highp float thirdStageColor2 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(0.0, -2.0 * texelHeight)).rgb); - highp float thirdStageColor3 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(1.0 * texelWidth, -2.0 * texelHeight)).rgb); - highp float thirdStageColor4 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(2.0 * texelWidth, -2.0 * texelHeight)).rgb); - highp float thirdStageColor5 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(2.0 * texelWidth, -1.0 * texelHeight)).rgb); - highp float thirdStageColor6 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(2.0 * texelWidth, 0.0)).rgb); - highp float thirdStageColor7 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(2.0 * texelWidth, 1.0 * texelHeight)).rgb); - highp float thirdStageColor8 = encodedIntensity(texture2D(inputImageTexture, textureCoordinate + vec2(2.0 * texelWidth, 2.0 * texelHeight)).rgb); - - // Use a tiebreaker for pixels to the left and immediately above this one - highp float multiplier = 1.0 - step(centerColor, topColor); - multiplier = multiplier * (1.0 - step(centerColor, topLeftColor)); - multiplier = multiplier * (1.0 - step(centerColor, leftColor)); - multiplier = multiplier * (1.0 - step(centerColor, bottomLeftColor)); - - multiplier = multiplier * (1.0 - step(centerColor, secondStageColor1)); - multiplier = multiplier * (1.0 - step(centerColor, secondStageColor2)); - multiplier = multiplier * (1.0 - step(centerColor, secondStageColor3)); - multiplier = multiplier * (1.0 - step(centerColor, secondStageColor4)); - multiplier = multiplier * (1.0 - step(centerColor, secondStageColor5)); - multiplier = multiplier * (1.0 - step(centerColor, secondStageColor6)); - multiplier = multiplier * (1.0 - step(centerColor, secondStageColor7)); - multiplier = multiplier * (1.0 - step(centerColor, secondStageColor8)); - - highp float maxValue = max(centerColor, bottomColor); - maxValue = max(maxValue, bottomRightColor); - maxValue = max(maxValue, rightColor); - maxValue = max(maxValue, topRightColor); - - maxValue = max(maxValue, thirdStageColor1); - maxValue = max(maxValue, thirdStageColor2); - maxValue = max(maxValue, thirdStageColor3); - maxValue = max(maxValue, thirdStageColor4); - maxValue = max(maxValue, thirdStageColor5); - maxValue = max(maxValue, thirdStageColor6); - maxValue = max(maxValue, thirdStageColor7); - maxValue = max(maxValue, thirdStageColor8); - - highp float midValue = centerColor * step(maxValue, centerColor) * multiplier; - highp float finalValue = step(threshold, midValue); - - gl_FragColor = vec4(finalValue * centerColor, topLeftColor, topRightColor, topColor); - } -); -#else -NSString *const kGPUImageThresholdedNonMaximumSuppressionFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform float threshold; - - void main() - { - float bottomColor = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float bottomLeftColor = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float bottomRightColor = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - vec4 centerColor = texture2D(inputImageTexture, textureCoordinate); - float leftColor = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightColor = texture2D(inputImageTexture, rightTextureCoordinate).r; - float topColor = texture2D(inputImageTexture, topTextureCoordinate).r; - float topRightColor = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftColor = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - - // Use a tiebreaker for pixels to the left and immediately above this one - float multiplier = 1.0 - step(centerColor.r, topColor); - multiplier = multiplier * (1.0 - step(centerColor.r, topLeftColor)); - multiplier = multiplier * (1.0 - step(centerColor.r, leftColor)); - multiplier = multiplier * (1.0 - step(centerColor.r, bottomLeftColor)); - - float maxValue = max(centerColor.r, bottomColor); - maxValue = max(maxValue, bottomRightColor); - maxValue = max(maxValue, rightColor); - maxValue = max(maxValue, topRightColor); - - float finalValue = centerColor.r * step(maxValue, centerColor.r) * multiplier; - finalValue = step(threshold, finalValue); - - gl_FragColor = vec4(finalValue, finalValue, finalValue, 1.0); - // - // gl_FragColor = vec4((centerColor.rgb * step(maxValue, step(threshold, centerColor.r)) * multiplier), 1.0); - } -); - -NSString *const kGPUImageThresholdedNonMaximumSuppressionPackedColorspaceFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform float threshold; - - void main() - { - float bottomColor = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float bottomLeftColor = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float bottomRightColor = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - vec4 centerColor = texture2D(inputImageTexture, textureCoordinate); - float leftColor = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightColor = texture2D(inputImageTexture, rightTextureCoordinate).r; - float topColor = texture2D(inputImageTexture, topTextureCoordinate).r; - float topRightColor = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftColor = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - - // Use a tiebreaker for pixels to the left and immediately above this one - float multiplier = 1.0 - step(centerColor.r, topColor); - multiplier = multiplier * (1.0 - step(centerColor.r, topLeftColor)); - multiplier = multiplier * (1.0 - step(centerColor.r, leftColor)); - multiplier = multiplier * (1.0 - step(centerColor.r, bottomLeftColor)); - - float maxValue = max(centerColor.r, bottomColor); - maxValue = max(maxValue, bottomRightColor); - maxValue = max(maxValue, rightColor); - maxValue = max(maxValue, topRightColor); - - float finalValue = centerColor.r * step(maxValue, centerColor.r) * multiplier; - finalValue = step(threshold, finalValue); - - gl_FragColor = vec4(finalValue, finalValue, finalValue, 1.0); - // - // gl_FragColor = vec4((centerColor.rgb * step(maxValue, step(threshold, centerColor.r)) * multiplier), 1.0); - } - ); -#endif - -@implementation GPUImageThresholdedNonMaximumSuppressionFilter - -@synthesize threshold = _threshold; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithPackedColorspace:NO])) - { - return nil; - } - - return self; -} - -- (id)initWithPackedColorspace:(BOOL)inputUsesPackedColorspace; -{ - NSString *shaderString; - if (inputUsesPackedColorspace) - { - shaderString = kGPUImageThresholdedNonMaximumSuppressionPackedColorspaceFragmentShaderString; - } - else - { - shaderString = kGPUImageThresholdedNonMaximumSuppressionFragmentShaderString; - } - - - if (!(self = [super initWithFragmentShaderFromString:shaderString])) - { - return nil; - } - - thresholdUniform = [filterProgram uniformIndex:@"threshold"]; - self.threshold = 0.9; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setThreshold:(CGFloat)newValue; -{ - _threshold = newValue; - - [self setFloat:_threshold forUniform:thresholdUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTiltShiftFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTiltShiftFilter.h deleted file mode 100755 index e41adee7..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTiltShiftFilter.h +++ /dev/null @@ -1,24 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImageGaussianBlurFilter; - -/// A simulated tilt shift lens effect -@interface GPUImageTiltShiftFilter : GPUImageFilterGroup -{ - GPUImageGaussianBlurFilter *blurFilter; - GPUImageFilter *tiltShiftFilter; -} - -/// The radius of the underlying blur, in pixels. This is 7.0 by default. -@property(readwrite, nonatomic) CGFloat blurRadiusInPixels; - -/// The normalized location of the top of the in-focus area in the image, this value should be lower than bottomFocusLevel, default 0.4 -@property(readwrite, nonatomic) CGFloat topFocusLevel; - -/// The normalized location of the bottom of the in-focus area in the image, this value should be higher than topFocusLevel, default 0.6 -@property(readwrite, nonatomic) CGFloat bottomFocusLevel; - -/// The rate at which the image gets blurry away from the in-focus region, default 0.2 -@property(readwrite, nonatomic) CGFloat focusFallOffRate; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTiltShiftFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTiltShiftFilter.m deleted file mode 100755 index e2f632b1..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTiltShiftFilter.m +++ /dev/null @@ -1,126 +0,0 @@ -#import "GPUImageTiltShiftFilter.h" -#import "GPUImageFilter.h" -#import "GPUImageTwoInputFilter.h" -#import "GPUImageGaussianBlurFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageTiltShiftFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform highp float topFocusLevel; - uniform highp float bottomFocusLevel; - uniform highp float focusFallOffRate; - - void main() - { - lowp vec4 sharpImageColor = texture2D(inputImageTexture, textureCoordinate); - lowp vec4 blurredImageColor = texture2D(inputImageTexture2, textureCoordinate2); - - lowp float blurIntensity = 1.0 - smoothstep(topFocusLevel - focusFallOffRate, topFocusLevel, textureCoordinate2.y); - blurIntensity += smoothstep(bottomFocusLevel, bottomFocusLevel + focusFallOffRate, textureCoordinate2.y); - - gl_FragColor = mix(sharpImageColor, blurredImageColor, blurIntensity); - } -); -#else -NSString *const kGPUImageTiltShiftFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform float topFocusLevel; - uniform float bottomFocusLevel; - uniform float focusFallOffRate; - - void main() - { - vec4 sharpImageColor = texture2D(inputImageTexture, textureCoordinate); - vec4 blurredImageColor = texture2D(inputImageTexture2, textureCoordinate2); - - float blurIntensity = 1.0 - smoothstep(topFocusLevel - focusFallOffRate, topFocusLevel, textureCoordinate2.y); - blurIntensity += smoothstep(bottomFocusLevel, bottomFocusLevel + focusFallOffRate, textureCoordinate2.y); - - gl_FragColor = mix(sharpImageColor, blurredImageColor, blurIntensity); - } -); -#endif - -@implementation GPUImageTiltShiftFilter - -@synthesize blurRadiusInPixels; -@synthesize topFocusLevel = _topFocusLevel; -@synthesize bottomFocusLevel = _bottomFocusLevel; -@synthesize focusFallOffRate = _focusFallOffRate; - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - // First pass: apply a variable Gaussian blur - blurFilter = [[GPUImageGaussianBlurFilter alloc] init]; - [self addFilter:blurFilter]; - - // Second pass: combine the blurred image with the original sharp one - tiltShiftFilter = [[GPUImageTwoInputFilter alloc] initWithFragmentShaderFromString:kGPUImageTiltShiftFragmentShaderString]; - [self addFilter:tiltShiftFilter]; - - // Texture location 0 needs to be the sharp image for both the blur and the second stage processing - [blurFilter addTarget:tiltShiftFilter atTextureLocation:1]; - - // To prevent double updating of this filter, disable updates from the sharp image side -// self.inputFilterToIgnoreForUpdates = tiltShiftFilter; - - self.initialFilters = [NSArray arrayWithObjects:blurFilter, tiltShiftFilter, nil]; - self.terminalFilter = tiltShiftFilter; - - self.topFocusLevel = 0.4; - self.bottomFocusLevel = 0.6; - self.focusFallOffRate = 0.2; - self.blurRadiusInPixels = 7.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setBlurRadiusInPixels:(CGFloat)newValue; -{ - blurFilter.blurRadiusInPixels = newValue; -} - -- (CGFloat)blurRadiusInPixels; -{ - return blurFilter.blurRadiusInPixels; -} - -- (void)setTopFocusLevel:(CGFloat)newValue; -{ - _topFocusLevel = newValue; - [tiltShiftFilter setFloat:newValue forUniformName:@"topFocusLevel"]; -} - -- (void)setBottomFocusLevel:(CGFloat)newValue; -{ - _bottomFocusLevel = newValue; - [tiltShiftFilter setFloat:newValue forUniformName:@"bottomFocusLevel"]; -} - -- (void)setFocusFallOffRate:(CGFloat)newValue; -{ - _focusFallOffRate = newValue; - [tiltShiftFilter setFloat:newValue forUniformName:@"focusFallOffRate"]; -} - -@end \ No newline at end of file diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageToneCurveFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageToneCurveFilter.h deleted file mode 100755 index ff4ae92e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageToneCurveFilter.h +++ /dev/null @@ -1,30 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageToneCurveFilter : GPUImageFilter - -@property(readwrite, nonatomic, copy) NSArray *redControlPoints; -@property(readwrite, nonatomic, copy) NSArray *greenControlPoints; -@property(readwrite, nonatomic, copy) NSArray *blueControlPoints; -@property(readwrite, nonatomic, copy) NSArray *rgbCompositeControlPoints; - -// Initialization and teardown -- (id)initWithACVData:(NSData*)data; - -- (id)initWithACV:(NSString*)curveFilename; -- (id)initWithACVURL:(NSURL*)curveFileURL; - -// This lets you set all three red, green, and blue tone curves at once. -// NOTE: Deprecated this function because this effect can be accomplished -// using the rgbComposite channel rather then setting all 3 R, G, and B channels. -- (void)setRGBControlPoints:(NSArray *)points DEPRECATED_ATTRIBUTE; - -- (void)setPointsWithACV:(NSString*)curveFilename; -- (void)setPointsWithACVURL:(NSURL*)curveFileURL; - -// Curve calculation -- (NSMutableArray *)getPreparedSplineCurve:(NSArray *)points; -- (NSMutableArray *)splineCurve:(NSArray *)points; -- (NSMutableArray *)secondDerivative:(NSArray *)cgPoints; -- (void)updateToneCurveTexture; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageToneCurveFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageToneCurveFilter.m deleted file mode 100644 index 18a717e0..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageToneCurveFilter.m +++ /dev/null @@ -1,621 +0,0 @@ -#import "GPUImageToneCurveFilter.h" - -#pragma mark - -#pragma mark GPUImageACVFile Helper - -// GPUImageACVFile -// -// ACV File format Parser -// Please refer to http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/PhotoshopFileFormats.htm#50577411_pgfId-1056330 -// - -@interface GPUImageACVFile : NSObject{ - short version; - short totalCurves; - - NSArray *rgbCompositeCurvePoints; - NSArray *redCurvePoints; - NSArray *greenCurvePoints; - NSArray *blueCurvePoints; -} - -@property(strong,nonatomic) NSArray *rgbCompositeCurvePoints; -@property(strong,nonatomic) NSArray *redCurvePoints; -@property(strong,nonatomic) NSArray *greenCurvePoints; -@property(strong,nonatomic) NSArray *blueCurvePoints; - -- (id) initWithACVFileData:(NSData*)data; - - -unsigned short int16WithBytes(Byte* bytes); -@end - -@implementation GPUImageACVFile - -@synthesize rgbCompositeCurvePoints, redCurvePoints, greenCurvePoints, blueCurvePoints; - -- (id) initWithACVFileData:(NSData *)data { - self = [super init]; - if (self != nil) - { - if (data.length == 0) - { - NSLog(@"failed to init ACVFile with data:%@", data); - - return self; - } - - Byte* rawBytes = (Byte*) [data bytes]; - version = int16WithBytes(rawBytes); - rawBytes+=2; - - totalCurves = int16WithBytes(rawBytes); - rawBytes+=2; - - NSMutableArray *curves = [NSMutableArray new]; - - float pointRate = (1.0 / 255); - // The following is the data for each curve specified by count above - for (NSInteger x = 0; x 0) - { - // Sort the array. - NSArray *sortedPoints = [points sortedArrayUsingComparator:^NSComparisonResult(id a, id b) { -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - float x1 = [(NSValue *)a CGPointValue].x; - float x2 = [(NSValue *)b CGPointValue].x; -#else - float x1 = [(NSValue *)a pointValue].x; - float x2 = [(NSValue *)b pointValue].x; -#endif - return x1 > x2; - }]; - - // Convert from (0, 1) to (0, 255). - NSMutableArray *convertedPoints = [NSMutableArray arrayWithCapacity:[sortedPoints count]]; - for (int i=0; i<[points count]; i++){ -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - CGPoint point = [[sortedPoints objectAtIndex:i] CGPointValue]; -#else - NSPoint point = [[sortedPoints objectAtIndex:i] pointValue]; -#endif - point.x = point.x * 255; - point.y = point.y * 255; - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - [convertedPoints addObject:[NSValue valueWithCGPoint:point]]; -#else - [convertedPoints addObject:[NSValue valueWithPoint:point]]; -#endif - } - - - NSMutableArray *splinePoints = [self splineCurve:convertedPoints]; - - // If we have a first point like (0.3, 0) we'll be missing some points at the beginning - // that should be 0. -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - CGPoint firstSplinePoint = [[splinePoints objectAtIndex:0] CGPointValue]; -#else - NSPoint firstSplinePoint = [[splinePoints objectAtIndex:0] pointValue]; -#endif - - if (firstSplinePoint.x > 0) { - for (int i=firstSplinePoint.x; i >= 0; i--) { -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - CGPoint newCGPoint = CGPointMake(i, 0); - [splinePoints insertObject:[NSValue valueWithCGPoint:newCGPoint] atIndex:0]; -#else - NSPoint newNSPoint = NSMakePoint(i, 0); - [splinePoints insertObject:[NSValue valueWithPoint:newNSPoint] atIndex:0]; -#endif - } - } - - // Insert points similarly at the end, if necessary. -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - CGPoint lastSplinePoint = [[splinePoints lastObject] CGPointValue]; - - if (lastSplinePoint.x < 255) { - for (int i = lastSplinePoint.x + 1; i <= 255; i++) { - CGPoint newCGPoint = CGPointMake(i, 255); - [splinePoints addObject:[NSValue valueWithCGPoint:newCGPoint]]; - } - } -#else - NSPoint lastSplinePoint = [[splinePoints lastObject] pointValue]; - - if (lastSplinePoint.x < 255) { - for (int i = lastSplinePoint.x + 1; i <= 255; i++) { - NSPoint newNSPoint = NSMakePoint(i, 255); - [splinePoints addObject:[NSValue valueWithPoint:newNSPoint]]; - } - } -#endif - - // Prepare the spline points. - NSMutableArray *preparedSplinePoints = [NSMutableArray arrayWithCapacity:[splinePoints count]]; - for (int i=0; i<[splinePoints count]; i++) - { -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - CGPoint newPoint = [[splinePoints objectAtIndex:i] CGPointValue]; -#else - NSPoint newPoint = [[splinePoints objectAtIndex:i] pointValue]; -#endif - CGPoint origPoint = CGPointMake(newPoint.x, newPoint.x); - - float distance = sqrt(pow((origPoint.x - newPoint.x), 2.0) + pow((origPoint.y - newPoint.y), 2.0)); - - if (origPoint.y > newPoint.y) - { - distance = -distance; - } - - [preparedSplinePoints addObject:[NSNumber numberWithFloat:distance]]; - } - - return preparedSplinePoints; - } - - return nil; -} - - -- (NSMutableArray *)splineCurve:(NSArray *)points -{ - NSMutableArray *sdA = [self secondDerivative:points]; - - // [points count] is equal to [sdA count] - NSInteger n = [sdA count]; - if (n < 1) - { - return nil; - } - double sd[n]; - - // From NSMutableArray to sd[n]; - for (int i=0; i 255.0) - { - y = 255.0; - } - else if (y < 0.0) - { - y = 0.0; - } -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - [output addObject:[NSValue valueWithCGPoint:CGPointMake(x, y)]]; -#else - [output addObject:[NSValue valueWithPoint:NSMakePoint(x, y)]]; -#endif - } - } - - // The above always misses the last point because the last point is the last next, so we approach but don't equal it. - [output addObject:[points lastObject]]; - return output; -} - -- (NSMutableArray *)secondDerivative:(NSArray *)points -{ - const NSInteger n = [points count]; - if ((n <= 0) || (n == 1)) - { - return nil; - } - - double matrix[n][3]; - double result[n]; - matrix[0][1]=1; - // What about matrix[0][1] and matrix[0][0]? Assuming 0 for now (Brad L.) - matrix[0][0]=0; - matrix[0][2]=0; - - for(int i=1;idown) - for(int i=1;iup) - for(NSInteger i=n-2;i>=0;i--) - { - double k = matrix[i][2]/matrix[i+1][1]; - matrix[i][1] -= k*matrix[i+1][0]; - matrix[i][2] = 0; - result[i] -= k*result[i+1]; - } - - double y2[n]; - for(int i=0;i= 256) && ([_greenCurve count] >= 256) && ([_blueCurve count] >= 256) && ([_rgbCompositeCurve count] >= 256)) - { - for (unsigned int currentCurveIndex = 0; currentCurveIndex < 256; currentCurveIndex++) - { - // BGRA for upload to texture - GLubyte b = fmin(fmax(currentCurveIndex + [[_blueCurve objectAtIndex:currentCurveIndex] floatValue], 0), 255); - toneCurveByteArray[currentCurveIndex * 4] = fmin(fmax(b + [[_rgbCompositeCurve objectAtIndex:b] floatValue], 0), 255); - GLubyte g = fmin(fmax(currentCurveIndex + [[_greenCurve objectAtIndex:currentCurveIndex] floatValue], 0), 255); - toneCurveByteArray[currentCurveIndex * 4 + 1] = fmin(fmax(g + [[_rgbCompositeCurve objectAtIndex:g] floatValue], 0), 255); - GLubyte r = fmin(fmax(currentCurveIndex + [[_redCurve objectAtIndex:currentCurveIndex] floatValue], 0), 255); - toneCurveByteArray[currentCurveIndex * 4 + 2] = fmin(fmax(r + [[_rgbCompositeCurve objectAtIndex:r] floatValue], 0), 255); - toneCurveByteArray[currentCurveIndex * 4 + 3] = 255; - } - - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256 /*width*/, 1 /*height*/, 0, GL_BGRA, GL_UNSIGNED_BYTE, toneCurveByteArray); - } - }); -} - -#pragma mark - -#pragma mark Rendering - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - if (self.preventRendering) - { - [firstInputFramebuffer unlock]; - return; - } - - [GPUImageContext setActiveShaderProgram:filterProgram]; - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - if (usingNextFrameForImageCapture) - { - [outputFramebuffer lock]; - } - - glClearColor(backgroundColorRed, backgroundColorGreen, backgroundColorBlue, backgroundColorAlpha); - glClear(GL_COLOR_BUFFER_BIT); - - glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, [firstInputFramebuffer texture]); - glUniform1i(filterInputTextureUniform, 2); - - glActiveTexture(GL_TEXTURE3); - glBindTexture(GL_TEXTURE_2D, toneCurveTexture); - glUniform1i(toneCurveTextureUniform, 3); - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - glVertexAttribPointer(filterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - [firstInputFramebuffer unlock]; - if (usingNextFrameForImageCapture) - { - dispatch_semaphore_signal(imageCaptureSemaphore); - } -} - -#pragma mark - -#pragma mark Accessors - -- (void)setRGBControlPoints:(NSArray *)points -{ - _redControlPoints = [points copy]; - _redCurve = [self getPreparedSplineCurve:_redControlPoints]; - - _greenControlPoints = [points copy]; - _greenCurve = [self getPreparedSplineCurve:_greenControlPoints]; - - _blueControlPoints = [points copy]; - _blueCurve = [self getPreparedSplineCurve:_blueControlPoints]; - - [self updateToneCurveTexture]; -} - - -- (void)setRgbCompositeControlPoints:(NSArray *)newValue -{ - _rgbCompositeControlPoints = [newValue copy]; - _rgbCompositeCurve = [self getPreparedSplineCurve:_rgbCompositeControlPoints]; - - [self updateToneCurveTexture]; -} - - -- (void)setRedControlPoints:(NSArray *)newValue; -{ - _redControlPoints = [newValue copy]; - _redCurve = [self getPreparedSplineCurve:_redControlPoints]; - - [self updateToneCurveTexture]; -} - - -- (void)setGreenControlPoints:(NSArray *)newValue -{ - _greenControlPoints = [newValue copy]; - _greenCurve = [self getPreparedSplineCurve:_greenControlPoints]; - - [self updateToneCurveTexture]; -} - - -- (void)setBlueControlPoints:(NSArray *)newValue -{ - _blueControlPoints = [newValue copy]; - _blueCurve = [self getPreparedSplineCurve:_blueControlPoints]; - - [self updateToneCurveTexture]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageToonFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageToonFilter.h deleted file mode 100755 index ef8e17c3..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageToonFilter.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "GPUImage3x3TextureSamplingFilter.h" - -/** This uses Sobel edge detection to place a black border around objects, - and then it quantizes the colors present in the image to give a cartoon-like quality to the image. - */ -@interface GPUImageToonFilter : GPUImage3x3TextureSamplingFilter -{ - GLint thresholdUniform, quantizationLevelsUniform; -} - -/** The threshold at which to apply the edges, default of 0.2 - */ -@property(readwrite, nonatomic) CGFloat threshold; - -/** The levels of quantization for the posterization of colors within the scene, with a default of 10.0 - */ -@property(readwrite, nonatomic) CGFloat quantizationLevels; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageToonFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageToonFilter.m deleted file mode 100755 index e8ff104e..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageToonFilter.m +++ /dev/null @@ -1,149 +0,0 @@ -#import "GPUImageToonFilter.h" -#import "GPUImageSobelEdgeDetectionFilter.h" -#import "GPUImage3x3ConvolutionFilter.h" - -// Code from "Graphics Shaders: Theory and Practice" by M. Bailey and S. Cunningham -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageToonFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp float intensity; - uniform highp float threshold; - uniform highp float quantizationLevels; - - const highp vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float h = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity; - float v = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity; - - float mag = length(vec2(h, v)); - - vec3 posterizedImageColor = floor((textureColor.rgb * quantizationLevels) + 0.5) / quantizationLevels; - - float thresholdTest = 1.0 - step(threshold, mag); - - gl_FragColor = vec4(posterizedImageColor * thresholdTest, textureColor.a); - } -); -#else -NSString *const kGPUImageToonFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform float intensity; - uniform float threshold; - uniform float quantizationLevels; - - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - - void main() - { - vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); - - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float h = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity; - float v = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity; - - float mag = length(vec2(h, v)); - - vec3 posterizedImageColor = floor((textureColor.rgb * quantizationLevels) + 0.5) / quantizationLevels; - - float thresholdTest = 1.0 - step(threshold, mag); - - gl_FragColor = vec4(posterizedImageColor * thresholdTest, textureColor.a); - } -); -#endif - -@implementation GPUImageToonFilter - -@synthesize threshold = _threshold; -@synthesize quantizationLevels = _quantizationLevels; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageToonFragmentShaderString])) - { - return nil; - } - - hasOverriddenImageSizeFactor = NO; - - thresholdUniform = [filterProgram uniformIndex:@"threshold"]; - quantizationLevelsUniform = [filterProgram uniformIndex:@"quantizationLevels"]; - - self.threshold = 0.2; - self.quantizationLevels = 10.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setThreshold:(CGFloat)newValue; -{ - _threshold = newValue; - - [self setFloat:_threshold forUniform:thresholdUniform program:filterProgram]; -} - -- (void)setQuantizationLevels:(CGFloat)newValue; -{ - _quantizationLevels = newValue; - - [self setFloat:_quantizationLevels forUniform:quantizationLevelsUniform program:filterProgram]; -} - - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTransformFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTransformFilter.h deleted file mode 100755 index 9865b853..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTransformFilter.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageTransformFilter : GPUImageFilter -{ - GLint transformMatrixUniform, orthographicMatrixUniform; - GPUMatrix4x4 orthographicMatrix; -} - -// You can either set the transform to apply to be a 2-D affine transform or a 3-D transform. The default is the identity transform (the output image is identical to the input). -@property(readwrite, nonatomic) CGAffineTransform affineTransform; -@property(readwrite, nonatomic) CATransform3D transform3D; - -// This applies the transform to the raw frame data if set to YES, the default of NO takes the aspect ratio of the image input into account when rotating -@property(readwrite, nonatomic) BOOL ignoreAspectRatio; - -// sets the anchor point to top left corner -@property(readwrite, nonatomic) BOOL anchorTopLeft; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTransformFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTransformFilter.m deleted file mode 100755 index 17933092..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTransformFilter.m +++ /dev/null @@ -1,260 +0,0 @@ -#import "GPUImageTransformFilter.h" - -NSString *const kGPUImageTransformVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - - uniform mat4 transformMatrix; - uniform mat4 orthographicMatrix; - - varying vec2 textureCoordinate; - - void main() - { - gl_Position = transformMatrix * vec4(position.xyz, 1.0) * orthographicMatrix; - textureCoordinate = inputTextureCoordinate.xy; - } -); - -@implementation GPUImageTransformFilter - -@synthesize affineTransform; -@synthesize transform3D = _transform3D; -@synthesize ignoreAspectRatio = _ignoreAspectRatio; -@synthesize anchorTopLeft = _anchorTopLeft; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithVertexShaderFromString:kGPUImageTransformVertexShaderString fragmentShaderFromString:kGPUImagePassthroughFragmentShaderString])) - { - return nil; - } - - transformMatrixUniform = [filterProgram uniformIndex:@"transformMatrix"]; - orthographicMatrixUniform = [filterProgram uniformIndex:@"orthographicMatrix"]; - - self.transform3D = CATransform3DIdentity; - - return self; -} - -#pragma mark - -#pragma mark Conversion from matrix formats - -- (void)loadOrthoMatrix:(GLfloat *)matrix left:(GLfloat)left right:(GLfloat)right bottom:(GLfloat)bottom top:(GLfloat)top near:(GLfloat)near far:(GLfloat)far; -{ - GLfloat r_l = right - left; - GLfloat t_b = top - bottom; - GLfloat f_n = far - near; - GLfloat tx = - (right + left) / (right - left); - GLfloat ty = - (top + bottom) / (top - bottom); - GLfloat tz = - (far + near) / (far - near); - - float scale = 2.0f; - if (_anchorTopLeft) - { - scale = 4.0f; - tx=-1.0f; - ty=-1.0f; - } - - matrix[0] = scale / r_l; - matrix[1] = 0.0f; - matrix[2] = 0.0f; - matrix[3] = tx; - - matrix[4] = 0.0f; - matrix[5] = scale / t_b; - matrix[6] = 0.0f; - matrix[7] = ty; - - matrix[8] = 0.0f; - matrix[9] = 0.0f; - matrix[10] = scale / f_n; - matrix[11] = tz; - - matrix[12] = 0.0f; - matrix[13] = 0.0f; - matrix[14] = 0.0f; - matrix[15] = 1.0f; -} - -//- (void)convert3DTransform:(CATransform3D *)transform3D toMatrix:(GLfloat *)matrix; -//{ -// // struct CATransform3D -// // { -// // CGFloat m11, m12, m13, m14; -// // CGFloat m21, m22, m23, m24; -// // CGFloat m31, m32, m33, m34; -// // CGFloat m41, m42, m43, m44; -// // }; -// -// matrix[0] = (GLfloat)transform3D->m11; -// matrix[1] = (GLfloat)transform3D->m12; -// matrix[2] = (GLfloat)transform3D->m13; -// matrix[3] = (GLfloat)transform3D->m14; -// matrix[4] = (GLfloat)transform3D->m21; -// matrix[5] = (GLfloat)transform3D->m22; -// matrix[6] = (GLfloat)transform3D->m23; -// matrix[7] = (GLfloat)transform3D->m24; -// matrix[8] = (GLfloat)transform3D->m31; -// matrix[9] = (GLfloat)transform3D->m32; -// matrix[10] = (GLfloat)transform3D->m33; -// matrix[11] = (GLfloat)transform3D->m34; -// matrix[12] = (GLfloat)transform3D->m41; -// matrix[13] = (GLfloat)transform3D->m42; -// matrix[14] = (GLfloat)transform3D->m43; -// matrix[15] = (GLfloat)transform3D->m44; -//} - -- (void)convert3DTransform:(CATransform3D *)transform3D toMatrix:(GPUMatrix4x4 *)matrix; -{ - // struct CATransform3D - // { - // CGFloat m11, m12, m13, m14; - // CGFloat m21, m22, m23, m24; - // CGFloat m31, m32, m33, m34; - // CGFloat m41, m42, m43, m44; - // }; - - GLfloat *mappedMatrix = (GLfloat *)matrix; - - mappedMatrix[0] = (GLfloat)transform3D->m11; - mappedMatrix[1] = (GLfloat)transform3D->m12; - mappedMatrix[2] = (GLfloat)transform3D->m13; - mappedMatrix[3] = (GLfloat)transform3D->m14; - mappedMatrix[4] = (GLfloat)transform3D->m21; - mappedMatrix[5] = (GLfloat)transform3D->m22; - mappedMatrix[6] = (GLfloat)transform3D->m23; - mappedMatrix[7] = (GLfloat)transform3D->m24; - mappedMatrix[8] = (GLfloat)transform3D->m31; - mappedMatrix[9] = (GLfloat)transform3D->m32; - mappedMatrix[10] = (GLfloat)transform3D->m33; - mappedMatrix[11] = (GLfloat)transform3D->m34; - mappedMatrix[12] = (GLfloat)transform3D->m41; - mappedMatrix[13] = (GLfloat)transform3D->m42; - mappedMatrix[14] = (GLfloat)transform3D->m43; - mappedMatrix[15] = (GLfloat)transform3D->m44; -} - -#pragma mark - -#pragma mark GPUImageInput - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - CGSize currentFBOSize = [self sizeOfFBO]; - CGFloat normalizedHeight = currentFBOSize.height / currentFBOSize.width; - - GLfloat adjustedVertices[] = { - -1.0f, -normalizedHeight, - 1.0f, -normalizedHeight, - -1.0f, normalizedHeight, - 1.0f, normalizedHeight, - }; - static const GLfloat squareVertices[] = { - -1.0f, -1.0f, - 1.0f, -1.0f, - -1.0f, 1.0f, - 1.0f, 1.0f, - }; - - GLfloat adjustedVerticesAnchorTL[] = { - 0.0f, 0.0f, - 1.0f, 0.0f, - 0.0f, normalizedHeight, - 1.0f, normalizedHeight, - }; - - static const GLfloat squareVerticesAnchorTL[] = { - 0.0f, 0.0f, - 1.0f, 0.0f, - 0.0f, 1.0f, - 1.0f, 1.0f, - }; - - if (_ignoreAspectRatio) - { - if (_anchorTopLeft) - { - [self renderToTextureWithVertices:squareVerticesAnchorTL textureCoordinates:[[self class] textureCoordinatesForRotation:inputRotation]]; - } - else - { - [self renderToTextureWithVertices:squareVertices textureCoordinates:[[self class] textureCoordinatesForRotation:inputRotation]]; - } - } - else - { - if (_anchorTopLeft) - { - [self renderToTextureWithVertices:adjustedVerticesAnchorTL textureCoordinates:[[self class] textureCoordinatesForRotation:inputRotation]]; - } - else - { - [self renderToTextureWithVertices:adjustedVertices textureCoordinates:[[self class] textureCoordinatesForRotation:inputRotation]]; - } - } - - [self informTargetsAboutNewFrameAtTime:frameTime]; -} - -- (void)setupFilterForSize:(CGSize)filterFrameSize; -{ - if (!_ignoreAspectRatio) - { - [self loadOrthoMatrix:(GLfloat *)&orthographicMatrix left:-1.0 right:1.0 bottom:(-1.0 * filterFrameSize.height / filterFrameSize.width) top:(1.0 * filterFrameSize.height / filterFrameSize.width) near:-1.0 far:1.0]; - // [self loadOrthoMatrix:orthographicMatrix left:-1.0 right:1.0 bottom:(-1.0 * (GLfloat)backingHeight / (GLfloat)backingWidth) top:(1.0 * (GLfloat)backingHeight / (GLfloat)backingWidth) near:-2.0 far:2.0]; - - [self setMatrix4f:orthographicMatrix forUniform:orthographicMatrixUniform program:filterProgram]; - } -} - -#pragma mark - -#pragma mark Accessors - -- (void)setAffineTransform:(CGAffineTransform)newValue; -{ - self.transform3D = CATransform3DMakeAffineTransform(newValue); -} - -- (CGAffineTransform)affineTransform; -{ - return CATransform3DGetAffineTransform(self.transform3D); -} - -- (void)setTransform3D:(CATransform3D)newValue; -{ - _transform3D = newValue; - - GPUMatrix4x4 temporaryMatrix; - - [self convert3DTransform:&_transform3D toMatrix:&temporaryMatrix]; - [self setMatrix4f:temporaryMatrix forUniform:transformMatrixUniform program:filterProgram]; -} - -- (void)setIgnoreAspectRatio:(BOOL)newValue; -{ - _ignoreAspectRatio = newValue; - - if (_ignoreAspectRatio) - { - [self loadOrthoMatrix:(GLfloat *)&orthographicMatrix left:-1.0 right:1.0 bottom:-1.0 top:1.0 near:-1.0 far:1.0]; - [self setMatrix4f:orthographicMatrix forUniform:orthographicMatrixUniform program:filterProgram]; - } - else - { - [self setupFilterForSize:[self sizeOfFBO]]; - } -} - -- (void)setAnchorTopLeft:(BOOL)newValue -{ - _anchorTopLeft = newValue; - [self setIgnoreAspectRatio:_ignoreAspectRatio]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoInputCrossTextureSamplingFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoInputCrossTextureSamplingFilter.h deleted file mode 100644 index 64eac9dc..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoInputCrossTextureSamplingFilter.h +++ /dev/null @@ -1,15 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageTwoInputCrossTextureSamplingFilter : GPUImageTwoInputFilter -{ - GLint texelWidthUniform, texelHeightUniform; - - CGFloat texelWidth, texelHeight; - BOOL hasOverriddenImageSizeFactor; -} - -// The texel width and height determines how far out to sample from this texel. By default, this is the normalized width of a pixel, but this can be overridden for different effects. -@property(readwrite, nonatomic) CGFloat texelWidth; -@property(readwrite, nonatomic) CGFloat texelHeight; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoInputCrossTextureSamplingFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoInputCrossTextureSamplingFilter.m deleted file mode 100644 index aa338f81..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoInputCrossTextureSamplingFilter.m +++ /dev/null @@ -1,108 +0,0 @@ -#import "GPUImageTwoInputCrossTextureSamplingFilter.h" - -NSString *const kGPUImageTwoInputNearbyTexelSamplingVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - attribute vec4 inputTextureCoordinate2; - - uniform float texelWidth; - uniform float texelHeight; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - varying vec2 topTextureCoordinate; - varying vec2 bottomTextureCoordinate; - - varying vec2 textureCoordinate2; - varying vec2 leftTextureCoordinate2; - varying vec2 rightTextureCoordinate2; - varying vec2 topTextureCoordinate2; - varying vec2 bottomTextureCoordinate2; - - void main() - { - gl_Position = position; - - vec2 widthStep = vec2(texelWidth, 0.0); - vec2 heightStep = vec2(0.0, texelHeight); - - textureCoordinate = inputTextureCoordinate.xy; - leftTextureCoordinate = inputTextureCoordinate.xy - widthStep; - rightTextureCoordinate = inputTextureCoordinate.xy + widthStep; - topTextureCoordinate = inputTextureCoordinate.xy - heightStep; - bottomTextureCoordinate = inputTextureCoordinate.xy + heightStep; - - textureCoordinate2 = inputTextureCoordinate2.xy; - leftTextureCoordinate2 = inputTextureCoordinate2.xy - widthStep; - rightTextureCoordinate2 = inputTextureCoordinate2.xy + widthStep; - topTextureCoordinate2 = inputTextureCoordinate2.xy - heightStep; - bottomTextureCoordinate2 = inputTextureCoordinate2.xy + heightStep; - } -); - -@implementation GPUImageTwoInputCrossTextureSamplingFilter - -@synthesize texelWidth = _texelWidth; -@synthesize texelHeight = _texelHeight; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [super initWithVertexShaderFromString:kGPUImageTwoInputNearbyTexelSamplingVertexShaderString fragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - texelWidthUniform = [filterProgram uniformIndex:@"texelWidth"]; - texelHeightUniform = [filterProgram uniformIndex:@"texelHeight"]; - - return self; -} - -- (void)setupFilterForSize:(CGSize)filterFrameSize; -{ - if (!hasOverriddenImageSizeFactor) - { - _texelWidth = 1.0 / filterFrameSize.width; - _texelHeight = 1.0 / filterFrameSize.height; - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:filterProgram]; - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - glUniform1f(texelWidthUniform, _texelHeight); - glUniform1f(texelHeightUniform, _texelWidth); - } - else - { - glUniform1f(texelWidthUniform, _texelWidth); - glUniform1f(texelHeightUniform, _texelHeight); - } - }); - } -} - -#pragma mark - -#pragma mark Accessors - -- (void)setTexelWidth:(CGFloat)newValue; -{ - hasOverriddenImageSizeFactor = YES; - _texelWidth = newValue; - - [self setFloat:_texelWidth forUniform:texelWidthUniform program:filterProgram]; -} - -- (void)setTexelHeight:(CGFloat)newValue; -{ - hasOverriddenImageSizeFactor = YES; - _texelHeight = newValue; - - [self setFloat:_texelHeight forUniform:texelHeightUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoInputFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoInputFilter.h deleted file mode 100644 index da3a1345..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoInputFilter.h +++ /dev/null @@ -1,21 +0,0 @@ -#import "GPUImageFilter.h" - -extern NSString *const kGPUImageTwoInputTextureVertexShaderString; - -@interface GPUImageTwoInputFilter : GPUImageFilter -{ - GPUImageFramebuffer *secondInputFramebuffer; - - GLint filterSecondTextureCoordinateAttribute; - GLint filterInputTextureUniform2; - GPUImageRotationMode inputRotation2; - CMTime firstFrameTime, secondFrameTime; - - BOOL hasSetFirstTexture, hasReceivedFirstFrame, hasReceivedSecondFrame, firstFrameWasVideo, secondFrameWasVideo; - BOOL firstFrameCheckDisabled, secondFrameCheckDisabled; -} - -- (void)disableFirstFrameCheck; -- (void)disableSecondFrameCheck; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoInputFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoInputFilter.m deleted file mode 100644 index cf318737..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoInputFilter.m +++ /dev/null @@ -1,264 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -NSString *const kGPUImageTwoInputTextureVertexShaderString = SHADER_STRING -( - attribute vec4 position; - attribute vec4 inputTextureCoordinate; - attribute vec4 inputTextureCoordinate2; - - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - void main() - { - gl_Position = position; - textureCoordinate = inputTextureCoordinate.xy; - textureCoordinate2 = inputTextureCoordinate2.xy; - } -); - - -@implementation GPUImageTwoInputFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithFragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [self initWithVertexShaderFromString:kGPUImageTwoInputTextureVertexShaderString fragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - return self; -} - -- (id)initWithVertexShaderFromString:(NSString *)vertexShaderString fragmentShaderFromString:(NSString *)fragmentShaderString; -{ - if (!(self = [super initWithVertexShaderFromString:vertexShaderString fragmentShaderFromString:fragmentShaderString])) - { - return nil; - } - - inputRotation2 = kGPUImageNoRotation; - - hasSetFirstTexture = NO; - - hasReceivedFirstFrame = NO; - hasReceivedSecondFrame = NO; - firstFrameWasVideo = NO; - secondFrameWasVideo = NO; - firstFrameCheckDisabled = NO; - secondFrameCheckDisabled = NO; - - firstFrameTime = kCMTimeInvalid; - secondFrameTime = kCMTimeInvalid; - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - filterSecondTextureCoordinateAttribute = [filterProgram attributeIndex:@"inputTextureCoordinate2"]; - - filterInputTextureUniform2 = [filterProgram uniformIndex:@"inputImageTexture2"]; // This does assume a name of "inputImageTexture2" for second input texture in the fragment shader - glEnableVertexAttribArray(filterSecondTextureCoordinateAttribute); - }); - - return self; -} - -- (void)initializeAttributes; -{ - [super initializeAttributes]; - [filterProgram addAttribute:@"inputTextureCoordinate2"]; -} - -- (void)disableFirstFrameCheck; -{ - firstFrameCheckDisabled = YES; -} - -- (void)disableSecondFrameCheck; -{ - secondFrameCheckDisabled = YES; -} - -#pragma mark - -#pragma mark Rendering - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - if (self.preventRendering) - { - [firstInputFramebuffer unlock]; - [secondInputFramebuffer unlock]; - return; - } - - [GPUImageContext setActiveShaderProgram:filterProgram]; - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - if (usingNextFrameForImageCapture) - { - [outputFramebuffer lock]; - } - - [self setUniformsForProgramAtIndex:0]; - - glClearColor(backgroundColorRed, backgroundColorGreen, backgroundColorBlue, backgroundColorAlpha); - glClear(GL_COLOR_BUFFER_BIT); - - glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, [firstInputFramebuffer texture]); - glUniform1i(filterInputTextureUniform, 2); - - glActiveTexture(GL_TEXTURE3); - glBindTexture(GL_TEXTURE_2D, [secondInputFramebuffer texture]); - glUniform1i(filterInputTextureUniform2, 3); - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - glVertexAttribPointer(filterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - glVertexAttribPointer(filterSecondTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, [[self class] textureCoordinatesForRotation:inputRotation2]); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - [firstInputFramebuffer unlock]; - [secondInputFramebuffer unlock]; - if (usingNextFrameForImageCapture) - { - dispatch_semaphore_signal(imageCaptureSemaphore); - } -} - -#pragma mark - -#pragma mark GPUImageInput - -- (NSInteger)nextAvailableTextureIndex; -{ - if (hasSetFirstTexture) - { - return 1; - } - else - { - return 0; - } -} - -- (void)setInputFramebuffer:(GPUImageFramebuffer *)newInputFramebuffer atIndex:(NSInteger)textureIndex; -{ - if (textureIndex == 0) - { - firstInputFramebuffer = newInputFramebuffer; - hasSetFirstTexture = YES; - [firstInputFramebuffer lock]; - } - else - { - secondInputFramebuffer = newInputFramebuffer; - [secondInputFramebuffer lock]; - } -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - if (textureIndex == 0) - { - [super setInputSize:newSize atIndex:textureIndex]; - - if (CGSizeEqualToSize(newSize, CGSizeZero)) - { - hasSetFirstTexture = NO; - } - } -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - if (textureIndex == 0) - { - inputRotation = newInputRotation; - } - else - { - inputRotation2 = newInputRotation; - } -} - -- (CGSize)rotatedSize:(CGSize)sizeToRotate forIndex:(NSInteger)textureIndex; -{ - CGSize rotatedSize = sizeToRotate; - - GPUImageRotationMode rotationToCheck; - if (textureIndex == 0) - { - rotationToCheck = inputRotation; - } - else - { - rotationToCheck = inputRotation2; - } - - if (GPUImageRotationSwapsWidthAndHeight(rotationToCheck)) - { - rotatedSize.width = sizeToRotate.height; - rotatedSize.height = sizeToRotate.width; - } - - return rotatedSize; -} - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - // You can set up infinite update loops, so this helps to short circuit them - if (hasReceivedFirstFrame && hasReceivedSecondFrame) - { - return; - } - - BOOL updatedMovieFrameOppositeStillImage = NO; - - if (textureIndex == 0) - { - hasReceivedFirstFrame = YES; - firstFrameTime = frameTime; - if (secondFrameCheckDisabled) - { - hasReceivedSecondFrame = YES; - } - - if (!CMTIME_IS_INDEFINITE(frameTime)) - { - if CMTIME_IS_INDEFINITE(secondFrameTime) - { - updatedMovieFrameOppositeStillImage = YES; - } - } - } - else - { - hasReceivedSecondFrame = YES; - secondFrameTime = frameTime; - if (firstFrameCheckDisabled) - { - hasReceivedFirstFrame = YES; - } - - if (!CMTIME_IS_INDEFINITE(frameTime)) - { - if CMTIME_IS_INDEFINITE(firstFrameTime) - { - updatedMovieFrameOppositeStillImage = YES; - } - } - } - - // || (hasReceivedFirstFrame && secondFrameCheckDisabled) || (hasReceivedSecondFrame && firstFrameCheckDisabled) - if ((hasReceivedFirstFrame && hasReceivedSecondFrame) || updatedMovieFrameOppositeStillImage) - { - CMTime passOnFrameTime = (!CMTIME_IS_INDEFINITE(firstFrameTime)) ? firstFrameTime : secondFrameTime; - [super newFrameReadyAtTime:passOnFrameTime atIndex:0]; // Bugfix when trying to record: always use time from first input (unless indefinite, in which case use the second input) - hasReceivedFirstFrame = NO; - hasReceivedSecondFrame = NO; - } -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoPassFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoPassFilter.h deleted file mode 100755 index 23087f35..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoPassFilter.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageTwoPassFilter : GPUImageFilter -{ - GPUImageFramebuffer *secondOutputFramebuffer; - - GLProgram *secondFilterProgram; - GLint secondFilterPositionAttribute, secondFilterTextureCoordinateAttribute; - GLint secondFilterInputTextureUniform, secondFilterInputTextureUniform2; - - NSMutableDictionary *secondProgramUniformStateRestorationBlocks; -} - -// Initialization and teardown -- (id)initWithFirstStageVertexShaderFromString:(NSString *)firstStageVertexShaderString firstStageFragmentShaderFromString:(NSString *)firstStageFragmentShaderString secondStageVertexShaderFromString:(NSString *)secondStageVertexShaderString secondStageFragmentShaderFromString:(NSString *)secondStageFragmentShaderString; -- (id)initWithFirstStageFragmentShaderFromString:(NSString *)firstStageFragmentShaderString secondStageFragmentShaderFromString:(NSString *)secondStageFragmentShaderString; -- (void)initializeSecondaryAttributes; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoPassFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoPassFilter.m deleted file mode 100755 index 9eb292b4..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoPassFilter.m +++ /dev/null @@ -1,201 +0,0 @@ -#import "GPUImageTwoPassFilter.h" - -@implementation GPUImageTwoPassFilter - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithFirstStageVertexShaderFromString:(NSString *)firstStageVertexShaderString firstStageFragmentShaderFromString:(NSString *)firstStageFragmentShaderString secondStageVertexShaderFromString:(NSString *)secondStageVertexShaderString secondStageFragmentShaderFromString:(NSString *)secondStageFragmentShaderString; -{ - if (!(self = [super initWithVertexShaderFromString:firstStageVertexShaderString fragmentShaderFromString:firstStageFragmentShaderString])) - { - return nil; - } - - secondProgramUniformStateRestorationBlocks = [NSMutableDictionary dictionaryWithCapacity:10]; - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - - secondFilterProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:secondStageVertexShaderString fragmentShaderString:secondStageFragmentShaderString]; - - if (!secondFilterProgram.initialized) - { - [self initializeSecondaryAttributes]; - - if (![secondFilterProgram link]) - { - NSString *progLog = [secondFilterProgram programLog]; - NSLog(@"Program link log: %@", progLog); - NSString *fragLog = [secondFilterProgram fragmentShaderLog]; - NSLog(@"Fragment shader compile log: %@", fragLog); - NSString *vertLog = [secondFilterProgram vertexShaderLog]; - NSLog(@"Vertex shader compile log: %@", vertLog); - secondFilterProgram = nil; - NSAssert(NO, @"Filter shader link failed"); - } - } - - secondFilterPositionAttribute = [secondFilterProgram attributeIndex:@"position"]; - secondFilterTextureCoordinateAttribute = [secondFilterProgram attributeIndex:@"inputTextureCoordinate"]; - secondFilterInputTextureUniform = [secondFilterProgram uniformIndex:@"inputImageTexture"]; // This does assume a name of "inputImageTexture" for the fragment shader - secondFilterInputTextureUniform2 = [secondFilterProgram uniformIndex:@"inputImageTexture2"]; // This does assume a name of "inputImageTexture2" for second input texture in the fragment shader - - [GPUImageContext setActiveShaderProgram:secondFilterProgram]; - - glEnableVertexAttribArray(secondFilterPositionAttribute); - glEnableVertexAttribArray(secondFilterTextureCoordinateAttribute); - }); - - return self; -} - -- (id)initWithFirstStageFragmentShaderFromString:(NSString *)firstStageFragmentShaderString secondStageFragmentShaderFromString:(NSString *)secondStageFragmentShaderString; -{ - if (!(self = [self initWithFirstStageVertexShaderFromString:kGPUImageVertexShaderString firstStageFragmentShaderFromString:firstStageFragmentShaderString secondStageVertexShaderFromString:kGPUImageVertexShaderString secondStageFragmentShaderFromString:secondStageFragmentShaderString])) - { - return nil; - } - - return self; -} - -- (void)initializeSecondaryAttributes; -{ - [secondFilterProgram addAttribute:@"position"]; - [secondFilterProgram addAttribute:@"inputTextureCoordinate"]; -} - -#pragma mark - -#pragma mark Managing targets - -- (GPUImageFramebuffer *)framebufferForOutput; -{ - return secondOutputFramebuffer; -} - -- (void)removeOutputFramebuffer; -{ - secondOutputFramebuffer = nil; -} - -#pragma mark - -#pragma mark Rendering - -- (void)renderToTextureWithVertices:(const GLfloat *)vertices textureCoordinates:(const GLfloat *)textureCoordinates; -{ - if (self.preventRendering) - { - [firstInputFramebuffer unlock]; - return; - } - - [GPUImageContext setActiveShaderProgram:filterProgram]; - - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - - [self setUniformsForProgramAtIndex:0]; - - glClearColor(backgroundColorRed, backgroundColorGreen, backgroundColorBlue, backgroundColorAlpha); - glClear(GL_COLOR_BUFFER_BIT); - - glActiveTexture(GL_TEXTURE2); - glBindTexture(GL_TEXTURE_2D, [firstInputFramebuffer texture]); - - glUniform1i(filterInputTextureUniform, 2); - - glVertexAttribPointer(filterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - glVertexAttribPointer(filterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - [firstInputFramebuffer unlock]; - firstInputFramebuffer = nil; - - // This assumes that any two-pass filter that says it desires monochrome input is using the first pass for a luminance conversion, which can be dropped -// if (!currentlyReceivingMonochromeInput) -// { - // Run the first stage of the two-pass filter -// [super renderToTextureWithVertices:vertices textureCoordinates:textureCoordinates]; -// } - - // Run the second stage of the two-pass filter - secondOutputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:[self sizeOfFBO] textureOptions:self.outputTextureOptions onlyTexture:NO]; - [secondOutputFramebuffer activateFramebuffer]; - [GPUImageContext setActiveShaderProgram:secondFilterProgram]; - if (usingNextFrameForImageCapture) - { - [secondOutputFramebuffer lock]; - } - - [self setUniformsForProgramAtIndex:1]; - - glActiveTexture(GL_TEXTURE3); - glBindTexture(GL_TEXTURE_2D, [outputFramebuffer texture]); - glVertexAttribPointer(secondFilterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, [[self class] textureCoordinatesForRotation:kGPUImageNoRotation]); - - // TODO: Re-enable this monochrome optimization -// if (!currentlyReceivingMonochromeInput) -// { -// glActiveTexture(GL_TEXTURE3); -// glBindTexture(GL_TEXTURE_2D, outputTexture); -// glVertexAttribPointer(secondFilterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, [[self class] textureCoordinatesForRotation:kGPUImageNoRotation]); -// } -// else -// { -// glActiveTexture(GL_TEXTURE3); -// glBindTexture(GL_TEXTURE_2D, sourceTexture); -// glVertexAttribPointer(secondFilterTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); -// } - - glUniform1i(secondFilterInputTextureUniform, 3); - - glVertexAttribPointer(secondFilterPositionAttribute, 2, GL_FLOAT, 0, 0, vertices); - - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - [outputFramebuffer unlock]; - outputFramebuffer = nil; - - if (usingNextFrameForImageCapture) - { - dispatch_semaphore_signal(imageCaptureSemaphore); - } -} - -- (void)setAndExecuteUniformStateCallbackAtIndex:(GLint)uniform forProgram:(GLProgram *)shaderProgram toBlock:(dispatch_block_t)uniformStateBlock; -{ -// TODO: Deal with the fact that two-pass filters may have the same shader program identifier - if (shaderProgram == filterProgram) - { - [uniformStateRestorationBlocks setObject:[uniformStateBlock copy] forKey:[NSNumber numberWithInt:uniform]]; - } - else - { - [secondProgramUniformStateRestorationBlocks setObject:[uniformStateBlock copy] forKey:[NSNumber numberWithInt:uniform]]; - } - uniformStateBlock(); -} - -- (void)setUniformsForProgramAtIndex:(NSUInteger)programIndex; -{ - if (programIndex == 0) - { - [uniformStateRestorationBlocks enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop){ - dispatch_block_t currentBlock = obj; - currentBlock(); - }]; - } - else - { - [secondProgramUniformStateRestorationBlocks enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop){ - dispatch_block_t currentBlock = obj; - currentBlock(); - }]; - } -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoPassTextureSamplingFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoPassTextureSamplingFilter.h deleted file mode 100644 index 73ab79d3..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoPassTextureSamplingFilter.h +++ /dev/null @@ -1,13 +0,0 @@ -#import "GPUImageTwoPassFilter.h" - -@interface GPUImageTwoPassTextureSamplingFilter : GPUImageTwoPassFilter -{ - GLint verticalPassTexelWidthOffsetUniform, verticalPassTexelHeightOffsetUniform, horizontalPassTexelWidthOffsetUniform, horizontalPassTexelHeightOffsetUniform; - GLfloat verticalPassTexelWidthOffset, verticalPassTexelHeightOffset, horizontalPassTexelWidthOffset, horizontalPassTexelHeightOffset; - CGFloat _verticalTexelSpacing, _horizontalTexelSpacing; -} - -// This sets the spacing between texels (in pixels) when sampling for the first. By default, this is 1.0 -@property(readwrite, nonatomic) CGFloat verticalTexelSpacing, horizontalTexelSpacing; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoPassTextureSamplingFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoPassTextureSamplingFilter.m deleted file mode 100644 index b6a2ec58..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageTwoPassTextureSamplingFilter.m +++ /dev/null @@ -1,85 +0,0 @@ -#import "GPUImageTwoPassTextureSamplingFilter.h" - -@implementation GPUImageTwoPassTextureSamplingFilter - -@synthesize verticalTexelSpacing = _verticalTexelSpacing; -@synthesize horizontalTexelSpacing = _horizontalTexelSpacing; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithFirstStageVertexShaderFromString:(NSString *)firstStageVertexShaderString firstStageFragmentShaderFromString:(NSString *)firstStageFragmentShaderString secondStageVertexShaderFromString:(NSString *)secondStageVertexShaderString secondStageFragmentShaderFromString:(NSString *)secondStageFragmentShaderString -{ - if (!(self = [super initWithFirstStageVertexShaderFromString:firstStageVertexShaderString firstStageFragmentShaderFromString:firstStageFragmentShaderString secondStageVertexShaderFromString:secondStageVertexShaderString secondStageFragmentShaderFromString:secondStageFragmentShaderString])) - { - return nil; - } - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - - verticalPassTexelWidthOffsetUniform = [filterProgram uniformIndex:@"texelWidthOffset"]; - verticalPassTexelHeightOffsetUniform = [filterProgram uniformIndex:@"texelHeightOffset"]; - - horizontalPassTexelWidthOffsetUniform = [secondFilterProgram uniformIndex:@"texelWidthOffset"]; - horizontalPassTexelHeightOffsetUniform = [secondFilterProgram uniformIndex:@"texelHeightOffset"]; - }); - - self.verticalTexelSpacing = 1.0; - self.horizontalTexelSpacing = 1.0; - - return self; -} - -- (void)setUniformsForProgramAtIndex:(NSUInteger)programIndex; -{ - [super setUniformsForProgramAtIndex:programIndex]; - - if (programIndex == 0) - { - glUniform1f(verticalPassTexelWidthOffsetUniform, verticalPassTexelWidthOffset); - glUniform1f(verticalPassTexelHeightOffsetUniform, verticalPassTexelHeightOffset); - } - else - { - glUniform1f(horizontalPassTexelWidthOffsetUniform, horizontalPassTexelWidthOffset); - glUniform1f(horizontalPassTexelHeightOffsetUniform, horizontalPassTexelHeightOffset); - } -} - -- (void)setupFilterForSize:(CGSize)filterFrameSize; -{ - runSynchronouslyOnVideoProcessingQueue(^{ - // The first pass through the framebuffer may rotate the inbound image, so need to account for that by changing up the kernel ordering for that pass - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - verticalPassTexelWidthOffset = _verticalTexelSpacing / filterFrameSize.height; - verticalPassTexelHeightOffset = 0.0; - } - else - { - verticalPassTexelWidthOffset = 0.0; - verticalPassTexelHeightOffset = _verticalTexelSpacing / filterFrameSize.height; - } - - horizontalPassTexelWidthOffset = _horizontalTexelSpacing / filterFrameSize.width; - horizontalPassTexelHeightOffset = 0.0; - }); -} - -#pragma mark - -#pragma mark Accessors - -- (void)setVerticalTexelSpacing:(CGFloat)newValue; -{ - _verticalTexelSpacing = newValue; - [self setupFilterForSize:[self sizeOfFBO]]; -} - -- (void)setHorizontalTexelSpacing:(CGFloat)newValue; -{ - _horizontalTexelSpacing = newValue; - [self setupFilterForSize:[self sizeOfFBO]]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageUIElement.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageUIElement.h deleted file mode 100644 index 984ff2ad..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageUIElement.h +++ /dev/null @@ -1,15 +0,0 @@ -#import "GPUImageOutput.h" - -@interface GPUImageUIElement : GPUImageOutput - -// Initialization and teardown -- (id)initWithView:(UIView *)inputView; -- (id)initWithLayer:(CALayer *)inputLayer; - -// Layer management -- (CGSize)layerSizeInPixels; -- (void)update; -- (void)updateUsingCurrentTime; -- (void)updateWithTimestamp:(CMTime)frameTime; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageUIElement.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageUIElement.m deleted file mode 100644 index 33208924..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageUIElement.m +++ /dev/null @@ -1,123 +0,0 @@ -#import "GPUImageUIElement.h" - -@interface GPUImageUIElement () -{ - UIView *view; - CALayer *layer; - - CGSize previousLayerSizeInPixels; - CMTime time; - NSTimeInterval actualTimeOfLastUpdate; -} - -@end - -@implementation GPUImageUIElement - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithView:(UIView *)inputView; -{ - if (!(self = [super init])) - { - return nil; - } - - view = inputView; - layer = inputView.layer; - - previousLayerSizeInPixels = CGSizeZero; - [self update]; - - return self; -} - -- (id)initWithLayer:(CALayer *)inputLayer; -{ - if (!(self = [super init])) - { - return nil; - } - - view = nil; - layer = inputLayer; - - previousLayerSizeInPixels = CGSizeZero; - [self update]; - - return self; -} - -#pragma mark - -#pragma mark Layer management - -- (CGSize)layerSizeInPixels; -{ - CGSize pointSize = layer.bounds.size; - return CGSizeMake(layer.contentsScale * pointSize.width, layer.contentsScale * pointSize.height); -} - -- (void)update; -{ - [self updateWithTimestamp:kCMTimeIndefinite]; -} - -- (void)updateUsingCurrentTime; -{ - if(CMTIME_IS_INVALID(time)) { - time = CMTimeMakeWithSeconds(0, 600); - actualTimeOfLastUpdate = [NSDate timeIntervalSinceReferenceDate]; - } else { - NSTimeInterval now = [NSDate timeIntervalSinceReferenceDate]; - NSTimeInterval diff = now - actualTimeOfLastUpdate; - time = CMTimeAdd(time, CMTimeMakeWithSeconds(diff, 600)); - actualTimeOfLastUpdate = now; - } - - [self updateWithTimestamp:time]; -} - -- (void)updateWithTimestamp:(CMTime)frameTime; -{ - [GPUImageContext useImageProcessingContext]; - - CGSize layerPixelSize = [self layerSizeInPixels]; - - GLubyte *imageData = (GLubyte *) calloc(1, (int)layerPixelSize.width * (int)layerPixelSize.height * 4); - - CGColorSpaceRef genericRGBColorspace = CGColorSpaceCreateDeviceRGB(); - CGContextRef imageContext = CGBitmapContextCreate(imageData, (int)layerPixelSize.width, (int)layerPixelSize.height, 8, (int)layerPixelSize.width * 4, genericRGBColorspace, kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst); -// CGContextRotateCTM(imageContext, M_PI_2); - CGContextTranslateCTM(imageContext, 0.0f, layerPixelSize.height); - CGContextScaleCTM(imageContext, layer.contentsScale, -layer.contentsScale); - // CGContextSetBlendMode(imageContext, kCGBlendModeCopy); // From Technical Q&A QA1708: http://developer.apple.com/library/ios/#qa/qa1708/_index.html - - [layer renderInContext:imageContext]; - - CGContextRelease(imageContext); - CGColorSpaceRelease(genericRGBColorspace); - - // TODO: This may not work - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:layerPixelSize textureOptions:self.outputTextureOptions onlyTexture:YES]; - - glBindTexture(GL_TEXTURE_2D, [outputFramebuffer texture]); - // no need to use self.outputTextureOptions here, we always need these texture options - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (int)layerPixelSize.width, (int)layerPixelSize.height, 0, GL_BGRA, GL_UNSIGNED_BYTE, imageData); - - free(imageData); - - for (id currentTarget in targets) - { - if (currentTarget != self.targetToIgnoreForUpdates) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger textureIndexOfTarget = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - - [currentTarget setInputSize:layerPixelSize atIndex:textureIndexOfTarget]; - [currentTarget newFrameReadyAtTime:frameTime atIndex:textureIndexOfTarget]; - } - } -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageUnsharpMaskFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageUnsharpMaskFilter.h deleted file mode 100755 index 9d8aff01..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageUnsharpMaskFilter.h +++ /dev/null @@ -1,16 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImageGaussianBlurFilter; - -@interface GPUImageUnsharpMaskFilter : GPUImageFilterGroup -{ - GPUImageGaussianBlurFilter *blurFilter; - GPUImageFilter *unsharpMaskFilter; -} -// The blur radius of the underlying Gaussian blur. The default is 4.0. -@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; - -// The strength of the sharpening, from 0.0 on up, with a default of 1.0 -@property(readwrite, nonatomic) CGFloat intensity; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageUnsharpMaskFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageUnsharpMaskFilter.m deleted file mode 100755 index 542c5ea3..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageUnsharpMaskFilter.m +++ /dev/null @@ -1,101 +0,0 @@ -#import "GPUImageUnsharpMaskFilter.h" -#import "GPUImageFilter.h" -#import "GPUImageTwoInputFilter.h" -#import "GPUImageGaussianBlurFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageUnsharpMaskFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - varying highp vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform highp float intensity; - - void main() - { - lowp vec4 sharpImageColor = texture2D(inputImageTexture, textureCoordinate); - lowp vec3 blurredImageColor = texture2D(inputImageTexture2, textureCoordinate2).rgb; - - gl_FragColor = vec4(sharpImageColor.rgb * intensity + blurredImageColor * (1.0 - intensity), sharpImageColor.a); -// gl_FragColor = mix(blurredImageColor, sharpImageColor, intensity); -// gl_FragColor = vec4(sharpImageColor.rgb - (blurredImageColor.rgb * intensity), 1.0); - } -); -#else -NSString *const kGPUImageUnsharpMaskFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 textureCoordinate2; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - - uniform float intensity; - - void main() - { - vec4 sharpImageColor = texture2D(inputImageTexture, textureCoordinate); - vec3 blurredImageColor = texture2D(inputImageTexture2, textureCoordinate2).rgb; - - gl_FragColor = vec4(sharpImageColor.rgb * intensity + blurredImageColor * (1.0 - intensity), sharpImageColor.a); - // gl_FragColor = mix(blurredImageColor, sharpImageColor, intensity); - // gl_FragColor = vec4(sharpImageColor.rgb - (blurredImageColor.rgb * intensity), 1.0); - } -); -#endif - -@implementation GPUImageUnsharpMaskFilter - -@synthesize blurRadiusInPixels; -@synthesize intensity = _intensity; - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - // First pass: apply a variable Gaussian blur - blurFilter = [[GPUImageGaussianBlurFilter alloc] init]; - [self addFilter:blurFilter]; - - // Second pass: combine the blurred image with the original sharp one - unsharpMaskFilter = [[GPUImageTwoInputFilter alloc] initWithFragmentShaderFromString:kGPUImageUnsharpMaskFragmentShaderString]; - [self addFilter:unsharpMaskFilter]; - - // Texture location 0 needs to be the sharp image for both the blur and the second stage processing - [blurFilter addTarget:unsharpMaskFilter atTextureLocation:1]; - - self.initialFilters = [NSArray arrayWithObjects:blurFilter, unsharpMaskFilter, nil]; - self.terminalFilter = unsharpMaskFilter; - - self.intensity = 1.0; - self.blurRadiusInPixels = 4.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setBlurRadiusInPixels:(CGFloat)newValue; -{ - blurFilter.blurRadiusInPixels = newValue; -} - -- (CGFloat)blurRadiusInPixels; -{ - return blurFilter.blurRadiusInPixels; -} - -- (void)setIntensity:(CGFloat)newValue; -{ - _intensity = newValue; - [unsharpMaskFilter setFloat:newValue forUniformName:@"intensity"]; -} - -@end \ No newline at end of file diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVideoCamera.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVideoCamera.h deleted file mode 100755 index 22ccb942..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVideoCamera.h +++ /dev/null @@ -1,154 +0,0 @@ -#import -#import -#import -#import "GPUImageContext.h" -#import "GPUImageOutput.h" - -extern const GLfloat kColorConversion601[]; -extern const GLfloat kColorConversion601FullRange[]; -extern const GLfloat kColorConversion709[]; -extern NSString *const kGPUImageYUVVideoRangeConversionForRGFragmentShaderString; -extern NSString *const kGPUImageYUVFullRangeConversionForLAFragmentShaderString; -extern NSString *const kGPUImageYUVVideoRangeConversionForLAFragmentShaderString; - - -//Delegate Protocal for Face Detection. -@protocol GPUImageVideoCameraDelegate - -@optional -- (void)willOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer; -@end - - -/** - A GPUImageOutput that provides frames from either camera -*/ -@interface GPUImageVideoCamera : GPUImageOutput -{ - NSUInteger numberOfFramesCaptured; - CGFloat totalFrameTimeDuringCapture; - - AVCaptureSession *_captureSession; - AVCaptureDevice *_inputCamera; - AVCaptureDevice *_microphone; - AVCaptureDeviceInput *videoInput; - AVCaptureVideoDataOutput *videoOutput; - - BOOL capturePaused; - GPUImageRotationMode outputRotation, internalRotation; - dispatch_semaphore_t frameRenderingSemaphore; - - BOOL captureAsYUV; - GLuint luminanceTexture, chrominanceTexture; - - __unsafe_unretained id _delegate; -} - -/// The AVCaptureSession used to capture from the camera -@property(readonly, retain, nonatomic) AVCaptureSession *captureSession; - -/// This enables the capture session preset to be changed on the fly -@property (readwrite, nonatomic, copy) NSString *captureSessionPreset; - -/// This sets the frame rate of the camera (iOS 5 and above only) -/** - Setting this to 0 or below will set the frame rate back to the default setting for a particular preset. - */ -@property (readwrite) int32_t frameRate; - -/// Easy way to tell which cameras are present on device -@property (readonly, getter = isFrontFacingCameraPresent) BOOL frontFacingCameraPresent; -@property (readonly, getter = isBackFacingCameraPresent) BOOL backFacingCameraPresent; - -/// This enables the benchmarking mode, which logs out instantaneous and average frame times to the console -@property(readwrite, nonatomic) BOOL runBenchmark; - -/// Use this property to manage camera settings. Focus point, exposure point, etc. -@property(readonly) AVCaptureDevice *inputCamera; - -/// This determines the rotation applied to the output image, based on the source material -@property(readwrite, nonatomic) UIInterfaceOrientation outputImageOrientation; - -/// These properties determine whether or not the two camera orientations should be mirrored. By default, both are NO. -@property(readwrite, nonatomic) BOOL horizontallyMirrorFrontFacingCamera, horizontallyMirrorRearFacingCamera; - -@property(nonatomic, assign) id delegate; - -/// @name Initialization and teardown - -/** Begin a capture session - - See AVCaptureSession for acceptable values - - @param sessionPreset Session preset to use - @param cameraPosition Camera to capture from - */ -- (id)initWithSessionPreset:(NSString *)sessionPreset cameraPosition:(AVCaptureDevicePosition)cameraPosition; - -/** Add audio capture to the session. Adding inputs and outputs freezes the capture session momentarily, so you - can use this method to add the audio inputs and outputs early, if you're going to set the audioEncodingTarget - later. Returns YES is the audio inputs and outputs were added, or NO if they had already been added. - */ -- (BOOL)addAudioInputsAndOutputs; - -/** Remove the audio capture inputs and outputs from this session. Returns YES if the audio inputs and outputs - were removed, or NO is they hadn't already been added. - */ -- (BOOL)removeAudioInputsAndOutputs; - -/** Tear down the capture session - */ -- (void)removeInputsAndOutputs; - -/// @name Manage the camera video stream - -/** Start camera capturing - */ -- (void)startCameraCapture; - -/** Stop camera capturing - */ -- (void)stopCameraCapture; - -/** Pause camera capturing - */ -- (void)pauseCameraCapture; - -/** Resume camera capturing - */ -- (void)resumeCameraCapture; - -/** Process a video sample - @param sampleBuffer Buffer to process - */ -- (void)processVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer; - -/** Process an audio sample - @param sampleBuffer Buffer to process - */ -- (void)processAudioSampleBuffer:(CMSampleBufferRef)sampleBuffer; - -/** Get the position (front, rear) of the source camera - */ -- (AVCaptureDevicePosition)cameraPosition; - -/** Get the AVCaptureConnection of the source camera - */ -- (AVCaptureConnection *)videoCaptureConnection; - -/** This flips between the front and rear cameras - */ -- (void)rotateCamera; - -/// @name Benchmarking - -/** When benchmarking is enabled, this will keep a running average of the time from uploading, processing, and final recording or display - */ -- (CGFloat)averageFrameDurationDuringCapture; - -- (void)resetBenchmarkAverage; - -+ (BOOL)isBackFacingCameraPresent; -+ (BOOL)isFrontFacingCameraPresent; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVideoCamera.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVideoCamera.m deleted file mode 100644 index b84f88aa..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVideoCamera.m +++ /dev/null @@ -1,1129 +0,0 @@ -#import "GPUImageVideoCamera.h" -#import "GPUImageMovieWriter.h" -#import "GPUImageFilter.h" - -// Color Conversion Constants (YUV to RGB) including adjustment from 16-235/16-240 (video range) - -// BT.601, which is the standard for SDTV. -const GLfloat kColorConversion601[] = { - 1.164, 1.164, 1.164, - 0.0, -0.392, 2.017, - 1.596, -0.813, 0.0, -}; - -// BT.709, which is the standard for HDTV. -const GLfloat kColorConversion709[] = { - 1.164, 1.164, 1.164, - 0.0, -0.213, 2.112, - 1.793, -0.533, 0.0, -}; - -// BT.601 full range (ref: http://www.equasys.de/colorconversion.html) -const GLfloat kColorConversion601FullRange[] = { - 1.0, 1.0, 1.0, - 0.0, -0.343, 1.765, - 1.4, -0.711, 0.0, -}; - -NSString *const kGPUImageYUVVideoRangeConversionForRGFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D luminanceTexture; - uniform sampler2D chrominanceTexture; - uniform mediump mat3 colorConversionMatrix; - - void main() - { - mediump vec3 yuv; - lowp vec3 rgb; - - yuv.x = texture2D(luminanceTexture, textureCoordinate).r; - yuv.yz = texture2D(chrominanceTexture, textureCoordinate).rg - vec2(0.5, 0.5); - rgb = colorConversionMatrix * yuv; - - gl_FragColor = vec4(rgb, 1); - } - ); - -NSString *const kGPUImageYUVFullRangeConversionForLAFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D luminanceTexture; - uniform sampler2D chrominanceTexture; - uniform mediump mat3 colorConversionMatrix; - - void main() - { - mediump vec3 yuv; - lowp vec3 rgb; - - yuv.x = texture2D(luminanceTexture, textureCoordinate).r; - yuv.yz = texture2D(chrominanceTexture, textureCoordinate).ra - vec2(0.5, 0.5); - rgb = colorConversionMatrix * yuv; - - gl_FragColor = vec4(rgb, 1); - } - ); - -NSString *const kGPUImageYUVVideoRangeConversionForLAFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D luminanceTexture; - uniform sampler2D chrominanceTexture; - uniform mediump mat3 colorConversionMatrix; - - void main() - { - mediump vec3 yuv; - lowp vec3 rgb; - - yuv.x = texture2D(luminanceTexture, textureCoordinate).r - (16.0/255.0); - yuv.yz = texture2D(chrominanceTexture, textureCoordinate).ra - vec2(0.5, 0.5); - rgb = colorConversionMatrix * yuv; - - gl_FragColor = vec4(rgb, 1); - } - ); - - -#pragma mark - -#pragma mark Private methods and instance variables - -@interface GPUImageVideoCamera () -{ - AVCaptureDeviceInput *audioInput; - AVCaptureAudioDataOutput *audioOutput; - NSDate *startingCaptureTime; - - dispatch_queue_t cameraProcessingQueue, audioProcessingQueue; - - GLProgram *yuvConversionProgram; - GLint yuvConversionPositionAttribute, yuvConversionTextureCoordinateAttribute; - GLint yuvConversionLuminanceTextureUniform, yuvConversionChrominanceTextureUniform; - GLint yuvConversionMatrixUniform; - const GLfloat *_preferredConversion; - - BOOL isFullYUVRange; - - int imageBufferWidth, imageBufferHeight; - - BOOL addedAudioInputsDueToEncodingTarget; -} - -- (void)updateOrientationSendToTargets; -- (void)convertYUVToRGBOutput; - -@end - -@implementation GPUImageVideoCamera - -@synthesize captureSessionPreset = _captureSessionPreset; -@synthesize captureSession = _captureSession; -@synthesize inputCamera = _inputCamera; -@synthesize runBenchmark = _runBenchmark; -@synthesize outputImageOrientation = _outputImageOrientation; -@synthesize delegate = _delegate; -@synthesize horizontallyMirrorFrontFacingCamera = _horizontallyMirrorFrontFacingCamera, horizontallyMirrorRearFacingCamera = _horizontallyMirrorRearFacingCamera; -@synthesize frameRate = _frameRate; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionBack])) - { - return nil; - } - - return self; -} - -- (id)initWithSessionPreset:(NSString *)sessionPreset cameraPosition:(AVCaptureDevicePosition)cameraPosition; -{ - if (!(self = [super init])) - { - return nil; - } - - cameraProcessingQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH,0); - audioProcessingQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW,0); - - frameRenderingSemaphore = dispatch_semaphore_create(1); - - _frameRate = 0; // This will not set frame rate unless this value gets set to 1 or above - _runBenchmark = NO; - capturePaused = NO; - outputRotation = kGPUImageNoRotation; - internalRotation = kGPUImageNoRotation; - captureAsYUV = YES; - _preferredConversion = kColorConversion709; - - // Grab the back-facing or front-facing camera - _inputCamera = nil; - NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; - for (AVCaptureDevice *device in devices) - { - if ([device position] == cameraPosition) - { - _inputCamera = device; - } - } - - if (!_inputCamera) { - return nil; - } - - // Create the capture session - _captureSession = [[AVCaptureSession alloc] init]; - - [_captureSession beginConfiguration]; - - // Add the video input - NSError *error = nil; - videoInput = [[AVCaptureDeviceInput alloc] initWithDevice:_inputCamera error:&error]; - if ([_captureSession canAddInput:videoInput]) - { - [_captureSession addInput:videoInput]; - } - - // Add the video frame output - videoOutput = [[AVCaptureVideoDataOutput alloc] init]; - [videoOutput setAlwaysDiscardsLateVideoFrames:NO]; - -// if (captureAsYUV && [GPUImageContext deviceSupportsRedTextures]) - if (captureAsYUV && [GPUImageContext supportsFastTextureUpload]) - { - BOOL supportsFullYUVRange = NO; - NSArray *supportedPixelFormats = videoOutput.availableVideoCVPixelFormatTypes; - for (NSNumber *currentPixelFormat in supportedPixelFormats) - { - if ([currentPixelFormat intValue] == kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) - { - supportsFullYUVRange = YES; - } - } - - if (supportsFullYUVRange) - { - [videoOutput setVideoSettings:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_420YpCbCr8BiPlanarFullRange] forKey:(id)kCVPixelBufferPixelFormatTypeKey]]; - isFullYUVRange = YES; - } - else - { - [videoOutput setVideoSettings:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange] forKey:(id)kCVPixelBufferPixelFormatTypeKey]]; - isFullYUVRange = NO; - } - } - else - { - [videoOutput setVideoSettings:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_32BGRA] forKey:(id)kCVPixelBufferPixelFormatTypeKey]]; - } - - runSynchronouslyOnVideoProcessingQueue(^{ - - if (captureAsYUV) - { - [GPUImageContext useImageProcessingContext]; - // if ([GPUImageContext deviceSupportsRedTextures]) - // { - // yuvConversionProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:kGPUImageVertexShaderString fragmentShaderString:kGPUImageYUVVideoRangeConversionForRGFragmentShaderString]; - // } - // else - // { - if (isFullYUVRange) - { - yuvConversionProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:kGPUImageVertexShaderString fragmentShaderString:kGPUImageYUVFullRangeConversionForLAFragmentShaderString]; - } - else - { - yuvConversionProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:kGPUImageVertexShaderString fragmentShaderString:kGPUImageYUVVideoRangeConversionForLAFragmentShaderString]; - } - - // } - - if (!yuvConversionProgram.initialized) - { - [yuvConversionProgram addAttribute:@"position"]; - [yuvConversionProgram addAttribute:@"inputTextureCoordinate"]; - - if (![yuvConversionProgram link]) - { - NSString *progLog = [yuvConversionProgram programLog]; - NSLog(@"Program link log: %@", progLog); - NSString *fragLog = [yuvConversionProgram fragmentShaderLog]; - NSLog(@"Fragment shader compile log: %@", fragLog); - NSString *vertLog = [yuvConversionProgram vertexShaderLog]; - NSLog(@"Vertex shader compile log: %@", vertLog); - yuvConversionProgram = nil; - NSAssert(NO, @"Filter shader link failed"); - } - } - - yuvConversionPositionAttribute = [yuvConversionProgram attributeIndex:@"position"]; - yuvConversionTextureCoordinateAttribute = [yuvConversionProgram attributeIndex:@"inputTextureCoordinate"]; - yuvConversionLuminanceTextureUniform = [yuvConversionProgram uniformIndex:@"luminanceTexture"]; - yuvConversionChrominanceTextureUniform = [yuvConversionProgram uniformIndex:@"chrominanceTexture"]; - yuvConversionMatrixUniform = [yuvConversionProgram uniformIndex:@"colorConversionMatrix"]; - - [GPUImageContext setActiveShaderProgram:yuvConversionProgram]; - - glEnableVertexAttribArray(yuvConversionPositionAttribute); - glEnableVertexAttribArray(yuvConversionTextureCoordinateAttribute); - } - }); - - [videoOutput setSampleBufferDelegate:self queue:cameraProcessingQueue]; - if ([_captureSession canAddOutput:videoOutput]) - { - [_captureSession addOutput:videoOutput]; - } - else - { - NSLog(@"Couldn't add video output"); - return nil; - } - - _captureSessionPreset = sessionPreset; - [_captureSession setSessionPreset:_captureSessionPreset]; - -// This will let you get 60 FPS video from the 720p preset on an iPhone 4S, but only that device and that preset -// AVCaptureConnection *conn = [videoOutput connectionWithMediaType:AVMediaTypeVideo]; -// -// if (conn.supportsVideoMinFrameDuration) -// conn.videoMinFrameDuration = CMTimeMake(1,60); -// if (conn.supportsVideoMaxFrameDuration) -// conn.videoMaxFrameDuration = CMTimeMake(1,60); - - [_captureSession commitConfiguration]; - - return self; -} - -- (GPUImageFramebuffer *)framebufferForOutput; -{ - return outputFramebuffer; -} - -- (void)dealloc -{ - [self stopCameraCapture]; - [videoOutput setSampleBufferDelegate:nil queue:dispatch_get_main_queue()]; - [audioOutput setSampleBufferDelegate:nil queue:dispatch_get_main_queue()]; - - [self removeInputsAndOutputs]; - -// ARC forbids explicit message send of 'release'; since iOS 6 even for dispatch_release() calls: stripping it out in that case is required. -#if !OS_OBJECT_USE_OBJC - if (frameRenderingSemaphore != NULL) - { - dispatch_release(frameRenderingSemaphore); - } -#endif -} - -- (BOOL)addAudioInputsAndOutputs -{ - if (audioOutput) - return NO; - - [_captureSession beginConfiguration]; - - _microphone = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio]; - audioInput = [AVCaptureDeviceInput deviceInputWithDevice:_microphone error:nil]; - if ([_captureSession canAddInput:audioInput]) - { - [_captureSession addInput:audioInput]; - } - audioOutput = [[AVCaptureAudioDataOutput alloc] init]; - - if ([_captureSession canAddOutput:audioOutput]) - { - [_captureSession addOutput:audioOutput]; - } - else - { - NSLog(@"Couldn't add audio output"); - } - [audioOutput setSampleBufferDelegate:self queue:audioProcessingQueue]; - - [_captureSession commitConfiguration]; - return YES; -} - -- (BOOL)removeAudioInputsAndOutputs -{ - if (!audioOutput) - return NO; - - [_captureSession beginConfiguration]; - [_captureSession removeInput:audioInput]; - [_captureSession removeOutput:audioOutput]; - audioInput = nil; - audioOutput = nil; - _microphone = nil; - [_captureSession commitConfiguration]; - return YES; -} - -- (void)removeInputsAndOutputs; -{ - [_captureSession beginConfiguration]; - if (videoInput) { - [_captureSession removeInput:videoInput]; - [_captureSession removeOutput:videoOutput]; - videoInput = nil; - videoOutput = nil; - } - if (_microphone != nil) - { - [_captureSession removeInput:audioInput]; - [_captureSession removeOutput:audioOutput]; - audioInput = nil; - audioOutput = nil; - _microphone = nil; - } - [_captureSession commitConfiguration]; -} - -#pragma mark - -#pragma mark Managing targets - -- (void)addTarget:(id)newTarget atTextureLocation:(NSInteger)textureLocation; -{ - [super addTarget:newTarget atTextureLocation:textureLocation]; - - [newTarget setInputRotation:outputRotation atIndex:textureLocation]; -} - -#pragma mark - -#pragma mark Manage the camera video stream - -- (void)startCameraCapture; -{ - if (![_captureSession isRunning]) - { - startingCaptureTime = [NSDate date]; - [_captureSession startRunning]; - }; -} - -- (void)stopCameraCapture; -{ - if ([_captureSession isRunning]) - { - [_captureSession stopRunning]; - } -} - -- (void)pauseCameraCapture; -{ - capturePaused = YES; -} - -- (void)resumeCameraCapture; -{ - capturePaused = NO; -} - -- (void)rotateCamera -{ - if (self.frontFacingCameraPresent == NO) - return; - - NSError *error; - AVCaptureDeviceInput *newVideoInput; - AVCaptureDevicePosition currentCameraPosition = [[videoInput device] position]; - - if (currentCameraPosition == AVCaptureDevicePositionBack) - { - currentCameraPosition = AVCaptureDevicePositionFront; - } - else - { - currentCameraPosition = AVCaptureDevicePositionBack; - } - - AVCaptureDevice *backFacingCamera = nil; - NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; - for (AVCaptureDevice *device in devices) - { - if ([device position] == currentCameraPosition) - { - backFacingCamera = device; - } - } - newVideoInput = [[AVCaptureDeviceInput alloc] initWithDevice:backFacingCamera error:&error]; - - if (newVideoInput != nil) - { - [_captureSession beginConfiguration]; - - [_captureSession removeInput:videoInput]; - if ([_captureSession canAddInput:newVideoInput]) - { - [_captureSession addInput:newVideoInput]; - videoInput = newVideoInput; - } - else - { - [_captureSession addInput:videoInput]; - } - //captureSession.sessionPreset = oriPreset; - [_captureSession commitConfiguration]; - } - - _inputCamera = backFacingCamera; - [self setOutputImageOrientation:_outputImageOrientation]; -} - -- (AVCaptureDevicePosition)cameraPosition -{ - return [[videoInput device] position]; -} - -+ (BOOL)isBackFacingCameraPresent; -{ - NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; - - for (AVCaptureDevice *device in devices) - { - if ([device position] == AVCaptureDevicePositionBack) - return YES; - } - - return NO; -} - -- (BOOL)isBackFacingCameraPresent -{ - return [GPUImageVideoCamera isBackFacingCameraPresent]; -} - -+ (BOOL)isFrontFacingCameraPresent; -{ - NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; - - for (AVCaptureDevice *device in devices) - { - if ([device position] == AVCaptureDevicePositionFront) - return YES; - } - - return NO; -} - -- (BOOL)isFrontFacingCameraPresent -{ - return [GPUImageVideoCamera isFrontFacingCameraPresent]; -} - -- (void)setCaptureSessionPreset:(NSString *)captureSessionPreset; -{ - [_captureSession beginConfiguration]; - - _captureSessionPreset = captureSessionPreset; - [_captureSession setSessionPreset:_captureSessionPreset]; - - [_captureSession commitConfiguration]; -} - -- (void)setFrameRate:(int32_t)frameRate; -{ - _frameRate = frameRate; - - if (_frameRate > 0) - { - if ([_inputCamera respondsToSelector:@selector(setActiveVideoMinFrameDuration:)] && - [_inputCamera respondsToSelector:@selector(setActiveVideoMaxFrameDuration:)]) { - - NSError *error; - [_inputCamera lockForConfiguration:&error]; - if (error == nil) { -#if defined(__IPHONE_7_0) - [_inputCamera setActiveVideoMinFrameDuration:CMTimeMake(1, _frameRate)]; - [_inputCamera setActiveVideoMaxFrameDuration:CMTimeMake(1, _frameRate)]; -#endif - } - [_inputCamera unlockForConfiguration]; - - } else { - - for (AVCaptureConnection *connection in videoOutput.connections) - { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - if ([connection respondsToSelector:@selector(setVideoMinFrameDuration:)]) - connection.videoMinFrameDuration = CMTimeMake(1, _frameRate); - - if ([connection respondsToSelector:@selector(setVideoMaxFrameDuration:)]) - connection.videoMaxFrameDuration = CMTimeMake(1, _frameRate); -#pragma clang diagnostic pop - } - } - - } - else - { - if ([_inputCamera respondsToSelector:@selector(setActiveVideoMinFrameDuration:)] && - [_inputCamera respondsToSelector:@selector(setActiveVideoMaxFrameDuration:)]) { - - NSError *error; - [_inputCamera lockForConfiguration:&error]; - if (error == nil) { -#if defined(__IPHONE_7_0) - [_inputCamera setActiveVideoMinFrameDuration:kCMTimeInvalid]; - [_inputCamera setActiveVideoMaxFrameDuration:kCMTimeInvalid]; -#endif - } - [_inputCamera unlockForConfiguration]; - - } else { - - for (AVCaptureConnection *connection in videoOutput.connections) - { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - if ([connection respondsToSelector:@selector(setVideoMinFrameDuration:)]) - connection.videoMinFrameDuration = kCMTimeInvalid; // This sets videoMinFrameDuration back to default - - if ([connection respondsToSelector:@selector(setVideoMaxFrameDuration:)]) - connection.videoMaxFrameDuration = kCMTimeInvalid; // This sets videoMaxFrameDuration back to default -#pragma clang diagnostic pop - } - } - - } -} - -- (int32_t)frameRate; -{ - return _frameRate; -} - -- (AVCaptureConnection *)videoCaptureConnection { - for (AVCaptureConnection *connection in [videoOutput connections] ) { - for ( AVCaptureInputPort *port in [connection inputPorts] ) { - if ( [[port mediaType] isEqual:AVMediaTypeVideo] ) { - return connection; - } - } - } - - return nil; -} - -#define INITIALFRAMESTOIGNOREFORBENCHMARK 5 - -- (void)updateTargetsForVideoCameraUsingCacheTextureAtWidth:(int)bufferWidth height:(int)bufferHeight time:(CMTime)currentTime; -{ - // First, update all the framebuffers in the targets - for (id currentTarget in targets) - { - if ([currentTarget enabled]) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger textureIndexOfTarget = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - - if (currentTarget != self.targetToIgnoreForUpdates) - { - [currentTarget setInputRotation:outputRotation atIndex:textureIndexOfTarget]; - [currentTarget setInputSize:CGSizeMake(bufferWidth, bufferHeight) atIndex:textureIndexOfTarget]; - - if ([currentTarget wantsMonochromeInput] && captureAsYUV) - { - [currentTarget setCurrentlyReceivingMonochromeInput:YES]; - // TODO: Replace optimization for monochrome output - [currentTarget setInputFramebuffer:outputFramebuffer atIndex:textureIndexOfTarget]; - } - else - { - [currentTarget setCurrentlyReceivingMonochromeInput:NO]; - [currentTarget setInputFramebuffer:outputFramebuffer atIndex:textureIndexOfTarget]; - } - } - else - { - [currentTarget setInputRotation:outputRotation atIndex:textureIndexOfTarget]; - [currentTarget setInputFramebuffer:outputFramebuffer atIndex:textureIndexOfTarget]; - } - } - } - - // Then release our hold on the local framebuffer to send it back to the cache as soon as it's no longer needed - [outputFramebuffer unlock]; - outputFramebuffer = nil; - - // Finally, trigger rendering as needed - for (id currentTarget in targets) - { - if ([currentTarget enabled]) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger textureIndexOfTarget = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - - if (currentTarget != self.targetToIgnoreForUpdates) - { - [currentTarget newFrameReadyAtTime:currentTime atIndex:textureIndexOfTarget]; - } - } - } -} - -- (void)processVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer; -{ - if (capturePaused) - { - return; - } - - CFAbsoluteTime startTime = CFAbsoluteTimeGetCurrent(); - CVImageBufferRef cameraFrame = CMSampleBufferGetImageBuffer(sampleBuffer); - int bufferWidth = (int) CVPixelBufferGetWidth(cameraFrame); - int bufferHeight = (int) CVPixelBufferGetHeight(cameraFrame); - CFTypeRef colorAttachments = CVBufferGetAttachment(cameraFrame, kCVImageBufferYCbCrMatrixKey, NULL); - if (colorAttachments != NULL) - { - if(CFStringCompare(colorAttachments, kCVImageBufferYCbCrMatrix_ITU_R_601_4, 0) == kCFCompareEqualTo) - { - if (isFullYUVRange) - { - _preferredConversion = kColorConversion601FullRange; - } - else - { - _preferredConversion = kColorConversion601; - } - } - else - { - _preferredConversion = kColorConversion709; - } - } - else - { - if (isFullYUVRange) - { - _preferredConversion = kColorConversion601FullRange; - } - else - { - _preferredConversion = kColorConversion601; - } - } - - CMTime currentTime = CMSampleBufferGetPresentationTimeStamp(sampleBuffer); - - [GPUImageContext useImageProcessingContext]; - - if ([GPUImageContext supportsFastTextureUpload] && captureAsYUV) - { - CVOpenGLESTextureRef luminanceTextureRef = NULL; - CVOpenGLESTextureRef chrominanceTextureRef = NULL; - -// if (captureAsYUV && [GPUImageContext deviceSupportsRedTextures]) - if (CVPixelBufferGetPlaneCount(cameraFrame) > 0) // Check for YUV planar inputs to do RGB conversion - { - CVPixelBufferLockBaseAddress(cameraFrame, 0); - - if ( (imageBufferWidth != bufferWidth) && (imageBufferHeight != bufferHeight) ) - { - imageBufferWidth = bufferWidth; - imageBufferHeight = bufferHeight; - } - - CVReturn err; - // Y-plane - glActiveTexture(GL_TEXTURE4); - if ([GPUImageContext deviceSupportsRedTextures]) - { -// err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, coreVideoTextureCache, cameraFrame, NULL, GL_TEXTURE_2D, GL_RED_EXT, bufferWidth, bufferHeight, GL_RED_EXT, GL_UNSIGNED_BYTE, 0, &luminanceTextureRef); - err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, [[GPUImageContext sharedImageProcessingContext] coreVideoTextureCache], cameraFrame, NULL, GL_TEXTURE_2D, GL_LUMINANCE, bufferWidth, bufferHeight, GL_LUMINANCE, GL_UNSIGNED_BYTE, 0, &luminanceTextureRef); - } - else - { - err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, [[GPUImageContext sharedImageProcessingContext] coreVideoTextureCache], cameraFrame, NULL, GL_TEXTURE_2D, GL_LUMINANCE, bufferWidth, bufferHeight, GL_LUMINANCE, GL_UNSIGNED_BYTE, 0, &luminanceTextureRef); - } - if (err) - { - NSLog(@"Error at CVOpenGLESTextureCacheCreateTextureFromImage %d", err); - } - - luminanceTexture = CVOpenGLESTextureGetName(luminanceTextureRef); - glBindTexture(GL_TEXTURE_2D, luminanceTexture); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - - // UV-plane - glActiveTexture(GL_TEXTURE5); - if ([GPUImageContext deviceSupportsRedTextures]) - { -// err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, coreVideoTextureCache, cameraFrame, NULL, GL_TEXTURE_2D, GL_RG_EXT, bufferWidth/2, bufferHeight/2, GL_RG_EXT, GL_UNSIGNED_BYTE, 1, &chrominanceTextureRef); - err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, [[GPUImageContext sharedImageProcessingContext] coreVideoTextureCache], cameraFrame, NULL, GL_TEXTURE_2D, GL_LUMINANCE_ALPHA, bufferWidth/2, bufferHeight/2, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, 1, &chrominanceTextureRef); - } - else - { - err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, [[GPUImageContext sharedImageProcessingContext] coreVideoTextureCache], cameraFrame, NULL, GL_TEXTURE_2D, GL_LUMINANCE_ALPHA, bufferWidth/2, bufferHeight/2, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, 1, &chrominanceTextureRef); - } - if (err) - { - NSLog(@"Error at CVOpenGLESTextureCacheCreateTextureFromImage %d", err); - } - - chrominanceTexture = CVOpenGLESTextureGetName(chrominanceTextureRef); - glBindTexture(GL_TEXTURE_2D, chrominanceTexture); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - -// if (!allTargetsWantMonochromeData) -// { - [self convertYUVToRGBOutput]; -// } - - int rotatedImageBufferWidth = bufferWidth, rotatedImageBufferHeight = bufferHeight; - - if (GPUImageRotationSwapsWidthAndHeight(internalRotation)) - { - rotatedImageBufferWidth = bufferHeight; - rotatedImageBufferHeight = bufferWidth; - } - - [self updateTargetsForVideoCameraUsingCacheTextureAtWidth:rotatedImageBufferWidth height:rotatedImageBufferHeight time:currentTime]; - - CVPixelBufferUnlockBaseAddress(cameraFrame, 0); - CFRelease(luminanceTextureRef); - CFRelease(chrominanceTextureRef); - } - else - { - // TODO: Mesh this with the output framebuffer structure - -// CVPixelBufferLockBaseAddress(cameraFrame, 0); -// -// CVReturn err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault, [[GPUImageContext sharedImageProcessingContext] coreVideoTextureCache], cameraFrame, NULL, GL_TEXTURE_2D, GL_RGBA, bufferWidth, bufferHeight, GL_BGRA, GL_UNSIGNED_BYTE, 0, &texture); -// -// if (!texture || err) { -// NSLog(@"Camera CVOpenGLESTextureCacheCreateTextureFromImage failed (error: %d)", err); -// NSAssert(NO, @"Camera failure"); -// return; -// } -// -// outputTexture = CVOpenGLESTextureGetName(texture); -// // glBindTexture(CVOpenGLESTextureGetTarget(texture), outputTexture); -// glBindTexture(GL_TEXTURE_2D, outputTexture); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); -// -// [self updateTargetsForVideoCameraUsingCacheTextureAtWidth:bufferWidth height:bufferHeight time:currentTime]; -// -// CVPixelBufferUnlockBaseAddress(cameraFrame, 0); -// CFRelease(texture); -// -// outputTexture = 0; - } - - - if (_runBenchmark) - { - numberOfFramesCaptured++; - if (numberOfFramesCaptured > INITIALFRAMESTOIGNOREFORBENCHMARK) - { - CFAbsoluteTime currentFrameTime = (CFAbsoluteTimeGetCurrent() - startTime); - totalFrameTimeDuringCapture += currentFrameTime; - NSLog(@"Average frame time : %f ms", [self averageFrameDurationDuringCapture]); - NSLog(@"Current frame time : %f ms", 1000.0 * currentFrameTime); - } - } - } - else - { - CVPixelBufferLockBaseAddress(cameraFrame, 0); - - int bytesPerRow = (int) CVPixelBufferGetBytesPerRow(cameraFrame); - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:CGSizeMake(bytesPerRow / 4, bufferHeight) onlyTexture:YES]; - [outputFramebuffer activateFramebuffer]; - - glBindTexture(GL_TEXTURE_2D, [outputFramebuffer texture]); - - // glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bufferWidth, bufferHeight, 0, GL_BGRA, GL_UNSIGNED_BYTE, CVPixelBufferGetBaseAddress(cameraFrame)); - - // Using BGRA extension to pull in video frame data directly - // The use of bytesPerRow / 4 accounts for a display glitch present in preview video frames when using the photo preset on the camera - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bytesPerRow / 4, bufferHeight, 0, GL_BGRA, GL_UNSIGNED_BYTE, CVPixelBufferGetBaseAddress(cameraFrame)); - - [self updateTargetsForVideoCameraUsingCacheTextureAtWidth:bytesPerRow / 4 height:bufferHeight time:currentTime]; - - CVPixelBufferUnlockBaseAddress(cameraFrame, 0); - - if (_runBenchmark) - { - numberOfFramesCaptured++; - if (numberOfFramesCaptured > INITIALFRAMESTOIGNOREFORBENCHMARK) - { - CFAbsoluteTime currentFrameTime = (CFAbsoluteTimeGetCurrent() - startTime); - totalFrameTimeDuringCapture += currentFrameTime; - } - } - } -} - -- (void)processAudioSampleBuffer:(CMSampleBufferRef)sampleBuffer; -{ - [self.audioEncodingTarget processAudioBuffer:sampleBuffer]; -} - -- (void)convertYUVToRGBOutput; -{ - [GPUImageContext setActiveShaderProgram:yuvConversionProgram]; - - int rotatedImageBufferWidth = imageBufferWidth, rotatedImageBufferHeight = imageBufferHeight; - - if (GPUImageRotationSwapsWidthAndHeight(internalRotation)) - { - rotatedImageBufferWidth = imageBufferHeight; - rotatedImageBufferHeight = imageBufferWidth; - } - - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:CGSizeMake(rotatedImageBufferWidth, rotatedImageBufferHeight) textureOptions:self.outputTextureOptions onlyTexture:NO]; - [outputFramebuffer activateFramebuffer]; - - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - static const GLfloat squareVertices[] = { - -1.0f, -1.0f, - 1.0f, -1.0f, - -1.0f, 1.0f, - 1.0f, 1.0f, - }; - - glActiveTexture(GL_TEXTURE4); - glBindTexture(GL_TEXTURE_2D, luminanceTexture); - glUniform1i(yuvConversionLuminanceTextureUniform, 4); - - glActiveTexture(GL_TEXTURE5); - glBindTexture(GL_TEXTURE_2D, chrominanceTexture); - glUniform1i(yuvConversionChrominanceTextureUniform, 5); - - glUniformMatrix3fv(yuvConversionMatrixUniform, 1, GL_FALSE, _preferredConversion); - - glVertexAttribPointer(yuvConversionPositionAttribute, 2, GL_FLOAT, 0, 0, squareVertices); - glVertexAttribPointer(yuvConversionTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, [GPUImageFilter textureCoordinatesForRotation:internalRotation]); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); -} - -#pragma mark - -#pragma mark Benchmarking - -- (CGFloat)averageFrameDurationDuringCapture; -{ - return (totalFrameTimeDuringCapture / (CGFloat)(numberOfFramesCaptured - INITIALFRAMESTOIGNOREFORBENCHMARK)) * 1000.0; -} - -- (void)resetBenchmarkAverage; -{ - numberOfFramesCaptured = 0; - totalFrameTimeDuringCapture = 0.0; -} - -#pragma mark - -#pragma mark AVCaptureVideoDataOutputSampleBufferDelegate - -- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection -{ - if (!self.captureSession.isRunning) - { - return; - } - else if (captureOutput == audioOutput) - { - [self processAudioSampleBuffer:sampleBuffer]; - } - else - { - if (dispatch_semaphore_wait(frameRenderingSemaphore, DISPATCH_TIME_NOW) != 0) - { - return; - } - - CFRetain(sampleBuffer); - runAsynchronouslyOnVideoProcessingQueue(^{ - //Feature Detection Hook. - if (self.delegate) - { - [self.delegate willOutputSampleBuffer:sampleBuffer]; - } - - [self processVideoSampleBuffer:sampleBuffer]; - - CFRelease(sampleBuffer); - dispatch_semaphore_signal(frameRenderingSemaphore); - }); - } -} - -#pragma mark - -#pragma mark Accessors - -- (void)setAudioEncodingTarget:(GPUImageMovieWriter *)newValue; -{ - if (newValue) { - /* Add audio inputs and outputs, if necessary */ - addedAudioInputsDueToEncodingTarget |= [self addAudioInputsAndOutputs]; - } else if (addedAudioInputsDueToEncodingTarget) { - /* Remove audio inputs and outputs, if they were added by previously setting the audio encoding target */ - [self removeAudioInputsAndOutputs]; - addedAudioInputsDueToEncodingTarget = NO; - } - - [super setAudioEncodingTarget:newValue]; -} - -- (void)updateOrientationSendToTargets; -{ - runSynchronouslyOnVideoProcessingQueue(^{ - - // From the iOS 5.0 release notes: - // In previous iOS versions, the front-facing camera would always deliver buffers in AVCaptureVideoOrientationLandscapeLeft and the back-facing camera would always deliver buffers in AVCaptureVideoOrientationLandscapeRight. - - if (captureAsYUV && [GPUImageContext supportsFastTextureUpload]) - { - outputRotation = kGPUImageNoRotation; - if ([self cameraPosition] == AVCaptureDevicePositionBack) - { - if (_horizontallyMirrorRearFacingCamera) - { - switch(_outputImageOrientation) - { - case UIInterfaceOrientationPortrait:internalRotation = kGPUImageRotateRightFlipVertical; break; - case UIInterfaceOrientationPortraitUpsideDown:internalRotation = kGPUImageRotate180; break; - case UIInterfaceOrientationLandscapeLeft:internalRotation = kGPUImageFlipHorizonal; break; - case UIInterfaceOrientationLandscapeRight:internalRotation = kGPUImageFlipVertical; break; - default:internalRotation = kGPUImageNoRotation; - } - } - else - { - switch(_outputImageOrientation) - { - case UIInterfaceOrientationPortrait:internalRotation = kGPUImageRotateRight; break; - case UIInterfaceOrientationPortraitUpsideDown:internalRotation = kGPUImageRotateLeft; break; - case UIInterfaceOrientationLandscapeLeft:internalRotation = kGPUImageRotate180; break; - case UIInterfaceOrientationLandscapeRight:internalRotation = kGPUImageNoRotation; break; - default:internalRotation = kGPUImageNoRotation; - } - } - } - else - { - if (_horizontallyMirrorFrontFacingCamera) - { - switch(_outputImageOrientation) - { - case UIInterfaceOrientationPortrait:internalRotation = kGPUImageRotateRightFlipVertical; break; - case UIInterfaceOrientationPortraitUpsideDown:internalRotation = kGPUImageRotateRightFlipHorizontal; break; - case UIInterfaceOrientationLandscapeLeft:internalRotation = kGPUImageFlipHorizonal; break; - case UIInterfaceOrientationLandscapeRight:internalRotation = kGPUImageFlipVertical; break; - default:internalRotation = kGPUImageNoRotation; - } - } - else - { - switch(_outputImageOrientation) - { - case UIInterfaceOrientationPortrait:internalRotation = kGPUImageRotateRight; break; - case UIInterfaceOrientationPortraitUpsideDown:internalRotation = kGPUImageRotateLeft; break; - case UIInterfaceOrientationLandscapeLeft:internalRotation = kGPUImageNoRotation; break; - case UIInterfaceOrientationLandscapeRight:internalRotation = kGPUImageRotate180; break; - default:internalRotation = kGPUImageNoRotation; - } - } - } - } - else - { - if ([self cameraPosition] == AVCaptureDevicePositionBack) - { - if (_horizontallyMirrorRearFacingCamera) - { - switch(_outputImageOrientation) - { - case UIInterfaceOrientationPortrait:outputRotation = kGPUImageRotateRightFlipVertical; break; - case UIInterfaceOrientationPortraitUpsideDown:outputRotation = kGPUImageRotate180; break; - case UIInterfaceOrientationLandscapeLeft:outputRotation = kGPUImageFlipHorizonal; break; - case UIInterfaceOrientationLandscapeRight:outputRotation = kGPUImageFlipVertical; break; - default:outputRotation = kGPUImageNoRotation; - } - } - else - { - switch(_outputImageOrientation) - { - case UIInterfaceOrientationPortrait:outputRotation = kGPUImageRotateRight; break; - case UIInterfaceOrientationPortraitUpsideDown:outputRotation = kGPUImageRotateLeft; break; - case UIInterfaceOrientationLandscapeLeft:outputRotation = kGPUImageRotate180; break; - case UIInterfaceOrientationLandscapeRight:outputRotation = kGPUImageNoRotation; break; - default:outputRotation = kGPUImageNoRotation; - } - } - } - else - { - if (_horizontallyMirrorFrontFacingCamera) - { - switch(_outputImageOrientation) - { - case UIInterfaceOrientationPortrait:outputRotation = kGPUImageRotateRightFlipVertical; break; - case UIInterfaceOrientationPortraitUpsideDown:outputRotation = kGPUImageRotateRightFlipHorizontal; break; - case UIInterfaceOrientationLandscapeLeft:outputRotation = kGPUImageFlipHorizonal; break; - case UIInterfaceOrientationLandscapeRight:outputRotation = kGPUImageFlipVertical; break; - default:outputRotation = kGPUImageNoRotation; - } - } - else - { - switch(_outputImageOrientation) - { - case UIInterfaceOrientationPortrait:outputRotation = kGPUImageRotateRight; break; - case UIInterfaceOrientationPortraitUpsideDown:outputRotation = kGPUImageRotateLeft; break; - case UIInterfaceOrientationLandscapeLeft:outputRotation = kGPUImageNoRotation; break; - case UIInterfaceOrientationLandscapeRight:outputRotation = kGPUImageRotate180; break; - default:outputRotation = kGPUImageNoRotation; - } - } - } - } - - for (id currentTarget in targets) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - [currentTarget setInputRotation:outputRotation atIndex:[[targetTextureIndices objectAtIndex:indexOfObject] integerValue]]; - } - }); -} - -- (void)setOutputImageOrientation:(UIInterfaceOrientation)newValue; -{ - _outputImageOrientation = newValue; - [self updateOrientationSendToTargets]; -} - -- (void)setHorizontallyMirrorFrontFacingCamera:(BOOL)newValue -{ - _horizontallyMirrorFrontFacingCamera = newValue; - [self updateOrientationSendToTargets]; -} - -- (void)setHorizontallyMirrorRearFacingCamera:(BOOL)newValue -{ - _horizontallyMirrorRearFacingCamera = newValue; - [self updateOrientationSendToTargets]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVignetteFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVignetteFilter.h deleted file mode 100755 index 37be9449..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVignetteFilter.h +++ /dev/null @@ -1,22 +0,0 @@ -#import "GPUImageFilter.h" - -/** Performs a vignetting effect, fading out the image at the edges - */ -@interface GPUImageVignetteFilter : GPUImageFilter -{ - GLint vignetteCenterUniform, vignetteColorUniform, vignetteStartUniform, vignetteEndUniform; -} - -// the center for the vignette in tex coords (defaults to 0.5, 0.5) -@property (nonatomic, readwrite) CGPoint vignetteCenter; - -// The color to use for the Vignette (defaults to black) -@property (nonatomic, readwrite) GPUVector3 vignetteColor; - -// The normalized distance from the center where the vignette effect starts. Default of 0.5. -@property (nonatomic, readwrite) CGFloat vignetteStart; - -// The normalized distance from the center where the vignette effect ends. Default of 0.75. -@property (nonatomic, readwrite) CGFloat vignetteEnd; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVignetteFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVignetteFilter.m deleted file mode 100755 index 6e1eadb2..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVignetteFilter.m +++ /dev/null @@ -1,104 +0,0 @@ -#import "GPUImageVignetteFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageVignetteFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - varying highp vec2 textureCoordinate; - - uniform lowp vec2 vignetteCenter; - uniform lowp vec3 vignetteColor; - uniform highp float vignetteStart; - uniform highp float vignetteEnd; - - void main() - { - lowp vec4 sourceImageColor = texture2D(inputImageTexture, textureCoordinate); - lowp float d = distance(textureCoordinate, vec2(vignetteCenter.x, vignetteCenter.y)); - lowp float percent = smoothstep(vignetteStart, vignetteEnd, d); - gl_FragColor = vec4(mix(sourceImageColor.rgb, vignetteColor, percent), sourceImageColor.a); - } -); -#else -NSString *const kGPUImageVignetteFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - varying vec2 textureCoordinate; - - uniform vec2 vignetteCenter; - uniform vec3 vignetteColor; - uniform float vignetteStart; - uniform float vignetteEnd; - - void main() - { - vec4 sourceImageColor = texture2D(inputImageTexture, textureCoordinate); - float d = distance(textureCoordinate, vec2(vignetteCenter.x, vignetteCenter.y)); - float percent = smoothstep(vignetteStart, vignetteEnd, d); - gl_FragColor = vec4(mix(sourceImageColor.rgb, vignetteColor, percent), sourceImageColor.a); - } -); -#endif - -@implementation GPUImageVignetteFilter - -@synthesize vignetteCenter = _vignetteCenter; -@synthesize vignetteColor = _vignetteColor; -@synthesize vignetteStart =_vignetteStart; -@synthesize vignetteEnd = _vignetteEnd; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageVignetteFragmentShaderString])) - { - return nil; - } - - vignetteCenterUniform = [filterProgram uniformIndex:@"vignetteCenter"]; - vignetteColorUniform = [filterProgram uniformIndex:@"vignetteColor"]; - vignetteStartUniform = [filterProgram uniformIndex:@"vignetteStart"]; - vignetteEndUniform = [filterProgram uniformIndex:@"vignetteEnd"]; - - self.vignetteCenter = (CGPoint){ 0.5f, 0.5f }; - self.vignetteColor = (GPUVector3){ 0.0f, 0.0f, 0.0f }; - self.vignetteStart = 0.3; - self.vignetteEnd = 0.75; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setVignetteCenter:(CGPoint)newValue -{ - _vignetteCenter = newValue; - - [self setPoint:newValue forUniform:vignetteCenterUniform program:filterProgram]; -} - -- (void)setVignetteColor:(GPUVector3)newValue -{ - _vignetteColor = newValue; - - [self setVec3:newValue forUniform:vignetteColorUniform program:filterProgram]; -} - -- (void)setVignetteStart:(CGFloat)newValue; -{ - _vignetteStart = newValue; - - [self setFloat:_vignetteStart forUniform:vignetteStartUniform program:filterProgram]; -} - -- (void)setVignetteEnd:(CGFloat)newValue; -{ - _vignetteEnd = newValue; - - [self setFloat:_vignetteEnd forUniform:vignetteEndUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVoronoiConsumerFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVoronoiConsumerFilter.h deleted file mode 100644 index 659e39d5..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVoronoiConsumerFilter.h +++ /dev/null @@ -1,10 +0,0 @@ -#import "GPUImageTwoInputFilter.h" - -@interface GPUImageVoronoiConsumerFilter : GPUImageTwoInputFilter -{ - GLint sizeUniform; -} - -@property (nonatomic, readwrite) CGSize sizeInPixels; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVoronoiConsumerFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVoronoiConsumerFilter.m deleted file mode 100644 index c12c34f4..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageVoronoiConsumerFilter.m +++ /dev/null @@ -1,94 +0,0 @@ -#import "GPUImageVoronoiConsumerFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageVoronoiConsumerFragmentShaderString = SHADER_STRING -( - - precision highp float; - - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - uniform vec2 size; - varying vec2 textureCoordinate; - - vec2 getCoordFromColor(vec4 color) -{ - float z = color.z * 256.0; - float yoff = floor(z / 8.0); - float xoff = mod(z, 8.0); - float x = color.x*256.0 + xoff*256.0; - float y = color.y*256.0 + yoff*256.0; - return vec2(x,y) / size; -} - - void main(void) { - vec4 colorLoc = texture2D(inputImageTexture2, textureCoordinate); - vec4 color = texture2D(inputImageTexture, getCoordFromColor(colorLoc)); - - gl_FragColor = color; - } -); -#else -NSString *const kGPUImageVoronoiConsumerFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - uniform sampler2D inputImageTexture2; - uniform vec2 size; - varying vec2 textureCoordinate; - - vec2 getCoordFromColor(vec4 color) - { - float z = color.z * 256.0; - float yoff = floor(z / 8.0); - float xoff = mod(z, 8.0); - float x = color.x*256.0 + xoff*256.0; - float y = color.y*256.0 + yoff*256.0; - return vec2(x,y) / size; - } - - void main(void) - { - vec4 colorLoc = texture2D(inputImageTexture2, textureCoordinate); - vec4 color = texture2D(inputImageTexture, getCoordFromColor(colorLoc)); - - gl_FragColor = color; - } -); -#endif - -@implementation GPUImageVoronoiConsumerFilter - -@synthesize sizeInPixels = _sizeInPixels; - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageVoronoiConsumerFragmentShaderString])) - { - return nil; - } - - sizeUniform = [filterProgram uniformIndex:@"size"]; - - return self; -} - --(void)setSizeInPixels:(CGSize)sizeInPixels { - _sizeInPixels = sizeInPixels; - - //validate that it's a power of 2 and square - - float width = log2(sizeInPixels.width); - float height = log2(sizeInPixels.height); - - if (width != height) { - NSLog(@"Voronoi point texture must be square"); - return; - } - if (width != floor(width) || height != floor(height)) { - NSLog(@"Voronoi point texture must be a power of 2. Texture size %f, %f", sizeInPixels.width, sizeInPixels.height); - return; - } - glUniform2f(sizeUniform, _sizeInPixels.width, _sizeInPixels.height); -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageWeakPixelInclusionFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageWeakPixelInclusionFilter.h deleted file mode 100644 index 44b76c6a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageWeakPixelInclusionFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImage3x3TextureSamplingFilter.h" - -@interface GPUImageWeakPixelInclusionFilter : GPUImage3x3TextureSamplingFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageWeakPixelInclusionFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageWeakPixelInclusionFilter.m deleted file mode 100644 index 4e95ad5d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageWeakPixelInclusionFilter.m +++ /dev/null @@ -1,94 +0,0 @@ -#import "GPUImageWeakPixelInclusionFilter.h" - -@implementation GPUImageWeakPixelInclusionFilter - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageWeakPixelInclusionFragmentShaderString = SHADER_STRING -( - precision lowp float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float centerIntensity = texture2D(inputImageTexture, textureCoordinate).r; - - float pixelIntensitySum = bottomLeftIntensity + topRightIntensity + topLeftIntensity + bottomRightIntensity + leftIntensity + rightIntensity + bottomIntensity + topIntensity + centerIntensity; - float sumTest = step(1.5, pixelIntensitySum); - float pixelTest = step(0.01, centerIntensity); - - gl_FragColor = vec4(vec3(sumTest * pixelTest), 1.0); - } -); -#else -NSString *const kGPUImageWeakPixelInclusionFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float centerIntensity = texture2D(inputImageTexture, textureCoordinate).r; - - float pixelIntensitySum = bottomLeftIntensity + topRightIntensity + topLeftIntensity + bottomRightIntensity + leftIntensity + rightIntensity + bottomIntensity + topIntensity + centerIntensity; - float sumTest = step(1.5, pixelIntensitySum); - float pixelTest = step(0.01, centerIntensity); - - gl_FragColor = vec4(vec3(sumTest * pixelTest), 1.0); - } -); -#endif - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImageWeakPixelInclusionFragmentShaderString])) - { - return nil; - } - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageWhiteBalanceFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageWhiteBalanceFilter.h deleted file mode 100644 index 6b09c33d..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageWhiteBalanceFilter.h +++ /dev/null @@ -1,17 +0,0 @@ -#import "GPUImageFilter.h" -/** - * Created by Alaric Cole - * Allows adjustment of color temperature in terms of what an image was effectively shot in. This means higher Kelvin values will warm the image, while lower values will cool it. - - */ -@interface GPUImageWhiteBalanceFilter : GPUImageFilter -{ - GLint temperatureUniform, tintUniform; -} -//choose color temperature, in degrees Kelvin -@property(readwrite, nonatomic) CGFloat temperature; - -//adjust tint to compensate -@property(readwrite, nonatomic) CGFloat tint; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageWhiteBalanceFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageWhiteBalanceFilter.m deleted file mode 100644 index 17c9bce9..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageWhiteBalanceFilter.m +++ /dev/null @@ -1,107 +0,0 @@ -#import "GPUImageWhiteBalanceFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageWhiteBalanceFragmentShaderString = SHADER_STRING -( -uniform sampler2D inputImageTexture; -varying highp vec2 textureCoordinate; - -uniform lowp float temperature; -uniform lowp float tint; - -const lowp vec3 warmFilter = vec3(0.93, 0.54, 0.0); - -const mediump mat3 RGBtoYIQ = mat3(0.299, 0.587, 0.114, 0.596, -0.274, -0.322, 0.212, -0.523, 0.311); -const mediump mat3 YIQtoRGB = mat3(1.0, 0.956, 0.621, 1.0, -0.272, -0.647, 1.0, -1.105, 1.702); - -void main() -{ - lowp vec4 source = texture2D(inputImageTexture, textureCoordinate); - - mediump vec3 yiq = RGBtoYIQ * source.rgb; //adjusting tint - yiq.b = clamp(yiq.b + tint*0.5226*0.1, -0.5226, 0.5226); - lowp vec3 rgb = YIQtoRGB * yiq; - - lowp vec3 processed = vec3( - (rgb.r < 0.5 ? (2.0 * rgb.r * warmFilter.r) : (1.0 - 2.0 * (1.0 - rgb.r) * (1.0 - warmFilter.r))), //adjusting temperature - (rgb.g < 0.5 ? (2.0 * rgb.g * warmFilter.g) : (1.0 - 2.0 * (1.0 - rgb.g) * (1.0 - warmFilter.g))), - (rgb.b < 0.5 ? (2.0 * rgb.b * warmFilter.b) : (1.0 - 2.0 * (1.0 - rgb.b) * (1.0 - warmFilter.b)))); - - gl_FragColor = vec4(mix(rgb, processed, temperature), source.a); -} -); -#else -NSString *const kGPUImageWhiteBalanceFragmentShaderString = SHADER_STRING -( - uniform sampler2D inputImageTexture; - varying vec2 textureCoordinate; - - uniform float temperature; - uniform float tint; - - const vec3 warmFilter = vec3(0.93, 0.54, 0.0); - - const mat3 RGBtoYIQ = mat3(0.299, 0.587, 0.114, 0.596, -0.274, -0.322, 0.212, -0.523, 0.311); - const mat3 YIQtoRGB = mat3(1.0, 0.956, 0.621, 1.0, -0.272, -0.647, 1.0, -1.105, 1.702); - - void main() -{ - vec4 source = texture2D(inputImageTexture, textureCoordinate); - - vec3 yiq = RGBtoYIQ * source.rgb; //adjusting tint - yiq.b = clamp(yiq.b + tint*0.5226*0.1, -0.5226, 0.5226); - vec3 rgb = YIQtoRGB * yiq; - - vec3 processed = vec3( - (rgb.r < 0.5 ? (2.0 * rgb.r * warmFilter.r) : (1.0 - 2.0 * (1.0 - rgb.r) * (1.0 - warmFilter.r))), //adjusting temperature - (rgb.g < 0.5 ? (2.0 * rgb.g * warmFilter.g) : (1.0 - 2.0 * (1.0 - rgb.g) * (1.0 - warmFilter.g))), - (rgb.b < 0.5 ? (2.0 * rgb.b * warmFilter.b) : (1.0 - 2.0 * (1.0 - rgb.b) * (1.0 - warmFilter.b)))); - - gl_FragColor = vec4(mix(rgb, processed, temperature), source.a); -} -); -#endif - -@implementation GPUImageWhiteBalanceFilter - -@synthesize temperature = _temperature; -@synthesize tint = _tint; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageWhiteBalanceFragmentShaderString])) - { - return nil; - } - - temperatureUniform = [filterProgram uniformIndex:@"temperature"]; - tintUniform = [filterProgram uniformIndex:@"tint"]; - - self.temperature = 5000.0; - self.tint = 0.0; - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setTemperature:(CGFloat)newValue; -{ - _temperature = newValue; - - [self setFloat:_temperature < 5000 ? 0.0004 * (_temperature-5000.0) : 0.00006 * (_temperature-5000.0) forUniform:temperatureUniform program:filterProgram]; -} - -- (void)setTint:(CGFloat)newValue; -{ - _tint = newValue; - - [self setFloat:_tint / 100.0 forUniform:tintUniform program:filterProgram]; -} - -@end - diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageXYDerivativeFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageXYDerivativeFilter.h deleted file mode 100755 index 8db57457..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageXYDerivativeFilter.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "GPUImageSobelEdgeDetectionFilter.h" - -@interface GPUImageXYDerivativeFilter : GPUImageSobelEdgeDetectionFilter - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageXYDerivativeFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageXYDerivativeFilter.m deleted file mode 100755 index 7e19e9d4..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageXYDerivativeFilter.m +++ /dev/null @@ -1,106 +0,0 @@ -#import "GPUImageXYDerivativeFilter.h" - -// I'm using the Prewitt operator to obtain the derivative, then squaring the X and Y components and placing the product of the two in Z. -// In tests, Prewitt seemed to be tied with Sobel for the best, and it's just a little cheaper to compute. -// This is primarily intended to be used with corner detection filters. - -@implementation GPUImageXYDerivativeFilter - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageGradientFragmentShaderString = SHADER_STRING -( - precision highp float; - - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform float edgeStrength; - - void main() - { - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - - float verticalDerivative = -topLeftIntensity - topIntensity - topRightIntensity + bottomLeftIntensity + bottomIntensity + bottomRightIntensity; - float horizontalDerivative = -bottomLeftIntensity - leftIntensity - topLeftIntensity + bottomRightIntensity + rightIntensity + topRightIntensity; - verticalDerivative = verticalDerivative * edgeStrength; - horizontalDerivative = horizontalDerivative * edgeStrength; - - // Scaling the X * Y operation so that negative numbers are not clipped in the 0..1 range. This will be expanded in the corner detection filter - gl_FragColor = vec4(horizontalDerivative * horizontalDerivative, verticalDerivative * verticalDerivative, ((verticalDerivative * horizontalDerivative) + 1.0) / 2.0, 1.0); - } -); -#else -NSString *const kGPUImageGradientFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - varying vec2 leftTextureCoordinate; - varying vec2 rightTextureCoordinate; - - varying vec2 topTextureCoordinate; - varying vec2 topLeftTextureCoordinate; - varying vec2 topRightTextureCoordinate; - - varying vec2 bottomTextureCoordinate; - varying vec2 bottomLeftTextureCoordinate; - varying vec2 bottomRightTextureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform float edgeStrength; - - void main() - { - float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r; - float topRightIntensity = texture2D(inputImageTexture, topRightTextureCoordinate).r; - float topLeftIntensity = texture2D(inputImageTexture, topLeftTextureCoordinate).r; - float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r; - float bottomLeftIntensity = texture2D(inputImageTexture, bottomLeftTextureCoordinate).r; - float bottomRightIntensity = texture2D(inputImageTexture, bottomRightTextureCoordinate).r; - float leftIntensity = texture2D(inputImageTexture, leftTextureCoordinate).r; - float rightIntensity = texture2D(inputImageTexture, rightTextureCoordinate).r; - - float verticalDerivative = -topLeftIntensity - topIntensity - topRightIntensity + bottomLeftIntensity + bottomIntensity + bottomRightIntensity; - float horizontalDerivative = -bottomLeftIntensity - leftIntensity - topLeftIntensity + bottomRightIntensity + rightIntensity + topRightIntensity; - verticalDerivative = verticalDerivative * edgeStrength; - horizontalDerivative = horizontalDerivative * edgeStrength; - - // Scaling the X * Y operation so that negative numbers are not clipped in the 0..1 range. This will be expanded in the corner detection filter - gl_FragColor = vec4(horizontalDerivative * horizontalDerivative, verticalDerivative * verticalDerivative, ((verticalDerivative * horizontalDerivative) + 1.0) / 2.0, 1.0); - } -); -#endif - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [self initWithFragmentShaderFromString:kGPUImageGradientFragmentShaderString])) - { - return nil; - } - - self.edgeStrength = 1.0; - - return self; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageZoomBlurFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageZoomBlurFilter.h deleted file mode 100644 index 744a72cb..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageZoomBlurFilter.h +++ /dev/null @@ -1,13 +0,0 @@ -#import "GPUImageFilter.h" - -@interface GPUImageZoomBlurFilter : GPUImageFilter - -/** A multiplier for the blur size, ranging from 0.0 on up, with a default of 1.0 - */ -@property (readwrite, nonatomic) CGFloat blurSize; - -/** The normalized center of the blur. (0.5, 0.5) by default - */ -@property (readwrite, nonatomic) CGPoint blurCenter; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageZoomBlurFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageZoomBlurFilter.m deleted file mode 100644 index 2ae84934..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageZoomBlurFilter.m +++ /dev/null @@ -1,115 +0,0 @@ -#import "GPUImageZoomBlurFilter.h" - -#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -NSString *const kGPUImageZoomBlurFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform highp vec2 blurCenter; - uniform highp float blurSize; - - void main() - { - // TODO: Do a more intelligent scaling based on resolution here - highp vec2 samplingOffset = 1.0/100.0 * (blurCenter - textureCoordinate) * blurSize; - - lowp vec4 fragmentColor = texture2D(inputImageTexture, textureCoordinate) * 0.18; - fragmentColor += texture2D(inputImageTexture, textureCoordinate + samplingOffset) * 0.15; - fragmentColor += texture2D(inputImageTexture, textureCoordinate + (2.0 * samplingOffset)) * 0.12; - fragmentColor += texture2D(inputImageTexture, textureCoordinate + (3.0 * samplingOffset)) * 0.09; - fragmentColor += texture2D(inputImageTexture, textureCoordinate + (4.0 * samplingOffset)) * 0.05; - fragmentColor += texture2D(inputImageTexture, textureCoordinate - samplingOffset) * 0.15; - fragmentColor += texture2D(inputImageTexture, textureCoordinate - (2.0 * samplingOffset)) * 0.12; - fragmentColor += texture2D(inputImageTexture, textureCoordinate - (3.0 * samplingOffset)) * 0.09; - fragmentColor += texture2D(inputImageTexture, textureCoordinate - (4.0 * samplingOffset)) * 0.05; - - gl_FragColor = fragmentColor; - } -); -#else -NSString *const kGPUImageZoomBlurFragmentShaderString = SHADER_STRING -( - varying vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - uniform vec2 blurCenter; - uniform float blurSize; - - void main() - { - // TODO: Do a more intelligent scaling based on resolution here - vec2 samplingOffset = 1.0/100.0 * (blurCenter - textureCoordinate) * blurSize; - - vec4 fragmentColor = texture2D(inputImageTexture, textureCoordinate) * 0.18; - fragmentColor += texture2D(inputImageTexture, textureCoordinate + samplingOffset) * 0.15; - fragmentColor += texture2D(inputImageTexture, textureCoordinate + (2.0 * samplingOffset)) * 0.12; - fragmentColor += texture2D(inputImageTexture, textureCoordinate + (3.0 * samplingOffset)) * 0.09; - fragmentColor += texture2D(inputImageTexture, textureCoordinate + (4.0 * samplingOffset)) * 0.05; - fragmentColor += texture2D(inputImageTexture, textureCoordinate - samplingOffset) * 0.15; - fragmentColor += texture2D(inputImageTexture, textureCoordinate - (2.0 * samplingOffset)) * 0.12; - fragmentColor += texture2D(inputImageTexture, textureCoordinate - (3.0 * samplingOffset)) * 0.09; - fragmentColor += texture2D(inputImageTexture, textureCoordinate - (4.0 * samplingOffset)) * 0.05; - - gl_FragColor = fragmentColor; - } -); -#endif - -@interface GPUImageZoomBlurFilter() -{ - GLint blurSizeUniform, blurCenterUniform; -} -@end - -@implementation GPUImageZoomBlurFilter - -@synthesize blurSize = _blurSize; -@synthesize blurCenter = _blurCenter; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super initWithFragmentShaderFromString:kGPUImageZoomBlurFragmentShaderString])) - { - return nil; - } - - blurSizeUniform = [filterProgram uniformIndex:@"blurSize"]; - blurCenterUniform = [filterProgram uniformIndex:@"blurCenter"]; - - self.blurSize = 1.0; - self.blurCenter = CGPointMake(0.5, 0.5); - - return self; -} - -#pragma mark - -#pragma mark Accessors - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - [super setInputRotation:newInputRotation atIndex:textureIndex]; - [self setBlurCenter:self.blurCenter]; -} - -- (void)setBlurSize:(CGFloat)newValue; -{ - _blurSize = newValue; - - [self setFloat:_blurSize forUniform:blurSizeUniform program:filterProgram]; -} - -- (void)setBlurCenter:(CGPoint)newValue; -{ - _blurCenter = newValue; - - CGPoint rotatedPoint = [self rotatedPoint:_blurCenter forRotation:inputRotation]; - [self setPoint:rotatedPoint forUniform:blurCenterUniform program:filterProgram]; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageiOSBlurFilter.h b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageiOSBlurFilter.h deleted file mode 100644 index 261d0d7c..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageiOSBlurFilter.h +++ /dev/null @@ -1,31 +0,0 @@ -#import "GPUImageFilterGroup.h" - -@class GPUImageSaturationFilter; -@class GPUImageGaussianBlurFilter; -@class GPUImageLuminanceRangeFilter; - -@interface GPUImageiOSBlurFilter : GPUImageFilterGroup -{ - GPUImageSaturationFilter *saturationFilter; - GPUImageGaussianBlurFilter *blurFilter; - GPUImageLuminanceRangeFilter *luminanceRangeFilter; -} - -/** A radius in pixels to use for the blur, with a default of 12.0. This adjusts the sigma variable in the Gaussian distribution function. - */ -@property (readwrite, nonatomic) CGFloat blurRadiusInPixels; - -/** Saturation ranges from 0.0 (fully desaturated) to 2.0 (max saturation), with 0.8 as the normal level - */ -@property (readwrite, nonatomic) CGFloat saturation; - -/** The degree to which to downsample, then upsample the incoming image to minimize computations within the Gaussian blur, default of 4.0 - */ -@property (readwrite, nonatomic) CGFloat downsampling; - - -/** The degree to reduce the luminance range, from 0.0 to 1.0. Default is 0.6. - */ -@property (readwrite, nonatomic) CGFloat rangeReductionFactor; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageiOSBlurFilter.m b/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageiOSBlurFilter.m deleted file mode 100644 index 18533213..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/GPUImageiOSBlurFilter.m +++ /dev/null @@ -1,114 +0,0 @@ -#import "GPUImageiOSBlurFilter.h" -#import "GPUImageSaturationFilter.h" -#import "GPUImageGaussianBlurFilter.h" -#import "GPUImageLuminanceRangeFilter.h" - -@implementation GPUImageiOSBlurFilter - -@synthesize blurRadiusInPixels; -@synthesize saturation; -@synthesize downsampling = _downsampling; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - // First pass: downsample and desaturate - saturationFilter = [[GPUImageSaturationFilter alloc] init]; - [self addFilter:saturationFilter]; - - // Second pass: apply a strong Gaussian blur - blurFilter = [[GPUImageGaussianBlurFilter alloc] init]; - [self addFilter:blurFilter]; - - // Third pass: upsample and adjust luminance range - luminanceRangeFilter = [[GPUImageLuminanceRangeFilter alloc] init]; - [self addFilter:luminanceRangeFilter]; - - [saturationFilter addTarget:blurFilter]; - [blurFilter addTarget:luminanceRangeFilter]; - - self.initialFilters = [NSArray arrayWithObject:saturationFilter]; - self.terminalFilter = luminanceRangeFilter; - - self.blurRadiusInPixels = 12.0; - self.saturation = 0.8; - self.downsampling = 4.0; - self.rangeReductionFactor = 0.6; - - return self; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - if (_downsampling > 1.0) - { - CGSize rotatedSize = [saturationFilter rotatedSize:newSize forIndex:textureIndex]; - - [saturationFilter forceProcessingAtSize:CGSizeMake(rotatedSize.width / _downsampling, rotatedSize.height / _downsampling)]; - [luminanceRangeFilter forceProcessingAtSize:rotatedSize]; - } - - [super setInputSize:newSize atIndex:textureIndex]; -} - -#pragma mark - -#pragma mark Accessors - -// From Apple's UIImage+ImageEffects category: - -// A description of how to compute the box kernel width from the Gaussian -// radius (aka standard deviation) appears in the SVG spec: -// http://www.w3.org/TR/SVG/filters.html#feGaussianBlurElement -// -// For larger values of 's' (s >= 2.0), an approximation can be used: Three -// successive box-blurs build a piece-wise quadratic convolution kernel, which -// approximates the Gaussian kernel to within roughly 3%. -// -// let d = floor(s * 3*sqrt(2*pi)/4 + 0.5) -// -// ... if d is odd, use three box-blurs of size 'd', centered on the output pixel. - - -- (void)setBlurRadiusInPixels:(CGFloat)newValue; -{ - blurFilter.blurRadiusInPixels = newValue; -} - -- (CGFloat)blurRadiusInPixels; -{ - return blurFilter.blurRadiusInPixels; -} - -- (void)setSaturation:(CGFloat)newValue; -{ - saturationFilter.saturation = newValue; -} - -- (CGFloat)saturation; -{ - return saturationFilter.saturation; -} - -- (void)setDownsampling:(CGFloat)newValue; -{ - _downsampling = newValue; -} - -- (void)setRangeReductionFactor:(CGFloat)rangeReductionFactor -{ - luminanceRangeFilter.rangeReductionFactor = rangeReductionFactor; -} - -- (CGFloat)rangeReductionFactor -{ - return luminanceRangeFilter.rangeReductionFactor; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/Framework/GPUImageFramework.h b/iOS_Tips/Pods/GPUImage/framework/Source/iOS/Framework/GPUImageFramework.h deleted file mode 100644 index ea12ac09..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/Framework/GPUImageFramework.h +++ /dev/null @@ -1,172 +0,0 @@ -#import - -//! Project version number for GPUImageFramework. -FOUNDATION_EXPORT double GPUImageFrameworkVersionNumber; - -//! Project version string for GPUImageFramework. -FOUNDATION_EXPORT const unsigned char GPUImageFrameworkVersionString[]; - -#import - -// Base classes -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - -// Filters -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageContext.h b/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageContext.h deleted file mode 100755 index 7e4fa035..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageContext.h +++ /dev/null @@ -1,55 +0,0 @@ -#import "GLProgram.h" -#import "GPUImageFramebuffer.h" -#import "GPUImageFramebufferCache.h" - -#define GPUImageRotationSwapsWidthAndHeight(rotation) ((rotation) == kGPUImageRotateLeft || (rotation) == kGPUImageRotateRight || (rotation) == kGPUImageRotateRightFlipVertical || (rotation) == kGPUImageRotateRightFlipHorizontal) - -typedef enum { kGPUImageNoRotation, kGPUImageRotateLeft, kGPUImageRotateRight, kGPUImageFlipVertical, kGPUImageFlipHorizonal, kGPUImageRotateRightFlipVertical, kGPUImageRotateRightFlipHorizontal, kGPUImageRotate180 } GPUImageRotationMode; - -@interface GPUImageContext : NSObject - -@property(readonly, nonatomic) dispatch_queue_t contextQueue; -@property(readwrite, retain, nonatomic) GLProgram *currentShaderProgram; -@property(readonly, retain, nonatomic) EAGLContext *context; -@property(readonly) CVOpenGLESTextureCacheRef coreVideoTextureCache; -@property(readonly) GPUImageFramebufferCache *framebufferCache; - -+ (void *)contextKey; -+ (GPUImageContext *)sharedImageProcessingContext; -+ (dispatch_queue_t)sharedContextQueue; -+ (GPUImageFramebufferCache *)sharedFramebufferCache; -+ (void)useImageProcessingContext; -- (void)useAsCurrentContext; -+ (void)setActiveShaderProgram:(GLProgram *)shaderProgram; -- (void)setContextShaderProgram:(GLProgram *)shaderProgram; -+ (GLint)maximumTextureSizeForThisDevice; -+ (GLint)maximumTextureUnitsForThisDevice; -+ (GLint)maximumVaryingVectorsForThisDevice; -+ (BOOL)deviceSupportsOpenGLESExtension:(NSString *)extension; -+ (BOOL)deviceSupportsRedTextures; -+ (BOOL)deviceSupportsFramebufferReads; -+ (CGSize)sizeThatFitsWithinATextureForSize:(CGSize)inputSize; - -- (void)presentBufferForDisplay; -- (GLProgram *)programForVertexShaderString:(NSString *)vertexShaderString fragmentShaderString:(NSString *)fragmentShaderString; - -- (void)useSharegroup:(EAGLSharegroup *)sharegroup; - -// Manage fast texture upload -+ (BOOL)supportsFastTextureUpload; - -@end - -@protocol GPUImageInput -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -- (void)setInputFramebuffer:(GPUImageFramebuffer *)newInputFramebuffer atIndex:(NSInteger)textureIndex; -- (NSInteger)nextAvailableTextureIndex; -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -- (CGSize)maximumOutputSize; -- (void)endProcessing; -- (BOOL)shouldIgnoreUpdatesToThisTarget; -- (BOOL)enabled; -- (BOOL)wantsMonochromeInput; -- (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageContext.m b/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageContext.m deleted file mode 100755 index 19546ba9..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageContext.m +++ /dev/null @@ -1,318 +0,0 @@ -#import "GPUImageContext.h" -#import -#import - -#define MAXSHADERPROGRAMSALLOWEDINCACHE 40 - -@interface GPUImageContext() -{ - NSMutableDictionary *shaderProgramCache; - NSMutableArray *shaderProgramUsageHistory; - EAGLSharegroup *_sharegroup; -} - -@end - -@implementation GPUImageContext - -@synthesize context = _context; -@synthesize currentShaderProgram = _currentShaderProgram; -@synthesize contextQueue = _contextQueue; -@synthesize coreVideoTextureCache = _coreVideoTextureCache; -@synthesize framebufferCache = _framebufferCache; - -static void *openGLESContextQueueKey; - -- (id)init; -{ - if (!(self = [super init])) - { - return nil; - } - - openGLESContextQueueKey = &openGLESContextQueueKey; - _contextQueue = dispatch_queue_create("com.sunsetlakesoftware.GPUImage.openGLESContextQueue", NULL); - -#if OS_OBJECT_USE_OBJC - dispatch_queue_set_specific(_contextQueue, openGLESContextQueueKey, (__bridge void *)self, NULL); -#endif - shaderProgramCache = [[NSMutableDictionary alloc] init]; - shaderProgramUsageHistory = [[NSMutableArray alloc] init]; - - return self; -} - -+ (void *)contextKey { - return openGLESContextQueueKey; -} - -// Based on Colin Wheeler's example here: http://cocoasamurai.blogspot.com/2011/04/singletons-your-doing-them-wrong.html -+ (GPUImageContext *)sharedImageProcessingContext; -{ - static dispatch_once_t pred; - static GPUImageContext *sharedImageProcessingContext = nil; - - dispatch_once(&pred, ^{ - sharedImageProcessingContext = [[[self class] alloc] init]; - }); - return sharedImageProcessingContext; -} - -+ (dispatch_queue_t)sharedContextQueue; -{ - return [[self sharedImageProcessingContext] contextQueue]; -} - -+ (GPUImageFramebufferCache *)sharedFramebufferCache; -{ - return [[self sharedImageProcessingContext] framebufferCache]; -} - -+ (void)useImageProcessingContext; -{ - [[GPUImageContext sharedImageProcessingContext] useAsCurrentContext]; -} - -- (void)useAsCurrentContext; -{ - EAGLContext *imageProcessingContext = [self context]; - if ([EAGLContext currentContext] != imageProcessingContext) - { - [EAGLContext setCurrentContext:imageProcessingContext]; - } -} - -+ (void)setActiveShaderProgram:(GLProgram *)shaderProgram; -{ - GPUImageContext *sharedContext = [GPUImageContext sharedImageProcessingContext]; - [sharedContext setContextShaderProgram:shaderProgram]; -} - -- (void)setContextShaderProgram:(GLProgram *)shaderProgram; -{ - EAGLContext *imageProcessingContext = [self context]; - if ([EAGLContext currentContext] != imageProcessingContext) - { - [EAGLContext setCurrentContext:imageProcessingContext]; - } - - if (self.currentShaderProgram != shaderProgram) - { - self.currentShaderProgram = shaderProgram; - [shaderProgram use]; - } -} - -+ (GLint)maximumTextureSizeForThisDevice; -{ - static dispatch_once_t pred; - static GLint maxTextureSize = 0; - - dispatch_once(&pred, ^{ - [self useImageProcessingContext]; - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize); - }); - - return maxTextureSize; -} - -+ (GLint)maximumTextureUnitsForThisDevice; -{ - static dispatch_once_t pred; - static GLint maxTextureUnits = 0; - - dispatch_once(&pred, ^{ - [self useImageProcessingContext]; - glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &maxTextureUnits); - }); - - return maxTextureUnits; -} - -+ (GLint)maximumVaryingVectorsForThisDevice; -{ - static dispatch_once_t pred; - static GLint maxVaryingVectors = 0; - - dispatch_once(&pred, ^{ - [self useImageProcessingContext]; - glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryingVectors); - }); - - return maxVaryingVectors; -} - -+ (BOOL)deviceSupportsOpenGLESExtension:(NSString *)extension; -{ - static dispatch_once_t pred; - static NSArray *extensionNames = nil; - - // Cache extensions for later quick reference, since this won't change for a given device - dispatch_once(&pred, ^{ - [GPUImageContext useImageProcessingContext]; - NSString *extensionsString = [NSString stringWithCString:(const char *)glGetString(GL_EXTENSIONS) encoding:NSASCIIStringEncoding]; - extensionNames = [extensionsString componentsSeparatedByString:@" "]; - }); - - return [extensionNames containsObject:extension]; -} - - -// http://www.khronos.org/registry/gles/extensions/EXT/EXT_texture_rg.txt - -+ (BOOL)deviceSupportsRedTextures; -{ - static dispatch_once_t pred; - static BOOL supportsRedTextures = NO; - - dispatch_once(&pred, ^{ - supportsRedTextures = [GPUImageContext deviceSupportsOpenGLESExtension:@"GL_EXT_texture_rg"]; - }); - - return supportsRedTextures; -} - -+ (BOOL)deviceSupportsFramebufferReads; -{ - static dispatch_once_t pred; - static BOOL supportsFramebufferReads = NO; - - dispatch_once(&pred, ^{ - supportsFramebufferReads = [GPUImageContext deviceSupportsOpenGLESExtension:@"GL_EXT_shader_framebuffer_fetch"]; - }); - - return supportsFramebufferReads; -} - -+ (CGSize)sizeThatFitsWithinATextureForSize:(CGSize)inputSize; -{ - GLint maxTextureSize = [self maximumTextureSizeForThisDevice]; - if ( (inputSize.width < maxTextureSize) && (inputSize.height < maxTextureSize) ) - { - return inputSize; - } - - CGSize adjustedSize; - if (inputSize.width > inputSize.height) - { - adjustedSize.width = (CGFloat)maxTextureSize; - adjustedSize.height = ((CGFloat)maxTextureSize / inputSize.width) * inputSize.height; - } - else - { - adjustedSize.height = (CGFloat)maxTextureSize; - adjustedSize.width = ((CGFloat)maxTextureSize / inputSize.height) * inputSize.width; - } - - return adjustedSize; -} - -- (void)presentBufferForDisplay; -{ - [self.context presentRenderbuffer:GL_RENDERBUFFER]; -} - -- (GLProgram *)programForVertexShaderString:(NSString *)vertexShaderString fragmentShaderString:(NSString *)fragmentShaderString; -{ - NSString *lookupKeyForShaderProgram = [NSString stringWithFormat:@"V: %@ - F: %@", vertexShaderString, fragmentShaderString]; - GLProgram *programFromCache = [shaderProgramCache objectForKey:lookupKeyForShaderProgram]; - - if (programFromCache == nil) - { - programFromCache = [[GLProgram alloc] initWithVertexShaderString:vertexShaderString fragmentShaderString:fragmentShaderString]; - [shaderProgramCache setObject:programFromCache forKey:lookupKeyForShaderProgram]; -// [shaderProgramUsageHistory addObject:lookupKeyForShaderProgram]; -// if ([shaderProgramUsageHistory count] >= MAXSHADERPROGRAMSALLOWEDINCACHE) -// { -// for (NSUInteger currentShaderProgramRemovedFromCache = 0; currentShaderProgramRemovedFromCache < 10; currentShaderProgramRemovedFromCache++) -// { -// NSString *shaderProgramToRemoveFromCache = [shaderProgramUsageHistory objectAtIndex:0]; -// [shaderProgramUsageHistory removeObjectAtIndex:0]; -// [shaderProgramCache removeObjectForKey:shaderProgramToRemoveFromCache]; -// } -// } - } - - return programFromCache; -} - -- (void)useSharegroup:(EAGLSharegroup *)sharegroup; -{ - NSAssert(_context == nil, @"Unable to use a share group when the context has already been created. Call this method before you use the context for the first time."); - - _sharegroup = sharegroup; -} - -- (EAGLContext *)createContext; -{ - EAGLContext *context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 sharegroup:_sharegroup]; - NSAssert(context != nil, @"Unable to create an OpenGL ES 2.0 context. The GPUImage framework requires OpenGL ES 2.0 support to work."); - return context; -} - - -#pragma mark - -#pragma mark Manage fast texture upload - -+ (BOOL)supportsFastTextureUpload; -{ -#if TARGET_IPHONE_SIMULATOR - return NO; -#else - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-pointer-compare" - return (CVOpenGLESTextureCacheCreate != NULL); -#pragma clang diagnostic pop - -#endif -} - -#pragma mark - -#pragma mark Accessors - -- (EAGLContext *)context; -{ - if (_context == nil) - { - _context = [self createContext]; - [EAGLContext setCurrentContext:_context]; - - // Set up a few global settings for the image processing pipeline - glDisable(GL_DEPTH_TEST); - } - - return _context; -} - -- (CVOpenGLESTextureCacheRef)coreVideoTextureCache; -{ - if (_coreVideoTextureCache == NULL) - { -#if defined(__IPHONE_6_0) - CVReturn err = CVOpenGLESTextureCacheCreate(kCFAllocatorDefault, NULL, [self context], NULL, &_coreVideoTextureCache); -#else - CVReturn err = CVOpenGLESTextureCacheCreate(kCFAllocatorDefault, NULL, (__bridge void *)[self context], NULL, &_coreVideoTextureCache); -#endif - - if (err) - { - NSAssert(NO, @"Error at CVOpenGLESTextureCacheCreate %d", err); - } - - } - - return _coreVideoTextureCache; -} - -- (GPUImageFramebufferCache *)framebufferCache; -{ - if (_framebufferCache == nil) - { - _framebufferCache = [[GPUImageFramebufferCache alloc] init]; - } - - return _framebufferCache; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageMovieWriter.h b/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageMovieWriter.h deleted file mode 100755 index f0b2c6ad..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageMovieWriter.h +++ /dev/null @@ -1,67 +0,0 @@ -#import -#import -#import "GPUImageContext.h" - -extern NSString *const kGPUImageColorSwizzlingFragmentShaderString; - -@protocol GPUImageMovieWriterDelegate - -@optional -- (void)movieRecordingCompleted; -- (void)movieRecordingFailedWithError:(NSError*)error; - -@end - -@interface GPUImageMovieWriter : NSObject -{ - BOOL alreadyFinishedRecording; - - NSURL *movieURL; - NSString *fileType; - AVAssetWriter *assetWriter; - AVAssetWriterInput *assetWriterAudioInput; - AVAssetWriterInput *assetWriterVideoInput; - AVAssetWriterInputPixelBufferAdaptor *assetWriterPixelBufferInput; - - GPUImageContext *_movieWriterContext; - CVPixelBufferRef renderTarget; - CVOpenGLESTextureRef renderTexture; - - CGSize videoSize; - GPUImageRotationMode inputRotation; -} - -@property(readwrite, nonatomic) BOOL hasAudioTrack; -@property(readwrite, nonatomic) BOOL shouldPassthroughAudio; -@property(readwrite, nonatomic) BOOL shouldInvalidateAudioSampleWhenDone; -@property(nonatomic, copy) void(^completionBlock)(void); -@property(nonatomic, copy) void(^failureBlock)(NSError*); -@property(nonatomic, assign) id delegate; -@property(readwrite, nonatomic) BOOL encodingLiveVideo; -@property(nonatomic, copy) BOOL(^videoInputReadyCallback)(void); -@property(nonatomic, copy) BOOL(^audioInputReadyCallback)(void); -@property(nonatomic, copy) void(^audioProcessingCallback)(SInt16 **samplesRef, CMItemCount numSamplesInBuffer); -@property(nonatomic) BOOL enabled; -@property(nonatomic, readonly) AVAssetWriter *assetWriter; -@property(nonatomic, readonly) CMTime duration; -@property(nonatomic, assign) CGAffineTransform transform; -@property(nonatomic, copy) NSArray *metaData; -@property(nonatomic, assign, getter = isPaused) BOOL paused; -@property(nonatomic, retain) GPUImageContext *movieWriterContext; - -// Initialization and teardown -- (id)initWithMovieURL:(NSURL *)newMovieURL size:(CGSize)newSize; -- (id)initWithMovieURL:(NSURL *)newMovieURL size:(CGSize)newSize fileType:(NSString *)newFileType outputSettings:(NSDictionary *)outputSettings; - -- (void)setHasAudioTrack:(BOOL)hasAudioTrack audioSettings:(NSDictionary *)audioOutputSettings; - -// Movie recording -- (void)startRecording; -- (void)startRecordingInOrientation:(CGAffineTransform)orientationTransform; -- (void)finishRecording; -- (void)finishRecordingWithCompletionHandler:(void (^)(void))handler; -- (void)cancelRecording; -- (void)processAudioBuffer:(CMSampleBufferRef)audioBuffer; -- (void)enableSynchronizationCallbacks; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageMovieWriter.m b/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageMovieWriter.m deleted file mode 100755 index 8ced0dfe..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageMovieWriter.m +++ /dev/null @@ -1,934 +0,0 @@ -#import "GPUImageMovieWriter.h" - -#import "GPUImageContext.h" -#import "GLProgram.h" -#import "GPUImageFilter.h" - -NSString *const kGPUImageColorSwizzlingFragmentShaderString = SHADER_STRING -( - varying highp vec2 textureCoordinate; - - uniform sampler2D inputImageTexture; - - void main() - { - gl_FragColor = texture2D(inputImageTexture, textureCoordinate).bgra; - } -); - - -@interface GPUImageMovieWriter () -{ - GLuint movieFramebuffer, movieRenderbuffer; - - GLProgram *colorSwizzlingProgram; - GLint colorSwizzlingPositionAttribute, colorSwizzlingTextureCoordinateAttribute; - GLint colorSwizzlingInputTextureUniform; - - GPUImageFramebuffer *firstInputFramebuffer; - - CMTime startTime, previousFrameTime, previousAudioTime; - - dispatch_queue_t audioQueue, videoQueue; - BOOL audioEncodingIsFinished, videoEncodingIsFinished; - - BOOL isRecording; -} - -// Movie recording -- (void)initializeMovieWithOutputSettings:(NSMutableDictionary *)outputSettings; - -// Frame rendering -- (void)createDataFBO; -- (void)destroyDataFBO; -- (void)setFilterFBO; - -- (void)renderAtInternalSizeUsingFramebuffer:(GPUImageFramebuffer *)inputFramebufferToUse; - -@end - -@implementation GPUImageMovieWriter - -@synthesize hasAudioTrack = _hasAudioTrack; -@synthesize encodingLiveVideo = _encodingLiveVideo; -@synthesize shouldPassthroughAudio = _shouldPassthroughAudio; -@synthesize completionBlock; -@synthesize failureBlock; -@synthesize videoInputReadyCallback; -@synthesize audioInputReadyCallback; -@synthesize enabled; -@synthesize shouldInvalidateAudioSampleWhenDone = _shouldInvalidateAudioSampleWhenDone; -@synthesize paused = _paused; -@synthesize movieWriterContext = _movieWriterContext; - -@synthesize delegate = _delegate; - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithMovieURL:(NSURL *)newMovieURL size:(CGSize)newSize; -{ - return [self initWithMovieURL:newMovieURL size:newSize fileType:AVFileTypeQuickTimeMovie outputSettings:nil]; -} - -- (id)initWithMovieURL:(NSURL *)newMovieURL size:(CGSize)newSize fileType:(NSString *)newFileType outputSettings:(NSMutableDictionary *)outputSettings; -{ - if (!(self = [super init])) - { - return nil; - } - - _shouldInvalidateAudioSampleWhenDone = NO; - - self.enabled = YES; - alreadyFinishedRecording = NO; - videoEncodingIsFinished = NO; - audioEncodingIsFinished = NO; - - videoSize = newSize; - movieURL = newMovieURL; - fileType = newFileType; - startTime = kCMTimeInvalid; - _encodingLiveVideo = [[outputSettings objectForKey:@"EncodingLiveVideo"] isKindOfClass:[NSNumber class]] ? [[outputSettings objectForKey:@"EncodingLiveVideo"] boolValue] : YES; - previousFrameTime = kCMTimeNegativeInfinity; - previousAudioTime = kCMTimeNegativeInfinity; - inputRotation = kGPUImageNoRotation; - - _movieWriterContext = [[GPUImageContext alloc] init]; - [_movieWriterContext useSharegroup:[[[GPUImageContext sharedImageProcessingContext] context] sharegroup]]; - - runSynchronouslyOnContextQueue(_movieWriterContext, ^{ - [_movieWriterContext useAsCurrentContext]; - - if ([GPUImageContext supportsFastTextureUpload]) - { - colorSwizzlingProgram = [_movieWriterContext programForVertexShaderString:kGPUImageVertexShaderString fragmentShaderString:kGPUImagePassthroughFragmentShaderString]; - } - else - { - colorSwizzlingProgram = [_movieWriterContext programForVertexShaderString:kGPUImageVertexShaderString fragmentShaderString:kGPUImageColorSwizzlingFragmentShaderString]; - } - - if (!colorSwizzlingProgram.initialized) - { - [colorSwizzlingProgram addAttribute:@"position"]; - [colorSwizzlingProgram addAttribute:@"inputTextureCoordinate"]; - - if (![colorSwizzlingProgram link]) - { - NSString *progLog = [colorSwizzlingProgram programLog]; - NSLog(@"Program link log: %@", progLog); - NSString *fragLog = [colorSwizzlingProgram fragmentShaderLog]; - NSLog(@"Fragment shader compile log: %@", fragLog); - NSString *vertLog = [colorSwizzlingProgram vertexShaderLog]; - NSLog(@"Vertex shader compile log: %@", vertLog); - colorSwizzlingProgram = nil; - NSAssert(NO, @"Filter shader link failed"); - } - } - - colorSwizzlingPositionAttribute = [colorSwizzlingProgram attributeIndex:@"position"]; - colorSwizzlingTextureCoordinateAttribute = [colorSwizzlingProgram attributeIndex:@"inputTextureCoordinate"]; - colorSwizzlingInputTextureUniform = [colorSwizzlingProgram uniformIndex:@"inputImageTexture"]; - - [_movieWriterContext setContextShaderProgram:colorSwizzlingProgram]; - - glEnableVertexAttribArray(colorSwizzlingPositionAttribute); - glEnableVertexAttribArray(colorSwizzlingTextureCoordinateAttribute); - }); - - [self initializeMovieWithOutputSettings:outputSettings]; - - return self; -} - -- (void)dealloc; -{ - [self destroyDataFBO]; - -#if !OS_OBJECT_USE_OBJC - if( audioQueue != NULL ) - { - dispatch_release(audioQueue); - } - if( videoQueue != NULL ) - { - dispatch_release(videoQueue); - } -#endif -} - -#pragma mark - -#pragma mark Movie recording - -- (void)initializeMovieWithOutputSettings:(NSDictionary *)outputSettings; -{ - isRecording = NO; - - self.enabled = YES; - NSError *error = nil; - assetWriter = [[AVAssetWriter alloc] initWithURL:movieURL fileType:fileType error:&error]; - if (error != nil) - { - NSLog(@"Error: %@", error); - if (failureBlock) - { - failureBlock(error); - } - else - { - if(self.delegate && [self.delegate respondsToSelector:@selector(movieRecordingFailedWithError:)]) - { - [self.delegate movieRecordingFailedWithError:error]; - } - } - } - - // Set this to make sure that a functional movie is produced, even if the recording is cut off mid-stream. Only the last second should be lost in that case. - assetWriter.movieFragmentInterval = CMTimeMakeWithSeconds(1.0, 1000); - - // use default output settings if none specified - if (outputSettings == nil) - { - NSMutableDictionary *settings = [[NSMutableDictionary alloc] init]; - [settings setObject:AVVideoCodecH264 forKey:AVVideoCodecKey]; - [settings setObject:[NSNumber numberWithInt:videoSize.width] forKey:AVVideoWidthKey]; - [settings setObject:[NSNumber numberWithInt:videoSize.height] forKey:AVVideoHeightKey]; - outputSettings = settings; - } - // custom output settings specified - else - { - NSString *videoCodec = [outputSettings objectForKey:AVVideoCodecKey]; - NSNumber *width = [outputSettings objectForKey:AVVideoWidthKey]; - NSNumber *height = [outputSettings objectForKey:AVVideoHeightKey]; - - NSAssert(videoCodec && width && height, @"OutputSettings is missing required parameters."); - - if( [outputSettings objectForKey:@"EncodingLiveVideo"] ) { - NSMutableDictionary *tmp = [outputSettings mutableCopy]; - [tmp removeObjectForKey:@"EncodingLiveVideo"]; - outputSettings = tmp; - } - } - - /* - NSDictionary *videoCleanApertureSettings = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithInt:videoSize.width], AVVideoCleanApertureWidthKey, - [NSNumber numberWithInt:videoSize.height], AVVideoCleanApertureHeightKey, - [NSNumber numberWithInt:0], AVVideoCleanApertureHorizontalOffsetKey, - [NSNumber numberWithInt:0], AVVideoCleanApertureVerticalOffsetKey, - nil]; - - NSDictionary *videoAspectRatioSettings = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithInt:3], AVVideoPixelAspectRatioHorizontalSpacingKey, - [NSNumber numberWithInt:3], AVVideoPixelAspectRatioVerticalSpacingKey, - nil]; - - NSMutableDictionary * compressionProperties = [[NSMutableDictionary alloc] init]; - [compressionProperties setObject:videoCleanApertureSettings forKey:AVVideoCleanApertureKey]; - [compressionProperties setObject:videoAspectRatioSettings forKey:AVVideoPixelAspectRatioKey]; - [compressionProperties setObject:[NSNumber numberWithInt: 2000000] forKey:AVVideoAverageBitRateKey]; - [compressionProperties setObject:[NSNumber numberWithInt: 16] forKey:AVVideoMaxKeyFrameIntervalKey]; - [compressionProperties setObject:AVVideoProfileLevelH264Main31 forKey:AVVideoProfileLevelKey]; - - [outputSettings setObject:compressionProperties forKey:AVVideoCompressionPropertiesKey]; - */ - - assetWriterVideoInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:outputSettings]; - assetWriterVideoInput.expectsMediaDataInRealTime = _encodingLiveVideo; - - // You need to use BGRA for the video in order to get realtime encoding. I use a color-swizzling shader to line up glReadPixels' normal RGBA output with the movie input's BGRA. - NSDictionary *sourcePixelBufferAttributesDictionary = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:kCVPixelFormatType_32BGRA], kCVPixelBufferPixelFormatTypeKey, - [NSNumber numberWithInt:videoSize.width], kCVPixelBufferWidthKey, - [NSNumber numberWithInt:videoSize.height], kCVPixelBufferHeightKey, - nil]; -// NSDictionary *sourcePixelBufferAttributesDictionary = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:kCVPixelFormatType_32ARGB], kCVPixelBufferPixelFormatTypeKey, -// nil]; - - assetWriterPixelBufferInput = [AVAssetWriterInputPixelBufferAdaptor assetWriterInputPixelBufferAdaptorWithAssetWriterInput:assetWriterVideoInput sourcePixelBufferAttributes:sourcePixelBufferAttributesDictionary]; - - [assetWriter addInput:assetWriterVideoInput]; -} - -- (void)setEncodingLiveVideo:(BOOL) value -{ - _encodingLiveVideo = value; - if (isRecording) { - NSAssert(NO, @"Can not change Encoding Live Video while recording"); - } - else - { - assetWriterVideoInput.expectsMediaDataInRealTime = _encodingLiveVideo; - assetWriterAudioInput.expectsMediaDataInRealTime = _encodingLiveVideo; - } -} - -- (void)startRecording; -{ - alreadyFinishedRecording = NO; - startTime = kCMTimeInvalid; - runSynchronouslyOnContextQueue(_movieWriterContext, ^{ - if (audioInputReadyCallback == NULL) - { - [assetWriter startWriting]; - } - }); - isRecording = YES; - // [assetWriter startSessionAtSourceTime:kCMTimeZero]; -} - -- (void)startRecordingInOrientation:(CGAffineTransform)orientationTransform; -{ - assetWriterVideoInput.transform = orientationTransform; - - [self startRecording]; -} - -- (void)cancelRecording; -{ - if (assetWriter.status == AVAssetWriterStatusCompleted) - { - return; - } - - isRecording = NO; - runSynchronouslyOnContextQueue(_movieWriterContext, ^{ - alreadyFinishedRecording = YES; - - if( assetWriter.status == AVAssetWriterStatusWriting && ! videoEncodingIsFinished ) - { - videoEncodingIsFinished = YES; - [assetWriterVideoInput markAsFinished]; - } - if( assetWriter.status == AVAssetWriterStatusWriting && ! audioEncodingIsFinished ) - { - audioEncodingIsFinished = YES; - [assetWriterAudioInput markAsFinished]; - } - [assetWriter cancelWriting]; - }); -} - -- (void)finishRecording; -{ - [self finishRecordingWithCompletionHandler:NULL]; -} - -- (void)finishRecordingWithCompletionHandler:(void (^)(void))handler; -{ - runSynchronouslyOnContextQueue(_movieWriterContext, ^{ - isRecording = NO; - - if (assetWriter.status == AVAssetWriterStatusCompleted || assetWriter.status == AVAssetWriterStatusCancelled || assetWriter.status == AVAssetWriterStatusUnknown) - { - if (handler) - runAsynchronouslyOnContextQueue(_movieWriterContext, handler); - return; - } - if( assetWriter.status == AVAssetWriterStatusWriting && ! videoEncodingIsFinished ) - { - videoEncodingIsFinished = YES; - [assetWriterVideoInput markAsFinished]; - } - if( assetWriter.status == AVAssetWriterStatusWriting && ! audioEncodingIsFinished ) - { - audioEncodingIsFinished = YES; - [assetWriterAudioInput markAsFinished]; - } -#if (!defined(__IPHONE_6_0) || (__IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_6_0)) - // Not iOS 6 SDK - [assetWriter finishWriting]; - if (handler) - runAsynchronouslyOnContextQueue(_movieWriterContext,handler); -#else - // iOS 6 SDK - if ([assetWriter respondsToSelector:@selector(finishWritingWithCompletionHandler:)]) { - // Running iOS 6 - [assetWriter finishWritingWithCompletionHandler:(handler ?: ^{ })]; - } - else { - // Not running iOS 6 -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - [assetWriter finishWriting]; -#pragma clang diagnostic pop - if (handler) - runAsynchronouslyOnContextQueue(_movieWriterContext, handler); - } -#endif - }); -} - -- (void)processAudioBuffer:(CMSampleBufferRef)audioBuffer; -{ - if (!isRecording) - { - return; - } - -// if (_hasAudioTrack && CMTIME_IS_VALID(startTime)) - if (_hasAudioTrack) - { - CFRetain(audioBuffer); - - CMTime currentSampleTime = CMSampleBufferGetOutputPresentationTimeStamp(audioBuffer); - - if (CMTIME_IS_INVALID(startTime)) - { - runSynchronouslyOnContextQueue(_movieWriterContext, ^{ - if ((audioInputReadyCallback == NULL) && (assetWriter.status != AVAssetWriterStatusWriting)) - { - [assetWriter startWriting]; - } - [assetWriter startSessionAtSourceTime:currentSampleTime]; - startTime = currentSampleTime; - }); - } - - if (!assetWriterAudioInput.readyForMoreMediaData && _encodingLiveVideo) - { - NSLog(@"1: Had to drop an audio frame: %@", CFBridgingRelease(CMTimeCopyDescription(kCFAllocatorDefault, currentSampleTime))); - if (_shouldInvalidateAudioSampleWhenDone) - { - CMSampleBufferInvalidate(audioBuffer); - } - CFRelease(audioBuffer); - return; - } - - previousAudioTime = currentSampleTime; - - //if the consumer wants to do something with the audio samples before writing, let him. - if (self.audioProcessingCallback) { - //need to introspect into the opaque CMBlockBuffer structure to find its raw sample buffers. - CMBlockBufferRef buffer = CMSampleBufferGetDataBuffer(audioBuffer); - CMItemCount numSamplesInBuffer = CMSampleBufferGetNumSamples(audioBuffer); - AudioBufferList audioBufferList; - - CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer(audioBuffer, - NULL, - &audioBufferList, - sizeof(audioBufferList), - NULL, - NULL, - kCMSampleBufferFlag_AudioBufferList_Assure16ByteAlignment, - &buffer - ); - //passing a live pointer to the audio buffers, try to process them in-place or we might have syncing issues. - for (int bufferCount=0; bufferCount < audioBufferList.mNumberBuffers; bufferCount++) { - SInt16 *samples = (SInt16 *)audioBufferList.mBuffers[bufferCount].mData; - self.audioProcessingCallback(&samples, numSamplesInBuffer); - } - } - -// NSLog(@"Recorded audio sample time: %lld, %d, %lld", currentSampleTime.value, currentSampleTime.timescale, currentSampleTime.epoch); - void(^write)() = ^() { - while( ! assetWriterAudioInput.readyForMoreMediaData && ! _encodingLiveVideo && ! audioEncodingIsFinished ) { - NSDate *maxDate = [NSDate dateWithTimeIntervalSinceNow:0.5]; - //NSLog(@"audio waiting..."); - [[NSRunLoop currentRunLoop] runUntilDate:maxDate]; - } - if (!assetWriterAudioInput.readyForMoreMediaData) - { - NSLog(@"2: Had to drop an audio frame %@", CFBridgingRelease(CMTimeCopyDescription(kCFAllocatorDefault, currentSampleTime))); - } - else if(assetWriter.status == AVAssetWriterStatusWriting) - { - if (![assetWriterAudioInput appendSampleBuffer:audioBuffer]) - NSLog(@"Problem appending audio buffer at time: %@", CFBridgingRelease(CMTimeCopyDescription(kCFAllocatorDefault, currentSampleTime))); - } - else - { - //NSLog(@"Wrote an audio frame %@", CFBridgingRelease(CMTimeCopyDescription(kCFAllocatorDefault, currentSampleTime))); - } - - if (_shouldInvalidateAudioSampleWhenDone) - { - CMSampleBufferInvalidate(audioBuffer); - } - CFRelease(audioBuffer); - }; -// runAsynchronouslyOnContextQueue(_movieWriterContext, write); - if( _encodingLiveVideo ) - - { - runAsynchronouslyOnContextQueue(_movieWriterContext, write); - } - else - { - write(); - } - } -} - -- (void)enableSynchronizationCallbacks; -{ - if (videoInputReadyCallback != NULL) - { - if( assetWriter.status != AVAssetWriterStatusWriting ) - { - [assetWriter startWriting]; - } - videoQueue = dispatch_queue_create("com.sunsetlakesoftware.GPUImage.videoReadingQueue", NULL); - [assetWriterVideoInput requestMediaDataWhenReadyOnQueue:videoQueue usingBlock:^{ - if( _paused ) - { - //NSLog(@"video requestMediaDataWhenReadyOnQueue paused"); - // if we don't sleep, we'll get called back almost immediately, chewing up CPU - usleep(10000); - return; - } - //NSLog(@"video requestMediaDataWhenReadyOnQueue begin"); - while( assetWriterVideoInput.readyForMoreMediaData && ! _paused ) - { - if( videoInputReadyCallback && ! videoInputReadyCallback() && ! videoEncodingIsFinished ) - { - runAsynchronouslyOnContextQueue(_movieWriterContext, ^{ - if( assetWriter.status == AVAssetWriterStatusWriting && ! videoEncodingIsFinished ) - { - videoEncodingIsFinished = YES; - [assetWriterVideoInput markAsFinished]; - } - }); - } - } - //NSLog(@"video requestMediaDataWhenReadyOnQueue end"); - }]; - } - - if (audioInputReadyCallback != NULL) - { - audioQueue = dispatch_queue_create("com.sunsetlakesoftware.GPUImage.audioReadingQueue", NULL); - [assetWriterAudioInput requestMediaDataWhenReadyOnQueue:audioQueue usingBlock:^{ - if( _paused ) - { - //NSLog(@"audio requestMediaDataWhenReadyOnQueue paused"); - // if we don't sleep, we'll get called back almost immediately, chewing up CPU - usleep(10000); - return; - } - //NSLog(@"audio requestMediaDataWhenReadyOnQueue begin"); - while( assetWriterAudioInput.readyForMoreMediaData && ! _paused ) - { - if( audioInputReadyCallback && ! audioInputReadyCallback() && ! audioEncodingIsFinished ) - { - runAsynchronouslyOnContextQueue(_movieWriterContext, ^{ - if( assetWriter.status == AVAssetWriterStatusWriting && ! audioEncodingIsFinished ) - { - audioEncodingIsFinished = YES; - [assetWriterAudioInput markAsFinished]; - } - }); - } - } - //NSLog(@"audio requestMediaDataWhenReadyOnQueue end"); - }]; - } - -} - -#pragma mark - -#pragma mark Frame rendering - -- (void)createDataFBO; -{ - glActiveTexture(GL_TEXTURE1); - glGenFramebuffers(1, &movieFramebuffer); - glBindFramebuffer(GL_FRAMEBUFFER, movieFramebuffer); - - if ([GPUImageContext supportsFastTextureUpload]) - { - // Code originally sourced from http://allmybrain.com/2011/12/08/rendering-to-a-texture-with-ios-5-texture-cache-api/ - - - CVPixelBufferPoolCreatePixelBuffer (NULL, [assetWriterPixelBufferInput pixelBufferPool], &renderTarget); - - /* AVAssetWriter will use BT.601 conversion matrix for RGB to YCbCr conversion - * regardless of the kCVImageBufferYCbCrMatrixKey value. - * Tagging the resulting video file as BT.601, is the best option right now. - * Creating a proper BT.709 video is not possible at the moment. - */ - CVBufferSetAttachment(renderTarget, kCVImageBufferColorPrimariesKey, kCVImageBufferColorPrimaries_ITU_R_709_2, kCVAttachmentMode_ShouldPropagate); - CVBufferSetAttachment(renderTarget, kCVImageBufferYCbCrMatrixKey, kCVImageBufferYCbCrMatrix_ITU_R_601_4, kCVAttachmentMode_ShouldPropagate); - CVBufferSetAttachment(renderTarget, kCVImageBufferTransferFunctionKey, kCVImageBufferTransferFunction_ITU_R_709_2, kCVAttachmentMode_ShouldPropagate); - - CVOpenGLESTextureCacheCreateTextureFromImage (kCFAllocatorDefault, [_movieWriterContext coreVideoTextureCache], renderTarget, - NULL, // texture attributes - GL_TEXTURE_2D, - GL_RGBA, // opengl format - (int)videoSize.width, - (int)videoSize.height, - GL_BGRA, // native iOS format - GL_UNSIGNED_BYTE, - 0, - &renderTexture); - - glBindTexture(CVOpenGLESTextureGetTarget(renderTexture), CVOpenGLESTextureGetName(renderTexture)); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, CVOpenGLESTextureGetName(renderTexture), 0); - } - else - { - glGenRenderbuffers(1, &movieRenderbuffer); - glBindRenderbuffer(GL_RENDERBUFFER, movieRenderbuffer); - glRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA8_OES, (int)videoSize.width, (int)videoSize.height); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, movieRenderbuffer); - } - - - GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); - - NSAssert(status == GL_FRAMEBUFFER_COMPLETE, @"Incomplete filter FBO: %d", status); -} - -- (void)destroyDataFBO; -{ - runSynchronouslyOnContextQueue(_movieWriterContext, ^{ - [_movieWriterContext useAsCurrentContext]; - - if (movieFramebuffer) - { - glDeleteFramebuffers(1, &movieFramebuffer); - movieFramebuffer = 0; - } - - if (movieRenderbuffer) - { - glDeleteRenderbuffers(1, &movieRenderbuffer); - movieRenderbuffer = 0; - } - - if ([GPUImageContext supportsFastTextureUpload]) - { - if (renderTexture) - { - CFRelease(renderTexture); - } - if (renderTarget) - { - CVPixelBufferRelease(renderTarget); - } - - } - }); -} - -- (void)setFilterFBO; -{ - if (!movieFramebuffer) - { - [self createDataFBO]; - } - - glBindFramebuffer(GL_FRAMEBUFFER, movieFramebuffer); - - glViewport(0, 0, (int)videoSize.width, (int)videoSize.height); -} - -- (void)renderAtInternalSizeUsingFramebuffer:(GPUImageFramebuffer *)inputFramebufferToUse; -{ - [_movieWriterContext useAsCurrentContext]; - [self setFilterFBO]; - - [_movieWriterContext setContextShaderProgram:colorSwizzlingProgram]; - - glClearColor(1.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - // This needs to be flipped to write out to video correctly - static const GLfloat squareVertices[] = { - -1.0f, -1.0f, - 1.0f, -1.0f, - -1.0f, 1.0f, - 1.0f, 1.0f, - }; - - const GLfloat *textureCoordinates = [GPUImageFilter textureCoordinatesForRotation:inputRotation]; - - glActiveTexture(GL_TEXTURE4); - glBindTexture(GL_TEXTURE_2D, [inputFramebufferToUse texture]); - glUniform1i(colorSwizzlingInputTextureUniform, 4); - -// NSLog(@"Movie writer framebuffer: %@", inputFramebufferToUse); - - glVertexAttribPointer(colorSwizzlingPositionAttribute, 2, GL_FLOAT, 0, 0, squareVertices); - glVertexAttribPointer(colorSwizzlingTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, textureCoordinates); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - glFinish(); -} - -#pragma mark - -#pragma mark GPUImageInput protocol - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - if (!isRecording) - { - [firstInputFramebuffer unlock]; - return; - } - - // Drop frames forced by images and other things with no time constants - // Also, if two consecutive times with the same value are added to the movie, it aborts recording, so I bail on that case - if ( (CMTIME_IS_INVALID(frameTime)) || (CMTIME_COMPARE_INLINE(frameTime, ==, previousFrameTime)) || (CMTIME_IS_INDEFINITE(frameTime)) ) - { - [firstInputFramebuffer unlock]; - return; - } - - if (CMTIME_IS_INVALID(startTime)) - { - runSynchronouslyOnContextQueue(_movieWriterContext, ^{ - if ((videoInputReadyCallback == NULL) && (assetWriter.status != AVAssetWriterStatusWriting)) - { - [assetWriter startWriting]; - } - - [assetWriter startSessionAtSourceTime:frameTime]; - startTime = frameTime; - }); - } - - GPUImageFramebuffer *inputFramebufferForBlock = firstInputFramebuffer; - glFinish(); - - runAsynchronouslyOnContextQueue(_movieWriterContext, ^{ - if (!assetWriterVideoInput.readyForMoreMediaData && _encodingLiveVideo) - { - [inputFramebufferForBlock unlock]; - NSLog(@"1: Had to drop a video frame: %@", CFBridgingRelease(CMTimeCopyDescription(kCFAllocatorDefault, frameTime))); - return; - } - - // Render the frame with swizzled colors, so that they can be uploaded quickly as BGRA frames - [_movieWriterContext useAsCurrentContext]; - [self renderAtInternalSizeUsingFramebuffer:inputFramebufferForBlock]; - - CVPixelBufferRef pixel_buffer = NULL; - - if ([GPUImageContext supportsFastTextureUpload]) - { - pixel_buffer = renderTarget; - CVPixelBufferLockBaseAddress(pixel_buffer, 0); - } - else - { - CVReturn status = CVPixelBufferPoolCreatePixelBuffer (NULL, [assetWriterPixelBufferInput pixelBufferPool], &pixel_buffer); - if ((pixel_buffer == NULL) || (status != kCVReturnSuccess)) - { - CVPixelBufferRelease(pixel_buffer); - return; - } - else - { - CVPixelBufferLockBaseAddress(pixel_buffer, 0); - - GLubyte *pixelBufferData = (GLubyte *)CVPixelBufferGetBaseAddress(pixel_buffer); - glReadPixels(0, 0, videoSize.width, videoSize.height, GL_RGBA, GL_UNSIGNED_BYTE, pixelBufferData); - } - } - - void(^write)() = ^() { - while( ! assetWriterVideoInput.readyForMoreMediaData && ! _encodingLiveVideo && ! videoEncodingIsFinished ) { - NSDate *maxDate = [NSDate dateWithTimeIntervalSinceNow:0.1]; - // NSLog(@"video waiting..."); - [[NSRunLoop currentRunLoop] runUntilDate:maxDate]; - } - if (!assetWriterVideoInput.readyForMoreMediaData) - { - NSLog(@"2: Had to drop a video frame: %@", CFBridgingRelease(CMTimeCopyDescription(kCFAllocatorDefault, frameTime))); - } - else if(self.assetWriter.status == AVAssetWriterStatusWriting) - { - if (![assetWriterPixelBufferInput appendPixelBuffer:pixel_buffer withPresentationTime:frameTime]) - NSLog(@"Problem appending pixel buffer at time: %@", CFBridgingRelease(CMTimeCopyDescription(kCFAllocatorDefault, frameTime))); - } - else - { - NSLog(@"Couldn't write a frame"); - //NSLog(@"Wrote a video frame: %@", CFBridgingRelease(CMTimeCopyDescription(kCFAllocatorDefault, frameTime))); - } - CVPixelBufferUnlockBaseAddress(pixel_buffer, 0); - - previousFrameTime = frameTime; - - if (![GPUImageContext supportsFastTextureUpload]) - { - CVPixelBufferRelease(pixel_buffer); - } - }; - - write(); - - [inputFramebufferForBlock unlock]; - }); -} - -- (NSInteger)nextAvailableTextureIndex; -{ - return 0; -} - -- (void)setInputFramebuffer:(GPUImageFramebuffer *)newInputFramebuffer atIndex:(NSInteger)textureIndex; -{ - [newInputFramebuffer lock]; -// runSynchronouslyOnContextQueue(_movieWriterContext, ^{ - firstInputFramebuffer = newInputFramebuffer; -// }); -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - inputRotation = newInputRotation; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ -} - -- (CGSize)maximumOutputSize; -{ - return videoSize; -} - -- (void)endProcessing -{ - if (completionBlock) - { - if (!alreadyFinishedRecording) - { - alreadyFinishedRecording = YES; - completionBlock(); - } - } - else - { - if (_delegate && [_delegate respondsToSelector:@selector(movieRecordingCompleted)]) - { - [_delegate movieRecordingCompleted]; - } - } -} - -- (BOOL)shouldIgnoreUpdatesToThisTarget; -{ - return NO; -} - -- (BOOL)wantsMonochromeInput; -{ - return NO; -} - -- (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; -{ - -} - -#pragma mark - -#pragma mark Accessors - -- (void)setHasAudioTrack:(BOOL)newValue -{ - [self setHasAudioTrack:newValue audioSettings:nil]; -} - -- (void)setHasAudioTrack:(BOOL)newValue audioSettings:(NSDictionary *)audioOutputSettings; -{ - _hasAudioTrack = newValue; - - if (_hasAudioTrack) - { - if (_shouldPassthroughAudio) - { - // Do not set any settings so audio will be the same as passthrough - audioOutputSettings = nil; - } - else if (audioOutputSettings == nil) - { - AVAudioSession *sharedAudioSession = [AVAudioSession sharedInstance]; - double preferredHardwareSampleRate; - - if ([sharedAudioSession respondsToSelector:@selector(sampleRate)]) - { - preferredHardwareSampleRate = [sharedAudioSession sampleRate]; - } - else - { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - preferredHardwareSampleRate = [[AVAudioSession sharedInstance] currentHardwareSampleRate]; -#pragma clang diagnostic pop - } - - AudioChannelLayout acl; - bzero( &acl, sizeof(acl)); - acl.mChannelLayoutTag = kAudioChannelLayoutTag_Mono; - - audioOutputSettings = [NSDictionary dictionaryWithObjectsAndKeys: - [ NSNumber numberWithInt: kAudioFormatMPEG4AAC], AVFormatIDKey, - [ NSNumber numberWithInt: 1 ], AVNumberOfChannelsKey, - [ NSNumber numberWithFloat: preferredHardwareSampleRate ], AVSampleRateKey, - [ NSData dataWithBytes: &acl length: sizeof( acl ) ], AVChannelLayoutKey, - //[ NSNumber numberWithInt:AVAudioQualityLow], AVEncoderAudioQualityKey, - [ NSNumber numberWithInt: 64000 ], AVEncoderBitRateKey, - nil]; -/* - AudioChannelLayout acl; - bzero( &acl, sizeof(acl)); - acl.mChannelLayoutTag = kAudioChannelLayoutTag_Mono; - - audioOutputSettings = [NSDictionary dictionaryWithObjectsAndKeys: - [ NSNumber numberWithInt: kAudioFormatMPEG4AAC ], AVFormatIDKey, - [ NSNumber numberWithInt: 1 ], AVNumberOfChannelsKey, - [ NSNumber numberWithFloat: 44100.0 ], AVSampleRateKey, - [ NSNumber numberWithInt: 64000 ], AVEncoderBitRateKey, - [ NSData dataWithBytes: &acl length: sizeof( acl ) ], AVChannelLayoutKey, - nil];*/ - } - - assetWriterAudioInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeAudio outputSettings:audioOutputSettings]; - [assetWriter addInput:assetWriterAudioInput]; - assetWriterAudioInput.expectsMediaDataInRealTime = _encodingLiveVideo; - } - else - { - // Remove audio track if it exists - } -} - -- (NSArray*)metaData { - return assetWriter.metadata; -} - -- (void)setMetaData:(NSArray*)metaData { - assetWriter.metadata = metaData; -} - -- (CMTime)duration { - if( ! CMTIME_IS_VALID(startTime) ) - return kCMTimeZero; - if( ! CMTIME_IS_NEGATIVE_INFINITY(previousFrameTime) ) - return CMTimeSubtract(previousFrameTime, startTime); - if( ! CMTIME_IS_NEGATIVE_INFINITY(previousAudioTime) ) - return CMTimeSubtract(previousAudioTime, startTime); - return kCMTimeZero; -} - -- (CGAffineTransform)transform { - return assetWriterVideoInput.transform; -} - -- (void)setTransform:(CGAffineTransform)transform { - assetWriterVideoInput.transform = transform; -} - -- (AVAssetWriter*)assetWriter { - return assetWriter; -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImagePicture+TextureSubimage.h b/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImagePicture+TextureSubimage.h deleted file mode 100644 index 03c631bc..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImagePicture+TextureSubimage.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// GPUImagePicture+TextureSubimage.h -// GPUImage -// -// Created by Jack Wu on 2014-05-28. -// Copyright (c) 2014 Brad Larson. All rights reserved. -// - -#import "GPUImagePicture.h" - -@interface GPUImagePicture (TextureSubimage) - -- (void)replaceTextureWithSubimage:(UIImage*)subimage; -- (void)replaceTextureWithSubCGImage:(CGImageRef)subimageSource; - -- (void)replaceTextureWithSubimage:(UIImage*)subimage inRect:(CGRect)subRect; -- (void)replaceTextureWithSubCGImage:(CGImageRef)subimageSource inRect:(CGRect)subRect; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImagePicture+TextureSubimage.m b/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImagePicture+TextureSubimage.m deleted file mode 100644 index 71ef8f97..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImagePicture+TextureSubimage.m +++ /dev/null @@ -1,103 +0,0 @@ -// -// GPUImagePicture+TextureSubimage.m -// GPUImage -// -// Created by Jack Wu on 2014-05-28. -// Copyright (c) 2014 Brad Larson. All rights reserved. -// - -#import "GPUImagePicture+TextureSubimage.h" - -@implementation GPUImagePicture (TextureSubimage) - -- (void)replaceTextureWithSubimage:(UIImage*)subimage { - return [self replaceTextureWithSubCGImage:[subimage CGImage]]; -} - -- (void)replaceTextureWithSubCGImage:(CGImageRef)subimageSource { - CGRect rect = (CGRect) {.origin = CGPointZero, .size = (CGSize){.width = CGImageGetWidth(subimageSource), .height = CGImageGetHeight(subimageSource)}}; - return [self replaceTextureWithSubCGImage:subimageSource inRect:rect]; -} - -- (void)replaceTextureWithSubimage:(UIImage*)subimage inRect:(CGRect)subRect { - return [self replaceTextureWithSubCGImage:[subimage CGImage] inRect:subRect]; -} - -- (void)replaceTextureWithSubCGImage:(CGImageRef)subimageSource inRect:(CGRect)subRect { - NSAssert(outputFramebuffer, @"Picture must be initialized first before replacing subtexture"); - NSAssert(self.framebufferForOutput.textureOptions.internalFormat == GL_RGBA, @"For replacing subtexture the internal texture format must be GL_RGBA."); - - CGRect subimageRect = (CGRect){.origin = CGPointZero, .size = (CGSize){.width = CGImageGetWidth(subimageSource), .height = CGImageGetHeight(subimageSource)}}; - NSAssert(!CGRectIsEmpty(subimageRect), @"Passed sub image must not be empty - it should be at least 1px tall and wide"); - NSAssert(!CGRectIsEmpty(subRect), @"Passed sub rect must not be empty"); - - NSAssert(CGSizeEqualToSize(subimageRect.size, subRect.size), @"Subimage size must match the size of sub rect"); - - // We don't have to worry about scaling the subimage or finding a power of two size. - // The initialization has taken care of that for us. - - dispatch_semaphore_signal(imageUpdateSemaphore); - - BOOL shouldRedrawUsingCoreGraphics = NO; - - // Since internal format is always RGBA, we need the input data in RGBA as well. - CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(subimageSource); - CGBitmapInfo byteOrderInfo = bitmapInfo & kCGBitmapByteOrderMask; - if (byteOrderInfo != kCGBitmapByteOrderDefault && byteOrderInfo != kCGBitmapByteOrder32Big) { - shouldRedrawUsingCoreGraphics = YES; - } - else { - CGImageAlphaInfo alphaInfo = bitmapInfo & kCGBitmapAlphaInfoMask; - if (alphaInfo != kCGImageAlphaPremultipliedLast && alphaInfo != kCGImageAlphaLast && alphaInfo != kCGImageAlphaNoneSkipLast) { - shouldRedrawUsingCoreGraphics = YES; - } - } - - GLubyte *imageData = NULL; - CFDataRef dataFromImageDataProvider; - if (shouldRedrawUsingCoreGraphics) - { - // For resized or incompatible image: redraw - imageData = (GLubyte *) calloc(1, (int)subimageRect.size.width * (int)subimageRect.size.height * 4); - - CGColorSpaceRef genericRGBColorspace = CGColorSpaceCreateDeviceRGB(); - - CGContextRef imageContext = CGBitmapContextCreate(imageData, (size_t)subimageRect.size.width, (size_t)subimageRect.size.height, 8, (size_t)subimageRect.size.width * 4, genericRGBColorspace, kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedLast); - - CGContextDrawImage(imageContext, CGRectMake(0.0, 0.0, subimageRect.size.width, subimageRect.size.height), subimageSource); - CGContextRelease(imageContext); - CGColorSpaceRelease(genericRGBColorspace); - } - else - { - // Access the raw image bytes directly - dataFromImageDataProvider = CGDataProviderCopyData(CGImageGetDataProvider(subimageSource)); - imageData = (GLubyte *)CFDataGetBytePtr(dataFromImageDataProvider); - } - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - [outputFramebuffer disableReferenceCounting]; - - glBindTexture(GL_TEXTURE_2D, [outputFramebuffer texture]); - - // no need to use self.outputTextureOptions here since pictures need this texture formats and type - glTexSubImage2D(GL_TEXTURE_2D, 0, subRect.origin.x, subRect.origin.y, (GLint)subRect.size.width, subRect.size.height, GL_RGBA, GL_UNSIGNED_BYTE, imageData); - - if (self.shouldSmoothlyScaleOutput) - { - glGenerateMipmap(GL_TEXTURE_2D); - } - glBindTexture(GL_TEXTURE_2D, 0); - }); - - if (shouldRedrawUsingCoreGraphics) - { - free(imageData); - } - else - { - CFRelease(dataFromImageDataProvider); - } -} -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImagePicture.h b/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImagePicture.h deleted file mode 100755 index 1ae0ef4a..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImagePicture.h +++ /dev/null @@ -1,34 +0,0 @@ -#import -#import "GPUImageOutput.h" - - -@interface GPUImagePicture : GPUImageOutput -{ - CGSize pixelSizeOfImage; - BOOL hasProcessedImage; - - dispatch_semaphore_t imageUpdateSemaphore; -} - -// Initialization and teardown -- (id)initWithURL:(NSURL *)url; -- (id)initWithImage:(UIImage *)newImageSource; -- (id)initWithCGImage:(CGImageRef)newImageSource; -- (id)initWithImage:(UIImage *)newImageSource smoothlyScaleOutput:(BOOL)smoothlyScaleOutput; -- (id)initWithCGImage:(CGImageRef)newImageSource smoothlyScaleOutput:(BOOL)smoothlyScaleOutput; - -// Image rendering -- (void)processImage; -- (CGSize)outputImageSize; - -/** - * Process image with all targets and filters asynchronously - * The completion handler is called after processing finished in the - * GPU's dispatch queue - and only if this method did not return NO. - * - * @returns NO if resource is blocked and processing is discarded, YES otherwise - */ -- (BOOL)processImageWithCompletionHandler:(void (^)(void))completion; -- (void)processImageUpToFilter:(GPUImageOutput *)finalFilterInChain withCompletionHandler:(void (^)(UIImage *processedImage))block; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImagePicture.m b/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImagePicture.m deleted file mode 100755 index 97602cf1..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImagePicture.m +++ /dev/null @@ -1,304 +0,0 @@ -#import "GPUImagePicture.h" - -@implementation GPUImagePicture - -#pragma mark - -#pragma mark Initialization and teardown - -- (id)initWithURL:(NSURL *)url; -{ - NSData *imageData = [[NSData alloc] initWithContentsOfURL:url]; - - if (!(self = [self initWithData:imageData])) - { - return nil; - } - - return self; -} - -- (id)initWithData:(NSData *)imageData; -{ - UIImage *inputImage = [[UIImage alloc] initWithData:imageData]; - - if (!(self = [self initWithImage:inputImage])) - { - return nil; - } - - return self; -} - -- (id)initWithImage:(UIImage *)newImageSource; -{ - if (!(self = [self initWithImage:newImageSource smoothlyScaleOutput:NO])) - { - return nil; - } - - return self; -} - -- (id)initWithCGImage:(CGImageRef)newImageSource; -{ - if (!(self = [self initWithCGImage:newImageSource smoothlyScaleOutput:NO])) - { - return nil; - } - return self; -} - -- (id)initWithImage:(UIImage *)newImageSource smoothlyScaleOutput:(BOOL)smoothlyScaleOutput; -{ - return [self initWithCGImage:[newImageSource CGImage] smoothlyScaleOutput:smoothlyScaleOutput]; -} - -- (id)initWithCGImage:(CGImageRef)newImageSource smoothlyScaleOutput:(BOOL)smoothlyScaleOutput; -{ - if (!(self = [super init])) - { - return nil; - } - - hasProcessedImage = NO; - self.shouldSmoothlyScaleOutput = smoothlyScaleOutput; - imageUpdateSemaphore = dispatch_semaphore_create(0); - dispatch_semaphore_signal(imageUpdateSemaphore); - - - // TODO: Dispatch this whole thing asynchronously to move image loading off main thread - CGFloat widthOfImage = CGImageGetWidth(newImageSource); - CGFloat heightOfImage = CGImageGetHeight(newImageSource); - - // If passed an empty image reference, CGContextDrawImage will fail in future versions of the SDK. - NSAssert( widthOfImage > 0 && heightOfImage > 0, @"Passed image must not be empty - it should be at least 1px tall and wide"); - - pixelSizeOfImage = CGSizeMake(widthOfImage, heightOfImage); - CGSize pixelSizeToUseForTexture = pixelSizeOfImage; - - BOOL shouldRedrawUsingCoreGraphics = NO; - - // For now, deal with images larger than the maximum texture size by resizing to be within that limit - CGSize scaledImageSizeToFitOnGPU = [GPUImageContext sizeThatFitsWithinATextureForSize:pixelSizeOfImage]; - if (!CGSizeEqualToSize(scaledImageSizeToFitOnGPU, pixelSizeOfImage)) - { - pixelSizeOfImage = scaledImageSizeToFitOnGPU; - pixelSizeToUseForTexture = pixelSizeOfImage; - shouldRedrawUsingCoreGraphics = YES; - } - - if (self.shouldSmoothlyScaleOutput) - { - // In order to use mipmaps, you need to provide power-of-two textures, so convert to the next largest power of two and stretch to fill - CGFloat powerClosestToWidth = ceil(log2(pixelSizeOfImage.width)); - CGFloat powerClosestToHeight = ceil(log2(pixelSizeOfImage.height)); - - pixelSizeToUseForTexture = CGSizeMake(pow(2.0, powerClosestToWidth), pow(2.0, powerClosestToHeight)); - - shouldRedrawUsingCoreGraphics = YES; - } - - GLubyte *imageData = NULL; - CFDataRef dataFromImageDataProvider = NULL; - GLenum format = GL_BGRA; - - if (!shouldRedrawUsingCoreGraphics) { - /* Check that the memory layout is compatible with GL, as we cannot use glPixelStore to - * tell GL about the memory layout with GLES. - */ - if (CGImageGetBytesPerRow(newImageSource) != CGImageGetWidth(newImageSource) * 4 || - CGImageGetBitsPerPixel(newImageSource) != 32 || - CGImageGetBitsPerComponent(newImageSource) != 8) - { - shouldRedrawUsingCoreGraphics = YES; - } else { - /* Check that the bitmap pixel format is compatible with GL */ - CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(newImageSource); - if ((bitmapInfo & kCGBitmapFloatComponents) != 0) { - /* We don't support float components for use directly in GL */ - shouldRedrawUsingCoreGraphics = YES; - } else { - CGBitmapInfo byteOrderInfo = bitmapInfo & kCGBitmapByteOrderMask; - if (byteOrderInfo == kCGBitmapByteOrder32Little) { - /* Little endian, for alpha-first we can use this bitmap directly in GL */ - CGImageAlphaInfo alphaInfo = bitmapInfo & kCGBitmapAlphaInfoMask; - if (alphaInfo != kCGImageAlphaPremultipliedFirst && alphaInfo != kCGImageAlphaFirst && - alphaInfo != kCGImageAlphaNoneSkipFirst) { - shouldRedrawUsingCoreGraphics = YES; - } - } else if (byteOrderInfo == kCGBitmapByteOrderDefault || byteOrderInfo == kCGBitmapByteOrder32Big) { - /* Big endian, for alpha-last we can use this bitmap directly in GL */ - CGImageAlphaInfo alphaInfo = bitmapInfo & kCGBitmapAlphaInfoMask; - if (alphaInfo != kCGImageAlphaPremultipliedLast && alphaInfo != kCGImageAlphaLast && - alphaInfo != kCGImageAlphaNoneSkipLast) { - shouldRedrawUsingCoreGraphics = YES; - } else { - /* Can access directly using GL_RGBA pixel format */ - format = GL_RGBA; - } - } - } - } - } - - // CFAbsoluteTime elapsedTime, startTime = CFAbsoluteTimeGetCurrent(); - - if (shouldRedrawUsingCoreGraphics) - { - // For resized or incompatible image: redraw - imageData = (GLubyte *) calloc(1, (int)pixelSizeToUseForTexture.width * (int)pixelSizeToUseForTexture.height * 4); - - CGColorSpaceRef genericRGBColorspace = CGColorSpaceCreateDeviceRGB(); - - CGContextRef imageContext = CGBitmapContextCreate(imageData, (size_t)pixelSizeToUseForTexture.width, (size_t)pixelSizeToUseForTexture.height, 8, (size_t)pixelSizeToUseForTexture.width * 4, genericRGBColorspace, kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst); - // CGContextSetBlendMode(imageContext, kCGBlendModeCopy); // From Technical Q&A QA1708: http://developer.apple.com/library/ios/#qa/qa1708/_index.html - CGContextDrawImage(imageContext, CGRectMake(0.0, 0.0, pixelSizeToUseForTexture.width, pixelSizeToUseForTexture.height), newImageSource); - CGContextRelease(imageContext); - CGColorSpaceRelease(genericRGBColorspace); - } - else - { - // Access the raw image bytes directly - dataFromImageDataProvider = CGDataProviderCopyData(CGImageGetDataProvider(newImageSource)); - imageData = (GLubyte *)CFDataGetBytePtr(dataFromImageDataProvider); - } - - // elapsedTime = (CFAbsoluteTimeGetCurrent() - startTime) * 1000.0; - // NSLog(@"Core Graphics drawing time: %f", elapsedTime); - - // CGFloat currentRedTotal = 0.0f, currentGreenTotal = 0.0f, currentBlueTotal = 0.0f, currentAlphaTotal = 0.0f; - // NSUInteger totalNumberOfPixels = round(pixelSizeToUseForTexture.width * pixelSizeToUseForTexture.height); - // - // for (NSUInteger currentPixel = 0; currentPixel < totalNumberOfPixels; currentPixel++) - // { - // currentBlueTotal += (CGFloat)imageData[(currentPixel * 4)] / 255.0f; - // currentGreenTotal += (CGFloat)imageData[(currentPixel * 4) + 1] / 255.0f; - // currentRedTotal += (CGFloat)imageData[(currentPixel * 4 + 2)] / 255.0f; - // currentAlphaTotal += (CGFloat)imageData[(currentPixel * 4) + 3] / 255.0f; - // } - // - // NSLog(@"Debug, average input image red: %f, green: %f, blue: %f, alpha: %f", currentRedTotal / (CGFloat)totalNumberOfPixels, currentGreenTotal / (CGFloat)totalNumberOfPixels, currentBlueTotal / (CGFloat)totalNumberOfPixels, currentAlphaTotal / (CGFloat)totalNumberOfPixels); - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - - outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:pixelSizeToUseForTexture onlyTexture:YES]; - [outputFramebuffer disableReferenceCounting]; - - glBindTexture(GL_TEXTURE_2D, [outputFramebuffer texture]); - if (self.shouldSmoothlyScaleOutput) - { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); - } - // no need to use self.outputTextureOptions here since pictures need this texture formats and type - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (int)pixelSizeToUseForTexture.width, (int)pixelSizeToUseForTexture.height, 0, format, GL_UNSIGNED_BYTE, imageData); - - if (self.shouldSmoothlyScaleOutput) - { - glGenerateMipmap(GL_TEXTURE_2D); - } - glBindTexture(GL_TEXTURE_2D, 0); - }); - - if (shouldRedrawUsingCoreGraphics) - { - free(imageData); - } - else - { - if (dataFromImageDataProvider) - { - CFRelease(dataFromImageDataProvider); - } - } - - return self; -} - -// ARC forbids explicit message send of 'release'; since iOS 6 even for dispatch_release() calls: stripping it out in that case is required. -- (void)dealloc; -{ - [outputFramebuffer enableReferenceCounting]; - [outputFramebuffer unlock]; - -#if !OS_OBJECT_USE_OBJC - if (imageUpdateSemaphore != NULL) - { - dispatch_release(imageUpdateSemaphore); - } -#endif -} - -#pragma mark - -#pragma mark Image rendering - -- (void)removeAllTargets; -{ - [super removeAllTargets]; - hasProcessedImage = NO; -} - -- (void)processImage; -{ - [self processImageWithCompletionHandler:nil]; -} - -- (BOOL)processImageWithCompletionHandler:(void (^)(void))completion; -{ - hasProcessedImage = YES; - - // dispatch_semaphore_wait(imageUpdateSemaphore, DISPATCH_TIME_FOREVER); - - if (dispatch_semaphore_wait(imageUpdateSemaphore, DISPATCH_TIME_NOW) != 0) - { - return NO; - } - - runAsynchronouslyOnVideoProcessingQueue(^{ - for (id currentTarget in targets) - { - NSInteger indexOfObject = [targets indexOfObject:currentTarget]; - NSInteger textureIndexOfTarget = [[targetTextureIndices objectAtIndex:indexOfObject] integerValue]; - - [currentTarget setCurrentlyReceivingMonochromeInput:NO]; - [currentTarget setInputSize:pixelSizeOfImage atIndex:textureIndexOfTarget]; - [currentTarget setInputFramebuffer:outputFramebuffer atIndex:textureIndexOfTarget]; - [currentTarget newFrameReadyAtTime:kCMTimeIndefinite atIndex:textureIndexOfTarget]; - } - - dispatch_semaphore_signal(imageUpdateSemaphore); - - if (completion != nil) { - completion(); - } - }); - - return YES; -} - -- (void)processImageUpToFilter:(GPUImageOutput *)finalFilterInChain withCompletionHandler:(void (^)(UIImage *processedImage))block; -{ - [finalFilterInChain useNextFrameForImageCapture]; - [self processImageWithCompletionHandler:^{ - UIImage *imageFromFilter = [finalFilterInChain imageFromCurrentFramebuffer]; - block(imageFromFilter); - }]; -} - -- (CGSize)outputImageSize; -{ - return pixelSizeOfImage; -} - -- (void)addTarget:(id)newTarget atTextureLocation:(NSInteger)textureLocation; -{ - [super addTarget:newTarget atTextureLocation:textureLocation]; - - if (hasProcessedImage) - { - [newTarget setInputSize:pixelSizeOfImage atIndex:textureLocation]; - [newTarget newFrameReadyAtTime:kCMTimeIndefinite atIndex:textureLocation]; - } -} - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageView.h b/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageView.h deleted file mode 100755 index 03e12ee5..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageView.h +++ /dev/null @@ -1,39 +0,0 @@ -#import -#import "GPUImageContext.h" - -typedef enum { - kGPUImageFillModeStretch, // Stretch to fill the full view, which may distort the image outside of its normal aspect ratio - kGPUImageFillModePreserveAspectRatio, // Maintains the aspect ratio of the source image, adding bars of the specified background color - kGPUImageFillModePreserveAspectRatioAndFill // Maintains the aspect ratio of the source image, zooming in on its center to fill the view -} GPUImageFillModeType; - -/** - UIView subclass to use as an endpoint for displaying GPUImage outputs - */ -@interface GPUImageView : UIView -{ - GPUImageRotationMode inputRotation; -} - -/** The fill mode dictates how images are fit in the view, with the default being kGPUImageFillModePreserveAspectRatio - */ -@property(readwrite, nonatomic) GPUImageFillModeType fillMode; - -/** This calculates the current display size, in pixels, taking into account Retina scaling factors - */ -@property(readonly, nonatomic) CGSize sizeInPixels; - -@property(nonatomic) BOOL enabled; - -/** Handling fill mode - - @param redComponent Red component for background color - @param greenComponent Green component for background color - @param blueComponent Blue component for background color - @param alphaComponent Alpha component for background color - */ -- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent; - -- (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; - -@end diff --git a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageView.m b/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageView.m deleted file mode 100755 index 5def624c..00000000 --- a/iOS_Tips/Pods/GPUImage/framework/Source/iOS/GPUImageView.m +++ /dev/null @@ -1,481 +0,0 @@ -#import "GPUImageView.h" -#import -#import -#import "GPUImageContext.h" -#import "GPUImageFilter.h" -#import - -#pragma mark - -#pragma mark Private methods and instance variables - -@interface GPUImageView () -{ - GPUImageFramebuffer *inputFramebufferForDisplay; - GLuint displayRenderbuffer, displayFramebuffer; - - GLProgram *displayProgram; - GLint displayPositionAttribute, displayTextureCoordinateAttribute; - GLint displayInputTextureUniform; - - CGSize inputImageSize; - GLfloat imageVertices[8]; - GLfloat backgroundColorRed, backgroundColorGreen, backgroundColorBlue, backgroundColorAlpha; - - CGSize boundsSizeAtFrameBufferEpoch; -} - -@property (assign, nonatomic) NSUInteger aspectRatio; - -// Initialization and teardown -- (void)commonInit; - -// Managing the display FBOs -- (void)createDisplayFramebuffer; -- (void)destroyDisplayFramebuffer; - -// Handling fill mode -- (void)recalculateViewGeometry; - -@end - -@implementation GPUImageView - -@synthesize aspectRatio; -@synthesize sizeInPixels = _sizeInPixels; -@synthesize fillMode = _fillMode; -@synthesize enabled; - -#pragma mark - -#pragma mark Initialization and teardown - -+ (Class)layerClass -{ - return [CAEAGLLayer class]; -} - -- (id)initWithFrame:(CGRect)frame -{ - if (!(self = [super initWithFrame:frame])) - { - return nil; - } - - [self commonInit]; - - return self; -} - --(id)initWithCoder:(NSCoder *)coder -{ - if (!(self = [super initWithCoder:coder])) - { - return nil; - } - - [self commonInit]; - - return self; -} - -- (void)commonInit; -{ - // Set scaling to account for Retina display - if ([self respondsToSelector:@selector(setContentScaleFactor:)]) - { - self.contentScaleFactor = [[UIScreen mainScreen] scale]; - } - - inputRotation = kGPUImageNoRotation; - self.opaque = YES; - self.hidden = NO; - CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer; - eaglLayer.opaque = YES; - eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil]; - - self.enabled = YES; - - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext useImageProcessingContext]; - - displayProgram = [[GPUImageContext sharedImageProcessingContext] programForVertexShaderString:kGPUImageVertexShaderString fragmentShaderString:kGPUImagePassthroughFragmentShaderString]; - if (!displayProgram.initialized) - { - [displayProgram addAttribute:@"position"]; - [displayProgram addAttribute:@"inputTextureCoordinate"]; - - if (![displayProgram link]) - { - NSString *progLog = [displayProgram programLog]; - NSLog(@"Program link log: %@", progLog); - NSString *fragLog = [displayProgram fragmentShaderLog]; - NSLog(@"Fragment shader compile log: %@", fragLog); - NSString *vertLog = [displayProgram vertexShaderLog]; - NSLog(@"Vertex shader compile log: %@", vertLog); - displayProgram = nil; - NSAssert(NO, @"Filter shader link failed"); - } - } - - displayPositionAttribute = [displayProgram attributeIndex:@"position"]; - displayTextureCoordinateAttribute = [displayProgram attributeIndex:@"inputTextureCoordinate"]; - displayInputTextureUniform = [displayProgram uniformIndex:@"inputImageTexture"]; // This does assume a name of "inputTexture" for the fragment shader - - [GPUImageContext setActiveShaderProgram:displayProgram]; - glEnableVertexAttribArray(displayPositionAttribute); - glEnableVertexAttribArray(displayTextureCoordinateAttribute); - - [self setBackgroundColorRed:0.0 green:0.0 blue:0.0 alpha:1.0]; - _fillMode = kGPUImageFillModePreserveAspectRatio; - [self createDisplayFramebuffer]; - }); -} - -- (void)layoutSubviews { - [super layoutSubviews]; - - // The frame buffer needs to be trashed and re-created when the view size changes. - if (!CGSizeEqualToSize(self.bounds.size, boundsSizeAtFrameBufferEpoch) && - !CGSizeEqualToSize(self.bounds.size, CGSizeZero)) { - runSynchronouslyOnVideoProcessingQueue(^{ - [self destroyDisplayFramebuffer]; - [self createDisplayFramebuffer]; - [self recalculateViewGeometry]; - }); - } -} - -- (void)dealloc -{ - runSynchronouslyOnVideoProcessingQueue(^{ - [self destroyDisplayFramebuffer]; - }); -} - -#pragma mark - -#pragma mark Managing the display FBOs - -- (void)createDisplayFramebuffer; -{ - [GPUImageContext useImageProcessingContext]; - - glGenFramebuffers(1, &displayFramebuffer); - glBindFramebuffer(GL_FRAMEBUFFER, displayFramebuffer); - - glGenRenderbuffers(1, &displayRenderbuffer); - glBindRenderbuffer(GL_RENDERBUFFER, displayRenderbuffer); - - [[[GPUImageContext sharedImageProcessingContext] context] renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer*)self.layer]; - - GLint backingWidth, backingHeight; - - glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &backingWidth); - glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &backingHeight); - - if ( (backingWidth == 0) || (backingHeight == 0) ) - { - [self destroyDisplayFramebuffer]; - return; - } - - _sizeInPixels.width = (CGFloat)backingWidth; - _sizeInPixels.height = (CGFloat)backingHeight; - -// NSLog(@"Backing width: %d, height: %d", backingWidth, backingHeight); - - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, displayRenderbuffer); - - GLuint framebufferCreationStatus = glCheckFramebufferStatus(GL_FRAMEBUFFER); - NSAssert(framebufferCreationStatus == GL_FRAMEBUFFER_COMPLETE, @"Failure with display framebuffer generation for display of size: %f, %f", self.bounds.size.width, self.bounds.size.height); - boundsSizeAtFrameBufferEpoch = self.bounds.size; -} - -- (void)destroyDisplayFramebuffer; -{ - [GPUImageContext useImageProcessingContext]; - - if (displayFramebuffer) - { - glDeleteFramebuffers(1, &displayFramebuffer); - displayFramebuffer = 0; - } - - if (displayRenderbuffer) - { - glDeleteRenderbuffers(1, &displayRenderbuffer); - displayRenderbuffer = 0; - } -} - -- (void)setDisplayFramebuffer; -{ - if (!displayFramebuffer) - { - [self createDisplayFramebuffer]; - } - - glBindFramebuffer(GL_FRAMEBUFFER, displayFramebuffer); - - glViewport(0, 0, (GLint)_sizeInPixels.width, (GLint)_sizeInPixels.height); -} - -- (void)presentFramebuffer; -{ - glBindRenderbuffer(GL_RENDERBUFFER, displayRenderbuffer); - [[GPUImageContext sharedImageProcessingContext] presentBufferForDisplay]; -} - -#pragma mark - -#pragma mark Handling fill mode - -- (void)recalculateViewGeometry; -{ - runSynchronouslyOnVideoProcessingQueue(^{ - CGFloat heightScaling, widthScaling; - - CGSize currentViewSize = self.bounds.size; - - // CGFloat imageAspectRatio = inputImageSize.width / inputImageSize.height; - // CGFloat viewAspectRatio = currentViewSize.width / currentViewSize.height; - - CGRect insetRect = AVMakeRectWithAspectRatioInsideRect(inputImageSize, self.bounds); - - switch(_fillMode) - { - case kGPUImageFillModeStretch: - { - widthScaling = 1.0; - heightScaling = 1.0; - }; break; - case kGPUImageFillModePreserveAspectRatio: - { - widthScaling = insetRect.size.width / currentViewSize.width; - heightScaling = insetRect.size.height / currentViewSize.height; - }; break; - case kGPUImageFillModePreserveAspectRatioAndFill: - { - // CGFloat widthHolder = insetRect.size.width / currentViewSize.width; - widthScaling = currentViewSize.height / insetRect.size.height; - heightScaling = currentViewSize.width / insetRect.size.width; - }; break; - } - - imageVertices[0] = -widthScaling; - imageVertices[1] = -heightScaling; - imageVertices[2] = widthScaling; - imageVertices[3] = -heightScaling; - imageVertices[4] = -widthScaling; - imageVertices[5] = heightScaling; - imageVertices[6] = widthScaling; - imageVertices[7] = heightScaling; - }); - -// static const GLfloat imageVertices[] = { -// -1.0f, -1.0f, -// 1.0f, -1.0f, -// -1.0f, 1.0f, -// 1.0f, 1.0f, -// }; -} - -- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent; -{ - backgroundColorRed = redComponent; - backgroundColorGreen = greenComponent; - backgroundColorBlue = blueComponent; - backgroundColorAlpha = alphaComponent; -} - -+ (const GLfloat *)textureCoordinatesForRotation:(GPUImageRotationMode)rotationMode; -{ -// static const GLfloat noRotationTextureCoordinates[] = { -// 0.0f, 0.0f, -// 1.0f, 0.0f, -// 0.0f, 1.0f, -// 1.0f, 1.0f, -// }; - - static const GLfloat noRotationTextureCoordinates[] = { - 0.0f, 1.0f, - 1.0f, 1.0f, - 0.0f, 0.0f, - 1.0f, 0.0f, - }; - - static const GLfloat rotateRightTextureCoordinates[] = { - 1.0f, 1.0f, - 1.0f, 0.0f, - 0.0f, 1.0f, - 0.0f, 0.0f, - }; - - static const GLfloat rotateLeftTextureCoordinates[] = { - 0.0f, 0.0f, - 0.0f, 1.0f, - 1.0f, 0.0f, - 1.0f, 1.0f, - }; - - static const GLfloat verticalFlipTextureCoordinates[] = { - 0.0f, 0.0f, - 1.0f, 0.0f, - 0.0f, 1.0f, - 1.0f, 1.0f, - }; - - static const GLfloat horizontalFlipTextureCoordinates[] = { - 1.0f, 1.0f, - 0.0f, 1.0f, - 1.0f, 0.0f, - 0.0f, 0.0f, - }; - - static const GLfloat rotateRightVerticalFlipTextureCoordinates[] = { - 1.0f, 0.0f, - 1.0f, 1.0f, - 0.0f, 0.0f, - 0.0f, 1.0f, - }; - - static const GLfloat rotateRightHorizontalFlipTextureCoordinates[] = { - 1.0f, 1.0f, - 1.0f, 0.0f, - 0.0f, 1.0f, - 0.0f, 0.0f, - }; - - static const GLfloat rotate180TextureCoordinates[] = { - 1.0f, 0.0f, - 0.0f, 0.0f, - 1.0f, 1.0f, - 0.0f, 1.0f, - }; - - switch(rotationMode) - { - case kGPUImageNoRotation: return noRotationTextureCoordinates; - case kGPUImageRotateLeft: return rotateLeftTextureCoordinates; - case kGPUImageRotateRight: return rotateRightTextureCoordinates; - case kGPUImageFlipVertical: return verticalFlipTextureCoordinates; - case kGPUImageFlipHorizonal: return horizontalFlipTextureCoordinates; - case kGPUImageRotateRightFlipVertical: return rotateRightVerticalFlipTextureCoordinates; - case kGPUImageRotateRightFlipHorizontal: return rotateRightHorizontalFlipTextureCoordinates; - case kGPUImageRotate180: return rotate180TextureCoordinates; - } -} - -#pragma mark - -#pragma mark GPUInput protocol - -- (void)newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex; -{ - runSynchronouslyOnVideoProcessingQueue(^{ - [GPUImageContext setActiveShaderProgram:displayProgram]; - [self setDisplayFramebuffer]; - - glClearColor(backgroundColorRed, backgroundColorGreen, backgroundColorBlue, backgroundColorAlpha); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glActiveTexture(GL_TEXTURE4); - glBindTexture(GL_TEXTURE_2D, [inputFramebufferForDisplay texture]); - glUniform1i(displayInputTextureUniform, 4); - - glVertexAttribPointer(displayPositionAttribute, 2, GL_FLOAT, 0, 0, imageVertices); - glVertexAttribPointer(displayTextureCoordinateAttribute, 2, GL_FLOAT, 0, 0, [GPUImageView textureCoordinatesForRotation:inputRotation]); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - [self presentFramebuffer]; - [inputFramebufferForDisplay unlock]; - inputFramebufferForDisplay = nil; - }); -} - -- (NSInteger)nextAvailableTextureIndex; -{ - return 0; -} - -- (void)setInputFramebuffer:(GPUImageFramebuffer *)newInputFramebuffer atIndex:(NSInteger)textureIndex; -{ - inputFramebufferForDisplay = newInputFramebuffer; - [inputFramebufferForDisplay lock]; -} - -- (void)setInputRotation:(GPUImageRotationMode)newInputRotation atIndex:(NSInteger)textureIndex; -{ - inputRotation = newInputRotation; -} - -- (void)setInputSize:(CGSize)newSize atIndex:(NSInteger)textureIndex; -{ - runSynchronouslyOnVideoProcessingQueue(^{ - CGSize rotatedSize = newSize; - - if (GPUImageRotationSwapsWidthAndHeight(inputRotation)) - { - rotatedSize.width = newSize.height; - rotatedSize.height = newSize.width; - } - - if (!CGSizeEqualToSize(inputImageSize, rotatedSize)) - { - inputImageSize = rotatedSize; - [self recalculateViewGeometry]; - } - }); -} - -- (CGSize)maximumOutputSize; -{ - if ([self respondsToSelector:@selector(setContentScaleFactor:)]) - { - CGSize pointSize = self.bounds.size; - return CGSizeMake(self.contentScaleFactor * pointSize.width, self.contentScaleFactor * pointSize.height); - } - else - { - return self.bounds.size; - } -} - -- (void)endProcessing -{ -} - -- (BOOL)shouldIgnoreUpdatesToThisTarget; -{ - return NO; -} - -- (BOOL)wantsMonochromeInput; -{ - return NO; -} - -- (void)setCurrentlyReceivingMonochromeInput:(BOOL)newValue; -{ - -} - -#pragma mark - -#pragma mark Accessors - -- (CGSize)sizeInPixels; -{ - if (CGSizeEqualToSize(_sizeInPixels, CGSizeZero)) - { - return [self maximumOutputSize]; - } - else - { - return _sizeInPixels; - } -} - -- (void)setFillMode:(GPUImageFillModeType)newValue; -{ - _fillMode = newValue; - [self recalculateViewGeometry]; -} - -@end diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/BaseType.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/BaseType.h deleted file mode 120000 index a4f8a379..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/BaseType.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/BaseType.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBAssociationManager+Internal.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBAssociationManager+Internal.h deleted file mode 120000 index 8747b028..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBAssociationManager+Internal.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Associations/Internal/FBAssociationManager+Internal.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBAssociationManager.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBAssociationManager.h deleted file mode 120000 index 87773ed0..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBAssociationManager.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Associations/FBAssociationManager.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBBlockInterface.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBBlockInterface.h deleted file mode 120000 index 28b4641e..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBBlockInterface.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockInterface.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBBlockStrongLayout.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBBlockStrongLayout.h deleted file mode 120000 index 831bea23..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBBlockStrongLayout.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongLayout.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBBlockStrongRelationDetector.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBBlockStrongRelationDetector.h deleted file mode 120000 index 0f130bd2..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBBlockStrongRelationDetector.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Layout/Blocks/FBBlockStrongRelationDetector.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBClassStrongLayout.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBClassStrongLayout.h deleted file mode 120000 index b27a4028..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBClassStrongLayout.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayout.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBClassStrongLayoutHelpers.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBClassStrongLayoutHelpers.h deleted file mode 120000 index 0abb7f6d..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBClassStrongLayoutHelpers.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayoutHelpers.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBIvarReference.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBIvarReference.h deleted file mode 120000 index 9d353eef..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBIvarReference.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBIvarReference.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBNodeEnumerator.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBNodeEnumerator.h deleted file mode 120000 index 4c41ee2d..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBNodeEnumerator.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBNodeEnumerator.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectGraphConfiguration.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectGraphConfiguration.h deleted file mode 120000 index 922bcebb..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectGraphConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectGraphConfiguration.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectInStructReference.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectInStructReference.h deleted file mode 120000 index 5cf4f43c..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectInStructReference.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBObjectInStructReference.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectReference.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectReference.h deleted file mode 120000 index 57e54c02..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectReference.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Reference/FBObjectReference.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCBlock.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCBlock.h deleted file mode 120000 index 7c42b2da..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCBlock.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCBlock.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCGraphElement+Internal.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCGraphElement+Internal.h deleted file mode 120000 index df1269f4..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCGraphElement+Internal.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Graph/Internal/FBObjectiveCGraphElement+Internal.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCGraphElement.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCGraphElement.h deleted file mode 120000 index 58c6b5b2..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCGraphElement.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCGraphElement.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCNSCFTimer.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCNSCFTimer.h deleted file mode 120000 index 25a71185..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCNSCFTimer.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Graph/Specialization/FBObjectiveCNSCFTimer.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCObject.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCObject.h deleted file mode 120000 index b12969ab..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBObjectiveCObject.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCObject.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBRetainCycleDetector+Internal.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBRetainCycleDetector+Internal.h deleted file mode 120000 index 0c4fa790..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBRetainCycleDetector+Internal.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBRetainCycleDetector+Internal.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBRetainCycleDetector.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBRetainCycleDetector.h deleted file mode 120000 index efd23309..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBRetainCycleDetector.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBRetainCycleDetector.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBRetainCycleUtils.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBRetainCycleUtils.h deleted file mode 120000 index 610a974e..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBRetainCycleUtils.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/FBRetainCycleUtils.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBStandardGraphEdgeFilters.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBStandardGraphEdgeFilters.h deleted file mode 120000 index e040885b..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBStandardGraphEdgeFilters.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Filtering/FBStandardGraphEdgeFilters.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBStructEncodingParser.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBStructEncodingParser.h deleted file mode 120000 index 1884d703..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/FBStructEncodingParser.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/FBStructEncodingParser.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/Struct.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/Struct.h deleted file mode 120000 index 26610318..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/Struct.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/Struct.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/Type.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/Type.h deleted file mode 120000 index f31a3275..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/Type.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/Parser/Type.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/fishhook.h b/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/fishhook.h deleted file mode 120000 index 0f149f3d..00000000 --- a/iOS_Tips/Pods/Headers/Private/FBRetainCycleDetector/fishhook.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/fishhook/fishhook.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GLProgram.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GLProgram.h deleted file mode 120000 index 7b517c78..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GLProgram.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GLProgram.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImage.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImage.h deleted file mode 120000 index bca8af3b..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImage.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImage3x3ConvolutionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImage3x3ConvolutionFilter.h deleted file mode 120000 index 810319ad..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImage3x3ConvolutionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImage3x3ConvolutionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImage3x3TextureSamplingFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImage3x3TextureSamplingFilter.h deleted file mode 120000 index 6e5da5e6..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImage3x3TextureSamplingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImage3x3TextureSamplingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAdaptiveThresholdFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAdaptiveThresholdFilter.h deleted file mode 120000 index 547be3d0..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAdaptiveThresholdFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageAdaptiveThresholdFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAddBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAddBlendFilter.h deleted file mode 120000 index c0020c2a..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAddBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageAddBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAlphaBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAlphaBlendFilter.h deleted file mode 120000 index 8d030c71..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAlphaBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageAlphaBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAmatorkaFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAmatorkaFilter.h deleted file mode 120000 index c357f5e3..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAmatorkaFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageAmatorkaFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAverageColor.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAverageColor.h deleted file mode 120000 index 702913cf..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAverageColor.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageAverageColor.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAverageLuminanceThresholdFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAverageLuminanceThresholdFilter.h deleted file mode 120000 index fabcf094..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageAverageLuminanceThresholdFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageAverageLuminanceThresholdFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBilateralFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBilateralFilter.h deleted file mode 120000 index 6498b00c..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBilateralFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageBilateralFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBoxBlurFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBoxBlurFilter.h deleted file mode 120000 index 9a4d8f03..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBoxBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageBoxBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBrightnessFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBrightnessFilter.h deleted file mode 120000 index 1b81b6a5..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBrightnessFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageBrightnessFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBuffer.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBuffer.h deleted file mode 120000 index 220ce7f8..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBuffer.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageBuffer.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBulgeDistortionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBulgeDistortionFilter.h deleted file mode 120000 index ab666324..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageBulgeDistortionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageBulgeDistortionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCGAColorspaceFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCGAColorspaceFilter.h deleted file mode 120000 index 3086aeb5..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCGAColorspaceFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageCGAColorspaceFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCannyEdgeDetectionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCannyEdgeDetectionFilter.h deleted file mode 120000 index 39e89d57..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCannyEdgeDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageCannyEdgeDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageChromaKeyBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageChromaKeyBlendFilter.h deleted file mode 120000 index cd3ea805..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageChromaKeyBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageChromaKeyBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageChromaKeyFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageChromaKeyFilter.h deleted file mode 120000 index bdecab2f..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageChromaKeyFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageChromaKeyFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageClosingFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageClosingFilter.h deleted file mode 120000 index 5b163840..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageClosingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageClosingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorBlendFilter.h deleted file mode 120000 index f72172b7..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageColorBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorBurnBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorBurnBlendFilter.h deleted file mode 120000 index a45ffd4b..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorBurnBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageColorBurnBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorDodgeBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorDodgeBlendFilter.h deleted file mode 120000 index 10e12cb6..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorDodgeBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageColorDodgeBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorInvertFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorInvertFilter.h deleted file mode 120000 index 6961f69a..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorInvertFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageColorInvertFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorMatrixFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorMatrixFilter.h deleted file mode 120000 index 4e8d4d59..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorMatrixFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageColorMatrixFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorPackingFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorPackingFilter.h deleted file mode 120000 index b6ce55c9..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageColorPackingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageColorPackingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageContext.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageContext.h deleted file mode 120000 index 40791f1b..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageContext.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/iOS/GPUImageContext.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageContrastFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageContrastFilter.h deleted file mode 120000 index 22057498..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageContrastFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageContrastFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCropFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCropFilter.h deleted file mode 120000 index d136ed77..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCropFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageCropFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCrosshairGenerator.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCrosshairGenerator.h deleted file mode 120000 index 2112ba21..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCrosshairGenerator.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageCrosshairGenerator.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCrosshatchFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCrosshatchFilter.h deleted file mode 120000 index 7706d91d..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageCrosshatchFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageCrosshatchFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDarkenBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDarkenBlendFilter.h deleted file mode 120000 index 8fdf8cd5..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDarkenBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDarkenBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDifferenceBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDifferenceBlendFilter.h deleted file mode 120000 index 6a41b879..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDifferenceBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDifferenceBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDilationFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDilationFilter.h deleted file mode 120000 index 1b82a7a7..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDilationFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDilationFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDirectionalNonMaximumSuppressionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDirectionalNonMaximumSuppressionFilter.h deleted file mode 120000 index c5820fac..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDirectionalNonMaximumSuppressionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDirectionalNonMaximumSuppressionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDirectionalSobelEdgeDetectionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDirectionalSobelEdgeDetectionFilter.h deleted file mode 120000 index ebc6b5b8..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDirectionalSobelEdgeDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDirectionalSobelEdgeDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDissolveBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDissolveBlendFilter.h deleted file mode 120000 index c40a8147..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDissolveBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDissolveBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDivideBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDivideBlendFilter.h deleted file mode 120000 index e21f3007..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageDivideBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDivideBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageEmbossFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageEmbossFilter.h deleted file mode 120000 index 93a8ac2d..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageEmbossFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageEmbossFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageErosionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageErosionFilter.h deleted file mode 120000 index 66c4b920..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageErosionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageErosionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageExclusionBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageExclusionBlendFilter.h deleted file mode 120000 index ee6a437c..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageExclusionBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageExclusionBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageExposureFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageExposureFilter.h deleted file mode 120000 index cb3ec5ed..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageExposureFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageExposureFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFASTCornerDetectionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFASTCornerDetectionFilter.h deleted file mode 120000 index 6f73c3e1..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFASTCornerDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFASTCornerDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFalseColorFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFalseColorFilter.h deleted file mode 120000 index 161cc44b..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFalseColorFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFalseColorFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFilter.h deleted file mode 120000 index c7036945..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFilterGroup.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFilterGroup.h deleted file mode 120000 index c15625a3..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFilterGroup.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFilterGroup.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFilterPipeline.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFilterPipeline.h deleted file mode 120000 index e3d54cd2..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFilterPipeline.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFilterPipeline.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFramebuffer.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFramebuffer.h deleted file mode 120000 index 912489a3..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFramebuffer.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFramebuffer.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFramebufferCache.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFramebufferCache.h deleted file mode 120000 index 14e95530..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFramebufferCache.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFramebufferCache.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFramework.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFramework.h deleted file mode 120000 index ade56d4a..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageFramework.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/iOS/Framework/GPUImageFramework.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGammaFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGammaFilter.h deleted file mode 120000 index 127ab2c7..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGammaFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageGammaFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGaussianBlurFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGaussianBlurFilter.h deleted file mode 120000 index 2a9ecae7..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGaussianBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageGaussianBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGaussianBlurPositionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGaussianBlurPositionFilter.h deleted file mode 120000 index 423c806f..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGaussianBlurPositionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageGaussianBlurPositionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGaussianSelectiveBlurFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGaussianSelectiveBlurFilter.h deleted file mode 120000 index 6d410149..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGaussianSelectiveBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageGaussianSelectiveBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGlassSphereFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGlassSphereFilter.h deleted file mode 120000 index e01a6f51..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGlassSphereFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageGlassSphereFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGrayscaleFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGrayscaleFilter.h deleted file mode 120000 index 8332833f..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageGrayscaleFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageGrayscaleFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHSBFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHSBFilter.h deleted file mode 120000 index df50e698..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHSBFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHSBFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHalftoneFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHalftoneFilter.h deleted file mode 120000 index f6151b4d..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHalftoneFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHalftoneFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHardLightBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHardLightBlendFilter.h deleted file mode 120000 index e857cd30..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHardLightBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHardLightBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHarrisCornerDetectionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHarrisCornerDetectionFilter.h deleted file mode 120000 index cf78593f..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHarrisCornerDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHarrisCornerDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHazeFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHazeFilter.h deleted file mode 120000 index 5b2806e7..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHazeFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHazeFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHighPassFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHighPassFilter.h deleted file mode 120000 index f5063f14..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHighPassFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHighPassFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHighlightShadowFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHighlightShadowFilter.h deleted file mode 120000 index 33329bd5..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHighlightShadowFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHighlightShadowFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHistogramEqualizationFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHistogramEqualizationFilter.h deleted file mode 120000 index 8a2721b7..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHistogramEqualizationFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHistogramEqualizationFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHistogramFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHistogramFilter.h deleted file mode 120000 index b2f97670..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHistogramFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHistogramFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHistogramGenerator.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHistogramGenerator.h deleted file mode 120000 index 03c93a15..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHistogramGenerator.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHistogramGenerator.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHoughTransformLineDetector.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHoughTransformLineDetector.h deleted file mode 120000 index 2d5da6af..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHoughTransformLineDetector.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHoughTransformLineDetector.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHueBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHueBlendFilter.h deleted file mode 120000 index 97d05aaf..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHueBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHueBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHueFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHueFilter.h deleted file mode 120000 index 62c976c1..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageHueFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHueFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageJFAVoronoiFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageJFAVoronoiFilter.h deleted file mode 120000 index f02faeb4..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageJFAVoronoiFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageJFAVoronoiFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageKuwaharaFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageKuwaharaFilter.h deleted file mode 120000 index e64abda0..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageKuwaharaFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageKuwaharaFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageKuwaharaRadius3Filter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageKuwaharaRadius3Filter.h deleted file mode 120000 index 3e2aec8c..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageKuwaharaRadius3Filter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageKuwaharaRadius3Filter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLanczosResamplingFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLanczosResamplingFilter.h deleted file mode 120000 index b036cbba..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLanczosResamplingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLanczosResamplingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLaplacianFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLaplacianFilter.h deleted file mode 120000 index d663c479..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLaplacianFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLaplacianFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLevelsFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLevelsFilter.h deleted file mode 120000 index 2d92e6bc..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLevelsFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLevelsFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLightenBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLightenBlendFilter.h deleted file mode 120000 index 425d16c0..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLightenBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLightenBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLineGenerator.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLineGenerator.h deleted file mode 120000 index 5a999110..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLineGenerator.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLineGenerator.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLinearBurnBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLinearBurnBlendFilter.h deleted file mode 120000 index f471fdb9..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLinearBurnBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLinearBurnBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLocalBinaryPatternFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLocalBinaryPatternFilter.h deleted file mode 120000 index 93395da8..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLocalBinaryPatternFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLocalBinaryPatternFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLookupFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLookupFilter.h deleted file mode 120000 index 0ea51d79..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLookupFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLookupFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLowPassFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLowPassFilter.h deleted file mode 120000 index 59aca2a8..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLowPassFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLowPassFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLuminanceRangeFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLuminanceRangeFilter.h deleted file mode 120000 index 9855a2a7..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLuminanceRangeFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLuminanceRangeFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLuminanceThresholdFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLuminanceThresholdFilter.h deleted file mode 120000 index 0b1478af..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLuminanceThresholdFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLuminanceThresholdFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLuminosity.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLuminosity.h deleted file mode 120000 index c20086fa..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLuminosity.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLuminosity.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLuminosityBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLuminosityBlendFilter.h deleted file mode 120000 index 19ef8578..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageLuminosityBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLuminosityBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMaskFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMaskFilter.h deleted file mode 120000 index 29e6989a..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMaskFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMaskFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMedianFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMedianFilter.h deleted file mode 120000 index 7e68c25d..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMedianFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMedianFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMissEtikateFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMissEtikateFilter.h deleted file mode 120000 index a0afc5ba..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMissEtikateFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMissEtikateFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMonochromeFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMonochromeFilter.h deleted file mode 120000 index 8c4201d7..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMonochromeFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMonochromeFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMosaicFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMosaicFilter.h deleted file mode 120000 index 8f8a3285..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMosaicFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMosaicFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMotionBlurFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMotionBlurFilter.h deleted file mode 120000 index f2e2b8e0..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMotionBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMotionBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMotionDetector.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMotionDetector.h deleted file mode 120000 index 8c5b0e10..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMotionDetector.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMotionDetector.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMovie.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMovie.h deleted file mode 120000 index 4d6e8798..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMovie.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMovie.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMovieComposition.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMovieComposition.h deleted file mode 120000 index 93598144..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMovieComposition.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMovieComposition.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMovieWriter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMovieWriter.h deleted file mode 120000 index 0981109d..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMovieWriter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/iOS/GPUImageMovieWriter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMultiplyBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMultiplyBlendFilter.h deleted file mode 120000 index 0b39ea10..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageMultiplyBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMultiplyBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageNobleCornerDetectionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageNobleCornerDetectionFilter.h deleted file mode 120000 index e4ea4995..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageNobleCornerDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageNobleCornerDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageNonMaximumSuppressionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageNonMaximumSuppressionFilter.h deleted file mode 120000 index b5f7957a..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageNonMaximumSuppressionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageNonMaximumSuppressionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageNormalBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageNormalBlendFilter.h deleted file mode 120000 index 5d0b343b..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageNormalBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageNormalBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageOpacityFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageOpacityFilter.h deleted file mode 120000 index 1bcca485..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageOpacityFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageOpacityFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageOpeningFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageOpeningFilter.h deleted file mode 120000 index b68bb068..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageOpeningFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageOpeningFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageOutput.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageOutput.h deleted file mode 120000 index dcb6fab8..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageOutput.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageOutput.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageOverlayBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageOverlayBlendFilter.h deleted file mode 120000 index 34b88fbe..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageOverlayBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageOverlayBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageParallelCoordinateLineTransformFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageParallelCoordinateLineTransformFilter.h deleted file mode 120000 index 8f0d06f6..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageParallelCoordinateLineTransformFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageParallelCoordinateLineTransformFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePerlinNoiseFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePerlinNoiseFilter.h deleted file mode 120000 index 00c2bfe7..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePerlinNoiseFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePerlinNoiseFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePicture+TextureSubimage.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePicture+TextureSubimage.h deleted file mode 120000 index 97e13907..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePicture+TextureSubimage.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/iOS/GPUImagePicture+TextureSubimage.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePicture.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePicture.h deleted file mode 120000 index 9999ee88..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePicture.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/iOS/GPUImagePicture.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePinchDistortionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePinchDistortionFilter.h deleted file mode 120000 index 561065be..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePinchDistortionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePinchDistortionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePixellateFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePixellateFilter.h deleted file mode 120000 index 65d5092c..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePixellateFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePixellateFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePixellatePositionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePixellatePositionFilter.h deleted file mode 120000 index 06e3b7e2..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePixellatePositionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePixellatePositionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePoissonBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePoissonBlendFilter.h deleted file mode 120000 index c852272e..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePoissonBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePoissonBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePolarPixellateFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePolarPixellateFilter.h deleted file mode 120000 index 752176da..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePolarPixellateFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePolarPixellateFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePolkaDotFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePolkaDotFilter.h deleted file mode 120000 index dba6db1a..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePolkaDotFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePolkaDotFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePosterizeFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePosterizeFilter.h deleted file mode 120000 index 215ea1b0..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePosterizeFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePosterizeFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePrewittEdgeDetectionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePrewittEdgeDetectionFilter.h deleted file mode 120000 index c620cdef..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImagePrewittEdgeDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePrewittEdgeDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBClosingFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBClosingFilter.h deleted file mode 120000 index e958b6df..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBClosingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRGBClosingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBDilationFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBDilationFilter.h deleted file mode 120000 index 406dea33..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBDilationFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRGBDilationFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBErosionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBErosionFilter.h deleted file mode 120000 index b0bea951..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBErosionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRGBErosionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBFilter.h deleted file mode 120000 index 64f0f29e..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRGBFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBOpeningFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBOpeningFilter.h deleted file mode 120000 index b08322df..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRGBOpeningFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRGBOpeningFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRawDataInput.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRawDataInput.h deleted file mode 120000 index 3ac18170..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRawDataInput.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRawDataInput.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRawDataOutput.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRawDataOutput.h deleted file mode 120000 index a08dd75e..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageRawDataOutput.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRawDataOutput.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSaturationBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSaturationBlendFilter.h deleted file mode 120000 index 128968a3..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSaturationBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSaturationBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSaturationFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSaturationFilter.h deleted file mode 120000 index 9b56c3c2..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSaturationFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSaturationFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageScreenBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageScreenBlendFilter.h deleted file mode 120000 index c09274d9..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageScreenBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageScreenBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSepiaFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSepiaFilter.h deleted file mode 120000 index 6af3120c..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSepiaFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSepiaFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSharpenFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSharpenFilter.h deleted file mode 120000 index a736679d..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSharpenFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSharpenFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageShiTomasiFeatureDetectionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageShiTomasiFeatureDetectionFilter.h deleted file mode 120000 index 6bfa8c58..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageShiTomasiFeatureDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageShiTomasiFeatureDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSingleComponentGaussianBlurFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSingleComponentGaussianBlurFilter.h deleted file mode 120000 index dd642505..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSingleComponentGaussianBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSingleComponentGaussianBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSketchFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSketchFilter.h deleted file mode 120000 index 9aafd154..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSketchFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSketchFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSmoothToonFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSmoothToonFilter.h deleted file mode 120000 index 8091466f..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSmoothToonFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSmoothToonFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSobelEdgeDetectionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSobelEdgeDetectionFilter.h deleted file mode 120000 index 019a83d0..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSobelEdgeDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSobelEdgeDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSoftEleganceFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSoftEleganceFilter.h deleted file mode 120000 index ae0fe89b..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSoftEleganceFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSoftEleganceFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSoftLightBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSoftLightBlendFilter.h deleted file mode 120000 index ec5c1881..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSoftLightBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSoftLightBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSolidColorGenerator.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSolidColorGenerator.h deleted file mode 120000 index 4eb09f85..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSolidColorGenerator.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSolidColorGenerator.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSourceOverBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSourceOverBlendFilter.h deleted file mode 120000 index 50dee17d..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSourceOverBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSourceOverBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSphereRefractionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSphereRefractionFilter.h deleted file mode 120000 index 9ebdd7cb..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSphereRefractionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSphereRefractionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageStillCamera.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageStillCamera.h deleted file mode 120000 index 52fd54f6..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageStillCamera.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageStillCamera.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageStretchDistortionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageStretchDistortionFilter.h deleted file mode 120000 index 261fca3d..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageStretchDistortionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageStretchDistortionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSubtractBlendFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSubtractBlendFilter.h deleted file mode 120000 index dfc7cb0a..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSubtractBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSubtractBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSwirlFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSwirlFilter.h deleted file mode 120000 index 84091382..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageSwirlFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSwirlFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTextureInput.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTextureInput.h deleted file mode 120000 index da1350a4..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTextureInput.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTextureInput.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTextureOutput.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTextureOutput.h deleted file mode 120000 index da55e4dc..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTextureOutput.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTextureOutput.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageThreeInputFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageThreeInputFilter.h deleted file mode 120000 index c3a2659a..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageThreeInputFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageThreeInputFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageThresholdEdgeDetectionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageThresholdEdgeDetectionFilter.h deleted file mode 120000 index 69d9d2cd..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageThresholdEdgeDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageThresholdEdgeDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageThresholdSketchFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageThresholdSketchFilter.h deleted file mode 120000 index eb97d3b4..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageThresholdSketchFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageThresholdSketchFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageThresholdedNonMaximumSuppressionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageThresholdedNonMaximumSuppressionFilter.h deleted file mode 120000 index 7ccd2357..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageThresholdedNonMaximumSuppressionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageThresholdedNonMaximumSuppressionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTiltShiftFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTiltShiftFilter.h deleted file mode 120000 index 939825c6..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTiltShiftFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTiltShiftFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageToneCurveFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageToneCurveFilter.h deleted file mode 120000 index 74c0912c..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageToneCurveFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageToneCurveFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageToonFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageToonFilter.h deleted file mode 120000 index 19aca502..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageToonFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageToonFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTransformFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTransformFilter.h deleted file mode 120000 index 647b8d5c..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTransformFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTransformFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTwoInputCrossTextureSamplingFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTwoInputCrossTextureSamplingFilter.h deleted file mode 120000 index 37e25218..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTwoInputCrossTextureSamplingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTwoInputCrossTextureSamplingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTwoInputFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTwoInputFilter.h deleted file mode 120000 index c5d5ae16..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTwoInputFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTwoInputFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTwoPassFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTwoPassFilter.h deleted file mode 120000 index 9ee4bf0b..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTwoPassFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTwoPassFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTwoPassTextureSamplingFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTwoPassTextureSamplingFilter.h deleted file mode 120000 index 0bd37757..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageTwoPassTextureSamplingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTwoPassTextureSamplingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageUIElement.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageUIElement.h deleted file mode 120000 index cccc6850..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageUIElement.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageUIElement.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageUnsharpMaskFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageUnsharpMaskFilter.h deleted file mode 120000 index 0d612ecd..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageUnsharpMaskFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageUnsharpMaskFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageVideoCamera.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageVideoCamera.h deleted file mode 120000 index e5a2daf8..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageVideoCamera.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageVideoCamera.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageView.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageView.h deleted file mode 120000 index 47efed92..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageView.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/iOS/GPUImageView.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageVignetteFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageVignetteFilter.h deleted file mode 120000 index 82aeec2b..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageVignetteFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageVignetteFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageVoronoiConsumerFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageVoronoiConsumerFilter.h deleted file mode 120000 index 31810f65..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageVoronoiConsumerFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageVoronoiConsumerFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageWeakPixelInclusionFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageWeakPixelInclusionFilter.h deleted file mode 120000 index 851aebf2..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageWeakPixelInclusionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageWeakPixelInclusionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageWhiteBalanceFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageWhiteBalanceFilter.h deleted file mode 120000 index d2318ca5..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageWhiteBalanceFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageWhiteBalanceFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageXYDerivativeFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageXYDerivativeFilter.h deleted file mode 120000 index d6024a32..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageXYDerivativeFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageXYDerivativeFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageZoomBlurFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageZoomBlurFilter.h deleted file mode 120000 index 67da1204..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageZoomBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageZoomBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageiOSBlurFilter.h b/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageiOSBlurFilter.h deleted file mode 120000 index 2bf9dc16..00000000 --- a/iOS_Tips/Pods/Headers/Private/GPUImage/GPUImageiOSBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageiOSBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MBProgressHUD/MBProgressHUD.h b/iOS_Tips/Pods/Headers/Private/MBProgressHUD/MBProgressHUD.h deleted file mode 120000 index 19ed4db7..00000000 --- a/iOS_Tips/Pods/Headers/Private/MBProgressHUD/MBProgressHUD.h +++ /dev/null @@ -1 +0,0 @@ -../../../MBProgressHUD/MBProgressHUD.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/MLeakedObjectProxy.h b/iOS_Tips/Pods/Headers/Private/MLeaksFinder/MLeakedObjectProxy.h deleted file mode 120000 index 132a394f..00000000 --- a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/MLeakedObjectProxy.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/MLeakedObjectProxy.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/MLeaksFinder.h b/iOS_Tips/Pods/Headers/Private/MLeaksFinder/MLeaksFinder.h deleted file mode 120000 index 0cf746ab..00000000 --- a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/MLeaksFinder.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/MLeaksFinder.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/MLeaksMessenger.h b/iOS_Tips/Pods/Headers/Private/MLeaksFinder/MLeaksMessenger.h deleted file mode 120000 index 4615e4f0..00000000 --- a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/MLeaksMessenger.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/MLeaksMessenger.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/NSObject+MemoryLeak.h b/iOS_Tips/Pods/Headers/Private/MLeaksFinder/NSObject+MemoryLeak.h deleted file mode 120000 index 7343f141..00000000 --- a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/NSObject+MemoryLeak.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/NSObject+MemoryLeak.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UIApplication+MemoryLeak.h b/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UIApplication+MemoryLeak.h deleted file mode 120000 index ed2b35db..00000000 --- a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UIApplication+MemoryLeak.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/UIApplication+MemoryLeak.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UINavigationController+MemoryLeak.h b/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UINavigationController+MemoryLeak.h deleted file mode 120000 index 4e0e0aac..00000000 --- a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UINavigationController+MemoryLeak.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/UINavigationController+MemoryLeak.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UIPageViewController+MemoryLeak.h b/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UIPageViewController+MemoryLeak.h deleted file mode 120000 index fe2af6f3..00000000 --- a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UIPageViewController+MemoryLeak.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/UIPageViewController+MemoryLeak.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UISplitViewController+MemoryLeak.h b/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UISplitViewController+MemoryLeak.h deleted file mode 120000 index ff0cab9c..00000000 --- a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UISplitViewController+MemoryLeak.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/UISplitViewController+MemoryLeak.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UITabBarController+MemoryLeak.h b/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UITabBarController+MemoryLeak.h deleted file mode 120000 index 759fea77..00000000 --- a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UITabBarController+MemoryLeak.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/UITabBarController+MemoryLeak.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UITouch+MemoryLeak.h b/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UITouch+MemoryLeak.h deleted file mode 120000 index f41084a3..00000000 --- a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UITouch+MemoryLeak.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/UITouch+MemoryLeak.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UIView+MemoryLeak.h b/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UIView+MemoryLeak.h deleted file mode 120000 index 9fc01700..00000000 --- a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UIView+MemoryLeak.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/UIView+MemoryLeak.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UIViewController+MemoryLeak.h b/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UIViewController+MemoryLeak.h deleted file mode 120000 index cdad092d..00000000 --- a/iOS_Tips/Pods/Headers/Private/MLeaksFinder/UIViewController+MemoryLeak.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/UIViewController+MemoryLeak.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/MASCompositeConstraint.h b/iOS_Tips/Pods/Headers/Private/Masonry/MASCompositeConstraint.h deleted file mode 120000 index b1b34103..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/MASCompositeConstraint.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASCompositeConstraint.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/MASConstraint+Private.h b/iOS_Tips/Pods/Headers/Private/Masonry/MASConstraint+Private.h deleted file mode 120000 index ed9aa9f3..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/MASConstraint+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASConstraint+Private.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/MASConstraint.h b/iOS_Tips/Pods/Headers/Private/Masonry/MASConstraint.h deleted file mode 120000 index 76e9e73d..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/MASConstraint.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASConstraint.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/MASConstraintMaker.h b/iOS_Tips/Pods/Headers/Private/Masonry/MASConstraintMaker.h deleted file mode 120000 index b6d6027b..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/MASConstraintMaker.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASConstraintMaker.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/MASLayoutConstraint.h b/iOS_Tips/Pods/Headers/Private/Masonry/MASLayoutConstraint.h deleted file mode 120000 index 73e87968..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/MASLayoutConstraint.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASLayoutConstraint.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/MASUtilities.h b/iOS_Tips/Pods/Headers/Private/Masonry/MASUtilities.h deleted file mode 120000 index aae5e32b..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/MASUtilities.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASUtilities.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/MASViewAttribute.h b/iOS_Tips/Pods/Headers/Private/Masonry/MASViewAttribute.h deleted file mode 120000 index 5399f642..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/MASViewAttribute.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASViewAttribute.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/MASViewConstraint.h b/iOS_Tips/Pods/Headers/Private/Masonry/MASViewConstraint.h deleted file mode 120000 index 382c4194..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/MASViewConstraint.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASViewConstraint.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/Masonry.h b/iOS_Tips/Pods/Headers/Private/Masonry/Masonry.h deleted file mode 120000 index f5093032..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/Masonry.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/Masonry.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/NSArray+MASAdditions.h b/iOS_Tips/Pods/Headers/Private/Masonry/NSArray+MASAdditions.h deleted file mode 120000 index db1d0ea7..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/NSArray+MASAdditions.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/NSArray+MASAdditions.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h b/iOS_Tips/Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h deleted file mode 120000 index 2169edc5..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h b/iOS_Tips/Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h deleted file mode 120000 index 72f59430..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/View+MASAdditions.h b/iOS_Tips/Pods/Headers/Private/Masonry/View+MASAdditions.h deleted file mode 120000 index 9060451a..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/View+MASAdditions.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/View+MASAdditions.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h b/iOS_Tips/Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h deleted file mode 120000 index 91ef93fa..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/View+MASShorthandAdditions.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Private/Masonry/ViewController+MASAdditions.h b/iOS_Tips/Pods/Headers/Private/Masonry/ViewController+MASAdditions.h deleted file mode 120000 index 12320e3f..00000000 --- a/iOS_Tips/Pods/Headers/Private/Masonry/ViewController+MASAdditions.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/ViewController+MASAdditions.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBAssociationManager.h b/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBAssociationManager.h deleted file mode 120000 index 87773ed0..00000000 --- a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBAssociationManager.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Associations/FBAssociationManager.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectGraphConfiguration.h b/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectGraphConfiguration.h deleted file mode 120000 index 922bcebb..00000000 --- a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectGraphConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectGraphConfiguration.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectiveCBlock.h b/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectiveCBlock.h deleted file mode 120000 index 7c42b2da..00000000 --- a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectiveCBlock.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCBlock.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectiveCGraphElement.h b/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectiveCGraphElement.h deleted file mode 120000 index 58c6b5b2..00000000 --- a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectiveCGraphElement.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCGraphElement.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectiveCNSCFTimer.h b/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectiveCNSCFTimer.h deleted file mode 120000 index 25a71185..00000000 --- a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectiveCNSCFTimer.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Graph/Specialization/FBObjectiveCNSCFTimer.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectiveCObject.h b/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectiveCObject.h deleted file mode 120000 index b12969ab..00000000 --- a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBObjectiveCObject.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Graph/FBObjectiveCObject.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBRetainCycleDetector.h b/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBRetainCycleDetector.h deleted file mode 120000 index efd23309..00000000 --- a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBRetainCycleDetector.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Detector/FBRetainCycleDetector.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBStandardGraphEdgeFilters.h b/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBStandardGraphEdgeFilters.h deleted file mode 120000 index e040885b..00000000 --- a/iOS_Tips/Pods/Headers/Public/FBRetainCycleDetector/FBStandardGraphEdgeFilters.h +++ /dev/null @@ -1 +0,0 @@ -../../../FBRetainCycleDetector/FBRetainCycleDetector/Filtering/FBStandardGraphEdgeFilters.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GLProgram.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GLProgram.h deleted file mode 120000 index 7b517c78..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GLProgram.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GLProgram.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImage.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImage.h deleted file mode 120000 index bca8af3b..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImage.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImage3x3ConvolutionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImage3x3ConvolutionFilter.h deleted file mode 120000 index 810319ad..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImage3x3ConvolutionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImage3x3ConvolutionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImage3x3TextureSamplingFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImage3x3TextureSamplingFilter.h deleted file mode 120000 index 6e5da5e6..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImage3x3TextureSamplingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImage3x3TextureSamplingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAdaptiveThresholdFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAdaptiveThresholdFilter.h deleted file mode 120000 index 547be3d0..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAdaptiveThresholdFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageAdaptiveThresholdFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAddBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAddBlendFilter.h deleted file mode 120000 index c0020c2a..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAddBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageAddBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAlphaBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAlphaBlendFilter.h deleted file mode 120000 index 8d030c71..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAlphaBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageAlphaBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAmatorkaFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAmatorkaFilter.h deleted file mode 120000 index c357f5e3..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAmatorkaFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageAmatorkaFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAverageColor.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAverageColor.h deleted file mode 120000 index 702913cf..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAverageColor.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageAverageColor.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAverageLuminanceThresholdFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAverageLuminanceThresholdFilter.h deleted file mode 120000 index fabcf094..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageAverageLuminanceThresholdFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageAverageLuminanceThresholdFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBilateralFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBilateralFilter.h deleted file mode 120000 index 6498b00c..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBilateralFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageBilateralFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBoxBlurFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBoxBlurFilter.h deleted file mode 120000 index 9a4d8f03..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBoxBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageBoxBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBrightnessFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBrightnessFilter.h deleted file mode 120000 index 1b81b6a5..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBrightnessFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageBrightnessFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBuffer.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBuffer.h deleted file mode 120000 index 220ce7f8..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBuffer.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageBuffer.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBulgeDistortionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBulgeDistortionFilter.h deleted file mode 120000 index ab666324..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageBulgeDistortionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageBulgeDistortionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCGAColorspaceFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCGAColorspaceFilter.h deleted file mode 120000 index 3086aeb5..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCGAColorspaceFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageCGAColorspaceFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCannyEdgeDetectionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCannyEdgeDetectionFilter.h deleted file mode 120000 index 39e89d57..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCannyEdgeDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageCannyEdgeDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageChromaKeyBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageChromaKeyBlendFilter.h deleted file mode 120000 index cd3ea805..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageChromaKeyBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageChromaKeyBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageChromaKeyFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageChromaKeyFilter.h deleted file mode 120000 index bdecab2f..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageChromaKeyFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageChromaKeyFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageClosingFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageClosingFilter.h deleted file mode 120000 index 5b163840..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageClosingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageClosingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorBlendFilter.h deleted file mode 120000 index f72172b7..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageColorBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorBurnBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorBurnBlendFilter.h deleted file mode 120000 index a45ffd4b..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorBurnBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageColorBurnBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorDodgeBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorDodgeBlendFilter.h deleted file mode 120000 index 10e12cb6..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorDodgeBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageColorDodgeBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorInvertFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorInvertFilter.h deleted file mode 120000 index 6961f69a..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorInvertFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageColorInvertFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorMatrixFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorMatrixFilter.h deleted file mode 120000 index 4e8d4d59..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorMatrixFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageColorMatrixFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorPackingFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorPackingFilter.h deleted file mode 120000 index b6ce55c9..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageColorPackingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageColorPackingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageContext.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageContext.h deleted file mode 120000 index 40791f1b..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageContext.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/iOS/GPUImageContext.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageContrastFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageContrastFilter.h deleted file mode 120000 index 22057498..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageContrastFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageContrastFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCropFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCropFilter.h deleted file mode 120000 index d136ed77..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCropFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageCropFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCrosshairGenerator.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCrosshairGenerator.h deleted file mode 120000 index 2112ba21..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCrosshairGenerator.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageCrosshairGenerator.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCrosshatchFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCrosshatchFilter.h deleted file mode 120000 index 7706d91d..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageCrosshatchFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageCrosshatchFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDarkenBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDarkenBlendFilter.h deleted file mode 120000 index 8fdf8cd5..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDarkenBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDarkenBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDifferenceBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDifferenceBlendFilter.h deleted file mode 120000 index 6a41b879..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDifferenceBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDifferenceBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDilationFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDilationFilter.h deleted file mode 120000 index 1b82a7a7..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDilationFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDilationFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDirectionalNonMaximumSuppressionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDirectionalNonMaximumSuppressionFilter.h deleted file mode 120000 index c5820fac..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDirectionalNonMaximumSuppressionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDirectionalNonMaximumSuppressionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDirectionalSobelEdgeDetectionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDirectionalSobelEdgeDetectionFilter.h deleted file mode 120000 index ebc6b5b8..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDirectionalSobelEdgeDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDirectionalSobelEdgeDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDissolveBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDissolveBlendFilter.h deleted file mode 120000 index c40a8147..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDissolveBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDissolveBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDivideBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDivideBlendFilter.h deleted file mode 120000 index e21f3007..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageDivideBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageDivideBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageEmbossFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageEmbossFilter.h deleted file mode 120000 index 93a8ac2d..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageEmbossFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageEmbossFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageErosionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageErosionFilter.h deleted file mode 120000 index 66c4b920..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageErosionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageErosionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageExclusionBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageExclusionBlendFilter.h deleted file mode 120000 index ee6a437c..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageExclusionBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageExclusionBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageExposureFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageExposureFilter.h deleted file mode 120000 index cb3ec5ed..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageExposureFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageExposureFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFASTCornerDetectionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFASTCornerDetectionFilter.h deleted file mode 120000 index 6f73c3e1..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFASTCornerDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFASTCornerDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFalseColorFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFalseColorFilter.h deleted file mode 120000 index 161cc44b..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFalseColorFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFalseColorFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFilter.h deleted file mode 120000 index c7036945..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFilterGroup.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFilterGroup.h deleted file mode 120000 index c15625a3..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFilterGroup.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFilterGroup.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFilterPipeline.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFilterPipeline.h deleted file mode 120000 index e3d54cd2..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFilterPipeline.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFilterPipeline.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFramebuffer.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFramebuffer.h deleted file mode 120000 index 912489a3..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFramebuffer.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFramebuffer.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFramebufferCache.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFramebufferCache.h deleted file mode 120000 index 14e95530..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFramebufferCache.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageFramebufferCache.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFramework.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFramework.h deleted file mode 120000 index ade56d4a..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageFramework.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/iOS/Framework/GPUImageFramework.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGammaFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGammaFilter.h deleted file mode 120000 index 127ab2c7..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGammaFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageGammaFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGaussianBlurFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGaussianBlurFilter.h deleted file mode 120000 index 2a9ecae7..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGaussianBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageGaussianBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGaussianBlurPositionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGaussianBlurPositionFilter.h deleted file mode 120000 index 423c806f..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGaussianBlurPositionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageGaussianBlurPositionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGaussianSelectiveBlurFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGaussianSelectiveBlurFilter.h deleted file mode 120000 index 6d410149..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGaussianSelectiveBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageGaussianSelectiveBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGlassSphereFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGlassSphereFilter.h deleted file mode 120000 index e01a6f51..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGlassSphereFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageGlassSphereFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGrayscaleFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGrayscaleFilter.h deleted file mode 120000 index 8332833f..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageGrayscaleFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageGrayscaleFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHSBFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHSBFilter.h deleted file mode 120000 index df50e698..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHSBFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHSBFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHalftoneFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHalftoneFilter.h deleted file mode 120000 index f6151b4d..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHalftoneFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHalftoneFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHardLightBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHardLightBlendFilter.h deleted file mode 120000 index e857cd30..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHardLightBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHardLightBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHarrisCornerDetectionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHarrisCornerDetectionFilter.h deleted file mode 120000 index cf78593f..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHarrisCornerDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHarrisCornerDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHazeFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHazeFilter.h deleted file mode 120000 index 5b2806e7..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHazeFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHazeFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHighPassFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHighPassFilter.h deleted file mode 120000 index f5063f14..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHighPassFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHighPassFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHighlightShadowFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHighlightShadowFilter.h deleted file mode 120000 index 33329bd5..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHighlightShadowFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHighlightShadowFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHistogramEqualizationFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHistogramEqualizationFilter.h deleted file mode 120000 index 8a2721b7..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHistogramEqualizationFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHistogramEqualizationFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHistogramFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHistogramFilter.h deleted file mode 120000 index b2f97670..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHistogramFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHistogramFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHistogramGenerator.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHistogramGenerator.h deleted file mode 120000 index 03c93a15..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHistogramGenerator.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHistogramGenerator.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHoughTransformLineDetector.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHoughTransformLineDetector.h deleted file mode 120000 index 2d5da6af..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHoughTransformLineDetector.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHoughTransformLineDetector.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHueBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHueBlendFilter.h deleted file mode 120000 index 97d05aaf..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHueBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHueBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHueFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHueFilter.h deleted file mode 120000 index 62c976c1..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageHueFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageHueFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageJFAVoronoiFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageJFAVoronoiFilter.h deleted file mode 120000 index f02faeb4..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageJFAVoronoiFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageJFAVoronoiFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageKuwaharaFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageKuwaharaFilter.h deleted file mode 120000 index e64abda0..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageKuwaharaFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageKuwaharaFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageKuwaharaRadius3Filter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageKuwaharaRadius3Filter.h deleted file mode 120000 index 3e2aec8c..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageKuwaharaRadius3Filter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageKuwaharaRadius3Filter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLanczosResamplingFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLanczosResamplingFilter.h deleted file mode 120000 index b036cbba..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLanczosResamplingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLanczosResamplingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLaplacianFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLaplacianFilter.h deleted file mode 120000 index d663c479..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLaplacianFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLaplacianFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLevelsFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLevelsFilter.h deleted file mode 120000 index 2d92e6bc..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLevelsFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLevelsFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLightenBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLightenBlendFilter.h deleted file mode 120000 index 425d16c0..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLightenBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLightenBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLineGenerator.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLineGenerator.h deleted file mode 120000 index 5a999110..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLineGenerator.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLineGenerator.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLinearBurnBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLinearBurnBlendFilter.h deleted file mode 120000 index f471fdb9..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLinearBurnBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLinearBurnBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLocalBinaryPatternFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLocalBinaryPatternFilter.h deleted file mode 120000 index 93395da8..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLocalBinaryPatternFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLocalBinaryPatternFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLookupFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLookupFilter.h deleted file mode 120000 index 0ea51d79..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLookupFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLookupFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLowPassFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLowPassFilter.h deleted file mode 120000 index 59aca2a8..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLowPassFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLowPassFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLuminanceRangeFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLuminanceRangeFilter.h deleted file mode 120000 index 9855a2a7..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLuminanceRangeFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLuminanceRangeFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLuminanceThresholdFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLuminanceThresholdFilter.h deleted file mode 120000 index 0b1478af..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLuminanceThresholdFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLuminanceThresholdFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLuminosity.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLuminosity.h deleted file mode 120000 index c20086fa..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLuminosity.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLuminosity.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLuminosityBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLuminosityBlendFilter.h deleted file mode 120000 index 19ef8578..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageLuminosityBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageLuminosityBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMaskFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMaskFilter.h deleted file mode 120000 index 29e6989a..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMaskFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMaskFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMedianFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMedianFilter.h deleted file mode 120000 index 7e68c25d..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMedianFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMedianFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMissEtikateFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMissEtikateFilter.h deleted file mode 120000 index a0afc5ba..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMissEtikateFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMissEtikateFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMonochromeFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMonochromeFilter.h deleted file mode 120000 index 8c4201d7..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMonochromeFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMonochromeFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMosaicFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMosaicFilter.h deleted file mode 120000 index 8f8a3285..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMosaicFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMosaicFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMotionBlurFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMotionBlurFilter.h deleted file mode 120000 index f2e2b8e0..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMotionBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMotionBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMotionDetector.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMotionDetector.h deleted file mode 120000 index 8c5b0e10..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMotionDetector.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMotionDetector.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMovie.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMovie.h deleted file mode 120000 index 4d6e8798..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMovie.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMovie.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMovieComposition.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMovieComposition.h deleted file mode 120000 index 93598144..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMovieComposition.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMovieComposition.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMovieWriter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMovieWriter.h deleted file mode 120000 index 0981109d..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMovieWriter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/iOS/GPUImageMovieWriter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMultiplyBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMultiplyBlendFilter.h deleted file mode 120000 index 0b39ea10..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageMultiplyBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageMultiplyBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageNobleCornerDetectionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageNobleCornerDetectionFilter.h deleted file mode 120000 index e4ea4995..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageNobleCornerDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageNobleCornerDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageNonMaximumSuppressionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageNonMaximumSuppressionFilter.h deleted file mode 120000 index b5f7957a..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageNonMaximumSuppressionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageNonMaximumSuppressionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageNormalBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageNormalBlendFilter.h deleted file mode 120000 index 5d0b343b..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageNormalBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageNormalBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageOpacityFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageOpacityFilter.h deleted file mode 120000 index 1bcca485..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageOpacityFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageOpacityFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageOpeningFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageOpeningFilter.h deleted file mode 120000 index b68bb068..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageOpeningFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageOpeningFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageOutput.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageOutput.h deleted file mode 120000 index dcb6fab8..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageOutput.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageOutput.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageOverlayBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageOverlayBlendFilter.h deleted file mode 120000 index 34b88fbe..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageOverlayBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageOverlayBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageParallelCoordinateLineTransformFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageParallelCoordinateLineTransformFilter.h deleted file mode 120000 index 8f0d06f6..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageParallelCoordinateLineTransformFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageParallelCoordinateLineTransformFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePerlinNoiseFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePerlinNoiseFilter.h deleted file mode 120000 index 00c2bfe7..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePerlinNoiseFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePerlinNoiseFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePicture+TextureSubimage.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePicture+TextureSubimage.h deleted file mode 120000 index 97e13907..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePicture+TextureSubimage.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/iOS/GPUImagePicture+TextureSubimage.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePicture.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePicture.h deleted file mode 120000 index 9999ee88..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePicture.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/iOS/GPUImagePicture.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePinchDistortionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePinchDistortionFilter.h deleted file mode 120000 index 561065be..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePinchDistortionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePinchDistortionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePixellateFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePixellateFilter.h deleted file mode 120000 index 65d5092c..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePixellateFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePixellateFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePixellatePositionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePixellatePositionFilter.h deleted file mode 120000 index 06e3b7e2..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePixellatePositionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePixellatePositionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePoissonBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePoissonBlendFilter.h deleted file mode 120000 index c852272e..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePoissonBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePoissonBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePolarPixellateFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePolarPixellateFilter.h deleted file mode 120000 index 752176da..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePolarPixellateFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePolarPixellateFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePolkaDotFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePolkaDotFilter.h deleted file mode 120000 index dba6db1a..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePolkaDotFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePolkaDotFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePosterizeFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePosterizeFilter.h deleted file mode 120000 index 215ea1b0..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePosterizeFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePosterizeFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePrewittEdgeDetectionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePrewittEdgeDetectionFilter.h deleted file mode 120000 index c620cdef..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImagePrewittEdgeDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImagePrewittEdgeDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBClosingFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBClosingFilter.h deleted file mode 120000 index e958b6df..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBClosingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRGBClosingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBDilationFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBDilationFilter.h deleted file mode 120000 index 406dea33..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBDilationFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRGBDilationFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBErosionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBErosionFilter.h deleted file mode 120000 index b0bea951..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBErosionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRGBErosionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBFilter.h deleted file mode 120000 index 64f0f29e..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRGBFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBOpeningFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBOpeningFilter.h deleted file mode 120000 index b08322df..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRGBOpeningFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRGBOpeningFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRawDataInput.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRawDataInput.h deleted file mode 120000 index 3ac18170..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRawDataInput.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRawDataInput.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRawDataOutput.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRawDataOutput.h deleted file mode 120000 index a08dd75e..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageRawDataOutput.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageRawDataOutput.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSaturationBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSaturationBlendFilter.h deleted file mode 120000 index 128968a3..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSaturationBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSaturationBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSaturationFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSaturationFilter.h deleted file mode 120000 index 9b56c3c2..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSaturationFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSaturationFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageScreenBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageScreenBlendFilter.h deleted file mode 120000 index c09274d9..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageScreenBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageScreenBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSepiaFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSepiaFilter.h deleted file mode 120000 index 6af3120c..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSepiaFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSepiaFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSharpenFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSharpenFilter.h deleted file mode 120000 index a736679d..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSharpenFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSharpenFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageShiTomasiFeatureDetectionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageShiTomasiFeatureDetectionFilter.h deleted file mode 120000 index 6bfa8c58..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageShiTomasiFeatureDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageShiTomasiFeatureDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSingleComponentGaussianBlurFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSingleComponentGaussianBlurFilter.h deleted file mode 120000 index dd642505..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSingleComponentGaussianBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSingleComponentGaussianBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSketchFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSketchFilter.h deleted file mode 120000 index 9aafd154..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSketchFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSketchFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSmoothToonFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSmoothToonFilter.h deleted file mode 120000 index 8091466f..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSmoothToonFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSmoothToonFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSobelEdgeDetectionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSobelEdgeDetectionFilter.h deleted file mode 120000 index 019a83d0..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSobelEdgeDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSobelEdgeDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSoftEleganceFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSoftEleganceFilter.h deleted file mode 120000 index ae0fe89b..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSoftEleganceFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSoftEleganceFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSoftLightBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSoftLightBlendFilter.h deleted file mode 120000 index ec5c1881..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSoftLightBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSoftLightBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSolidColorGenerator.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSolidColorGenerator.h deleted file mode 120000 index 4eb09f85..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSolidColorGenerator.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSolidColorGenerator.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSourceOverBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSourceOverBlendFilter.h deleted file mode 120000 index 50dee17d..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSourceOverBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSourceOverBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSphereRefractionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSphereRefractionFilter.h deleted file mode 120000 index 9ebdd7cb..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSphereRefractionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSphereRefractionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageStillCamera.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageStillCamera.h deleted file mode 120000 index 52fd54f6..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageStillCamera.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageStillCamera.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageStretchDistortionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageStretchDistortionFilter.h deleted file mode 120000 index 261fca3d..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageStretchDistortionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageStretchDistortionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSubtractBlendFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSubtractBlendFilter.h deleted file mode 120000 index dfc7cb0a..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSubtractBlendFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSubtractBlendFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSwirlFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSwirlFilter.h deleted file mode 120000 index 84091382..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageSwirlFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageSwirlFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTextureInput.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTextureInput.h deleted file mode 120000 index da1350a4..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTextureInput.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTextureInput.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTextureOutput.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTextureOutput.h deleted file mode 120000 index da55e4dc..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTextureOutput.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTextureOutput.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageThreeInputFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageThreeInputFilter.h deleted file mode 120000 index c3a2659a..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageThreeInputFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageThreeInputFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageThresholdEdgeDetectionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageThresholdEdgeDetectionFilter.h deleted file mode 120000 index 69d9d2cd..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageThresholdEdgeDetectionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageThresholdEdgeDetectionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageThresholdSketchFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageThresholdSketchFilter.h deleted file mode 120000 index eb97d3b4..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageThresholdSketchFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageThresholdSketchFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageThresholdedNonMaximumSuppressionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageThresholdedNonMaximumSuppressionFilter.h deleted file mode 120000 index 7ccd2357..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageThresholdedNonMaximumSuppressionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageThresholdedNonMaximumSuppressionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTiltShiftFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTiltShiftFilter.h deleted file mode 120000 index 939825c6..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTiltShiftFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTiltShiftFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageToneCurveFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageToneCurveFilter.h deleted file mode 120000 index 74c0912c..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageToneCurveFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageToneCurveFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageToonFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageToonFilter.h deleted file mode 120000 index 19aca502..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageToonFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageToonFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTransformFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTransformFilter.h deleted file mode 120000 index 647b8d5c..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTransformFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTransformFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTwoInputCrossTextureSamplingFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTwoInputCrossTextureSamplingFilter.h deleted file mode 120000 index 37e25218..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTwoInputCrossTextureSamplingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTwoInputCrossTextureSamplingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTwoInputFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTwoInputFilter.h deleted file mode 120000 index c5d5ae16..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTwoInputFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTwoInputFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTwoPassFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTwoPassFilter.h deleted file mode 120000 index 9ee4bf0b..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTwoPassFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTwoPassFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTwoPassTextureSamplingFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTwoPassTextureSamplingFilter.h deleted file mode 120000 index 0bd37757..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageTwoPassTextureSamplingFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageTwoPassTextureSamplingFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageUIElement.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageUIElement.h deleted file mode 120000 index cccc6850..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageUIElement.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageUIElement.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageUnsharpMaskFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageUnsharpMaskFilter.h deleted file mode 120000 index 0d612ecd..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageUnsharpMaskFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageUnsharpMaskFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageVideoCamera.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageVideoCamera.h deleted file mode 120000 index e5a2daf8..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageVideoCamera.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageVideoCamera.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageView.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageView.h deleted file mode 120000 index 47efed92..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageView.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/iOS/GPUImageView.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageVignetteFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageVignetteFilter.h deleted file mode 120000 index 82aeec2b..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageVignetteFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageVignetteFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageVoronoiConsumerFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageVoronoiConsumerFilter.h deleted file mode 120000 index 31810f65..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageVoronoiConsumerFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageVoronoiConsumerFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageWeakPixelInclusionFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageWeakPixelInclusionFilter.h deleted file mode 120000 index 851aebf2..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageWeakPixelInclusionFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageWeakPixelInclusionFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageWhiteBalanceFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageWhiteBalanceFilter.h deleted file mode 120000 index d2318ca5..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageWhiteBalanceFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageWhiteBalanceFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageXYDerivativeFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageXYDerivativeFilter.h deleted file mode 120000 index d6024a32..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageXYDerivativeFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageXYDerivativeFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageZoomBlurFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageZoomBlurFilter.h deleted file mode 120000 index 67da1204..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageZoomBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageZoomBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageiOSBlurFilter.h b/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageiOSBlurFilter.h deleted file mode 120000 index 2bf9dc16..00000000 --- a/iOS_Tips/Pods/Headers/Public/GPUImage/GPUImageiOSBlurFilter.h +++ /dev/null @@ -1 +0,0 @@ -../../../GPUImage/framework/Source/GPUImageiOSBlurFilter.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/MBProgressHUD/MBProgressHUD.h b/iOS_Tips/Pods/Headers/Public/MBProgressHUD/MBProgressHUD.h deleted file mode 120000 index 19ed4db7..00000000 --- a/iOS_Tips/Pods/Headers/Public/MBProgressHUD/MBProgressHUD.h +++ /dev/null @@ -1 +0,0 @@ -../../../MBProgressHUD/MBProgressHUD.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/MLeaksFinder/MLeaksFinder.h b/iOS_Tips/Pods/Headers/Public/MLeaksFinder/MLeaksFinder.h deleted file mode 120000 index 0cf746ab..00000000 --- a/iOS_Tips/Pods/Headers/Public/MLeaksFinder/MLeaksFinder.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/MLeaksFinder.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/MLeaksFinder/NSObject+MemoryLeak.h b/iOS_Tips/Pods/Headers/Public/MLeaksFinder/NSObject+MemoryLeak.h deleted file mode 120000 index 7343f141..00000000 --- a/iOS_Tips/Pods/Headers/Public/MLeaksFinder/NSObject+MemoryLeak.h +++ /dev/null @@ -1 +0,0 @@ -../../../MLeaksFinder/MLeaksFinder/NSObject+MemoryLeak.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/MASCompositeConstraint.h b/iOS_Tips/Pods/Headers/Public/Masonry/MASCompositeConstraint.h deleted file mode 120000 index b1b34103..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/MASCompositeConstraint.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASCompositeConstraint.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/MASConstraint+Private.h b/iOS_Tips/Pods/Headers/Public/Masonry/MASConstraint+Private.h deleted file mode 120000 index ed9aa9f3..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/MASConstraint+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASConstraint+Private.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/MASConstraint.h b/iOS_Tips/Pods/Headers/Public/Masonry/MASConstraint.h deleted file mode 120000 index 76e9e73d..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/MASConstraint.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASConstraint.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/MASConstraintMaker.h b/iOS_Tips/Pods/Headers/Public/Masonry/MASConstraintMaker.h deleted file mode 120000 index b6d6027b..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/MASConstraintMaker.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASConstraintMaker.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/MASLayoutConstraint.h b/iOS_Tips/Pods/Headers/Public/Masonry/MASLayoutConstraint.h deleted file mode 120000 index 73e87968..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/MASLayoutConstraint.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASLayoutConstraint.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/MASUtilities.h b/iOS_Tips/Pods/Headers/Public/Masonry/MASUtilities.h deleted file mode 120000 index aae5e32b..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/MASUtilities.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASUtilities.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/MASViewAttribute.h b/iOS_Tips/Pods/Headers/Public/Masonry/MASViewAttribute.h deleted file mode 120000 index 5399f642..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/MASViewAttribute.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASViewAttribute.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/MASViewConstraint.h b/iOS_Tips/Pods/Headers/Public/Masonry/MASViewConstraint.h deleted file mode 120000 index 382c4194..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/MASViewConstraint.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/MASViewConstraint.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/Masonry.h b/iOS_Tips/Pods/Headers/Public/Masonry/Masonry.h deleted file mode 120000 index f5093032..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/Masonry.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/Masonry.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/NSArray+MASAdditions.h b/iOS_Tips/Pods/Headers/Public/Masonry/NSArray+MASAdditions.h deleted file mode 120000 index db1d0ea7..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/NSArray+MASAdditions.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/NSArray+MASAdditions.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h b/iOS_Tips/Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h deleted file mode 120000 index 2169edc5..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h b/iOS_Tips/Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h deleted file mode 120000 index 72f59430..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/View+MASAdditions.h b/iOS_Tips/Pods/Headers/Public/Masonry/View+MASAdditions.h deleted file mode 120000 index 9060451a..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/View+MASAdditions.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/View+MASAdditions.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h b/iOS_Tips/Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h deleted file mode 120000 index 91ef93fa..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/View+MASShorthandAdditions.h \ No newline at end of file diff --git a/iOS_Tips/Pods/Headers/Public/Masonry/ViewController+MASAdditions.h b/iOS_Tips/Pods/Headers/Public/Masonry/ViewController+MASAdditions.h deleted file mode 120000 index 12320e3f..00000000 --- a/iOS_Tips/Pods/Headers/Public/Masonry/ViewController+MASAdditions.h +++ /dev/null @@ -1 +0,0 @@ -../../../Masonry/Masonry/ViewController+MASAdditions.h \ No newline at end of file diff --git a/iOS_Tips/Pods/MBProgressHUD/LICENSE b/iOS_Tips/Pods/MBProgressHUD/LICENSE deleted file mode 100644 index 1c0d59bb..00000000 --- a/iOS_Tips/Pods/MBProgressHUD/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright © 2009-2016 Matej Bukovinski - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/iOS_Tips/Pods/MBProgressHUD/MBProgressHUD.h b/iOS_Tips/Pods/MBProgressHUD/MBProgressHUD.h deleted file mode 100644 index a7b54ee9..00000000 --- a/iOS_Tips/Pods/MBProgressHUD/MBProgressHUD.h +++ /dev/null @@ -1,443 +0,0 @@ -// -// MBProgressHUD.h -// Version 1.1.0 -// Created by Matej Bukovinski on 2.4.09. -// - -// This code is distributed under the terms and conditions of the MIT license. - -// Copyright © 2009-2016 Matej Bukovinski -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import -#import - -@class MBBackgroundView; -@protocol MBProgressHUDDelegate; - - -extern CGFloat const MBProgressMaxOffset; - -typedef NS_ENUM(NSInteger, MBProgressHUDMode) { - /// UIActivityIndicatorView. - MBProgressHUDModeIndeterminate, - /// A round, pie-chart like, progress view. - MBProgressHUDModeDeterminate, - /// Horizontal progress bar. - MBProgressHUDModeDeterminateHorizontalBar, - /// Ring-shaped progress view. - MBProgressHUDModeAnnularDeterminate, - /// Shows a custom view. - MBProgressHUDModeCustomView, - /// Shows only labels. - MBProgressHUDModeText -}; - -typedef NS_ENUM(NSInteger, MBProgressHUDAnimation) { - /// Opacity animation - MBProgressHUDAnimationFade, - /// Opacity + scale animation (zoom in when appearing zoom out when disappearing) - MBProgressHUDAnimationZoom, - /// Opacity + scale animation (zoom out style) - MBProgressHUDAnimationZoomOut, - /// Opacity + scale animation (zoom in style) - MBProgressHUDAnimationZoomIn -}; - -typedef NS_ENUM(NSInteger, MBProgressHUDBackgroundStyle) { - /// Solid color background - MBProgressHUDBackgroundStyleSolidColor, - /// UIVisualEffectView or UIToolbar.layer background view - MBProgressHUDBackgroundStyleBlur -}; - -typedef void (^MBProgressHUDCompletionBlock)(void); - - -NS_ASSUME_NONNULL_BEGIN - - -/** - * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. - * - * This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class. - * The MBProgressHUD window spans over the entire space given to it by the initWithFrame: constructor and catches all - * user input on this region, thereby preventing the user operations on components below the view. - * - * @note To still allow touches to pass through the HUD, you can set hud.userInteractionEnabled = NO. - * @attention MBProgressHUD is a UI class and should therefore only be accessed on the main thread. - */ -@interface MBProgressHUD : UIView - -/** - * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. - * - * @note This method sets removeFromSuperViewOnHide. The HUD will automatically be removed from the view hierarchy when hidden. - * - * @param view The view that the HUD will be added to - * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use - * animations while appearing. - * @return A reference to the created HUD. - * - * @see hideHUDForView:animated: - * @see animationType - */ -+ (instancetype)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; - -/// @name Showing and hiding - -/** - * Finds the top-most HUD subview that hasn't finished and hides it. The counterpart to this method is showHUDAddedTo:animated:. - * - * @note This method sets removeFromSuperViewOnHide. The HUD will automatically be removed from the view hierarchy when hidden. - * - * @param view The view that is going to be searched for a HUD subview. - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @return YES if a HUD was found and removed, NO otherwise. - * - * @see showHUDAddedTo:animated: - * @see animationType - */ -+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated; - -/** - * Finds the top-most HUD subview that hasn't finished and returns it. - * - * @param view The view that is going to be searched. - * @return A reference to the last HUD subview discovered. - */ -+ (nullable MBProgressHUD *)HUDForView:(UIView *)view; - -/** - * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with - * view.bounds as the parameter. - * - * @param view The view instance that will provide the bounds for the HUD. Should be the same instance as - * the HUD's superview (i.e., the view that the HUD will be added to). - */ -- (instancetype)initWithView:(UIView *)view; - -/** - * Displays the HUD. - * - * @note You need to make sure that the main thread completes its run loop soon after this method call so that - * the user interface can be updated. Call this method when your task is already set up to be executed in a new thread - * (e.g., when using something like NSOperation or making an asynchronous call like NSURLRequest). - * - * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use - * animations while appearing. - * - * @see animationType - */ -- (void)showAnimated:(BOOL)animated; - -/** - * Hides the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * - * @see animationType - */ -- (void)hideAnimated:(BOOL)animated; - -/** - * Hides the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to - * hide the HUD when your task completes. - * - * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use - * animations while disappearing. - * @param delay Delay in seconds until the HUD is hidden. - * - * @see animationType - */ -- (void)hideAnimated:(BOOL)animated afterDelay:(NSTimeInterval)delay; - -/** - * The HUD delegate object. Receives HUD state notifications. - */ -@property (weak, nonatomic) id delegate; - -/** - * Called after the HUD is hiden. - */ -@property (copy, nullable) MBProgressHUDCompletionBlock completionBlock; - -/* - * Grace period is the time (in seconds) that the invoked method may be run without - * showing the HUD. If the task finishes before the grace time runs out, the HUD will - * not be shown at all. - * This may be used to prevent HUD display for very short tasks. - * Defaults to 0 (no grace time). - */ -@property (assign, nonatomic) NSTimeInterval graceTime; - -/** - * The minimum time (in seconds) that the HUD is shown. - * This avoids the problem of the HUD being shown and than instantly hidden. - * Defaults to 0 (no minimum show time). - */ -@property (assign, nonatomic) NSTimeInterval minShowTime; - -/** - * Removes the HUD from its parent view when hidden. - * Defaults to NO. - */ -@property (assign, nonatomic) BOOL removeFromSuperViewOnHide; - -/// @name Appearance - -/** - * MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate. - */ -@property (assign, nonatomic) MBProgressHUDMode mode; - -/** - * A color that gets forwarded to all labels and supported indicators. Also sets the tintColor - * for custom views on iOS 7+. Set to nil to manage color individually. - * Defaults to semi-translucent black on iOS 7 and later and white on earlier iOS versions. - */ -@property (strong, nonatomic, nullable) UIColor *contentColor UI_APPEARANCE_SELECTOR; - -/** - * The animation type that should be used when the HUD is shown and hidden. - */ -@property (assign, nonatomic) MBProgressHUDAnimation animationType UI_APPEARANCE_SELECTOR; - -/** - * The bezel offset relative to the center of the view. You can use MBProgressMaxOffset - * and -MBProgressMaxOffset to move the HUD all the way to the screen edge in each direction. - * E.g., CGPointMake(0.f, MBProgressMaxOffset) would position the HUD centered on the bottom edge. - */ -@property (assign, nonatomic) CGPoint offset UI_APPEARANCE_SELECTOR; - -/** - * The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views). - * This also represents the minimum bezel distance to the edge of the HUD view. - * Defaults to 20.f - */ -@property (assign, nonatomic) CGFloat margin UI_APPEARANCE_SELECTOR; - -/** - * The minimum size of the HUD bezel. Defaults to CGSizeZero (no minimum size). - */ -@property (assign, nonatomic) CGSize minSize UI_APPEARANCE_SELECTOR; - -/** - * Force the HUD dimensions to be equal if possible. - */ -@property (assign, nonatomic, getter = isSquare) BOOL square UI_APPEARANCE_SELECTOR; - -/** - * When enabled, the bezel center gets slightly affected by the device accelerometer data. - * Has no effect on iOS < 7.0. Defaults to YES. - */ -@property (assign, nonatomic, getter=areDefaultMotionEffectsEnabled) BOOL defaultMotionEffectsEnabled UI_APPEARANCE_SELECTOR; - -/// @name Progress - -/** - * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. - */ -@property (assign, nonatomic) float progress; - -/// @name ProgressObject - -/** - * The NSProgress object feeding the progress information to the progress indicator. - */ -@property (strong, nonatomic, nullable) NSProgress *progressObject; - -/// @name Views - -/** - * The view containing the labels and indicator (or customView). - */ -@property (strong, nonatomic, readonly) MBBackgroundView *bezelView; - -/** - * View covering the entire HUD area, placed behind bezelView. - */ -@property (strong, nonatomic, readonly) MBBackgroundView *backgroundView; - -/** - * The UIView (e.g., a UIImageView) to be shown when the HUD is in MBProgressHUDModeCustomView. - * The view should implement intrinsicContentSize for proper sizing. For best results use approximately 37 by 37 pixels. - */ -@property (strong, nonatomic, nullable) UIView *customView; - -/** - * A label that holds an optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit - * the entire text. - */ -@property (strong, nonatomic, readonly) UILabel *label; - -/** - * A label that holds an optional details message displayed below the labelText message. The details text can span multiple lines. - */ -@property (strong, nonatomic, readonly) UILabel *detailsLabel; - -/** - * A button that is placed below the labels. Visible only if a target / action is added. - */ -@property (strong, nonatomic, readonly) UIButton *button; - -@end - - -@protocol MBProgressHUDDelegate - -@optional - -/** - * Called after the HUD was fully hidden from the screen. - */ -- (void)hudWasHidden:(MBProgressHUD *)hud; - -@end - - -/** - * A progress view for showing definite progress by filling up a circle (pie chart). - */ -@interface MBRoundProgressView : UIView - -/** - * Progress (0.0 to 1.0) - */ -@property (nonatomic, assign) float progress; - -/** - * Indicator progress color. - * Defaults to white [UIColor whiteColor]. - */ -@property (nonatomic, strong) UIColor *progressTintColor; - -/** - * Indicator background (non-progress) color. - * Only applicable on iOS versions older than iOS 7. - * Defaults to translucent white (alpha 0.1). - */ -@property (nonatomic, strong) UIColor *backgroundTintColor; - -/* - * Display mode - NO = round or YES = annular. Defaults to round. - */ -@property (nonatomic, assign, getter = isAnnular) BOOL annular; - -@end - - -/** - * A flat bar progress view. - */ -@interface MBBarProgressView : UIView - -/** - * Progress (0.0 to 1.0) - */ -@property (nonatomic, assign) float progress; - -/** - * Bar border line color. - * Defaults to white [UIColor whiteColor]. - */ -@property (nonatomic, strong) UIColor *lineColor; - -/** - * Bar background color. - * Defaults to clear [UIColor clearColor]; - */ -@property (nonatomic, strong) UIColor *progressRemainingColor; - -/** - * Bar progress color. - * Defaults to white [UIColor whiteColor]. - */ -@property (nonatomic, strong) UIColor *progressColor; - -@end - - -@interface MBBackgroundView : UIView - -/** - * The background style. - * Defaults to MBProgressHUDBackgroundStyleBlur on iOS 7 or later and MBProgressHUDBackgroundStyleSolidColor otherwise. - * @note Due to iOS 7 not supporting UIVisualEffectView, the blur effect differs slightly between iOS 7 and later versions. - */ -@property (nonatomic) MBProgressHUDBackgroundStyle style; - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV -/** - * The blur effect style, when using MBProgressHUDBackgroundStyleBlur. - * Defaults to UIBlurEffectStyleLight. - */ -@property (nonatomic) UIBlurEffectStyle blurEffectStyle; -#endif - -/** - * The background color or the blur tint color. - * @note Due to iOS 7 not supporting UIVisualEffectView, the blur effect differs slightly between iOS 7 and later versions. - */ -@property (nonatomic, strong) UIColor *color; - -@end - -@interface MBProgressHUD (Deprecated) - -+ (NSArray *)allHUDsForView:(UIView *)view __attribute__((deprecated("Store references when using more than one HUD per view."))); -+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated __attribute__((deprecated("Store references when using more than one HUD per view."))); - -- (id)initWithWindow:(UIWindow *)window __attribute__((deprecated("Use initWithView: instead."))); - -- (void)show:(BOOL)animated __attribute__((deprecated("Use showAnimated: instead."))); -- (void)hide:(BOOL)animated __attribute__((deprecated("Use hideAnimated: instead."))); -- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay __attribute__((deprecated("Use hideAnimated:afterDelay: instead."))); - -- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated __attribute__((deprecated("Use GCD directly."))); -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block __attribute__((deprecated("Use GCD directly."))); -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(nullable MBProgressHUDCompletionBlock)completion __attribute__((deprecated("Use GCD directly."))); -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue __attribute__((deprecated("Use GCD directly."))); -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue - completionBlock:(nullable MBProgressHUDCompletionBlock)completion __attribute__((deprecated("Use GCD directly."))); -@property (assign) BOOL taskInProgress __attribute__((deprecated("No longer needed."))); - -@property (nonatomic, copy) NSString *labelText __attribute__((deprecated("Use label.text instead."))); -@property (nonatomic, strong) UIFont *labelFont __attribute__((deprecated("Use label.font instead."))); -@property (nonatomic, strong) UIColor *labelColor __attribute__((deprecated("Use label.textColor instead."))); -@property (nonatomic, copy) NSString *detailsLabelText __attribute__((deprecated("Use detailsLabel.text instead."))); -@property (nonatomic, strong) UIFont *detailsLabelFont __attribute__((deprecated("Use detailsLabel.font instead."))); -@property (nonatomic, strong) UIColor *detailsLabelColor __attribute__((deprecated("Use detailsLabel.textColor instead."))); -@property (assign, nonatomic) CGFloat opacity __attribute__((deprecated("Customize bezelView properties instead."))); -@property (strong, nonatomic) UIColor *color __attribute__((deprecated("Customize the bezelView color instead."))); -@property (assign, nonatomic) CGFloat xOffset __attribute__((deprecated("Set offset.x instead."))); -@property (assign, nonatomic) CGFloat yOffset __attribute__((deprecated("Set offset.y instead."))); -@property (assign, nonatomic) CGFloat cornerRadius __attribute__((deprecated("Set bezelView.layer.cornerRadius instead."))); -@property (assign, nonatomic) BOOL dimBackground __attribute__((deprecated("Customize HUD background properties instead."))); -@property (strong, nonatomic) UIColor *activityIndicatorColor __attribute__((deprecated("Use UIAppearance to customize UIActivityIndicatorView. E.g.: [UIActivityIndicatorView appearanceWhenContainedIn:[MBProgressHUD class], nil].color = [UIColor redColor];"))); -@property (atomic, assign, readonly) CGSize size __attribute__((deprecated("Get the bezelView.frame.size instead."))); - -@end - -NS_ASSUME_NONNULL_END diff --git a/iOS_Tips/Pods/MBProgressHUD/MBProgressHUD.m b/iOS_Tips/Pods/MBProgressHUD/MBProgressHUD.m deleted file mode 100644 index 1bcf9e99..00000000 --- a/iOS_Tips/Pods/MBProgressHUD/MBProgressHUD.m +++ /dev/null @@ -1,1495 +0,0 @@ -// -// MBProgressHUD.m -// Version 1.1.0 -// Created by Matej Bukovinski on 2.4.09. -// - -#import "MBProgressHUD.h" -#import - - -#ifndef kCFCoreFoundationVersionNumber_iOS_7_0 - #define kCFCoreFoundationVersionNumber_iOS_7_0 847.20 -#endif - -#ifndef kCFCoreFoundationVersionNumber_iOS_8_0 - #define kCFCoreFoundationVersionNumber_iOS_8_0 1129.15 -#endif - -#define MBMainThreadAssert() NSAssert([NSThread isMainThread], @"MBProgressHUD needs to be accessed on the main thread."); - -CGFloat const MBProgressMaxOffset = 1000000.f; - -static const CGFloat MBDefaultPadding = 4.f; -static const CGFloat MBDefaultLabelFontSize = 16.f; -static const CGFloat MBDefaultDetailsLabelFontSize = 12.f; - - -@interface MBProgressHUD () { - // Deprecated - UIColor *_activityIndicatorColor; - CGFloat _opacity; -} - -@property (nonatomic, assign) BOOL useAnimation; -@property (nonatomic, assign, getter=hasFinished) BOOL finished; -@property (nonatomic, strong) UIView *indicator; -@property (nonatomic, strong) NSDate *showStarted; -@property (nonatomic, strong) NSArray *paddingConstraints; -@property (nonatomic, strong) NSArray *bezelConstraints; -@property (nonatomic, strong) UIView *topSpacer; -@property (nonatomic, strong) UIView *bottomSpacer; -@property (nonatomic, weak) NSTimer *graceTimer; -@property (nonatomic, weak) NSTimer *minShowTimer; -@property (nonatomic, weak) NSTimer *hideDelayTimer; -@property (nonatomic, weak) CADisplayLink *progressObjectDisplayLink; - -// Deprecated -@property (assign) BOOL taskInProgress; - -@end - - -@interface MBProgressHUDRoundedButton : UIButton -@end - - -@implementation MBProgressHUD - -#pragma mark - Class methods - -+ (instancetype)showHUDAddedTo:(UIView *)view animated:(BOOL)animated { - MBProgressHUD *hud = [[self alloc] initWithView:view]; - hud.removeFromSuperViewOnHide = YES; - [view addSubview:hud]; - [hud showAnimated:animated]; - return hud; -} - -+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated { - MBProgressHUD *hud = [self HUDForView:view]; - if (hud != nil) { - hud.removeFromSuperViewOnHide = YES; - [hud hideAnimated:animated]; - return YES; - } - return NO; -} - -+ (MBProgressHUD *)HUDForView:(UIView *)view { - NSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator]; - for (UIView *subview in subviewsEnum) { - if ([subview isKindOfClass:self]) { - MBProgressHUD *hud = (MBProgressHUD *)subview; - if (hud.hasFinished == NO) { - return hud; - } - } - } - return nil; -} - -#pragma mark - Lifecycle - -- (void)commonInit { - // Set default values for properties - _animationType = MBProgressHUDAnimationFade; - _mode = MBProgressHUDModeIndeterminate; - _margin = 20.0f; - _opacity = 1.f; - _defaultMotionEffectsEnabled = YES; - - // Default color, depending on the current iOS version - BOOL isLegacy = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0; - _contentColor = isLegacy ? [UIColor whiteColor] : [UIColor colorWithWhite:0.f alpha:0.7f]; - // Transparent background - self.opaque = NO; - self.backgroundColor = [UIColor clearColor]; - // Make it invisible for now - self.alpha = 0.0f; - self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - self.layer.allowsGroupOpacity = NO; - - [self setupViews]; - [self updateIndicators]; - [self registerForNotifications]; -} - -- (instancetype)initWithFrame:(CGRect)frame { - if ((self = [super initWithFrame:frame])) { - [self commonInit]; - } - return self; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - if ((self = [super initWithCoder:aDecoder])) { - [self commonInit]; - } - return self; -} - -- (id)initWithView:(UIView *)view { - NSAssert(view, @"View must not be nil."); - return [self initWithFrame:view.bounds]; -} - -- (void)dealloc { - [self unregisterFromNotifications]; -} - -#pragma mark - Show & hide - -- (void)showAnimated:(BOOL)animated { - MBMainThreadAssert(); - [self.minShowTimer invalidate]; - self.useAnimation = animated; - self.finished = NO; - // If the grace time is set, postpone the HUD display - if (self.graceTime > 0.0) { - NSTimer *timer = [NSTimer timerWithTimeInterval:self.graceTime target:self selector:@selector(handleGraceTimer:) userInfo:nil repeats:NO]; - [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; - self.graceTimer = timer; - } - // ... otherwise show the HUD immediately - else { - [self showUsingAnimation:self.useAnimation]; - } -} - -- (void)hideAnimated:(BOOL)animated { - MBMainThreadAssert(); - [self.graceTimer invalidate]; - self.useAnimation = animated; - self.finished = YES; - // If the minShow time is set, calculate how long the HUD was shown, - // and postpone the hiding operation if necessary - if (self.minShowTime > 0.0 && self.showStarted) { - NSTimeInterval interv = [[NSDate date] timeIntervalSinceDate:self.showStarted]; - if (interv < self.minShowTime) { - NSTimer *timer = [NSTimer timerWithTimeInterval:(self.minShowTime - interv) target:self selector:@selector(handleMinShowTimer:) userInfo:nil repeats:NO]; - [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; - self.minShowTimer = timer; - return; - } - } - // ... otherwise hide the HUD immediately - [self hideUsingAnimation:self.useAnimation]; -} - -- (void)hideAnimated:(BOOL)animated afterDelay:(NSTimeInterval)delay { - // Cancel any scheduled hideDelayed: calls - [self.hideDelayTimer invalidate]; - - NSTimer *timer = [NSTimer timerWithTimeInterval:delay target:self selector:@selector(handleHideTimer:) userInfo:@(animated) repeats:NO]; - [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; - self.hideDelayTimer = timer; -} - -#pragma mark - Timer callbacks - -- (void)handleGraceTimer:(NSTimer *)theTimer { - // Show the HUD only if the task is still running - if (!self.hasFinished) { - [self showUsingAnimation:self.useAnimation]; - } -} - -- (void)handleMinShowTimer:(NSTimer *)theTimer { - [self hideUsingAnimation:self.useAnimation]; -} - -- (void)handleHideTimer:(NSTimer *)timer { - [self hideAnimated:[timer.userInfo boolValue]]; -} - -#pragma mark - View Hierrarchy - -- (void)didMoveToSuperview { - [self updateForCurrentOrientationAnimated:NO]; -} - -#pragma mark - Internal show & hide operations - -- (void)showUsingAnimation:(BOOL)animated { - // Cancel any previous animations - [self.bezelView.layer removeAllAnimations]; - [self.backgroundView.layer removeAllAnimations]; - - // Cancel any scheduled hideDelayed: calls - [self.hideDelayTimer invalidate]; - - self.showStarted = [NSDate date]; - self.alpha = 1.f; - - // Needed in case we hide and re-show with the same NSProgress object attached. - [self setNSProgressDisplayLinkEnabled:YES]; - - if (animated) { - [self animateIn:YES withType:self.animationType completion:NULL]; - } else { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - self.bezelView.alpha = self.opacity; -#pragma clang diagnostic pop - self.backgroundView.alpha = 1.f; - } -} - -- (void)hideUsingAnimation:(BOOL)animated { - if (animated && self.showStarted) { - self.showStarted = nil; - [self animateIn:NO withType:self.animationType completion:^(BOOL finished) { - [self done]; - }]; - } else { - self.showStarted = nil; - self.bezelView.alpha = 0.f; - self.backgroundView.alpha = 1.f; - [self done]; - } -} - -- (void)animateIn:(BOOL)animatingIn withType:(MBProgressHUDAnimation)type completion:(void(^)(BOOL finished))completion { - // Automatically determine the correct zoom animation type - if (type == MBProgressHUDAnimationZoom) { - type = animatingIn ? MBProgressHUDAnimationZoomIn : MBProgressHUDAnimationZoomOut; - } - - CGAffineTransform small = CGAffineTransformMakeScale(0.5f, 0.5f); - CGAffineTransform large = CGAffineTransformMakeScale(1.5f, 1.5f); - - // Set starting state - UIView *bezelView = self.bezelView; - if (animatingIn && bezelView.alpha == 0.f && type == MBProgressHUDAnimationZoomIn) { - bezelView.transform = small; - } else if (animatingIn && bezelView.alpha == 0.f && type == MBProgressHUDAnimationZoomOut) { - bezelView.transform = large; - } - - // Perform animations - dispatch_block_t animations = ^{ - if (animatingIn) { - bezelView.transform = CGAffineTransformIdentity; - } else if (!animatingIn && type == MBProgressHUDAnimationZoomIn) { - bezelView.transform = large; - } else if (!animatingIn && type == MBProgressHUDAnimationZoomOut) { - bezelView.transform = small; - } -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - bezelView.alpha = animatingIn ? self.opacity : 0.f; -#pragma clang diagnostic pop - self.backgroundView.alpha = animatingIn ? 1.f : 0.f; - }; - - // Spring animations are nicer, but only available on iOS 7+ -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 || TARGET_OS_TV - if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) { - [UIView animateWithDuration:0.3 delay:0. usingSpringWithDamping:1.f initialSpringVelocity:0.f options:UIViewAnimationOptionBeginFromCurrentState animations:animations completion:completion]; - return; - } -#endif - [UIView animateWithDuration:0.3 delay:0. options:UIViewAnimationOptionBeginFromCurrentState animations:animations completion:completion]; -} - -- (void)done { - // Cancel any scheduled hideDelayed: calls - [self.hideDelayTimer invalidate]; - [self setNSProgressDisplayLinkEnabled:NO]; - - if (self.hasFinished) { - self.alpha = 0.0f; - if (self.removeFromSuperViewOnHide) { - [self removeFromSuperview]; - } - } - MBProgressHUDCompletionBlock completionBlock = self.completionBlock; - if (completionBlock) { - completionBlock(); - } - id delegate = self.delegate; - if ([delegate respondsToSelector:@selector(hudWasHidden:)]) { - [delegate performSelector:@selector(hudWasHidden:) withObject:self]; - } -} - -#pragma mark - UI - -- (void)setupViews { - UIColor *defaultColor = self.contentColor; - - MBBackgroundView *backgroundView = [[MBBackgroundView alloc] initWithFrame:self.bounds]; - backgroundView.style = MBProgressHUDBackgroundStyleSolidColor; - backgroundView.backgroundColor = [UIColor clearColor]; - backgroundView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - backgroundView.alpha = 0.f; - [self addSubview:backgroundView]; - _backgroundView = backgroundView; - - MBBackgroundView *bezelView = [MBBackgroundView new]; - bezelView.translatesAutoresizingMaskIntoConstraints = NO; - bezelView.layer.cornerRadius = 5.f; - bezelView.alpha = 0.f; - [self addSubview:bezelView]; - _bezelView = bezelView; - [self updateBezelMotionEffects]; - - UILabel *label = [UILabel new]; - label.adjustsFontSizeToFitWidth = NO; - label.textAlignment = NSTextAlignmentCenter; - label.textColor = defaultColor; - label.font = [UIFont boldSystemFontOfSize:MBDefaultLabelFontSize]; - label.opaque = NO; - label.backgroundColor = [UIColor clearColor]; - _label = label; - - UILabel *detailsLabel = [UILabel new]; - detailsLabel.adjustsFontSizeToFitWidth = NO; - detailsLabel.textAlignment = NSTextAlignmentCenter; - detailsLabel.textColor = defaultColor; - detailsLabel.numberOfLines = 0; - detailsLabel.font = [UIFont boldSystemFontOfSize:MBDefaultDetailsLabelFontSize]; - detailsLabel.opaque = NO; - detailsLabel.backgroundColor = [UIColor clearColor]; - _detailsLabel = detailsLabel; - - UIButton *button = [MBProgressHUDRoundedButton buttonWithType:UIButtonTypeCustom]; - button.titleLabel.textAlignment = NSTextAlignmentCenter; - button.titleLabel.font = [UIFont boldSystemFontOfSize:MBDefaultDetailsLabelFontSize]; - [button setTitleColor:defaultColor forState:UIControlStateNormal]; - _button = button; - - for (UIView *view in @[label, detailsLabel, button]) { - view.translatesAutoresizingMaskIntoConstraints = NO; - [view setContentCompressionResistancePriority:998.f forAxis:UILayoutConstraintAxisHorizontal]; - [view setContentCompressionResistancePriority:998.f forAxis:UILayoutConstraintAxisVertical]; - [bezelView addSubview:view]; - } - - UIView *topSpacer = [UIView new]; - topSpacer.translatesAutoresizingMaskIntoConstraints = NO; - topSpacer.hidden = YES; - [bezelView addSubview:topSpacer]; - _topSpacer = topSpacer; - - UIView *bottomSpacer = [UIView new]; - bottomSpacer.translatesAutoresizingMaskIntoConstraints = NO; - bottomSpacer.hidden = YES; - [bezelView addSubview:bottomSpacer]; - _bottomSpacer = bottomSpacer; -} - -- (void)updateIndicators { - UIView *indicator = self.indicator; - BOOL isActivityIndicator = [indicator isKindOfClass:[UIActivityIndicatorView class]]; - BOOL isRoundIndicator = [indicator isKindOfClass:[MBRoundProgressView class]]; - - MBProgressHUDMode mode = self.mode; - if (mode == MBProgressHUDModeIndeterminate) { - if (!isActivityIndicator) { - // Update to indeterminate indicator - [indicator removeFromSuperview]; - indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; - [(UIActivityIndicatorView *)indicator startAnimating]; - [self.bezelView addSubview:indicator]; - } - } - else if (mode == MBProgressHUDModeDeterminateHorizontalBar) { - // Update to bar determinate indicator - [indicator removeFromSuperview]; - indicator = [[MBBarProgressView alloc] init]; - [self.bezelView addSubview:indicator]; - } - else if (mode == MBProgressHUDModeDeterminate || mode == MBProgressHUDModeAnnularDeterminate) { - if (!isRoundIndicator) { - // Update to determinante indicator - [indicator removeFromSuperview]; - indicator = [[MBRoundProgressView alloc] init]; - [self.bezelView addSubview:indicator]; - } - if (mode == MBProgressHUDModeAnnularDeterminate) { - [(MBRoundProgressView *)indicator setAnnular:YES]; - } - } - else if (mode == MBProgressHUDModeCustomView && self.customView != indicator) { - // Update custom view indicator - [indicator removeFromSuperview]; - indicator = self.customView; - [self.bezelView addSubview:indicator]; - } - else if (mode == MBProgressHUDModeText) { - [indicator removeFromSuperview]; - indicator = nil; - } - indicator.translatesAutoresizingMaskIntoConstraints = NO; - self.indicator = indicator; - - if ([indicator respondsToSelector:@selector(setProgress:)]) { - [(id)indicator setValue:@(self.progress) forKey:@"progress"]; - } - - [indicator setContentCompressionResistancePriority:998.f forAxis:UILayoutConstraintAxisHorizontal]; - [indicator setContentCompressionResistancePriority:998.f forAxis:UILayoutConstraintAxisVertical]; - - [self updateViewsForColor:self.contentColor]; - [self setNeedsUpdateConstraints]; -} - -- (void)updateViewsForColor:(UIColor *)color { - if (!color) return; - - self.label.textColor = color; - self.detailsLabel.textColor = color; - [self.button setTitleColor:color forState:UIControlStateNormal]; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - if (self.activityIndicatorColor) { - color = self.activityIndicatorColor; - } -#pragma clang diagnostic pop - - // UIAppearance settings are prioritized. If they are preset the set color is ignored. - - UIView *indicator = self.indicator; - if ([indicator isKindOfClass:[UIActivityIndicatorView class]]) { - UIActivityIndicatorView *appearance = nil; -#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000 - appearance = [UIActivityIndicatorView appearanceWhenContainedIn:[MBProgressHUD class], nil]; -#else - // For iOS 9+ - appearance = [UIActivityIndicatorView appearanceWhenContainedInInstancesOfClasses:@[[MBProgressHUD class]]]; -#endif - - if (appearance.color == nil) { - ((UIActivityIndicatorView *)indicator).color = color; - } - } else if ([indicator isKindOfClass:[MBRoundProgressView class]]) { - MBRoundProgressView *appearance = nil; -#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000 - appearance = [MBRoundProgressView appearanceWhenContainedIn:[MBProgressHUD class], nil]; -#else - appearance = [MBRoundProgressView appearanceWhenContainedInInstancesOfClasses:@[[MBProgressHUD class]]]; -#endif - if (appearance.progressTintColor == nil) { - ((MBRoundProgressView *)indicator).progressTintColor = color; - } - if (appearance.backgroundTintColor == nil) { - ((MBRoundProgressView *)indicator).backgroundTintColor = [color colorWithAlphaComponent:0.1]; - } - } else if ([indicator isKindOfClass:[MBBarProgressView class]]) { - MBBarProgressView *appearance = nil; -#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000 - appearance = [MBBarProgressView appearanceWhenContainedIn:[MBProgressHUD class], nil]; -#else - appearance = [MBBarProgressView appearanceWhenContainedInInstancesOfClasses:@[[MBProgressHUD class]]]; -#endif - if (appearance.progressColor == nil) { - ((MBBarProgressView *)indicator).progressColor = color; - } - if (appearance.lineColor == nil) { - ((MBBarProgressView *)indicator).lineColor = color; - } - } else { -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 || TARGET_OS_TV - if ([indicator respondsToSelector:@selector(setTintColor:)]) { - [indicator setTintColor:color]; - } -#endif - } -} - -- (void)updateBezelMotionEffects { -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 || TARGET_OS_TV - MBBackgroundView *bezelView = self.bezelView; - if (![bezelView respondsToSelector:@selector(addMotionEffect:)]) return; - - if (self.defaultMotionEffectsEnabled) { - CGFloat effectOffset = 10.f; - UIInterpolatingMotionEffect *effectX = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis]; - effectX.maximumRelativeValue = @(effectOffset); - effectX.minimumRelativeValue = @(-effectOffset); - - UIInterpolatingMotionEffect *effectY = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.y" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis]; - effectY.maximumRelativeValue = @(effectOffset); - effectY.minimumRelativeValue = @(-effectOffset); - - UIMotionEffectGroup *group = [[UIMotionEffectGroup alloc] init]; - group.motionEffects = @[effectX, effectY]; - - [bezelView addMotionEffect:group]; - } else { - NSArray *effects = [bezelView motionEffects]; - for (UIMotionEffect *effect in effects) { - [bezelView removeMotionEffect:effect]; - } - } -#endif -} - -#pragma mark - Layout - -- (void)updateConstraints { - UIView *bezel = self.bezelView; - UIView *topSpacer = self.topSpacer; - UIView *bottomSpacer = self.bottomSpacer; - CGFloat margin = self.margin; - NSMutableArray *bezelConstraints = [NSMutableArray array]; - NSDictionary *metrics = @{@"margin": @(margin)}; - - NSMutableArray *subviews = [NSMutableArray arrayWithObjects:self.topSpacer, self.label, self.detailsLabel, self.button, self.bottomSpacer, nil]; - if (self.indicator) [subviews insertObject:self.indicator atIndex:1]; - - // Remove existing constraints - [self removeConstraints:self.constraints]; - [topSpacer removeConstraints:topSpacer.constraints]; - [bottomSpacer removeConstraints:bottomSpacer.constraints]; - if (self.bezelConstraints) { - [bezel removeConstraints:self.bezelConstraints]; - self.bezelConstraints = nil; - } - - // Center bezel in container (self), applying the offset if set - CGPoint offset = self.offset; - NSMutableArray *centeringConstraints = [NSMutableArray array]; - [centeringConstraints addObject:[NSLayoutConstraint constraintWithItem:bezel attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1.f constant:offset.x]]; - [centeringConstraints addObject:[NSLayoutConstraint constraintWithItem:bezel attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterY multiplier:1.f constant:offset.y]]; - [self applyPriority:998.f toConstraints:centeringConstraints]; - [self addConstraints:centeringConstraints]; - - // Ensure minimum side margin is kept - NSMutableArray *sideConstraints = [NSMutableArray array]; - [sideConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"|-(>=margin)-[bezel]-(>=margin)-|" options:0 metrics:metrics views:NSDictionaryOfVariableBindings(bezel)]]; - [sideConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(>=margin)-[bezel]-(>=margin)-|" options:0 metrics:metrics views:NSDictionaryOfVariableBindings(bezel)]]; - [self applyPriority:999.f toConstraints:sideConstraints]; - [self addConstraints:sideConstraints]; - - // Minimum bezel size, if set - CGSize minimumSize = self.minSize; - if (!CGSizeEqualToSize(minimumSize, CGSizeZero)) { - NSMutableArray *minSizeConstraints = [NSMutableArray array]; - [minSizeConstraints addObject:[NSLayoutConstraint constraintWithItem:bezel attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.f constant:minimumSize.width]]; - [minSizeConstraints addObject:[NSLayoutConstraint constraintWithItem:bezel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.f constant:minimumSize.height]]; - [self applyPriority:997.f toConstraints:minSizeConstraints]; - [bezelConstraints addObjectsFromArray:minSizeConstraints]; - } - - // Square aspect ratio, if set - if (self.square) { - NSLayoutConstraint *square = [NSLayoutConstraint constraintWithItem:bezel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:bezel attribute:NSLayoutAttributeWidth multiplier:1.f constant:0]; - square.priority = 997.f; - [bezelConstraints addObject:square]; - } - - // Top and bottom spacing - [topSpacer addConstraint:[NSLayoutConstraint constraintWithItem:topSpacer attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.f constant:margin]]; - [bottomSpacer addConstraint:[NSLayoutConstraint constraintWithItem:bottomSpacer attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.f constant:margin]]; - // Top and bottom spaces should be equal - [bezelConstraints addObject:[NSLayoutConstraint constraintWithItem:topSpacer attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:bottomSpacer attribute:NSLayoutAttributeHeight multiplier:1.f constant:0.f]]; - - // Layout subviews in bezel - NSMutableArray *paddingConstraints = [NSMutableArray new]; - [subviews enumerateObjectsUsingBlock:^(UIView *view, NSUInteger idx, BOOL *stop) { - // Center in bezel - [bezelConstraints addObject:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:bezel attribute:NSLayoutAttributeCenterX multiplier:1.f constant:0.f]]; - // Ensure the minimum edge margin is kept - [bezelConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"|-(>=margin)-[view]-(>=margin)-|" options:0 metrics:metrics views:NSDictionaryOfVariableBindings(view)]]; - // Element spacing - if (idx == 0) { - // First, ensure spacing to bezel edge - [bezelConstraints addObject:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:bezel attribute:NSLayoutAttributeTop multiplier:1.f constant:0.f]]; - } else if (idx == subviews.count - 1) { - // Last, ensure spacing to bezel edge - [bezelConstraints addObject:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:bezel attribute:NSLayoutAttributeBottom multiplier:1.f constant:0.f]]; - } - if (idx > 0) { - // Has previous - NSLayoutConstraint *padding = [NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:subviews[idx - 1] attribute:NSLayoutAttributeBottom multiplier:1.f constant:0.f]; - [bezelConstraints addObject:padding]; - [paddingConstraints addObject:padding]; - } - }]; - - [bezel addConstraints:bezelConstraints]; - self.bezelConstraints = bezelConstraints; - - self.paddingConstraints = [paddingConstraints copy]; - [self updatePaddingConstraints]; - - [super updateConstraints]; -} - -- (void)layoutSubviews { - // There is no need to update constraints if they are going to - // be recreated in [super layoutSubviews] due to needsUpdateConstraints being set. - // This also avoids an issue on iOS 8, where updatePaddingConstraints - // would trigger a zombie object access. - if (!self.needsUpdateConstraints) { - [self updatePaddingConstraints]; - } - [super layoutSubviews]; -} - -- (void)updatePaddingConstraints { - // Set padding dynamically, depending on whether the view is visible or not - __block BOOL hasVisibleAncestors = NO; - [self.paddingConstraints enumerateObjectsUsingBlock:^(NSLayoutConstraint *padding, NSUInteger idx, BOOL *stop) { - UIView *firstView = (UIView *)padding.firstItem; - UIView *secondView = (UIView *)padding.secondItem; - BOOL firstVisible = !firstView.hidden && !CGSizeEqualToSize(firstView.intrinsicContentSize, CGSizeZero); - BOOL secondVisible = !secondView.hidden && !CGSizeEqualToSize(secondView.intrinsicContentSize, CGSizeZero); - // Set if both views are visible or if there's a visible view on top that doesn't have padding - // added relative to the current view yet - padding.constant = (firstVisible && (secondVisible || hasVisibleAncestors)) ? MBDefaultPadding : 0.f; - hasVisibleAncestors |= secondVisible; - }]; -} - -- (void)applyPriority:(UILayoutPriority)priority toConstraints:(NSArray *)constraints { - for (NSLayoutConstraint *constraint in constraints) { - constraint.priority = priority; - } -} - -#pragma mark - Properties - -- (void)setMode:(MBProgressHUDMode)mode { - if (mode != _mode) { - _mode = mode; - [self updateIndicators]; - } -} - -- (void)setCustomView:(UIView *)customView { - if (customView != _customView) { - _customView = customView; - if (self.mode == MBProgressHUDModeCustomView) { - [self updateIndicators]; - } - } -} - -- (void)setOffset:(CGPoint)offset { - if (!CGPointEqualToPoint(offset, _offset)) { - _offset = offset; - [self setNeedsUpdateConstraints]; - } -} - -- (void)setMargin:(CGFloat)margin { - if (margin != _margin) { - _margin = margin; - [self setNeedsUpdateConstraints]; - } -} - -- (void)setMinSize:(CGSize)minSize { - if (!CGSizeEqualToSize(minSize, _minSize)) { - _minSize = minSize; - [self setNeedsUpdateConstraints]; - } -} - -- (void)setSquare:(BOOL)square { - if (square != _square) { - _square = square; - [self setNeedsUpdateConstraints]; - } -} - -- (void)setProgressObjectDisplayLink:(CADisplayLink *)progressObjectDisplayLink { - if (progressObjectDisplayLink != _progressObjectDisplayLink) { - [_progressObjectDisplayLink invalidate]; - - _progressObjectDisplayLink = progressObjectDisplayLink; - - [_progressObjectDisplayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; - } -} - -- (void)setProgressObject:(NSProgress *)progressObject { - if (progressObject != _progressObject) { - _progressObject = progressObject; - [self setNSProgressDisplayLinkEnabled:YES]; - } -} - -- (void)setProgress:(float)progress { - if (progress != _progress) { - _progress = progress; - UIView *indicator = self.indicator; - if ([indicator respondsToSelector:@selector(setProgress:)]) { - [(id)indicator setValue:@(self.progress) forKey:@"progress"]; - } - } -} - -- (void)setContentColor:(UIColor *)contentColor { - if (contentColor != _contentColor && ![contentColor isEqual:_contentColor]) { - _contentColor = contentColor; - [self updateViewsForColor:contentColor]; - } -} - -- (void)setDefaultMotionEffectsEnabled:(BOOL)defaultMotionEffectsEnabled { - if (defaultMotionEffectsEnabled != _defaultMotionEffectsEnabled) { - _defaultMotionEffectsEnabled = defaultMotionEffectsEnabled; - [self updateBezelMotionEffects]; - } -} - -#pragma mark - NSProgress - -- (void)setNSProgressDisplayLinkEnabled:(BOOL)enabled { - // We're using CADisplayLink, because NSProgress can change very quickly and observing it may starve the main thread, - // so we're refreshing the progress only every frame draw - if (enabled && self.progressObject) { - // Only create if not already active. - if (!self.progressObjectDisplayLink) { - self.progressObjectDisplayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateProgressFromProgressObject)]; - } - } else { - self.progressObjectDisplayLink = nil; - } -} - -- (void)updateProgressFromProgressObject { - self.progress = self.progressObject.fractionCompleted; -} - -#pragma mark - Notifications - -- (void)registerForNotifications { -#if !TARGET_OS_TV - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - - [nc addObserver:self selector:@selector(statusBarOrientationDidChange:) - name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; -#endif -} - -- (void)unregisterFromNotifications { -#if !TARGET_OS_TV - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; -#endif -} - -#if !TARGET_OS_TV -- (void)statusBarOrientationDidChange:(NSNotification *)notification { - UIView *superview = self.superview; - if (!superview) { - return; - } else { - [self updateForCurrentOrientationAnimated:YES]; - } -} -#endif - -- (void)updateForCurrentOrientationAnimated:(BOOL)animated { - // Stay in sync with the superview in any case - if (self.superview) { - self.frame = self.superview.bounds; - } - - // Not needed on iOS 8+, compile out when the deployment target allows, - // to avoid sharedApplication problems on extension targets -#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000 - // Only needed pre iOS 8 when added to a window - BOOL iOS8OrLater = kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0; - if (iOS8OrLater || ![self.superview isKindOfClass:[UIWindow class]]) return; - - // Make extension friendly. Will not get called on extensions (iOS 8+) due to the above check. - // This just ensures we don't get a warning about extension-unsafe API. - Class UIApplicationClass = NSClassFromString(@"UIApplication"); - if (!UIApplicationClass || ![UIApplicationClass respondsToSelector:@selector(sharedApplication)]) return; - - UIApplication *application = [UIApplication performSelector:@selector(sharedApplication)]; - UIInterfaceOrientation orientation = application.statusBarOrientation; - CGFloat radians = 0; - - if (UIInterfaceOrientationIsLandscape(orientation)) { - radians = orientation == UIInterfaceOrientationLandscapeLeft ? -(CGFloat)M_PI_2 : (CGFloat)M_PI_2; - // Window coordinates differ! - self.bounds = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.width); - } else { - radians = orientation == UIInterfaceOrientationPortraitUpsideDown ? (CGFloat)M_PI : 0.f; - } - - if (animated) { - [UIView animateWithDuration:0.3 animations:^{ - self.transform = CGAffineTransformMakeRotation(radians); - }]; - } else { - self.transform = CGAffineTransformMakeRotation(radians); - } -#endif -} - -@end - - -@implementation MBRoundProgressView - -#pragma mark - Lifecycle - -- (id)init { - return [self initWithFrame:CGRectMake(0.f, 0.f, 37.f, 37.f)]; -} - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - self.backgroundColor = [UIColor clearColor]; - self.opaque = NO; - _progress = 0.f; - _annular = NO; - _progressTintColor = [[UIColor alloc] initWithWhite:1.f alpha:1.f]; - _backgroundTintColor = [[UIColor alloc] initWithWhite:1.f alpha:.1f]; - } - return self; -} - -#pragma mark - Layout - -- (CGSize)intrinsicContentSize { - return CGSizeMake(37.f, 37.f); -} - -#pragma mark - Properties - -- (void)setProgress:(float)progress { - if (progress != _progress) { - _progress = progress; - [self setNeedsDisplay]; - } -} - -- (void)setProgressTintColor:(UIColor *)progressTintColor { - NSAssert(progressTintColor, @"The color should not be nil."); - if (progressTintColor != _progressTintColor && ![progressTintColor isEqual:_progressTintColor]) { - _progressTintColor = progressTintColor; - [self setNeedsDisplay]; - } -} - -- (void)setBackgroundTintColor:(UIColor *)backgroundTintColor { - NSAssert(backgroundTintColor, @"The color should not be nil."); - if (backgroundTintColor != _backgroundTintColor && ![backgroundTintColor isEqual:_backgroundTintColor]) { - _backgroundTintColor = backgroundTintColor; - [self setNeedsDisplay]; - } -} - -#pragma mark - Drawing - -- (void)drawRect:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - BOOL isPreiOS7 = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0; - - if (_annular) { - // Draw background - CGFloat lineWidth = isPreiOS7 ? 5.f : 2.f; - UIBezierPath *processBackgroundPath = [UIBezierPath bezierPath]; - processBackgroundPath.lineWidth = lineWidth; - processBackgroundPath.lineCapStyle = kCGLineCapButt; - CGPoint center = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds)); - CGFloat radius = (self.bounds.size.width - lineWidth)/2; - CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees - CGFloat endAngle = (2 * (float)M_PI) + startAngle; - [processBackgroundPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; - [_backgroundTintColor set]; - [processBackgroundPath stroke]; - // Draw progress - UIBezierPath *processPath = [UIBezierPath bezierPath]; - processPath.lineCapStyle = isPreiOS7 ? kCGLineCapRound : kCGLineCapSquare; - processPath.lineWidth = lineWidth; - endAngle = (self.progress * 2 * (float)M_PI) + startAngle; - [processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; - [_progressTintColor set]; - [processPath stroke]; - } else { - // Draw background - CGFloat lineWidth = 2.f; - CGRect allRect = self.bounds; - CGRect circleRect = CGRectInset(allRect, lineWidth/2.f, lineWidth/2.f); - CGPoint center = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds)); - [_progressTintColor setStroke]; - [_backgroundTintColor setFill]; - CGContextSetLineWidth(context, lineWidth); - if (isPreiOS7) { - CGContextFillEllipseInRect(context, circleRect); - } - CGContextStrokeEllipseInRect(context, circleRect); - // 90 degrees - CGFloat startAngle = - ((float)M_PI / 2.f); - // Draw progress - if (isPreiOS7) { - CGFloat radius = (CGRectGetWidth(self.bounds) / 2.f) - lineWidth; - CGFloat endAngle = (self.progress * 2.f * (float)M_PI) + startAngle; - [_progressTintColor setFill]; - CGContextMoveToPoint(context, center.x, center.y); - CGContextAddArc(context, center.x, center.y, radius, startAngle, endAngle, 0); - CGContextClosePath(context); - CGContextFillPath(context); - } else { - UIBezierPath *processPath = [UIBezierPath bezierPath]; - processPath.lineCapStyle = kCGLineCapButt; - processPath.lineWidth = lineWidth * 2.f; - CGFloat radius = (CGRectGetWidth(self.bounds) / 2.f) - (processPath.lineWidth / 2.f); - CGFloat endAngle = (self.progress * 2.f * (float)M_PI) + startAngle; - [processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; - // Ensure that we don't get color overlapping when _progressTintColor alpha < 1.f. - CGContextSetBlendMode(context, kCGBlendModeCopy); - [_progressTintColor set]; - [processPath stroke]; - } - } -} - -@end - - -@implementation MBBarProgressView - -#pragma mark - Lifecycle - -- (id)init { - return [self initWithFrame:CGRectMake(.0f, .0f, 120.0f, 20.0f)]; -} - -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - _progress = 0.f; - _lineColor = [UIColor whiteColor]; - _progressColor = [UIColor whiteColor]; - _progressRemainingColor = [UIColor clearColor]; - self.backgroundColor = [UIColor clearColor]; - self.opaque = NO; - } - return self; -} - -#pragma mark - Layout - -- (CGSize)intrinsicContentSize { - BOOL isPreiOS7 = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0; - return CGSizeMake(120.f, isPreiOS7 ? 20.f : 10.f); -} - -#pragma mark - Properties - -- (void)setProgress:(float)progress { - if (progress != _progress) { - _progress = progress; - [self setNeedsDisplay]; - } -} - -- (void)setProgressColor:(UIColor *)progressColor { - NSAssert(progressColor, @"The color should not be nil."); - if (progressColor != _progressColor && ![progressColor isEqual:_progressColor]) { - _progressColor = progressColor; - [self setNeedsDisplay]; - } -} - -- (void)setProgressRemainingColor:(UIColor *)progressRemainingColor { - NSAssert(progressRemainingColor, @"The color should not be nil."); - if (progressRemainingColor != _progressRemainingColor && ![progressRemainingColor isEqual:_progressRemainingColor]) { - _progressRemainingColor = progressRemainingColor; - [self setNeedsDisplay]; - } -} - -#pragma mark - Drawing - -- (void)drawRect:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - - CGContextSetLineWidth(context, 2); - CGContextSetStrokeColorWithColor(context,[_lineColor CGColor]); - CGContextSetFillColorWithColor(context, [_progressRemainingColor CGColor]); - - // Draw background and Border - CGFloat radius = (rect.size.height / 2) - 2; - CGContextMoveToPoint(context, 2, rect.size.height/2); - CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); - CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); - CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); - CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); - CGContextDrawPath(context, kCGPathFillStroke); - - CGContextSetFillColorWithColor(context, [_progressColor CGColor]); - radius = radius - 2; - CGFloat amount = self.progress * rect.size.width; - - // Progress in the middle area - if (amount >= radius + 4 && amount <= (rect.size.width - radius - 4)) { - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); - CGContextAddLineToPoint(context, amount, 4); - CGContextAddLineToPoint(context, amount, radius + 4); - - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); - CGContextAddLineToPoint(context, amount, rect.size.height - 4); - CGContextAddLineToPoint(context, amount, radius + 4); - - CGContextFillPath(context); - } - - // Progress in the right arc - else if (amount > radius + 4) { - CGFloat x = amount - (rect.size.width - radius - 4); - - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); - CGContextAddLineToPoint(context, rect.size.width - radius - 4, 4); - CGFloat angle = -acos(x/radius); - if (isnan(angle)) angle = 0; - CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, M_PI, angle, 0); - CGContextAddLineToPoint(context, amount, rect.size.height/2); - - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); - CGContextAddLineToPoint(context, rect.size.width - radius - 4, rect.size.height - 4); - angle = acos(x/radius); - if (isnan(angle)) angle = 0; - CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, -M_PI, angle, 1); - CGContextAddLineToPoint(context, amount, rect.size.height/2); - - CGContextFillPath(context); - } - - // Progress is in the left arc - else if (amount < radius + 4 && amount > 0) { - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); - CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); - - CGContextMoveToPoint(context, 4, rect.size.height/2); - CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); - CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); - - CGContextFillPath(context); - } -} - -@end - - -@interface MBBackgroundView () - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV -@property UIVisualEffectView *effectView; -#endif -#if !TARGET_OS_TV -@property UIToolbar *toolbar; -#endif - -@end - - -@implementation MBBackgroundView - -#pragma mark - Lifecycle - -- (instancetype)initWithFrame:(CGRect)frame { - if ((self = [super initWithFrame:frame])) { - if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) { - _style = MBProgressHUDBackgroundStyleBlur; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV - _blurEffectStyle = UIBlurEffectStyleLight; -#endif - if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) { - _color = [UIColor colorWithWhite:0.8f alpha:0.6f]; - } else { - _color = [UIColor colorWithWhite:0.95f alpha:0.6f]; - } - } else { - _style = MBProgressHUDBackgroundStyleSolidColor; - _color = [[UIColor blackColor] colorWithAlphaComponent:0.8]; - } - - self.clipsToBounds = YES; - - [self updateForBackgroundStyle]; - } - return self; -} - -#pragma mark - Layout - -- (CGSize)intrinsicContentSize { - // Smallest size possible. Content pushes against this. - return CGSizeZero; -} - -#pragma mark - Appearance - -- (void)setStyle:(MBProgressHUDBackgroundStyle)style { - if (style == MBProgressHUDBackgroundStyleBlur && kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0) { - style = MBProgressHUDBackgroundStyleSolidColor; - } - if (_style != style) { - _style = style; - [self updateForBackgroundStyle]; - } -} - -- (void)setColor:(UIColor *)color { - NSAssert(color, @"The color should not be nil."); - if (color != _color && ![color isEqual:_color]) { - _color = color; - [self updateViewsForColor:color]; - } -} - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV - -- (void)setBlurEffectStyle:(UIBlurEffectStyle)blurEffectStyle { - if (_blurEffectStyle == blurEffectStyle) { - return; - } - - _blurEffectStyle = blurEffectStyle; - - [self updateForBackgroundStyle]; -} - -#endif - -/////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - Views - -- (void)updateForBackgroundStyle { - MBProgressHUDBackgroundStyle style = self.style; - if (style == MBProgressHUDBackgroundStyleBlur) { -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV - if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) { - UIBlurEffect *effect = [UIBlurEffect effectWithStyle:self.blurEffectStyle]; - UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:effect]; - [self addSubview:effectView]; - effectView.frame = self.bounds; - effectView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; - self.backgroundColor = self.color; - self.layer.allowsGroupOpacity = NO; - self.effectView = effectView; - } else { -#endif -#if !TARGET_OS_TV - UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectInset(self.bounds, -100.f, -100.f)]; - toolbar.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; - toolbar.barTintColor = self.color; - toolbar.translucent = YES; - [self addSubview:toolbar]; - self.toolbar = toolbar; -#endif -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV - } -#endif - } else { -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV - if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) { - [self.effectView removeFromSuperview]; - self.effectView = nil; - } else { -#endif -#if !TARGET_OS_TV - [self.toolbar removeFromSuperview]; - self.toolbar = nil; -#endif -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV - } -#endif - self.backgroundColor = self.color; - } -} - -- (void)updateViewsForColor:(UIColor *)color { - if (self.style == MBProgressHUDBackgroundStyleBlur) { - if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) { - self.backgroundColor = self.color; - } else { -#if !TARGET_OS_TV - self.toolbar.barTintColor = color; -#endif - } - } else { - self.backgroundColor = self.color; - } -} - -@end - - -@implementation MBProgressHUD (Deprecated) - -#pragma mark - Class - -+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated { - NSArray *huds = [MBProgressHUD allHUDsForView:view]; - for (MBProgressHUD *hud in huds) { - hud.removeFromSuperViewOnHide = YES; - [hud hideAnimated:animated]; - } - return [huds count]; -} - -+ (NSArray *)allHUDsForView:(UIView *)view { - NSMutableArray *huds = [NSMutableArray array]; - NSArray *subviews = view.subviews; - for (UIView *aView in subviews) { - if ([aView isKindOfClass:self]) { - [huds addObject:aView]; - } - } - return [NSArray arrayWithArray:huds]; -} - -#pragma mark - Lifecycle - -- (id)initWithWindow:(UIWindow *)window { - return [self initWithView:window]; -} - -#pragma mark - Show & hide - -- (void)show:(BOOL)animated { - [self showAnimated:animated]; -} - -- (void)hide:(BOOL)animated { - [self hideAnimated:animated]; -} - -- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay { - [self hideAnimated:animated afterDelay:delay]; -} - -#pragma mark - Threading - -- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated { - [self showAnimated:animated whileExecutingBlock:^{ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-performSelector-leaks" - // Start executing the requested task - [target performSelector:method withObject:object]; -#pragma clang diagnostic pop - }]; -} - -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block { - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL]; -} - -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(void (^)(void))completion { - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:completion]; -} - -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue { - [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL]; -} - -- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue completionBlock:(nullable MBProgressHUDCompletionBlock)completion { - self.taskInProgress = YES; - self.completionBlock = completion; - dispatch_async(queue, ^(void) { - block(); - dispatch_async(dispatch_get_main_queue(), ^(void) { - [self cleanUp]; - }); - }); - [self showAnimated:animated]; -} - -- (void)cleanUp { - self.taskInProgress = NO; - [self hideAnimated:self.useAnimation]; -} - -#pragma mark - Labels - -- (NSString *)labelText { - return self.label.text; -} - -- (void)setLabelText:(NSString *)labelText { - MBMainThreadAssert(); - self.label.text = labelText; -} - -- (UIFont *)labelFont { - return self.label.font; -} - -- (void)setLabelFont:(UIFont *)labelFont { - MBMainThreadAssert(); - self.label.font = labelFont; -} - -- (UIColor *)labelColor { - return self.label.textColor; -} - -- (void)setLabelColor:(UIColor *)labelColor { - MBMainThreadAssert(); - self.label.textColor = labelColor; -} - -- (NSString *)detailsLabelText { - return self.detailsLabel.text; -} - -- (void)setDetailsLabelText:(NSString *)detailsLabelText { - MBMainThreadAssert(); - self.detailsLabel.text = detailsLabelText; -} - -- (UIFont *)detailsLabelFont { - return self.detailsLabel.font; -} - -- (void)setDetailsLabelFont:(UIFont *)detailsLabelFont { - MBMainThreadAssert(); - self.detailsLabel.font = detailsLabelFont; -} - -- (UIColor *)detailsLabelColor { - return self.detailsLabel.textColor; -} - -- (void)setDetailsLabelColor:(UIColor *)detailsLabelColor { - MBMainThreadAssert(); - self.detailsLabel.textColor = detailsLabelColor; -} - -- (CGFloat)opacity { - return _opacity; -} - -- (void)setOpacity:(CGFloat)opacity { - MBMainThreadAssert(); - _opacity = opacity; -} - -- (UIColor *)color { - return self.bezelView.color; -} - -- (void)setColor:(UIColor *)color { - MBMainThreadAssert(); - self.bezelView.color = color; -} - -- (CGFloat)yOffset { - return self.offset.y; -} - -- (void)setYOffset:(CGFloat)yOffset { - MBMainThreadAssert(); - self.offset = CGPointMake(self.offset.x, yOffset); -} - -- (CGFloat)xOffset { - return self.offset.x; -} - -- (void)setXOffset:(CGFloat)xOffset { - MBMainThreadAssert(); - self.offset = CGPointMake(xOffset, self.offset.y); -} - -- (CGFloat)cornerRadius { - return self.bezelView.layer.cornerRadius; -} - -- (void)setCornerRadius:(CGFloat)cornerRadius { - MBMainThreadAssert(); - self.bezelView.layer.cornerRadius = cornerRadius; -} - -- (BOOL)dimBackground { - MBBackgroundView *backgroundView = self.backgroundView; - UIColor *dimmedColor = [UIColor colorWithWhite:0.f alpha:.2f]; - return backgroundView.style == MBProgressHUDBackgroundStyleSolidColor && [backgroundView.color isEqual:dimmedColor]; -} - -- (void)setDimBackground:(BOOL)dimBackground { - MBMainThreadAssert(); - self.backgroundView.style = MBProgressHUDBackgroundStyleSolidColor; - self.backgroundView.color = dimBackground ? [UIColor colorWithWhite:0.f alpha:.2f] : [UIColor clearColor]; -} - -- (CGSize)size { - return self.bezelView.frame.size; -} - -- (UIColor *)activityIndicatorColor { - return _activityIndicatorColor; -} - -- (void)setActivityIndicatorColor:(UIColor *)activityIndicatorColor { - if (activityIndicatorColor != _activityIndicatorColor) { - _activityIndicatorColor = activityIndicatorColor; - UIActivityIndicatorView *indicator = (UIActivityIndicatorView *)self.indicator; - if ([indicator isKindOfClass:[UIActivityIndicatorView class]]) { - [indicator setColor:activityIndicatorColor]; - } - } -} - -@end - -@implementation MBProgressHUDRoundedButton - -#pragma mark - Lifecycle - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - CALayer *layer = self.layer; - layer.borderWidth = 1.f; - } - return self; -} - -#pragma mark - Layout - -- (void)layoutSubviews { - [super layoutSubviews]; - // Fully rounded corners - CGFloat height = CGRectGetHeight(self.bounds); - self.layer.cornerRadius = ceil(height / 2.f); -} - -- (CGSize)intrinsicContentSize { - // Only show if we have associated control events - if (self.allControlEvents == 0) return CGSizeZero; - CGSize size = [super intrinsicContentSize]; - // Add some side padding - size.width += 20.f; - return size; -} - -#pragma mark - Color - -- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state { - [super setTitleColor:color forState:state]; - // Update related colors - [self setHighlighted:self.highlighted]; - self.layer.borderColor = color.CGColor; -} - -- (void)setHighlighted:(BOOL)highlighted { - [super setHighlighted:highlighted]; - UIColor *baseColor = [self titleColorForState:UIControlStateSelected]; - self.backgroundColor = highlighted ? [baseColor colorWithAlphaComponent:0.1f] : [UIColor clearColor]; -} - -@end diff --git a/iOS_Tips/Pods/MBProgressHUD/README.mdown b/iOS_Tips/Pods/MBProgressHUD/README.mdown deleted file mode 100644 index 21ba843b..00000000 --- a/iOS_Tips/Pods/MBProgressHUD/README.mdown +++ /dev/null @@ -1,126 +0,0 @@ -# MBProgressHUD - -[![Build Status](https://travis-ci.org/matej/MBProgressHUD.svg?branch=master)](https://travis-ci.org/matej/MBProgressHUD) [![codecov.io](https://codecov.io/github/matej/MBProgressHUD/coverage.svg?branch=master)](https://codecov.io/github/matej/MBProgressHUD?branch=master) - [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) [![CocoaPods compatible](https://img.shields.io/cocoapods/v/MBProgressHUD.svg?style=flat)](https://cocoapods.org/pods/MBProgressHUD) [![License: MIT](https://img.shields.io/cocoapods/l/MBProgressHUD.svg?style=flat)](http://opensource.org/licenses/MIT) - -`MBProgressHUD` is an iOS drop-in class that displays a translucent HUD with an indicator and/or labels while work is being done in a background thread. The HUD is meant as a replacement for the undocumented, private `UIKit` `UIProgressHUD` with some additional features. - -[![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/1-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/1.png) -[![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/2-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/2.png) -[![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/3-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/3.png) -[![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/4-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/4.png) -[![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/5-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/5.png) -[![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/6-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/6.png) -[![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/7-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/7.png) - -**NOTE:** The class has recently undergone a major rewrite. The old version is available in the [legacy](https://github.com/jdg/MBProgressHUD/tree/legacy) branch, should you need it. - -## Requirements - -`MBProgressHUD` works on iOS 6+ and requires ARC to build. It depends on the following Apple frameworks, which should already be included with most Xcode templates: - -* Foundation.framework -* UIKit.framework -* CoreGraphics.framework - -You will need the latest developer tools in order to build `MBProgressHUD`. Old Xcode versions might work, but compatibility will not be explicitly maintained. - -## Adding MBProgressHUD to your project - -### CocoaPods - -[CocoaPods](http://cocoapods.org) is the recommended way to add MBProgressHUD to your project. - -1. Add a pod entry for MBProgressHUD to your Podfile `pod 'MBProgressHUD', '~> 1.1.0'` -2. Install the pod(s) by running `pod install`. -3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`. - -### Carthage - -1. Add MBProgressHUD to your Cartfile. e.g., `github "jdg/MBProgressHUD" ~> 1.1.0` -2. Run `carthage update` -3. Follow the rest of the [standard Carthage installation instructions](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) to add MBProgressHUD to your project. - -### Source files - -Alternatively you can directly add the `MBProgressHUD.h` and `MBProgressHUD.m` source files to your project. - -1. Download the [latest code version](https://github.com/matej/MBProgressHUD/archive/master.zip) or add the repository as a git submodule to your git-tracked project. -2. Open your project in Xcode, then drag and drop `MBProgressHUD.h` and `MBProgressHUD.m` onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project. -3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`. - -### Static library - -You can also add MBProgressHUD as a static library to your project or workspace. - -1. Download the [latest code version](https://github.com/matej/MBProgressHUD/downloads) or add the repository as a git submodule to your git-tracked project. -2. Open your project in Xcode, then drag and drop `MBProgressHUD.xcodeproj` onto your project or workspace (use the "Product Navigator view"). -3. Select your target and go to the Build phases tab. In the Link Binary With Libraries section select the add button. On the sheet find and add `libMBProgressHUD.a`. You might also need to add `MBProgressHUD` to the Target Dependencies list. -4. Include MBProgressHUD wherever you need it with `#import `. - -## Usage - -The main guideline you need to follow when dealing with MBProgressHUD while running long-running tasks is keeping the main thread work-free, so the UI can be updated promptly. The recommended way of using MBProgressHUD is therefore to set it up on the main thread and then spinning the task, that you want to perform, off onto a new thread. - -```objective-c -[MBProgressHUD showHUDAddedTo:self.view animated:YES]; -dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{ - // Do something... - dispatch_async(dispatch_get_main_queue(), ^{ - [MBProgressHUD hideHUDForView:self.view animated:YES]; - }); -}); -``` - -You can add the HUD on any view or window. It is however a good idea to avoid adding the HUD to certain `UIKit` views with complex view hierarchies - like `UITableView` or `UICollectionView`. Those can mutate their subviews in unexpected ways and thereby break HUD display. - -If you need to configure the HUD you can do this by using the MBProgressHUD reference that showHUDAddedTo:animated: returns. - -```objective-c -MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; -hud.mode = MBProgressHUDModeAnnularDeterminate; -hud.label.text = @"Loading"; -[self doSomethingInBackgroundWithProgressCallback:^(float progress) { - hud.progress = progress; -} completionCallback:^{ - [hud hideAnimated:YES]; -}]; -``` - -You can also use a `NSProgress` object and MBProgressHUD will update itself when there is progress reported through that object. - -```objective-c -MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; -hud.mode = MBProgressHUDModeAnnularDeterminate; -hud.label.text = @"Loading"; -NSProgress *progress = [self doSomethingInBackgroundCompletion:^{ - [hud hideAnimated:YES]; -}]; -hud.progressObject = progress; -``` - -Keep in mind that UI updates, inclining calls to MBProgressHUD should always be done on the main thread. - -If you need to run your long-running task in the main thread, you should perform it with a slight delay, so UIKit will have enough time to update the UI (i.e., draw the HUD) before you block the main thread with your task. - -```objective-c -[MBProgressHUD showHUDAddedTo:self.view animated:YES]; -dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 0.01 * NSEC_PER_SEC); -dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ - // Do something... - [MBProgressHUD hideHUDForView:self.view animated:YES]; -}); -``` - -You should be aware that any HUD updates issued inside the above block won't be displayed until the block completes. - -For more examples, including how to use MBProgressHUD with asynchronous operations such as NSURLConnection, take a look at the bundled demo project. Extensive API documentation is provided in the header file (MBProgressHUD.h). - - -## License - -This code is distributed under the terms and conditions of the [MIT license](LICENSE). - -## Change-log - -A brief summary of each MBProgressHUD release can be found in the [CHANGELOG](CHANGELOG.mdown). diff --git a/iOS_Tips/Pods/MLeaksFinder/LICENSE b/iOS_Tips/Pods/MLeaksFinder/LICENSE deleted file mode 100644 index 0739a90e..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016 Zeposhe - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeakedObjectProxy.h b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeakedObjectProxy.h deleted file mode 100644 index 94898394..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeakedObjectProxy.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// MLeakedObjectProxy.h -// MLeaksFinder -// -// Created by 佘泽坡 on 7/15/16. -// Copyright © 2016 zeposhe. All rights reserved. -// - -#import - -@interface MLeakedObjectProxy : NSObject - -+ (BOOL)isAnyObjectLeakedAtPtrs:(NSSet *)ptrs; -+ (void)addLeakedObject:(id)object; - -@end diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeakedObjectProxy.m b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeakedObjectProxy.m deleted file mode 100644 index d25d9acd..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeakedObjectProxy.m +++ /dev/null @@ -1,141 +0,0 @@ -// -// MLeakedObjectProxy.m -// MLeaksFinder -// -// Created by 佘泽坡 on 7/15/16. -// Copyright © 2016 zeposhe. All rights reserved. -// - -#import "MLeakedObjectProxy.h" -#import "MLeaksFinder.h" -#import "MLeaksMessenger.h" -#import "NSObject+MemoryLeak.h" -#import -#import - -#if _INTERNAL_MLF_RC_ENABLED -#import -#endif - -static NSMutableSet *leakedObjectPtrs; - -@interface MLeakedObjectProxy () -@property (nonatomic, weak) id object; -@property (nonatomic, strong) NSNumber *objectPtr; -@property (nonatomic, strong) NSArray *viewStack; -@end - -@implementation MLeakedObjectProxy - -+ (BOOL)isAnyObjectLeakedAtPtrs:(NSSet *)ptrs { - NSAssert([NSThread isMainThread], @"Must be in main thread."); - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - leakedObjectPtrs = [[NSMutableSet alloc] init]; - }); - - if (!ptrs.count) { - return NO; - } - if ([leakedObjectPtrs intersectsSet:ptrs]) { - return YES; - } else { - return NO; - } -} - -+ (void)addLeakedObject:(id)object { - NSAssert([NSThread isMainThread], @"Must be in main thread."); - - MLeakedObjectProxy *proxy = [[MLeakedObjectProxy alloc] init]; - proxy.object = object; - proxy.objectPtr = @((uintptr_t)object); - proxy.viewStack = [object viewStack]; - static const void *const kLeakedObjectProxyKey = &kLeakedObjectProxyKey; - objc_setAssociatedObject(object, kLeakedObjectProxyKey, proxy, OBJC_ASSOCIATION_RETAIN); - - [leakedObjectPtrs addObject:proxy.objectPtr]; - -#if _INTERNAL_MLF_RC_ENABLED - [MLeaksMessenger alertWithTitle:@"Memory Leak" - message:[NSString stringWithFormat:@"%@", proxy.viewStack] - delegate:proxy - additionalButtonTitle:@"Retain Cycle"]; -#else - [MLeaksMessenger alertWithTitle:@"Memory Leak" - message:[NSString stringWithFormat:@"%@", proxy.viewStack]]; -#endif -} - -- (void)dealloc { - NSNumber *objectPtr = _objectPtr; - NSArray *viewStack = _viewStack; - dispatch_async(dispatch_get_main_queue(), ^{ - [leakedObjectPtrs removeObject:objectPtr]; - [MLeaksMessenger alertWithTitle:@"Object Deallocated" - message:[NSString stringWithFormat:@"%@", viewStack]]; - }); -} - -#pragma mark - UIAlertViewDelegate - -- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { - if (!buttonIndex) { - return; - } - - id object = self.object; - if (!object) { - return; - } - -#if _INTERNAL_MLF_RC_ENABLED - dispatch_async(dispatch_get_global_queue(0, 0), ^{ - FBRetainCycleDetector *detector = [FBRetainCycleDetector new]; - [detector addCandidate:self.object]; - NSSet *retainCycles = [detector findRetainCyclesWithMaxCycleLength:20]; - - BOOL hasFound = NO; - for (NSArray *retainCycle in retainCycles) { - NSInteger index = 0; - for (FBObjectiveCGraphElement *element in retainCycle) { - if (element.object == object) { - NSArray *shiftedRetainCycle = [self shiftArray:retainCycle toIndex:index]; - - dispatch_async(dispatch_get_main_queue(), ^{ - [MLeaksMessenger alertWithTitle:@"Retain Cycle" - message:[NSString stringWithFormat:@"%@", shiftedRetainCycle]]; - }); - hasFound = YES; - break; - } - - ++index; - } - if (hasFound) { - break; - } - } - if (!hasFound) { - dispatch_async(dispatch_get_main_queue(), ^{ - [MLeaksMessenger alertWithTitle:@"Retain Cycle" - message:@"Fail to find a retain cycle"]; - }); - } - }); -#endif -} - -- (NSArray *)shiftArray:(NSArray *)array toIndex:(NSInteger)index { - if (index == 0) { - return array; - } - - NSRange range = NSMakeRange(index, array.count - index); - NSMutableArray *result = [[array subarrayWithRange:range] mutableCopy]; - [result addObjectsFromArray:[array subarrayWithRange:NSMakeRange(0, index)]]; - return result; -} - -@end diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeaksFinder.h b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeaksFinder.h deleted file mode 100644 index a46760c3..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeaksFinder.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// MLeaksFinder.h -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import "NSObject+MemoryLeak.h" - -//#define MEMORY_LEAKS_FINDER_ENABLED 0 - -#ifdef MEMORY_LEAKS_FINDER_ENABLED -#define _INTERNAL_MLF_ENABLED MEMORY_LEAKS_FINDER_ENABLED -#else -#define _INTERNAL_MLF_ENABLED DEBUG -#endif - -//#define MEMORY_LEAKS_FINDER_RETAIN_CYCLE_ENABLED 1 - -#ifdef MEMORY_LEAKS_FINDER_RETAIN_CYCLE_ENABLED -#define _INTERNAL_MLF_RC_ENABLED MEMORY_LEAKS_FINDER_RETAIN_CYCLE_ENABLED -#elif COCOAPODS -#define _INTERNAL_MLF_RC_ENABLED COCOAPODS -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeaksMessenger.h b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeaksMessenger.h deleted file mode 100644 index c4d0147d..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeaksMessenger.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// MLeaksMessenger.h -// MLeaksFinder -// -// Created by 佘泽坡 on 7/17/16. -// Copyright © 2016 zeposhe. All rights reserved. -// - -#import -#import - -@interface MLeaksMessenger : NSObject - -+ (void)alertWithTitle:(NSString *)title message:(NSString *)message; -+ (void)alertWithTitle:(NSString *)title - message:(NSString *)message - delegate:(id)delegate - additionalButtonTitle:(NSString *)additionalButtonTitle; - -@end diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeaksMessenger.m b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeaksMessenger.m deleted file mode 100644 index 561b4f40..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/MLeaksMessenger.m +++ /dev/null @@ -1,35 +0,0 @@ -// -// MLeaksMessenger.m -// MLeaksFinder -// -// Created by 佘泽坡 on 7/17/16. -// Copyright © 2016 zeposhe. All rights reserved. -// - -#import "MLeaksMessenger.h" - -static __weak UIAlertView *alertView; - -@implementation MLeaksMessenger - -+ (void)alertWithTitle:(NSString *)title message:(NSString *)message { - [self alertWithTitle:title message:message delegate:nil additionalButtonTitle:nil]; -} - -+ (void)alertWithTitle:(NSString *)title - message:(NSString *)message - delegate:(id)delegate - additionalButtonTitle:(NSString *)additionalButtonTitle { - [alertView dismissWithClickedButtonIndex:0 animated:NO]; - UIAlertView *alertViewTemp = [[UIAlertView alloc] initWithTitle:title - message:message - delegate:delegate - cancelButtonTitle:@"OK" - otherButtonTitles:additionalButtonTitle, nil]; - [alertViewTemp show]; - alertView = alertViewTemp; - - NSLog(@"%@: %@", title, message); -} - -@end diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/NSObject+MemoryLeak.h b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/NSObject+MemoryLeak.h deleted file mode 100644 index 822df2c6..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/NSObject+MemoryLeak.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// NSObject+MemoryLeak.h -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import - -#define MLCheck(TARGET) [self willReleaseObject:(TARGET) relationship:@#TARGET]; - -@interface NSObject (MemoryLeak) - -- (BOOL)willDealloc; -- (void)willReleaseObject:(id)object relationship:(NSString *)relationship; - -- (void)willReleaseChild:(id)child; -- (void)willReleaseChildren:(NSArray *)children; - -- (NSArray *)viewStack; - -+ (void)addClassNamesToWhitelist:(NSArray *)classNames; - -+ (void)swizzleSEL:(SEL)originalSEL withSEL:(SEL)swizzledSEL; - -@end diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/NSObject+MemoryLeak.m b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/NSObject+MemoryLeak.m deleted file mode 100644 index 0e0ec91c..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/NSObject+MemoryLeak.m +++ /dev/null @@ -1,169 +0,0 @@ -// -// NSObject+MemoryLeak.m -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import "NSObject+MemoryLeak.h" -#import "MLeakedObjectProxy.h" -#import "MLeaksFinder.h" -#import -#import - -#if _INTERNAL_MLF_RC_ENABLED -#import -#endif - -static const void *const kViewStackKey = &kViewStackKey; -static const void *const kParentPtrsKey = &kParentPtrsKey; -const void *const kLatestSenderKey = &kLatestSenderKey; - -@implementation NSObject (MemoryLeak) - -- (BOOL)willDealloc { - NSString *className = NSStringFromClass([self class]); - if ([[NSObject classNamesWhitelist] containsObject:className]) - return NO; - - NSNumber *senderPtr = objc_getAssociatedObject([UIApplication sharedApplication], kLatestSenderKey); - if ([senderPtr isEqualToNumber:@((uintptr_t)self)]) - return NO; - - __weak id weakSelf = self; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - __strong id strongSelf = weakSelf; - [strongSelf assertNotDealloc]; - }); - - return YES; -} - -- (void)assertNotDealloc { - if ([MLeakedObjectProxy isAnyObjectLeakedAtPtrs:[self parentPtrs]]) { - return; - } - [MLeakedObjectProxy addLeakedObject:self]; - - NSString *className = NSStringFromClass([self class]); - NSLog(@"Possibly Memory Leak.\nIn case that %@ should not be dealloced, override -willDealloc in %@ by returning NO.\nView-ViewController stack: %@", className, className, [self viewStack]); -} - -- (void)willReleaseObject:(id)object relationship:(NSString *)relationship { - if ([relationship hasPrefix:@"self"]) { - relationship = [relationship stringByReplacingCharactersInRange:NSMakeRange(0, 4) withString:@""]; - } - NSString *className = NSStringFromClass([object class]); - className = [NSString stringWithFormat:@"%@(%@), ", relationship, className]; - - [object setViewStack:[[self viewStack] arrayByAddingObject:className]]; - [object setParentPtrs:[[self parentPtrs] setByAddingObject:@((uintptr_t)object)]]; - [object willDealloc]; -} - -- (void)willReleaseChild:(id)child { - if (!child) { - return; - } - - [self willReleaseChildren:@[ child ]]; -} - -- (void)willReleaseChildren:(NSArray *)children { - NSArray *viewStack = [self viewStack]; - NSSet *parentPtrs = [self parentPtrs]; - for (id child in children) { - NSString *className = NSStringFromClass([child class]); - [child setViewStack:[viewStack arrayByAddingObject:className]]; - [child setParentPtrs:[parentPtrs setByAddingObject:@((uintptr_t)child)]]; - [child willDealloc]; - } -} - -- (NSArray *)viewStack { - NSArray *viewStack = objc_getAssociatedObject(self, kViewStackKey); - if (viewStack) { - return viewStack; - } - - NSString *className = NSStringFromClass([self class]); - return @[ className ]; -} - -- (void)setViewStack:(NSArray *)viewStack { - objc_setAssociatedObject(self, kViewStackKey, viewStack, OBJC_ASSOCIATION_RETAIN); -} - -- (NSSet *)parentPtrs { - NSSet *parentPtrs = objc_getAssociatedObject(self, kParentPtrsKey); - if (!parentPtrs) { - parentPtrs = [[NSSet alloc] initWithObjects:@((uintptr_t)self), nil]; - } - return parentPtrs; -} - -- (void)setParentPtrs:(NSSet *)parentPtrs { - objc_setAssociatedObject(self, kParentPtrsKey, parentPtrs, OBJC_ASSOCIATION_RETAIN); -} - -+ (NSMutableSet *)classNamesWhitelist { - static NSMutableSet *whitelist = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - whitelist = [NSMutableSet setWithObjects: - @"UIFieldEditor", // UIAlertControllerTextField - @"UINavigationBar", - @"_UIAlertControllerActionView", - @"_UIVisualEffectBackdropView", - nil]; - - // System's bug since iOS 10 and not fixed yet up to this ci. - NSString *systemVersion = [UIDevice currentDevice].systemVersion; - if ([systemVersion compare:@"10.0" options:NSNumericSearch] != NSOrderedAscending) { - [whitelist addObject:@"UISwitch"]; - } - }); - return whitelist; -} - -+ (void)addClassNamesToWhitelist:(NSArray *)classNames { - [[self classNamesWhitelist] addObjectsFromArray:classNames]; -} - -+ (void)swizzleSEL:(SEL)originalSEL withSEL:(SEL)swizzledSEL { -#if _INTERNAL_MLF_ENABLED - -#if _INTERNAL_MLF_RC_ENABLED - // Just find a place to set up FBRetainCycleDetector. - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - dispatch_async(dispatch_get_main_queue(), ^{ - [FBAssociationManager hook]; - }); - }); -#endif - - Class class = [self class]; - - Method originalMethod = class_getInstanceMethod(class, originalSEL); - Method swizzledMethod = class_getInstanceMethod(class, swizzledSEL); - - BOOL didAddMethod = - class_addMethod(class, - originalSEL, - method_getImplementation(swizzledMethod), - method_getTypeEncoding(swizzledMethod)); - - if (didAddMethod) { - class_replaceMethod(class, - swizzledSEL, - method_getImplementation(originalMethod), - method_getTypeEncoding(originalMethod)); - } else { - method_exchangeImplementations(originalMethod, swizzledMethod); - } -#endif -} - -@end diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIApplication+MemoryLeak.h b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIApplication+MemoryLeak.h deleted file mode 100644 index d5711a04..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIApplication+MemoryLeak.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// UIApplication+MemoryLeak.h -// MLeaksFinder -// -// Created by 佘泽坡 on 5/11/16. -// Copyright © 2016 zeposhe. All rights reserved. -// - -#import -#import "MLeaksFinder.h" - -#if _INTERNAL_MLF_ENABLED - -@interface UIApplication (MemoryLeak) - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIApplication+MemoryLeak.m b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIApplication+MemoryLeak.m deleted file mode 100644 index 3079aad3..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIApplication+MemoryLeak.m +++ /dev/null @@ -1,34 +0,0 @@ -// -// UIApplication+MemoryLeak.m -// MLeaksFinder -// -// Created by 佘泽坡 on 5/11/16. -// Copyright © 2016 zeposhe. All rights reserved. -// - -#import "UIApplication+MemoryLeak.h" -#import "NSObject+MemoryLeak.h" -#import - -#if _INTERNAL_MLF_ENABLED - -extern const void *const kLatestSenderKey; - -@implementation UIApplication (MemoryLeak) - -+ (void)load { - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - [self swizzleSEL:@selector(sendAction:to:from:forEvent:) withSEL:@selector(swizzled_sendAction:to:from:forEvent:)]; - }); -} - -- (BOOL)swizzled_sendAction:(SEL)action to:(id)target from:(id)sender forEvent:(UIEvent *)event { - objc_setAssociatedObject(self, kLatestSenderKey, @((uintptr_t)sender), OBJC_ASSOCIATION_RETAIN); - - return [self swizzled_sendAction:action to:target from:sender forEvent:event]; -} - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UINavigationController+MemoryLeak.h b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UINavigationController+MemoryLeak.h deleted file mode 100644 index 8d201699..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UINavigationController+MemoryLeak.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// UINavigationController+MemoryLeak.h -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import -#import "MLeaksFinder.h" - -#if _INTERNAL_MLF_ENABLED - -@interface UINavigationController (MemoryLeak) - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UINavigationController+MemoryLeak.m b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UINavigationController+MemoryLeak.m deleted file mode 100644 index 94e2add1..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UINavigationController+MemoryLeak.m +++ /dev/null @@ -1,95 +0,0 @@ -// -// UINavigationController+MemoryLeak.m -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import "UINavigationController+MemoryLeak.h" -#import "NSObject+MemoryLeak.h" -#import - -#if _INTERNAL_MLF_ENABLED - -static const void *const kPoppedDetailVCKey = &kPoppedDetailVCKey; - -@implementation UINavigationController (MemoryLeak) - -+ (void)load { - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - [self swizzleSEL:@selector(pushViewController:animated:) withSEL:@selector(swizzled_pushViewController:animated:)]; - [self swizzleSEL:@selector(popViewControllerAnimated:) withSEL:@selector(swizzled_popViewControllerAnimated:)]; - [self swizzleSEL:@selector(popToViewController:animated:) withSEL:@selector(swizzled_popToViewController:animated:)]; - [self swizzleSEL:@selector(popToRootViewControllerAnimated:) withSEL:@selector(swizzled_popToRootViewControllerAnimated:)]; - }); -} - -- (void)swizzled_pushViewController:(UIViewController *)viewController animated:(BOOL)animated { - if (self.splitViewController) { - id detailViewController = objc_getAssociatedObject(self, kPoppedDetailVCKey); - if ([detailViewController isKindOfClass:[UIViewController class]]) { - [detailViewController willDealloc]; - objc_setAssociatedObject(self, kPoppedDetailVCKey, nil, OBJC_ASSOCIATION_RETAIN); - } - } - - [self swizzled_pushViewController:viewController animated:animated]; -} - -- (UIViewController *)swizzled_popViewControllerAnimated:(BOOL)animated { - UIViewController *poppedViewController = [self swizzled_popViewControllerAnimated:animated]; - - if (!poppedViewController) { - return nil; - } - - // Detail VC in UISplitViewController is not dealloced until another detail VC is shown - if (self.splitViewController && - self.splitViewController.viewControllers.firstObject == self && - self.splitViewController == poppedViewController.splitViewController) { - objc_setAssociatedObject(self, kPoppedDetailVCKey, poppedViewController, OBJC_ASSOCIATION_RETAIN); - return poppedViewController; - } - - // VC is not dealloced until disappear when popped using a left-edge swipe gesture - extern const void *const kHasBeenPoppedKey; - objc_setAssociatedObject(poppedViewController, kHasBeenPoppedKey, @(YES), OBJC_ASSOCIATION_RETAIN); - - return poppedViewController; -} - -- (NSArray *)swizzled_popToViewController:(UIViewController *)viewController animated:(BOOL)animated { - NSArray *poppedViewControllers = [self swizzled_popToViewController:viewController animated:animated]; - - for (UIViewController *viewController in poppedViewControllers) { - [viewController willDealloc]; - } - - return poppedViewControllers; -} - -- (NSArray *)swizzled_popToRootViewControllerAnimated:(BOOL)animated { - NSArray *poppedViewControllers = [self swizzled_popToRootViewControllerAnimated:animated]; - - for (UIViewController *viewController in poppedViewControllers) { - [viewController willDealloc]; - } - - return poppedViewControllers; -} - -- (BOOL)willDealloc { - if (![super willDealloc]) { - return NO; - } - - [self willReleaseChildren:self.viewControllers]; - - return YES; -} - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIPageViewController+MemoryLeak.h b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIPageViewController+MemoryLeak.h deleted file mode 100644 index c86b9009..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIPageViewController+MemoryLeak.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// UIPageViewController+MemoryLeak.h -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import -#import "MLeaksFinder.h" - -#if _INTERNAL_MLF_ENABLED - -@interface UIPageViewController (MemoryLeak) - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIPageViewController+MemoryLeak.m b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIPageViewController+MemoryLeak.m deleted file mode 100644 index be088cc2..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIPageViewController+MemoryLeak.m +++ /dev/null @@ -1,28 +0,0 @@ -// -// UIPageViewController+MemoryLeak.m -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import "UIPageViewController+MemoryLeak.h" -#import "NSObject+MemoryLeak.h" - -#if _INTERNAL_MLF_ENABLED - -@implementation UIPageViewController (MemoryLeak) - -- (BOOL)willDealloc { - if (![super willDealloc]) { - return NO; - } - - [self willReleaseChildren:self.viewControllers]; - - return YES; -} - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UISplitViewController+MemoryLeak.h b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UISplitViewController+MemoryLeak.h deleted file mode 100644 index 2fe868d1..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UISplitViewController+MemoryLeak.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// UISplitViewController+MemoryLeak.h -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import -#import "MLeaksFinder.h" - -#if _INTERNAL_MLF_ENABLED - -@interface UISplitViewController (MemoryLeak) - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UISplitViewController+MemoryLeak.m b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UISplitViewController+MemoryLeak.m deleted file mode 100644 index 5143c139..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UISplitViewController+MemoryLeak.m +++ /dev/null @@ -1,28 +0,0 @@ -// -// UISplitViewController+MemoryLeak.m -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import "UISplitViewController+MemoryLeak.h" -#import "NSObject+MemoryLeak.h" - -#if _INTERNAL_MLF_ENABLED - -@implementation UISplitViewController (MemoryLeak) - -- (BOOL)willDealloc { - if (![super willDealloc]) { - return NO; - } - - [self willReleaseChildren:self.viewControllers]; - - return YES; -} - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UITabBarController+MemoryLeak.h b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UITabBarController+MemoryLeak.h deleted file mode 100644 index 561ab41a..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UITabBarController+MemoryLeak.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// UITabBarController+MemoryLeak.h -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import -#import "MLeaksFinder.h" - -#if _INTERNAL_MLF_ENABLED - -@interface UITabBarController (MemoryLeak) - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UITabBarController+MemoryLeak.m b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UITabBarController+MemoryLeak.m deleted file mode 100644 index b9b6e243..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UITabBarController+MemoryLeak.m +++ /dev/null @@ -1,28 +0,0 @@ -// -// UITabBarController+MemoryLeak.m -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import "UITabBarController+MemoryLeak.h" -#import "NSObject+MemoryLeak.h" - -#if _INTERNAL_MLF_ENABLED - -@implementation UITabBarController (MemoryLeak) - -- (BOOL)willDealloc { - if (![super willDealloc]) { - return NO; - } - - [self willReleaseChildren:self.viewControllers]; - - return YES; -} - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UITouch+MemoryLeak.h b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UITouch+MemoryLeak.h deleted file mode 100644 index 1f89c914..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UITouch+MemoryLeak.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// UITouch+MemoryLeak.h -// MLeaksFinder -// -// Created by 佘泽坡 on 8/31/16. -// Copyright © 2016 zeposhe. All rights reserved. -// - -#import -#import "MLeaksFinder.h" - -#if _INTERNAL_MLF_ENABLED - -@interface UITouch (MemoryLeak) - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UITouch+MemoryLeak.m b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UITouch+MemoryLeak.m deleted file mode 100644 index 807ba8ad..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UITouch+MemoryLeak.m +++ /dev/null @@ -1,38 +0,0 @@ -// -// UITouch+MemoryLeak.m -// MLeaksFinder -// -// Created by 佘泽坡 on 8/31/16. -// Copyright © 2016 zeposhe. All rights reserved. -// - -#import "UITouch+MemoryLeak.h" -#import - -#if _INTERNAL_MLF_ENABLED - -extern const void *const kLatestSenderKey; - -@implementation UITouch (MemoryLeak) - -+ (void)load { - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - [self swizzleSEL:@selector(setView:) withSEL:@selector(swizzled_setView:)]; - }); -} - -- (void)swizzled_setView:(UIView *)view { - [self swizzled_setView:view]; - - if (view) { - objc_setAssociatedObject([UIApplication sharedApplication], - kLatestSenderKey, - @((uintptr_t)view), - OBJC_ASSOCIATION_RETAIN); - } -} - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIView+MemoryLeak.h b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIView+MemoryLeak.h deleted file mode 100644 index 908762d3..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIView+MemoryLeak.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// UIView+MemoryLeak.h -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import -#import "MLeaksFinder.h" - -#if _INTERNAL_MLF_ENABLED - -@interface UIView (MemoryLeak) - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIView+MemoryLeak.m b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIView+MemoryLeak.m deleted file mode 100644 index 23ef50e7..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIView+MemoryLeak.m +++ /dev/null @@ -1,28 +0,0 @@ -// -// UIView+MemoryLeak.m -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import "UIView+MemoryLeak.h" -#import "NSObject+MemoryLeak.h" - -#if _INTERNAL_MLF_ENABLED - -@implementation UIView (MemoryLeak) - -- (BOOL)willDealloc { - if (![super willDealloc]) { - return NO; - } - - [self willReleaseChildren:self.subviews]; - - return YES; -} - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIViewController+MemoryLeak.h b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIViewController+MemoryLeak.h deleted file mode 100644 index b646a3eb..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIViewController+MemoryLeak.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// UIViewController+MemoryLeak.h -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import -#import "MLeaksFinder.h" - -#if _INTERNAL_MLF_ENABLED - -@interface UIViewController (MemoryLeak) - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIViewController+MemoryLeak.m b/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIViewController+MemoryLeak.m deleted file mode 100644 index f7dee545..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/MLeaksFinder/UIViewController+MemoryLeak.m +++ /dev/null @@ -1,72 +0,0 @@ -// -// UIViewController+MemoryLeak.m -// MLeaksFinder -// -// Created by zeposhe on 12/12/15. -// Copyright © 2015 zeposhe. All rights reserved. -// - -#import "UIViewController+MemoryLeak.h" -#import "NSObject+MemoryLeak.h" -#import - -#if _INTERNAL_MLF_ENABLED - -const void *const kHasBeenPoppedKey = &kHasBeenPoppedKey; - -@implementation UIViewController (MemoryLeak) - -+ (void)load { - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - [self swizzleSEL:@selector(viewDidDisappear:) withSEL:@selector(swizzled_viewDidDisappear:)]; - [self swizzleSEL:@selector(viewWillAppear:) withSEL:@selector(swizzled_viewWillAppear:)]; - [self swizzleSEL:@selector(dismissViewControllerAnimated:completion:) withSEL:@selector(swizzled_dismissViewControllerAnimated:completion:)]; - }); -} - -- (void)swizzled_viewDidDisappear:(BOOL)animated { - [self swizzled_viewDidDisappear:animated]; - - if ([objc_getAssociatedObject(self, kHasBeenPoppedKey) boolValue]) { - [self willDealloc]; - } -} - -- (void)swizzled_viewWillAppear:(BOOL)animated { - [self swizzled_viewWillAppear:animated]; - - objc_setAssociatedObject(self, kHasBeenPoppedKey, @(NO), OBJC_ASSOCIATION_RETAIN); -} - -- (void)swizzled_dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion { - [self swizzled_dismissViewControllerAnimated:flag completion:completion]; - - UIViewController *dismissedViewController = self.presentedViewController; - if (!dismissedViewController && self.presentingViewController) { - dismissedViewController = self; - } - - if (!dismissedViewController) return; - - [dismissedViewController willDealloc]; -} - -- (BOOL)willDealloc { - if (![super willDealloc]) { - return NO; - } - - [self willReleaseChildren:self.childViewControllers]; - [self willReleaseChild:self.presentedViewController]; - - if (self.isViewLoaded) { - [self willReleaseChild:self.view]; - } - - return YES; -} - -@end - -#endif diff --git a/iOS_Tips/Pods/MLeaksFinder/README-CN.md b/iOS_Tips/Pods/MLeaksFinder/README-CN.md deleted file mode 100644 index 1e87e494..00000000 --- a/iOS_Tips/Pods/MLeaksFinder/README-CN.md +++ /dev/null @@ -1,19 +0,0 @@ -# FAQ -**1) 引进 MLeaksFinder 后没生效?** - -* 先验证引进是否正确,在 UIViewController+MemoryLeak.m 的 `+ (void)load` 方法里加断点,app 启动时进入该方法则引进成功,否则引进失败。 -* 用 CocoaPods 安装时注意有没有 warnings,特别是 `OTHER_LDFLAGS` 相关的 warnings。如果有 warnings,可以在主工程的 Build Settings -> Other Linker Flags 加上 `-ObjC`。 - -**2) 可以手动引进 MLeaksFinder 吗?** - -* 直接把 MLeaksFinder 的代码放到项目里即生效。如果把 MLeaksFinder 做为子工程,需要在主工程的 Build Settings -> Other Linker Flags 加上 `-ObjC`。 -* 引进 MLeaksFinder 的代码后即可检测内存泄漏,但查找循环引用的功能还未生效。可以再手动加入 FBRetainCycleDetector 代码,然后把 MLeaksFinder.h 里的 `//#define MEMORY_LEAKS_FINDER_RETAIN_CYCLE_ENABLED 1` 打开。 - -**3) Fail to find a retain cycle?** - -* 内存泄漏不一定是循环引用造成的。 -* 有的循环引用 FBRetainCycleDetector 不一定能找出。 - -**4) 如何关掉 MLeaksFinder?** - -* MLeaksFinder 默认只在 debug 下生效,当然也可以通过 MLeaksFinder.h 里的 `//#define MEMORY_LEAKS_FINDER_ENABLED 0` 来手动控制开关。 diff --git a/iOS_Tips/Pods/Manifest.lock b/iOS_Tips/Pods/Manifest.lock deleted file mode 100644 index 3be33660..00000000 --- a/iOS_Tips/Pods/Manifest.lock +++ /dev/null @@ -1,43 +0,0 @@ -PODS: - - GPUImage (0.1.7) - - Masonry (1.1.0) - - MBProgressHUD (1.1.0) - - YYCache (1.0.4) - - YYImage (1.0.4): - - YYImage/Core (= 1.0.4) - - YYImage/Core (1.0.4) - - YYModel (1.0.4) - - YYWebImage (1.0.5): - - YYCache - - YYImage - -DEPENDENCIES: - - GPUImage - - Masonry - - MBProgressHUD - - YYImage - - YYModel - - YYWebImage - -SPEC REPOS: - https://github.com/CocoaPods/Specs.git: - - GPUImage - - Masonry - - MBProgressHUD - - YYCache - - YYImage - - YYModel - - YYWebImage - -SPEC CHECKSUMS: - GPUImage: 733a5f0fab92df9de1c37ba9df520a833ccb406d - Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 - MBProgressHUD: e7baa36a220447d8aeb12769bf0585582f3866d9 - YYCache: 8105b6638f5e849296c71f331ff83891a4942952 - YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54 - YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30 - YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928 - -PODFILE CHECKSUM: b400933f5b26aee061a3055185a9866897951c9e - -COCOAPODS: 1.9.1 diff --git a/iOS_Tips/Pods/Masonry/LICENSE b/iOS_Tips/Pods/Masonry/LICENSE deleted file mode 100644 index a843c00c..00000000 --- a/iOS_Tips/Pods/Masonry/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASCompositeConstraint.h b/iOS_Tips/Pods/Masonry/Masonry/MASCompositeConstraint.h deleted file mode 100644 index 934c6f16..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASCompositeConstraint.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// MASCompositeConstraint.h -// Masonry -// -// Created by Jonas Budelmann on 21/07/13. -// Copyright (c) 2013 cloudling. All rights reserved. -// - -#import "MASConstraint.h" -#import "MASUtilities.h" - -/** - * A group of MASConstraint objects - */ -@interface MASCompositeConstraint : MASConstraint - -/** - * Creates a composite with a predefined array of children - * - * @param children child MASConstraints - * - * @return a composite constraint - */ -- (id)initWithChildren:(NSArray *)children; - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASCompositeConstraint.m b/iOS_Tips/Pods/Masonry/Masonry/MASCompositeConstraint.m deleted file mode 100644 index 2002a405..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASCompositeConstraint.m +++ /dev/null @@ -1,183 +0,0 @@ -// -// MASCompositeConstraint.m -// Masonry -// -// Created by Jonas Budelmann on 21/07/13. -// Copyright (c) 2013 cloudling. All rights reserved. -// - -#import "MASCompositeConstraint.h" -#import "MASConstraint+Private.h" - -@interface MASCompositeConstraint () - -@property (nonatomic, strong) id mas_key; -@property (nonatomic, strong) NSMutableArray *childConstraints; - -@end - -@implementation MASCompositeConstraint - -- (id)initWithChildren:(NSArray *)children { - self = [super init]; - if (!self) return nil; - - _childConstraints = [children mutableCopy]; - for (MASConstraint *constraint in _childConstraints) { - constraint.delegate = self; - } - - return self; -} - -#pragma mark - MASConstraintDelegate - -- (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { - NSUInteger index = [self.childConstraints indexOfObject:constraint]; - NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint); - [self.childConstraints replaceObjectAtIndex:index withObject:replacementConstraint]; -} - -- (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { - id strongDelegate = self.delegate; - MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; - newConstraint.delegate = self; - [self.childConstraints addObject:newConstraint]; - return newConstraint; -} - -#pragma mark - NSLayoutConstraint multiplier proxies - -- (MASConstraint * (^)(CGFloat))multipliedBy { - return ^id(CGFloat multiplier) { - for (MASConstraint *constraint in self.childConstraints) { - constraint.multipliedBy(multiplier); - } - return self; - }; -} - -- (MASConstraint * (^)(CGFloat))dividedBy { - return ^id(CGFloat divider) { - for (MASConstraint *constraint in self.childConstraints) { - constraint.dividedBy(divider); - } - return self; - }; -} - -#pragma mark - MASLayoutPriority proxy - -- (MASConstraint * (^)(MASLayoutPriority))priority { - return ^id(MASLayoutPriority priority) { - for (MASConstraint *constraint in self.childConstraints) { - constraint.priority(priority); - } - return self; - }; -} - -#pragma mark - NSLayoutRelation proxy - -- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { - return ^id(id attr, NSLayoutRelation relation) { - for (MASConstraint *constraint in self.childConstraints.copy) { - constraint.equalToWithRelation(attr, relation); - } - return self; - }; -} - -#pragma mark - attribute chaining - -- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { - [self constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; - return self; -} - -#pragma mark - Animator proxy - -#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) - -- (MASConstraint *)animator { - for (MASConstraint *constraint in self.childConstraints) { - [constraint animator]; - } - return self; -} - -#endif - -#pragma mark - debug helpers - -- (MASConstraint * (^)(id))key { - return ^id(id key) { - self.mas_key = key; - int i = 0; - for (MASConstraint *constraint in self.childConstraints) { - constraint.key([NSString stringWithFormat:@"%@[%d]", key, i++]); - } - return self; - }; -} - -#pragma mark - NSLayoutConstraint constant setters - -- (void)setInsets:(MASEdgeInsets)insets { - for (MASConstraint *constraint in self.childConstraints) { - constraint.insets = insets; - } -} - -- (void)setInset:(CGFloat)inset { - for (MASConstraint *constraint in self.childConstraints) { - constraint.inset = inset; - } -} - -- (void)setOffset:(CGFloat)offset { - for (MASConstraint *constraint in self.childConstraints) { - constraint.offset = offset; - } -} - -- (void)setSizeOffset:(CGSize)sizeOffset { - for (MASConstraint *constraint in self.childConstraints) { - constraint.sizeOffset = sizeOffset; - } -} - -- (void)setCenterOffset:(CGPoint)centerOffset { - for (MASConstraint *constraint in self.childConstraints) { - constraint.centerOffset = centerOffset; - } -} - -#pragma mark - MASConstraint - -- (void)activate { - for (MASConstraint *constraint in self.childConstraints) { - [constraint activate]; - } -} - -- (void)deactivate { - for (MASConstraint *constraint in self.childConstraints) { - [constraint deactivate]; - } -} - -- (void)install { - for (MASConstraint *constraint in self.childConstraints) { - constraint.updateExisting = self.updateExisting; - [constraint install]; - } -} - -- (void)uninstall { - for (MASConstraint *constraint in self.childConstraints) { - [constraint uninstall]; - } -} - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASConstraint+Private.h b/iOS_Tips/Pods/Masonry/Masonry/MASConstraint+Private.h deleted file mode 100644 index ee0fd960..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASConstraint+Private.h +++ /dev/null @@ -1,66 +0,0 @@ -// -// MASConstraint+Private.h -// Masonry -// -// Created by Nick Tymchenko on 29/04/14. -// Copyright (c) 2014 cloudling. All rights reserved. -// - -#import "MASConstraint.h" - -@protocol MASConstraintDelegate; - - -@interface MASConstraint () - -/** - * Whether or not to check for an existing constraint instead of adding constraint - */ -@property (nonatomic, assign) BOOL updateExisting; - -/** - * Usually MASConstraintMaker but could be a parent MASConstraint - */ -@property (nonatomic, weak) id delegate; - -/** - * Based on a provided value type, is equal to calling: - * NSNumber - setOffset: - * NSValue with CGPoint - setPointOffset: - * NSValue with CGSize - setSizeOffset: - * NSValue with MASEdgeInsets - setInsets: - */ -- (void)setLayoutConstantWithValue:(NSValue *)value; - -@end - - -@interface MASConstraint (Abstract) - -/** - * Sets the constraint relation to given NSLayoutRelation - * returns a block which accepts one of the following: - * MASViewAttribute, UIView, NSValue, NSArray - * see readme for more details. - */ -- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation; - -/** - * Override to set a custom chaining behaviour - */ -- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; - -@end - - -@protocol MASConstraintDelegate - -/** - * Notifies the delegate when the constraint needs to be replaced with another constraint. For example - * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks - */ -- (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint; - -- (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASConstraint.h b/iOS_Tips/Pods/Masonry/Masonry/MASConstraint.h deleted file mode 100644 index 3eaa8a10..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASConstraint.h +++ /dev/null @@ -1,272 +0,0 @@ -// -// MASConstraint.h -// Masonry -// -// Created by Jonas Budelmann on 22/07/13. -// Copyright (c) 2013 cloudling. All rights reserved. -// - -#import "MASUtilities.h" - -/** - * Enables Constraints to be created with chainable syntax - * Constraint can represent single NSLayoutConstraint (MASViewConstraint) - * or a group of NSLayoutConstraints (MASComposisteConstraint) - */ -@interface MASConstraint : NSObject - -// Chaining Support - -/** - * Modifies the NSLayoutConstraint constant, - * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following - * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight - */ -- (MASConstraint * (^)(MASEdgeInsets insets))insets; - -/** - * Modifies the NSLayoutConstraint constant, - * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following - * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight - */ -- (MASConstraint * (^)(CGFloat inset))inset; - -/** - * Modifies the NSLayoutConstraint constant, - * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following - * NSLayoutAttributeWidth, NSLayoutAttributeHeight - */ -- (MASConstraint * (^)(CGSize offset))sizeOffset; - -/** - * Modifies the NSLayoutConstraint constant, - * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following - * NSLayoutAttributeCenterX, NSLayoutAttributeCenterY - */ -- (MASConstraint * (^)(CGPoint offset))centerOffset; - -/** - * Modifies the NSLayoutConstraint constant - */ -- (MASConstraint * (^)(CGFloat offset))offset; - -/** - * Modifies the NSLayoutConstraint constant based on a value type - */ -- (MASConstraint * (^)(NSValue *value))valueOffset; - -/** - * Sets the NSLayoutConstraint multiplier property - */ -- (MASConstraint * (^)(CGFloat multiplier))multipliedBy; - -/** - * Sets the NSLayoutConstraint multiplier to 1.0/dividedBy - */ -- (MASConstraint * (^)(CGFloat divider))dividedBy; - -/** - * Sets the NSLayoutConstraint priority to a float or MASLayoutPriority - */ -- (MASConstraint * (^)(MASLayoutPriority priority))priority; - -/** - * Sets the NSLayoutConstraint priority to MASLayoutPriorityLow - */ -- (MASConstraint * (^)(void))priorityLow; - -/** - * Sets the NSLayoutConstraint priority to MASLayoutPriorityMedium - */ -- (MASConstraint * (^)(void))priorityMedium; - -/** - * Sets the NSLayoutConstraint priority to MASLayoutPriorityHigh - */ -- (MASConstraint * (^)(void))priorityHigh; - -/** - * Sets the constraint relation to NSLayoutRelationEqual - * returns a block which accepts one of the following: - * MASViewAttribute, UIView, NSValue, NSArray - * see readme for more details. - */ -- (MASConstraint * (^)(id attr))equalTo; - -/** - * Sets the constraint relation to NSLayoutRelationGreaterThanOrEqual - * returns a block which accepts one of the following: - * MASViewAttribute, UIView, NSValue, NSArray - * see readme for more details. - */ -- (MASConstraint * (^)(id attr))greaterThanOrEqualTo; - -/** - * Sets the constraint relation to NSLayoutRelationLessThanOrEqual - * returns a block which accepts one of the following: - * MASViewAttribute, UIView, NSValue, NSArray - * see readme for more details. - */ -- (MASConstraint * (^)(id attr))lessThanOrEqualTo; - -/** - * Optional semantic property which has no effect but improves the readability of constraint - */ -- (MASConstraint *)with; - -/** - * Optional semantic property which has no effect but improves the readability of constraint - */ -- (MASConstraint *)and; - -/** - * Creates a new MASCompositeConstraint with the called attribute and reciever - */ -- (MASConstraint *)left; -- (MASConstraint *)top; -- (MASConstraint *)right; -- (MASConstraint *)bottom; -- (MASConstraint *)leading; -- (MASConstraint *)trailing; -- (MASConstraint *)width; -- (MASConstraint *)height; -- (MASConstraint *)centerX; -- (MASConstraint *)centerY; -- (MASConstraint *)baseline; - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - -- (MASConstraint *)firstBaseline; -- (MASConstraint *)lastBaseline; - -#endif - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - -- (MASConstraint *)leftMargin; -- (MASConstraint *)rightMargin; -- (MASConstraint *)topMargin; -- (MASConstraint *)bottomMargin; -- (MASConstraint *)leadingMargin; -- (MASConstraint *)trailingMargin; -- (MASConstraint *)centerXWithinMargins; -- (MASConstraint *)centerYWithinMargins; - -#endif - - -/** - * Sets the constraint debug name - */ -- (MASConstraint * (^)(id key))key; - -// NSLayoutConstraint constant Setters -// for use outside of mas_updateConstraints/mas_makeConstraints blocks - -/** - * Modifies the NSLayoutConstraint constant, - * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following - * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight - */ -- (void)setInsets:(MASEdgeInsets)insets; - -/** - * Modifies the NSLayoutConstraint constant, - * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following - * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight - */ -- (void)setInset:(CGFloat)inset; - -/** - * Modifies the NSLayoutConstraint constant, - * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following - * NSLayoutAttributeWidth, NSLayoutAttributeHeight - */ -- (void)setSizeOffset:(CGSize)sizeOffset; - -/** - * Modifies the NSLayoutConstraint constant, - * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following - * NSLayoutAttributeCenterX, NSLayoutAttributeCenterY - */ -- (void)setCenterOffset:(CGPoint)centerOffset; - -/** - * Modifies the NSLayoutConstraint constant - */ -- (void)setOffset:(CGFloat)offset; - - -// NSLayoutConstraint Installation support - -#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) -/** - * Whether or not to go through the animator proxy when modifying the constraint - */ -@property (nonatomic, copy, readonly) MASConstraint *animator; -#endif - -/** - * Activates an NSLayoutConstraint if it's supported by an OS. - * Invokes install otherwise. - */ -- (void)activate; - -/** - * Deactivates previously installed/activated NSLayoutConstraint. - */ -- (void)deactivate; - -/** - * Creates a NSLayoutConstraint and adds it to the appropriate view. - */ -- (void)install; - -/** - * Removes previously installed NSLayoutConstraint - */ -- (void)uninstall; - -@end - - -/** - * Convenience auto-boxing macros for MASConstraint methods. - * - * Defining MAS_SHORTHAND_GLOBALS will turn on auto-boxing for default syntax. - * A potential drawback of this is that the unprefixed macros will appear in global scope. - */ -#define mas_equalTo(...) equalTo(MASBoxValue((__VA_ARGS__))) -#define mas_greaterThanOrEqualTo(...) greaterThanOrEqualTo(MASBoxValue((__VA_ARGS__))) -#define mas_lessThanOrEqualTo(...) lessThanOrEqualTo(MASBoxValue((__VA_ARGS__))) - -#define mas_offset(...) valueOffset(MASBoxValue((__VA_ARGS__))) - - -#ifdef MAS_SHORTHAND_GLOBALS - -#define equalTo(...) mas_equalTo(__VA_ARGS__) -#define greaterThanOrEqualTo(...) mas_greaterThanOrEqualTo(__VA_ARGS__) -#define lessThanOrEqualTo(...) mas_lessThanOrEqualTo(__VA_ARGS__) - -#define offset(...) mas_offset(__VA_ARGS__) - -#endif - - -@interface MASConstraint (AutoboxingSupport) - -/** - * Aliases to corresponding relation methods (for shorthand macros) - * Also needed to aid autocompletion - */ -- (MASConstraint * (^)(id attr))mas_equalTo; -- (MASConstraint * (^)(id attr))mas_greaterThanOrEqualTo; -- (MASConstraint * (^)(id attr))mas_lessThanOrEqualTo; - -/** - * A dummy method to aid autocompletion - */ -- (MASConstraint * (^)(id offset))mas_offset; - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASConstraint.m b/iOS_Tips/Pods/Masonry/Masonry/MASConstraint.m deleted file mode 100644 index 52de590c..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASConstraint.m +++ /dev/null @@ -1,301 +0,0 @@ -// -// MASConstraint.m -// Masonry -// -// Created by Nick Tymchenko on 1/20/14. -// - -#import "MASConstraint.h" -#import "MASConstraint+Private.h" - -#define MASMethodNotImplemented() \ - @throw [NSException exceptionWithName:NSInternalInconsistencyException \ - reason:[NSString stringWithFormat:@"You must override %@ in a subclass.", NSStringFromSelector(_cmd)] \ - userInfo:nil] - -@implementation MASConstraint - -#pragma mark - Init - -- (id)init { - NSAssert(![self isMemberOfClass:[MASConstraint class]], @"MASConstraint is an abstract class, you should not instantiate it directly."); - return [super init]; -} - -#pragma mark - NSLayoutRelation proxies - -- (MASConstraint * (^)(id))equalTo { - return ^id(id attribute) { - return self.equalToWithRelation(attribute, NSLayoutRelationEqual); - }; -} - -- (MASConstraint * (^)(id))mas_equalTo { - return ^id(id attribute) { - return self.equalToWithRelation(attribute, NSLayoutRelationEqual); - }; -} - -- (MASConstraint * (^)(id))greaterThanOrEqualTo { - return ^id(id attribute) { - return self.equalToWithRelation(attribute, NSLayoutRelationGreaterThanOrEqual); - }; -} - -- (MASConstraint * (^)(id))mas_greaterThanOrEqualTo { - return ^id(id attribute) { - return self.equalToWithRelation(attribute, NSLayoutRelationGreaterThanOrEqual); - }; -} - -- (MASConstraint * (^)(id))lessThanOrEqualTo { - return ^id(id attribute) { - return self.equalToWithRelation(attribute, NSLayoutRelationLessThanOrEqual); - }; -} - -- (MASConstraint * (^)(id))mas_lessThanOrEqualTo { - return ^id(id attribute) { - return self.equalToWithRelation(attribute, NSLayoutRelationLessThanOrEqual); - }; -} - -#pragma mark - MASLayoutPriority proxies - -- (MASConstraint * (^)(void))priorityLow { - return ^id{ - self.priority(MASLayoutPriorityDefaultLow); - return self; - }; -} - -- (MASConstraint * (^)(void))priorityMedium { - return ^id{ - self.priority(MASLayoutPriorityDefaultMedium); - return self; - }; -} - -- (MASConstraint * (^)(void))priorityHigh { - return ^id{ - self.priority(MASLayoutPriorityDefaultHigh); - return self; - }; -} - -#pragma mark - NSLayoutConstraint constant proxies - -- (MASConstraint * (^)(MASEdgeInsets))insets { - return ^id(MASEdgeInsets insets){ - self.insets = insets; - return self; - }; -} - -- (MASConstraint * (^)(CGFloat))inset { - return ^id(CGFloat inset){ - self.inset = inset; - return self; - }; -} - -- (MASConstraint * (^)(CGSize))sizeOffset { - return ^id(CGSize offset) { - self.sizeOffset = offset; - return self; - }; -} - -- (MASConstraint * (^)(CGPoint))centerOffset { - return ^id(CGPoint offset) { - self.centerOffset = offset; - return self; - }; -} - -- (MASConstraint * (^)(CGFloat))offset { - return ^id(CGFloat offset){ - self.offset = offset; - return self; - }; -} - -- (MASConstraint * (^)(NSValue *value))valueOffset { - return ^id(NSValue *offset) { - NSAssert([offset isKindOfClass:NSValue.class], @"expected an NSValue offset, got: %@", offset); - [self setLayoutConstantWithValue:offset]; - return self; - }; -} - -- (MASConstraint * (^)(id offset))mas_offset { - // Will never be called due to macro - return nil; -} - -#pragma mark - NSLayoutConstraint constant setter - -- (void)setLayoutConstantWithValue:(NSValue *)value { - if ([value isKindOfClass:NSNumber.class]) { - self.offset = [(NSNumber *)value doubleValue]; - } else if (strcmp(value.objCType, @encode(CGPoint)) == 0) { - CGPoint point; - [value getValue:&point]; - self.centerOffset = point; - } else if (strcmp(value.objCType, @encode(CGSize)) == 0) { - CGSize size; - [value getValue:&size]; - self.sizeOffset = size; - } else if (strcmp(value.objCType, @encode(MASEdgeInsets)) == 0) { - MASEdgeInsets insets; - [value getValue:&insets]; - self.insets = insets; - } else { - NSAssert(NO, @"attempting to set layout constant with unsupported value: %@", value); - } -} - -#pragma mark - Semantic properties - -- (MASConstraint *)with { - return self; -} - -- (MASConstraint *)and { - return self; -} - -#pragma mark - Chaining - -- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute __unused)layoutAttribute { - MASMethodNotImplemented(); -} - -- (MASConstraint *)left { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeft]; -} - -- (MASConstraint *)top { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTop]; -} - -- (MASConstraint *)right { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRight]; -} - -- (MASConstraint *)bottom { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottom]; -} - -- (MASConstraint *)leading { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeading]; -} - -- (MASConstraint *)trailing { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailing]; -} - -- (MASConstraint *)width { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeWidth]; -} - -- (MASConstraint *)height { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeHeight]; -} - -- (MASConstraint *)centerX { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterX]; -} - -- (MASConstraint *)centerY { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterY]; -} - -- (MASConstraint *)baseline { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBaseline]; -} - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - -- (MASConstraint *)firstBaseline { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline]; -} -- (MASConstraint *)lastBaseline { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline]; -} - -#endif - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - -- (MASConstraint *)leftMargin { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin]; -} - -- (MASConstraint *)rightMargin { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRightMargin]; -} - -- (MASConstraint *)topMargin { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTopMargin]; -} - -- (MASConstraint *)bottomMargin { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottomMargin]; -} - -- (MASConstraint *)leadingMargin { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeadingMargin]; -} - -- (MASConstraint *)trailingMargin { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailingMargin]; -} - -- (MASConstraint *)centerXWithinMargins { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterXWithinMargins]; -} - -- (MASConstraint *)centerYWithinMargins { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterYWithinMargins]; -} - -#endif - -#pragma mark - Abstract - -- (MASConstraint * (^)(CGFloat multiplier))multipliedBy { MASMethodNotImplemented(); } - -- (MASConstraint * (^)(CGFloat divider))dividedBy { MASMethodNotImplemented(); } - -- (MASConstraint * (^)(MASLayoutPriority priority))priority { MASMethodNotImplemented(); } - -- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { MASMethodNotImplemented(); } - -- (MASConstraint * (^)(id key))key { MASMethodNotImplemented(); } - -- (void)setInsets:(MASEdgeInsets __unused)insets { MASMethodNotImplemented(); } - -- (void)setInset:(CGFloat __unused)inset { MASMethodNotImplemented(); } - -- (void)setSizeOffset:(CGSize __unused)sizeOffset { MASMethodNotImplemented(); } - -- (void)setCenterOffset:(CGPoint __unused)centerOffset { MASMethodNotImplemented(); } - -- (void)setOffset:(CGFloat __unused)offset { MASMethodNotImplemented(); } - -#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) - -- (MASConstraint *)animator { MASMethodNotImplemented(); } - -#endif - -- (void)activate { MASMethodNotImplemented(); } - -- (void)deactivate { MASMethodNotImplemented(); } - -- (void)install { MASMethodNotImplemented(); } - -- (void)uninstall { MASMethodNotImplemented(); } - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASConstraintMaker.h b/iOS_Tips/Pods/Masonry/Masonry/MASConstraintMaker.h deleted file mode 100644 index d9b58f4f..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASConstraintMaker.h +++ /dev/null @@ -1,146 +0,0 @@ -// -// MASConstraintMaker.h -// Masonry -// -// Created by Jonas Budelmann on 20/07/13. -// Copyright (c) 2013 cloudling. All rights reserved. -// - -#import "MASConstraint.h" -#import "MASUtilities.h" - -typedef NS_OPTIONS(NSInteger, MASAttribute) { - MASAttributeLeft = 1 << NSLayoutAttributeLeft, - MASAttributeRight = 1 << NSLayoutAttributeRight, - MASAttributeTop = 1 << NSLayoutAttributeTop, - MASAttributeBottom = 1 << NSLayoutAttributeBottom, - MASAttributeLeading = 1 << NSLayoutAttributeLeading, - MASAttributeTrailing = 1 << NSLayoutAttributeTrailing, - MASAttributeWidth = 1 << NSLayoutAttributeWidth, - MASAttributeHeight = 1 << NSLayoutAttributeHeight, - MASAttributeCenterX = 1 << NSLayoutAttributeCenterX, - MASAttributeCenterY = 1 << NSLayoutAttributeCenterY, - MASAttributeBaseline = 1 << NSLayoutAttributeBaseline, - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - - MASAttributeFirstBaseline = 1 << NSLayoutAttributeFirstBaseline, - MASAttributeLastBaseline = 1 << NSLayoutAttributeLastBaseline, - -#endif - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - - MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin, - MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin, - MASAttributeTopMargin = 1 << NSLayoutAttributeTopMargin, - MASAttributeBottomMargin = 1 << NSLayoutAttributeBottomMargin, - MASAttributeLeadingMargin = 1 << NSLayoutAttributeLeadingMargin, - MASAttributeTrailingMargin = 1 << NSLayoutAttributeTrailingMargin, - MASAttributeCenterXWithinMargins = 1 << NSLayoutAttributeCenterXWithinMargins, - MASAttributeCenterYWithinMargins = 1 << NSLayoutAttributeCenterYWithinMargins, - -#endif - -}; - -/** - * Provides factory methods for creating MASConstraints. - * Constraints are collected until they are ready to be installed - * - */ -@interface MASConstraintMaker : NSObject - -/** - * The following properties return a new MASViewConstraint - * with the first item set to the makers associated view and the appropriate MASViewAttribute - */ -@property (nonatomic, strong, readonly) MASConstraint *left; -@property (nonatomic, strong, readonly) MASConstraint *top; -@property (nonatomic, strong, readonly) MASConstraint *right; -@property (nonatomic, strong, readonly) MASConstraint *bottom; -@property (nonatomic, strong, readonly) MASConstraint *leading; -@property (nonatomic, strong, readonly) MASConstraint *trailing; -@property (nonatomic, strong, readonly) MASConstraint *width; -@property (nonatomic, strong, readonly) MASConstraint *height; -@property (nonatomic, strong, readonly) MASConstraint *centerX; -@property (nonatomic, strong, readonly) MASConstraint *centerY; -@property (nonatomic, strong, readonly) MASConstraint *baseline; - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - -@property (nonatomic, strong, readonly) MASConstraint *firstBaseline; -@property (nonatomic, strong, readonly) MASConstraint *lastBaseline; - -#endif - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - -@property (nonatomic, strong, readonly) MASConstraint *leftMargin; -@property (nonatomic, strong, readonly) MASConstraint *rightMargin; -@property (nonatomic, strong, readonly) MASConstraint *topMargin; -@property (nonatomic, strong, readonly) MASConstraint *bottomMargin; -@property (nonatomic, strong, readonly) MASConstraint *leadingMargin; -@property (nonatomic, strong, readonly) MASConstraint *trailingMargin; -@property (nonatomic, strong, readonly) MASConstraint *centerXWithinMargins; -@property (nonatomic, strong, readonly) MASConstraint *centerYWithinMargins; - -#endif - -/** - * Returns a block which creates a new MASCompositeConstraint with the first item set - * to the makers associated view and children corresponding to the set bits in the - * MASAttribute parameter. Combine multiple attributes via binary-or. - */ -@property (nonatomic, strong, readonly) MASConstraint *(^attributes)(MASAttribute attrs); - -/** - * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges - * which generates the appropriate MASViewConstraint children (top, left, bottom, right) - * with the first item set to the makers associated view - */ -@property (nonatomic, strong, readonly) MASConstraint *edges; - -/** - * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeSize - * which generates the appropriate MASViewConstraint children (width, height) - * with the first item set to the makers associated view - */ -@property (nonatomic, strong, readonly) MASConstraint *size; - -/** - * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeCenter - * which generates the appropriate MASViewConstraint children (centerX, centerY) - * with the first item set to the makers associated view - */ -@property (nonatomic, strong, readonly) MASConstraint *center; - -/** - * Whether or not to check for an existing constraint instead of adding constraint - */ -@property (nonatomic, assign) BOOL updateExisting; - -/** - * Whether or not to remove existing constraints prior to installing - */ -@property (nonatomic, assign) BOOL removeExisting; - -/** - * initialises the maker with a default view - * - * @param view any MASConstraint are created with this view as the first item - * - * @return a new MASConstraintMaker - */ -- (id)initWithView:(MAS_VIEW *)view; - -/** - * Calls install method on any MASConstraints which have been created by this maker - * - * @return an array of all the installed MASConstraints - */ -- (NSArray *)install; - -- (MASConstraint * (^)(dispatch_block_t))group; - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASConstraintMaker.m b/iOS_Tips/Pods/Masonry/Masonry/MASConstraintMaker.m deleted file mode 100644 index f11492ab..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASConstraintMaker.m +++ /dev/null @@ -1,273 +0,0 @@ -// -// MASConstraintMaker.m -// Masonry -// -// Created by Jonas Budelmann on 20/07/13. -// Copyright (c) 2013 cloudling. All rights reserved. -// - -#import "MASConstraintMaker.h" -#import "MASViewConstraint.h" -#import "MASCompositeConstraint.h" -#import "MASConstraint+Private.h" -#import "MASViewAttribute.h" -#import "View+MASAdditions.h" - -@interface MASConstraintMaker () - -@property (nonatomic, weak) MAS_VIEW *view; -@property (nonatomic, strong) NSMutableArray *constraints; - -@end - -@implementation MASConstraintMaker - -- (id)initWithView:(MAS_VIEW *)view { - self = [super init]; - if (!self) return nil; - - self.view = view; - self.constraints = NSMutableArray.new; - - return self; -} - -- (NSArray *)install { - if (self.removeExisting) { - NSArray *installedConstraints = [MASViewConstraint installedConstraintsForView:self.view]; - for (MASConstraint *constraint in installedConstraints) { - [constraint uninstall]; - } - } - NSArray *constraints = self.constraints.copy; - for (MASConstraint *constraint in constraints) { - constraint.updateExisting = self.updateExisting; - [constraint install]; - } - [self.constraints removeAllObjects]; - return constraints; -} - -#pragma mark - MASConstraintDelegate - -- (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { - NSUInteger index = [self.constraints indexOfObject:constraint]; - NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint); - [self.constraints replaceObjectAtIndex:index withObject:replacementConstraint]; -} - -- (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { - MASViewAttribute *viewAttribute = [[MASViewAttribute alloc] initWithView:self.view layoutAttribute:layoutAttribute]; - MASViewConstraint *newConstraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:viewAttribute]; - if ([constraint isKindOfClass:MASViewConstraint.class]) { - //replace with composite constraint - NSArray *children = @[constraint, newConstraint]; - MASCompositeConstraint *compositeConstraint = [[MASCompositeConstraint alloc] initWithChildren:children]; - compositeConstraint.delegate = self; - [self constraint:constraint shouldBeReplacedWithConstraint:compositeConstraint]; - return compositeConstraint; - } - if (!constraint) { - newConstraint.delegate = self; - [self.constraints addObject:newConstraint]; - } - return newConstraint; -} - -- (MASConstraint *)addConstraintWithAttributes:(MASAttribute)attrs { - __unused MASAttribute anyAttribute = (MASAttributeLeft | MASAttributeRight | MASAttributeTop | MASAttributeBottom | MASAttributeLeading - | MASAttributeTrailing | MASAttributeWidth | MASAttributeHeight | MASAttributeCenterX - | MASAttributeCenterY | MASAttributeBaseline -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - | MASAttributeFirstBaseline | MASAttributeLastBaseline -#endif -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - | MASAttributeLeftMargin | MASAttributeRightMargin | MASAttributeTopMargin | MASAttributeBottomMargin - | MASAttributeLeadingMargin | MASAttributeTrailingMargin | MASAttributeCenterXWithinMargins - | MASAttributeCenterYWithinMargins -#endif - ); - - NSAssert((attrs & anyAttribute) != 0, @"You didn't pass any attribute to make.attributes(...)"); - - NSMutableArray *attributes = [NSMutableArray array]; - - if (attrs & MASAttributeLeft) [attributes addObject:self.view.mas_left]; - if (attrs & MASAttributeRight) [attributes addObject:self.view.mas_right]; - if (attrs & MASAttributeTop) [attributes addObject:self.view.mas_top]; - if (attrs & MASAttributeBottom) [attributes addObject:self.view.mas_bottom]; - if (attrs & MASAttributeLeading) [attributes addObject:self.view.mas_leading]; - if (attrs & MASAttributeTrailing) [attributes addObject:self.view.mas_trailing]; - if (attrs & MASAttributeWidth) [attributes addObject:self.view.mas_width]; - if (attrs & MASAttributeHeight) [attributes addObject:self.view.mas_height]; - if (attrs & MASAttributeCenterX) [attributes addObject:self.view.mas_centerX]; - if (attrs & MASAttributeCenterY) [attributes addObject:self.view.mas_centerY]; - if (attrs & MASAttributeBaseline) [attributes addObject:self.view.mas_baseline]; - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - - if (attrs & MASAttributeFirstBaseline) [attributes addObject:self.view.mas_firstBaseline]; - if (attrs & MASAttributeLastBaseline) [attributes addObject:self.view.mas_lastBaseline]; - -#endif - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - - if (attrs & MASAttributeLeftMargin) [attributes addObject:self.view.mas_leftMargin]; - if (attrs & MASAttributeRightMargin) [attributes addObject:self.view.mas_rightMargin]; - if (attrs & MASAttributeTopMargin) [attributes addObject:self.view.mas_topMargin]; - if (attrs & MASAttributeBottomMargin) [attributes addObject:self.view.mas_bottomMargin]; - if (attrs & MASAttributeLeadingMargin) [attributes addObject:self.view.mas_leadingMargin]; - if (attrs & MASAttributeTrailingMargin) [attributes addObject:self.view.mas_trailingMargin]; - if (attrs & MASAttributeCenterXWithinMargins) [attributes addObject:self.view.mas_centerXWithinMargins]; - if (attrs & MASAttributeCenterYWithinMargins) [attributes addObject:self.view.mas_centerYWithinMargins]; - -#endif - - NSMutableArray *children = [NSMutableArray arrayWithCapacity:attributes.count]; - - for (MASViewAttribute *a in attributes) { - [children addObject:[[MASViewConstraint alloc] initWithFirstViewAttribute:a]]; - } - - MASCompositeConstraint *constraint = [[MASCompositeConstraint alloc] initWithChildren:children]; - constraint.delegate = self; - [self.constraints addObject:constraint]; - return constraint; -} - -#pragma mark - standard Attributes - -- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { - return [self constraint:nil addConstraintWithLayoutAttribute:layoutAttribute]; -} - -- (MASConstraint *)left { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeft]; -} - -- (MASConstraint *)top { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTop]; -} - -- (MASConstraint *)right { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRight]; -} - -- (MASConstraint *)bottom { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottom]; -} - -- (MASConstraint *)leading { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeading]; -} - -- (MASConstraint *)trailing { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailing]; -} - -- (MASConstraint *)width { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeWidth]; -} - -- (MASConstraint *)height { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeHeight]; -} - -- (MASConstraint *)centerX { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterX]; -} - -- (MASConstraint *)centerY { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterY]; -} - -- (MASConstraint *)baseline { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBaseline]; -} - -- (MASConstraint *(^)(MASAttribute))attributes { - return ^(MASAttribute attrs){ - return [self addConstraintWithAttributes:attrs]; - }; -} - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - -- (MASConstraint *)firstBaseline { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline]; -} - -- (MASConstraint *)lastBaseline { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline]; -} - -#endif - - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - -- (MASConstraint *)leftMargin { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin]; -} - -- (MASConstraint *)rightMargin { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRightMargin]; -} - -- (MASConstraint *)topMargin { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTopMargin]; -} - -- (MASConstraint *)bottomMargin { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottomMargin]; -} - -- (MASConstraint *)leadingMargin { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeadingMargin]; -} - -- (MASConstraint *)trailingMargin { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailingMargin]; -} - -- (MASConstraint *)centerXWithinMargins { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterXWithinMargins]; -} - -- (MASConstraint *)centerYWithinMargins { - return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterYWithinMargins]; -} - -#endif - - -#pragma mark - composite Attributes - -- (MASConstraint *)edges { - return [self addConstraintWithAttributes:MASAttributeTop | MASAttributeLeft | MASAttributeRight | MASAttributeBottom]; -} - -- (MASConstraint *)size { - return [self addConstraintWithAttributes:MASAttributeWidth | MASAttributeHeight]; -} - -- (MASConstraint *)center { - return [self addConstraintWithAttributes:MASAttributeCenterX | MASAttributeCenterY]; -} - -#pragma mark - grouping - -- (MASConstraint *(^)(dispatch_block_t group))group { - return ^id(dispatch_block_t group) { - NSInteger previousCount = self.constraints.count; - group(); - - NSArray *children = [self.constraints subarrayWithRange:NSMakeRange(previousCount, self.constraints.count - previousCount)]; - MASCompositeConstraint *constraint = [[MASCompositeConstraint alloc] initWithChildren:children]; - constraint.delegate = self; - return constraint; - }; -} - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASLayoutConstraint.h b/iOS_Tips/Pods/Masonry/Masonry/MASLayoutConstraint.h deleted file mode 100644 index 699041cb..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASLayoutConstraint.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// MASLayoutConstraint.h -// Masonry -// -// Created by Jonas Budelmann on 3/08/13. -// Copyright (c) 2013 Jonas Budelmann. All rights reserved. -// - -#import "MASUtilities.h" - -/** - * When you are debugging or printing the constraints attached to a view this subclass - * makes it easier to identify which constraints have been created via Masonry - */ -@interface MASLayoutConstraint : NSLayoutConstraint - -/** - * a key to associate with this constraint - */ -@property (nonatomic, strong) id mas_key; - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASLayoutConstraint.m b/iOS_Tips/Pods/Masonry/Masonry/MASLayoutConstraint.m deleted file mode 100644 index 3483f026..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASLayoutConstraint.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// MASLayoutConstraint.m -// Masonry -// -// Created by Jonas Budelmann on 3/08/13. -// Copyright (c) 2013 Jonas Budelmann. All rights reserved. -// - -#import "MASLayoutConstraint.h" - -@implementation MASLayoutConstraint - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASUtilities.h b/iOS_Tips/Pods/Masonry/Masonry/MASUtilities.h deleted file mode 100644 index 1dbfd938..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASUtilities.h +++ /dev/null @@ -1,136 +0,0 @@ -// -// MASUtilities.h -// Masonry -// -// Created by Jonas Budelmann on 19/08/13. -// Copyright (c) 2013 Jonas Budelmann. All rights reserved. -// - -#import - - - -#if TARGET_OS_IPHONE || TARGET_OS_TV - - #import - #define MAS_VIEW UIView - #define MAS_VIEW_CONTROLLER UIViewController - #define MASEdgeInsets UIEdgeInsets - - typedef UILayoutPriority MASLayoutPriority; - static const MASLayoutPriority MASLayoutPriorityRequired = UILayoutPriorityRequired; - static const MASLayoutPriority MASLayoutPriorityDefaultHigh = UILayoutPriorityDefaultHigh; - static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 500; - static const MASLayoutPriority MASLayoutPriorityDefaultLow = UILayoutPriorityDefaultLow; - static const MASLayoutPriority MASLayoutPriorityFittingSizeLevel = UILayoutPriorityFittingSizeLevel; - -#elif TARGET_OS_MAC - - #import - #define MAS_VIEW NSView - #define MASEdgeInsets NSEdgeInsets - - typedef NSLayoutPriority MASLayoutPriority; - static const MASLayoutPriority MASLayoutPriorityRequired = NSLayoutPriorityRequired; - static const MASLayoutPriority MASLayoutPriorityDefaultHigh = NSLayoutPriorityDefaultHigh; - static const MASLayoutPriority MASLayoutPriorityDragThatCanResizeWindow = NSLayoutPriorityDragThatCanResizeWindow; - static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 501; - static const MASLayoutPriority MASLayoutPriorityWindowSizeStayPut = NSLayoutPriorityWindowSizeStayPut; - static const MASLayoutPriority MASLayoutPriorityDragThatCannotResizeWindow = NSLayoutPriorityDragThatCannotResizeWindow; - static const MASLayoutPriority MASLayoutPriorityDefaultLow = NSLayoutPriorityDefaultLow; - static const MASLayoutPriority MASLayoutPriorityFittingSizeCompression = NSLayoutPriorityFittingSizeCompression; - -#endif - -/** - * Allows you to attach keys to objects matching the variable names passed. - * - * view1.mas_key = @"view1", view2.mas_key = @"view2"; - * - * is equivalent to: - * - * MASAttachKeys(view1, view2); - */ -#define MASAttachKeys(...) \ - { \ - NSDictionary *keyPairs = NSDictionaryOfVariableBindings(__VA_ARGS__); \ - for (id key in keyPairs.allKeys) { \ - id obj = keyPairs[key]; \ - NSAssert([obj respondsToSelector:@selector(setMas_key:)], \ - @"Cannot attach mas_key to %@", obj); \ - [obj setMas_key:key]; \ - } \ - } - -/** - * Used to create object hashes - * Based on http://www.mikeash.com/pyblog/friday-qa-2010-06-18-implementing-equality-and-hashing.html - */ -#define MAS_NSUINT_BIT (CHAR_BIT * sizeof(NSUInteger)) -#define MAS_NSUINTROTATE(val, howmuch) ((((NSUInteger)val) << howmuch) | (((NSUInteger)val) >> (MAS_NSUINT_BIT - howmuch))) - -/** - * Given a scalar or struct value, wraps it in NSValue - * Based on EXPObjectify: https://github.com/specta/expecta - */ -static inline id _MASBoxValue(const char *type, ...) { - va_list v; - va_start(v, type); - id obj = nil; - if (strcmp(type, @encode(id)) == 0) { - id actual = va_arg(v, id); - obj = actual; - } else if (strcmp(type, @encode(CGPoint)) == 0) { - CGPoint actual = (CGPoint)va_arg(v, CGPoint); - obj = [NSValue value:&actual withObjCType:type]; - } else if (strcmp(type, @encode(CGSize)) == 0) { - CGSize actual = (CGSize)va_arg(v, CGSize); - obj = [NSValue value:&actual withObjCType:type]; - } else if (strcmp(type, @encode(MASEdgeInsets)) == 0) { - MASEdgeInsets actual = (MASEdgeInsets)va_arg(v, MASEdgeInsets); - obj = [NSValue value:&actual withObjCType:type]; - } else if (strcmp(type, @encode(double)) == 0) { - double actual = (double)va_arg(v, double); - obj = [NSNumber numberWithDouble:actual]; - } else if (strcmp(type, @encode(float)) == 0) { - float actual = (float)va_arg(v, double); - obj = [NSNumber numberWithFloat:actual]; - } else if (strcmp(type, @encode(int)) == 0) { - int actual = (int)va_arg(v, int); - obj = [NSNumber numberWithInt:actual]; - } else if (strcmp(type, @encode(long)) == 0) { - long actual = (long)va_arg(v, long); - obj = [NSNumber numberWithLong:actual]; - } else if (strcmp(type, @encode(long long)) == 0) { - long long actual = (long long)va_arg(v, long long); - obj = [NSNumber numberWithLongLong:actual]; - } else if (strcmp(type, @encode(short)) == 0) { - short actual = (short)va_arg(v, int); - obj = [NSNumber numberWithShort:actual]; - } else if (strcmp(type, @encode(char)) == 0) { - char actual = (char)va_arg(v, int); - obj = [NSNumber numberWithChar:actual]; - } else if (strcmp(type, @encode(bool)) == 0) { - bool actual = (bool)va_arg(v, int); - obj = [NSNumber numberWithBool:actual]; - } else if (strcmp(type, @encode(unsigned char)) == 0) { - unsigned char actual = (unsigned char)va_arg(v, unsigned int); - obj = [NSNumber numberWithUnsignedChar:actual]; - } else if (strcmp(type, @encode(unsigned int)) == 0) { - unsigned int actual = (unsigned int)va_arg(v, unsigned int); - obj = [NSNumber numberWithUnsignedInt:actual]; - } else if (strcmp(type, @encode(unsigned long)) == 0) { - unsigned long actual = (unsigned long)va_arg(v, unsigned long); - obj = [NSNumber numberWithUnsignedLong:actual]; - } else if (strcmp(type, @encode(unsigned long long)) == 0) { - unsigned long long actual = (unsigned long long)va_arg(v, unsigned long long); - obj = [NSNumber numberWithUnsignedLongLong:actual]; - } else if (strcmp(type, @encode(unsigned short)) == 0) { - unsigned short actual = (unsigned short)va_arg(v, unsigned int); - obj = [NSNumber numberWithUnsignedShort:actual]; - } - va_end(v); - return obj; -} - -#define MASBoxValue(value) _MASBoxValue(@encode(__typeof__((value))), (value)) diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASViewAttribute.h b/iOS_Tips/Pods/Masonry/Masonry/MASViewAttribute.h deleted file mode 100644 index 601c25d1..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASViewAttribute.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// MASViewAttribute.h -// Masonry -// -// Created by Jonas Budelmann on 21/07/13. -// Copyright (c) 2013 cloudling. All rights reserved. -// - -#import "MASUtilities.h" - -/** - * An immutable tuple which stores the view and the related NSLayoutAttribute. - * Describes part of either the left or right hand side of a constraint equation - */ -@interface MASViewAttribute : NSObject - -/** - * The view which the reciever relates to. Can be nil if item is not a view. - */ -@property (nonatomic, weak, readonly) MAS_VIEW *view; - -/** - * The item which the reciever relates to. - */ -@property (nonatomic, weak, readonly) id item; - -/** - * The attribute which the reciever relates to - */ -@property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute; - -/** - * Convenience initializer. - */ -- (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute; - -/** - * The designated initializer. - */ -- (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute; - -/** - * Determine whether the layoutAttribute is a size attribute - * - * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight - */ -- (BOOL)isSizeAttribute; - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASViewAttribute.m b/iOS_Tips/Pods/Masonry/Masonry/MASViewAttribute.m deleted file mode 100644 index e573e8bd..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASViewAttribute.m +++ /dev/null @@ -1,46 +0,0 @@ -// -// MASViewAttribute.m -// Masonry -// -// Created by Jonas Budelmann on 21/07/13. -// Copyright (c) 2013 cloudling. All rights reserved. -// - -#import "MASViewAttribute.h" - -@implementation MASViewAttribute - -- (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute { - self = [self initWithView:view item:view layoutAttribute:layoutAttribute]; - return self; -} - -- (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute { - self = [super init]; - if (!self) return nil; - - _view = view; - _item = item; - _layoutAttribute = layoutAttribute; - - return self; -} - -- (BOOL)isSizeAttribute { - return self.layoutAttribute == NSLayoutAttributeWidth - || self.layoutAttribute == NSLayoutAttributeHeight; -} - -- (BOOL)isEqual:(MASViewAttribute *)viewAttribute { - if ([viewAttribute isKindOfClass:self.class]) { - return self.view == viewAttribute.view - && self.layoutAttribute == viewAttribute.layoutAttribute; - } - return [super isEqual:viewAttribute]; -} - -- (NSUInteger)hash { - return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute; -} - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASViewConstraint.h b/iOS_Tips/Pods/Masonry/Masonry/MASViewConstraint.h deleted file mode 100644 index ec390d15..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASViewConstraint.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// MASViewConstraint.h -// Masonry -// -// Created by Jonas Budelmann on 20/07/13. -// Copyright (c) 2013 cloudling. All rights reserved. -// - -#import "MASViewAttribute.h" -#import "MASConstraint.h" -#import "MASLayoutConstraint.h" -#import "MASUtilities.h" - -/** - * A single constraint. - * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view - */ -@interface MASViewConstraint : MASConstraint - -/** - * First item/view and first attribute of the NSLayoutConstraint - */ -@property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute; - -/** - * Second item/view and second attribute of the NSLayoutConstraint - */ -@property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute; - -/** - * initialises the MASViewConstraint with the first part of the equation - * - * @param firstViewAttribute view.mas_left, view.mas_width etc. - * - * @return a new view constraint - */ -- (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute; - -/** - * Returns all MASViewConstraints installed with this view as a first item. - * - * @param view A view to retrieve constraints for. - * - * @return An array of MASViewConstraints. - */ -+ (NSArray *)installedConstraintsForView:(MAS_VIEW *)view; - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/MASViewConstraint.m b/iOS_Tips/Pods/Masonry/Masonry/MASViewConstraint.m deleted file mode 100644 index 173eec16..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/MASViewConstraint.m +++ /dev/null @@ -1,401 +0,0 @@ -// -// MASViewConstraint.m -// Masonry -// -// Created by Jonas Budelmann on 20/07/13. -// Copyright (c) 2013 cloudling. All rights reserved. -// - -#import "MASViewConstraint.h" -#import "MASConstraint+Private.h" -#import "MASCompositeConstraint.h" -#import "MASLayoutConstraint.h" -#import "View+MASAdditions.h" -#import - -@interface MAS_VIEW (MASConstraints) - -@property (nonatomic, readonly) NSMutableSet *mas_installedConstraints; - -@end - -@implementation MAS_VIEW (MASConstraints) - -static char kInstalledConstraintsKey; - -- (NSMutableSet *)mas_installedConstraints { - NSMutableSet *constraints = objc_getAssociatedObject(self, &kInstalledConstraintsKey); - if (!constraints) { - constraints = [NSMutableSet set]; - objc_setAssociatedObject(self, &kInstalledConstraintsKey, constraints, OBJC_ASSOCIATION_RETAIN_NONATOMIC); - } - return constraints; -} - -@end - - -@interface MASViewConstraint () - -@property (nonatomic, strong, readwrite) MASViewAttribute *secondViewAttribute; -@property (nonatomic, weak) MAS_VIEW *installedView; -@property (nonatomic, weak) MASLayoutConstraint *layoutConstraint; -@property (nonatomic, assign) NSLayoutRelation layoutRelation; -@property (nonatomic, assign) MASLayoutPriority layoutPriority; -@property (nonatomic, assign) CGFloat layoutMultiplier; -@property (nonatomic, assign) CGFloat layoutConstant; -@property (nonatomic, assign) BOOL hasLayoutRelation; -@property (nonatomic, strong) id mas_key; -@property (nonatomic, assign) BOOL useAnimator; - -@end - -@implementation MASViewConstraint - -- (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute { - self = [super init]; - if (!self) return nil; - - _firstViewAttribute = firstViewAttribute; - self.layoutPriority = MASLayoutPriorityRequired; - self.layoutMultiplier = 1; - - return self; -} - -#pragma mark - NSCoping - -- (id)copyWithZone:(NSZone __unused *)zone { - MASViewConstraint *constraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:self.firstViewAttribute]; - constraint.layoutConstant = self.layoutConstant; - constraint.layoutRelation = self.layoutRelation; - constraint.layoutPriority = self.layoutPriority; - constraint.layoutMultiplier = self.layoutMultiplier; - constraint.delegate = self.delegate; - return constraint; -} - -#pragma mark - Public - -+ (NSArray *)installedConstraintsForView:(MAS_VIEW *)view { - return [view.mas_installedConstraints allObjects]; -} - -#pragma mark - Private - -- (void)setLayoutConstant:(CGFloat)layoutConstant { - _layoutConstant = layoutConstant; - -#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) - if (self.useAnimator) { - [self.layoutConstraint.animator setConstant:layoutConstant]; - } else { - self.layoutConstraint.constant = layoutConstant; - } -#else - self.layoutConstraint.constant = layoutConstant; -#endif -} - -- (void)setLayoutRelation:(NSLayoutRelation)layoutRelation { - _layoutRelation = layoutRelation; - self.hasLayoutRelation = YES; -} - -- (BOOL)supportsActiveProperty { - return [self.layoutConstraint respondsToSelector:@selector(isActive)]; -} - -- (BOOL)isActive { - BOOL active = YES; - if ([self supportsActiveProperty]) { - active = [self.layoutConstraint isActive]; - } - - return active; -} - -- (BOOL)hasBeenInstalled { - return (self.layoutConstraint != nil) && [self isActive]; -} - -- (void)setSecondViewAttribute:(id)secondViewAttribute { - if ([secondViewAttribute isKindOfClass:NSValue.class]) { - [self setLayoutConstantWithValue:secondViewAttribute]; - } else if ([secondViewAttribute isKindOfClass:MAS_VIEW.class]) { - _secondViewAttribute = [[MASViewAttribute alloc] initWithView:secondViewAttribute layoutAttribute:self.firstViewAttribute.layoutAttribute]; - } else if ([secondViewAttribute isKindOfClass:MASViewAttribute.class]) { - _secondViewAttribute = secondViewAttribute; - } else { - NSAssert(NO, @"attempting to add unsupported attribute: %@", secondViewAttribute); - } -} - -#pragma mark - NSLayoutConstraint multiplier proxies - -- (MASConstraint * (^)(CGFloat))multipliedBy { - return ^id(CGFloat multiplier) { - NSAssert(!self.hasBeenInstalled, - @"Cannot modify constraint multiplier after it has been installed"); - - self.layoutMultiplier = multiplier; - return self; - }; -} - - -- (MASConstraint * (^)(CGFloat))dividedBy { - return ^id(CGFloat divider) { - NSAssert(!self.hasBeenInstalled, - @"Cannot modify constraint multiplier after it has been installed"); - - self.layoutMultiplier = 1.0/divider; - return self; - }; -} - -#pragma mark - MASLayoutPriority proxy - -- (MASConstraint * (^)(MASLayoutPriority))priority { - return ^id(MASLayoutPriority priority) { - NSAssert(!self.hasBeenInstalled, - @"Cannot modify constraint priority after it has been installed"); - - self.layoutPriority = priority; - return self; - }; -} - -#pragma mark - NSLayoutRelation proxy - -- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { - return ^id(id attribute, NSLayoutRelation relation) { - if ([attribute isKindOfClass:NSArray.class]) { - NSAssert(!self.hasLayoutRelation, @"Redefinition of constraint relation"); - NSMutableArray *children = NSMutableArray.new; - for (id attr in attribute) { - MASViewConstraint *viewConstraint = [self copy]; - viewConstraint.layoutRelation = relation; - viewConstraint.secondViewAttribute = attr; - [children addObject:viewConstraint]; - } - MASCompositeConstraint *compositeConstraint = [[MASCompositeConstraint alloc] initWithChildren:children]; - compositeConstraint.delegate = self.delegate; - [self.delegate constraint:self shouldBeReplacedWithConstraint:compositeConstraint]; - return compositeConstraint; - } else { - NSAssert(!self.hasLayoutRelation || self.layoutRelation == relation && [attribute isKindOfClass:NSValue.class], @"Redefinition of constraint relation"); - self.layoutRelation = relation; - self.secondViewAttribute = attribute; - return self; - } - }; -} - -#pragma mark - Semantic properties - -- (MASConstraint *)with { - return self; -} - -- (MASConstraint *)and { - return self; -} - -#pragma mark - attribute chaining - -- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { - NSAssert(!self.hasLayoutRelation, @"Attributes should be chained before defining the constraint relation"); - - return [self.delegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; -} - -#pragma mark - Animator proxy - -#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) - -- (MASConstraint *)animator { - self.useAnimator = YES; - return self; -} - -#endif - -#pragma mark - debug helpers - -- (MASConstraint * (^)(id))key { - return ^id(id key) { - self.mas_key = key; - return self; - }; -} - -#pragma mark - NSLayoutConstraint constant setters - -- (void)setInsets:(MASEdgeInsets)insets { - NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute; - switch (layoutAttribute) { - case NSLayoutAttributeLeft: - case NSLayoutAttributeLeading: - self.layoutConstant = insets.left; - break; - case NSLayoutAttributeTop: - self.layoutConstant = insets.top; - break; - case NSLayoutAttributeBottom: - self.layoutConstant = -insets.bottom; - break; - case NSLayoutAttributeRight: - case NSLayoutAttributeTrailing: - self.layoutConstant = -insets.right; - break; - default: - break; - } -} - -- (void)setInset:(CGFloat)inset { - [self setInsets:(MASEdgeInsets){.top = inset, .left = inset, .bottom = inset, .right = inset}]; -} - -- (void)setOffset:(CGFloat)offset { - self.layoutConstant = offset; -} - -- (void)setSizeOffset:(CGSize)sizeOffset { - NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute; - switch (layoutAttribute) { - case NSLayoutAttributeWidth: - self.layoutConstant = sizeOffset.width; - break; - case NSLayoutAttributeHeight: - self.layoutConstant = sizeOffset.height; - break; - default: - break; - } -} - -- (void)setCenterOffset:(CGPoint)centerOffset { - NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute; - switch (layoutAttribute) { - case NSLayoutAttributeCenterX: - self.layoutConstant = centerOffset.x; - break; - case NSLayoutAttributeCenterY: - self.layoutConstant = centerOffset.y; - break; - default: - break; - } -} - -#pragma mark - MASConstraint - -- (void)activate { - [self install]; -} - -- (void)deactivate { - [self uninstall]; -} - -- (void)install { - if (self.hasBeenInstalled) { - return; - } - - if ([self supportsActiveProperty] && self.layoutConstraint) { - self.layoutConstraint.active = YES; - [self.firstViewAttribute.view.mas_installedConstraints addObject:self]; - return; - } - - MAS_VIEW *firstLayoutItem = self.firstViewAttribute.item; - NSLayoutAttribute firstLayoutAttribute = self.firstViewAttribute.layoutAttribute; - MAS_VIEW *secondLayoutItem = self.secondViewAttribute.item; - NSLayoutAttribute secondLayoutAttribute = self.secondViewAttribute.layoutAttribute; - - // alignment attributes must have a secondViewAttribute - // therefore we assume that is refering to superview - // eg make.left.equalTo(@10) - if (!self.firstViewAttribute.isSizeAttribute && !self.secondViewAttribute) { - secondLayoutItem = self.firstViewAttribute.view.superview; - secondLayoutAttribute = firstLayoutAttribute; - } - - MASLayoutConstraint *layoutConstraint - = [MASLayoutConstraint constraintWithItem:firstLayoutItem - attribute:firstLayoutAttribute - relatedBy:self.layoutRelation - toItem:secondLayoutItem - attribute:secondLayoutAttribute - multiplier:self.layoutMultiplier - constant:self.layoutConstant]; - - layoutConstraint.priority = self.layoutPriority; - layoutConstraint.mas_key = self.mas_key; - - if (self.secondViewAttribute.view) { - MAS_VIEW *closestCommonSuperview = [self.firstViewAttribute.view mas_closestCommonSuperview:self.secondViewAttribute.view]; - NSAssert(closestCommonSuperview, - @"couldn't find a common superview for %@ and %@", - self.firstViewAttribute.view, self.secondViewAttribute.view); - self.installedView = closestCommonSuperview; - } else if (self.firstViewAttribute.isSizeAttribute) { - self.installedView = self.firstViewAttribute.view; - } else { - self.installedView = self.firstViewAttribute.view.superview; - } - - - MASLayoutConstraint *existingConstraint = nil; - if (self.updateExisting) { - existingConstraint = [self layoutConstraintSimilarTo:layoutConstraint]; - } - if (existingConstraint) { - // just update the constant - existingConstraint.constant = layoutConstraint.constant; - self.layoutConstraint = existingConstraint; - } else { - [self.installedView addConstraint:layoutConstraint]; - self.layoutConstraint = layoutConstraint; - [firstLayoutItem.mas_installedConstraints addObject:self]; - } -} - -- (MASLayoutConstraint *)layoutConstraintSimilarTo:(MASLayoutConstraint *)layoutConstraint { - // check if any constraints are the same apart from the only mutable property constant - - // go through constraints in reverse as we do not want to match auto-resizing or interface builder constraints - // and they are likely to be added first. - for (NSLayoutConstraint *existingConstraint in self.installedView.constraints.reverseObjectEnumerator) { - if (![existingConstraint isKindOfClass:MASLayoutConstraint.class]) continue; - if (existingConstraint.firstItem != layoutConstraint.firstItem) continue; - if (existingConstraint.secondItem != layoutConstraint.secondItem) continue; - if (existingConstraint.firstAttribute != layoutConstraint.firstAttribute) continue; - if (existingConstraint.secondAttribute != layoutConstraint.secondAttribute) continue; - if (existingConstraint.relation != layoutConstraint.relation) continue; - if (existingConstraint.multiplier != layoutConstraint.multiplier) continue; - if (existingConstraint.priority != layoutConstraint.priority) continue; - - return (id)existingConstraint; - } - return nil; -} - -- (void)uninstall { - if ([self supportsActiveProperty]) { - self.layoutConstraint.active = NO; - [self.firstViewAttribute.view.mas_installedConstraints removeObject:self]; - return; - } - - [self.installedView removeConstraint:self.layoutConstraint]; - self.layoutConstraint = nil; - self.installedView = nil; - - [self.firstViewAttribute.view.mas_installedConstraints removeObject:self]; -} - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/Masonry.h b/iOS_Tips/Pods/Masonry/Masonry/Masonry.h deleted file mode 100644 index d1bd579d..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/Masonry.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Masonry.h -// Masonry -// -// Created by Jonas Budelmann on 20/07/13. -// Copyright (c) 2013 cloudling. All rights reserved. -// - -#import - -//! Project version number for Masonry. -FOUNDATION_EXPORT double MasonryVersionNumber; - -//! Project version string for Masonry. -FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; - -#import "MASUtilities.h" -#import "View+MASAdditions.h" -#import "View+MASShorthandAdditions.h" -#import "ViewController+MASAdditions.h" -#import "NSArray+MASAdditions.h" -#import "NSArray+MASShorthandAdditions.h" -#import "MASConstraint.h" -#import "MASCompositeConstraint.h" -#import "MASViewAttribute.h" -#import "MASViewConstraint.h" -#import "MASConstraintMaker.h" -#import "MASLayoutConstraint.h" -#import "NSLayoutConstraint+MASDebugAdditions.h" diff --git a/iOS_Tips/Pods/Masonry/Masonry/NSArray+MASAdditions.h b/iOS_Tips/Pods/Masonry/Masonry/NSArray+MASAdditions.h deleted file mode 100644 index 587618d9..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/NSArray+MASAdditions.h +++ /dev/null @@ -1,72 +0,0 @@ -// -// NSArray+MASAdditions.h -// -// -// Created by Daniel Hammond on 11/26/13. -// -// - -#import "MASUtilities.h" -#import "MASConstraintMaker.h" -#import "MASViewAttribute.h" - -typedef NS_ENUM(NSUInteger, MASAxisType) { - MASAxisTypeHorizontal, - MASAxisTypeVertical -}; - -@interface NSArray (MASAdditions) - -/** - * Creates a MASConstraintMaker with each view in the callee. - * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view - * - * @param block scope within which you can build up the constraints which you wish to apply to each view. - * - * @return Array of created MASConstraints - */ -- (NSArray *)mas_makeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; - -/** - * Creates a MASConstraintMaker with each view in the callee. - * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. - * If an existing constraint exists then it will be updated instead. - * - * @param block scope within which you can build up the constraints which you wish to apply to each view. - * - * @return Array of created/updated MASConstraints - */ -- (NSArray *)mas_updateConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; - -/** - * Creates a MASConstraintMaker with each view in the callee. - * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. - * All constraints previously installed for the views will be removed. - * - * @param block scope within which you can build up the constraints which you wish to apply to each view. - * - * @return Array of created/updated MASConstraints - */ -- (NSArray *)mas_remakeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; - -/** - * distribute with fixed spacing - * - * @param axisType which axis to distribute items along - * @param fixedSpacing the spacing between each item - * @param leadSpacing the spacing before the first item and the container - * @param tailSpacing the spacing after the last item and the container - */ -- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; - -/** - * distribute with fixed item size - * - * @param axisType which axis to distribute items along - * @param fixedItemLength the fixed length of each item - * @param leadSpacing the spacing before the first item and the container - * @param tailSpacing the spacing after the last item and the container - */ -- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/NSArray+MASAdditions.m b/iOS_Tips/Pods/Masonry/Masonry/NSArray+MASAdditions.m deleted file mode 100644 index 831d8cda..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/NSArray+MASAdditions.m +++ /dev/null @@ -1,162 +0,0 @@ -// -// NSArray+MASAdditions.m -// -// -// Created by Daniel Hammond on 11/26/13. -// -// - -#import "NSArray+MASAdditions.h" -#import "View+MASAdditions.h" - -@implementation NSArray (MASAdditions) - -- (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block { - NSMutableArray *constraints = [NSMutableArray array]; - for (MAS_VIEW *view in self) { - NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); - [constraints addObjectsFromArray:[view mas_makeConstraints:block]]; - } - return constraints; -} - -- (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block { - NSMutableArray *constraints = [NSMutableArray array]; - for (MAS_VIEW *view in self) { - NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); - [constraints addObjectsFromArray:[view mas_updateConstraints:block]]; - } - return constraints; -} - -- (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block { - NSMutableArray *constraints = [NSMutableArray array]; - for (MAS_VIEW *view in self) { - NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); - [constraints addObjectsFromArray:[view mas_remakeConstraints:block]]; - } - return constraints; -} - -- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing { - if (self.count < 2) { - NSAssert(self.count>1,@"views to distribute need to bigger than one"); - return; - } - - MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews]; - if (axisType == MASAxisTypeHorizontal) { - MAS_VIEW *prev; - for (int i = 0; i < self.count; i++) { - MAS_VIEW *v = self[i]; - [v mas_makeConstraints:^(MASConstraintMaker *make) { - if (prev) { - make.width.equalTo(prev); - make.left.equalTo(prev.mas_right).offset(fixedSpacing); - if (i == self.count - 1) {//last one - make.right.equalTo(tempSuperView).offset(-tailSpacing); - } - } - else {//first one - make.left.equalTo(tempSuperView).offset(leadSpacing); - } - - }]; - prev = v; - } - } - else { - MAS_VIEW *prev; - for (int i = 0; i < self.count; i++) { - MAS_VIEW *v = self[i]; - [v mas_makeConstraints:^(MASConstraintMaker *make) { - if (prev) { - make.height.equalTo(prev); - make.top.equalTo(prev.mas_bottom).offset(fixedSpacing); - if (i == self.count - 1) {//last one - make.bottom.equalTo(tempSuperView).offset(-tailSpacing); - } - } - else {//first one - make.top.equalTo(tempSuperView).offset(leadSpacing); - } - - }]; - prev = v; - } - } -} - -- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing { - if (self.count < 2) { - NSAssert(self.count>1,@"views to distribute need to bigger than one"); - return; - } - - MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews]; - if (axisType == MASAxisTypeHorizontal) { - MAS_VIEW *prev; - for (int i = 0; i < self.count; i++) { - MAS_VIEW *v = self[i]; - [v mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.equalTo(@(fixedItemLength)); - if (prev) { - if (i == self.count - 1) {//last one - make.right.equalTo(tempSuperView).offset(-tailSpacing); - } - else { - CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1)); - make.right.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset); - } - } - else {//first one - make.left.equalTo(tempSuperView).offset(leadSpacing); - } - }]; - prev = v; - } - } - else { - MAS_VIEW *prev; - for (int i = 0; i < self.count; i++) { - MAS_VIEW *v = self[i]; - [v mas_makeConstraints:^(MASConstraintMaker *make) { - make.height.equalTo(@(fixedItemLength)); - if (prev) { - if (i == self.count - 1) {//last one - make.bottom.equalTo(tempSuperView).offset(-tailSpacing); - } - else { - CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1)); - make.bottom.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset); - } - } - else {//first one - make.top.equalTo(tempSuperView).offset(leadSpacing); - } - }]; - prev = v; - } - } -} - -- (MAS_VIEW *)mas_commonSuperviewOfViews -{ - MAS_VIEW *commonSuperview = nil; - MAS_VIEW *previousView = nil; - for (id object in self) { - if ([object isKindOfClass:[MAS_VIEW class]]) { - MAS_VIEW *view = (MAS_VIEW *)object; - if (previousView) { - commonSuperview = [view mas_closestCommonSuperview:commonSuperview]; - } else { - commonSuperview = view; - } - previousView = view; - } - } - NSAssert(commonSuperview, @"Can't constrain views that do not share a common superview. Make sure that all the views in this array have been added into the same view hierarchy."); - return commonSuperview; -} - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h b/iOS_Tips/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h deleted file mode 100644 index 8b473697..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// NSArray+MASShorthandAdditions.h -// Masonry -// -// Created by Jonas Budelmann on 22/07/13. -// Copyright (c) 2013 Jonas Budelmann. All rights reserved. -// - -#import "NSArray+MASAdditions.h" - -#ifdef MAS_SHORTHAND - -/** - * Shorthand array additions without the 'mas_' prefixes, - * only enabled if MAS_SHORTHAND is defined - */ -@interface NSArray (MASShorthandAdditions) - -- (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; -- (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; -- (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; - -@end - -@implementation NSArray (MASShorthandAdditions) - -- (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { - return [self mas_makeConstraints:block]; -} - -- (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { - return [self mas_updateConstraints:block]; -} - -- (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { - return [self mas_remakeConstraints:block]; -} - -@end - -#endif diff --git a/iOS_Tips/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h b/iOS_Tips/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h deleted file mode 100644 index 1279b4fd..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// NSLayoutConstraint+MASDebugAdditions.h -// Masonry -// -// Created by Jonas Budelmann on 3/08/13. -// Copyright (c) 2013 Jonas Budelmann. All rights reserved. -// - -#import "MASUtilities.h" - -/** - * makes debug and log output of NSLayoutConstraints more readable - */ -@interface NSLayoutConstraint (MASDebugAdditions) - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m b/iOS_Tips/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m deleted file mode 100644 index ab539a21..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m +++ /dev/null @@ -1,146 +0,0 @@ -// -// NSLayoutConstraint+MASDebugAdditions.m -// Masonry -// -// Created by Jonas Budelmann on 3/08/13. -// Copyright (c) 2013 Jonas Budelmann. All rights reserved. -// - -#import "NSLayoutConstraint+MASDebugAdditions.h" -#import "MASConstraint.h" -#import "MASLayoutConstraint.h" - -@implementation NSLayoutConstraint (MASDebugAdditions) - -#pragma mark - description maps - -+ (NSDictionary *)layoutRelationDescriptionsByValue { - static dispatch_once_t once; - static NSDictionary *descriptionMap; - dispatch_once(&once, ^{ - descriptionMap = @{ - @(NSLayoutRelationEqual) : @"==", - @(NSLayoutRelationGreaterThanOrEqual) : @">=", - @(NSLayoutRelationLessThanOrEqual) : @"<=", - }; - }); - return descriptionMap; -} - -+ (NSDictionary *)layoutAttributeDescriptionsByValue { - static dispatch_once_t once; - static NSDictionary *descriptionMap; - dispatch_once(&once, ^{ - descriptionMap = @{ - @(NSLayoutAttributeTop) : @"top", - @(NSLayoutAttributeLeft) : @"left", - @(NSLayoutAttributeBottom) : @"bottom", - @(NSLayoutAttributeRight) : @"right", - @(NSLayoutAttributeLeading) : @"leading", - @(NSLayoutAttributeTrailing) : @"trailing", - @(NSLayoutAttributeWidth) : @"width", - @(NSLayoutAttributeHeight) : @"height", - @(NSLayoutAttributeCenterX) : @"centerX", - @(NSLayoutAttributeCenterY) : @"centerY", - @(NSLayoutAttributeBaseline) : @"baseline", - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - @(NSLayoutAttributeFirstBaseline) : @"firstBaseline", - @(NSLayoutAttributeLastBaseline) : @"lastBaseline", -#endif - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - @(NSLayoutAttributeLeftMargin) : @"leftMargin", - @(NSLayoutAttributeRightMargin) : @"rightMargin", - @(NSLayoutAttributeTopMargin) : @"topMargin", - @(NSLayoutAttributeBottomMargin) : @"bottomMargin", - @(NSLayoutAttributeLeadingMargin) : @"leadingMargin", - @(NSLayoutAttributeTrailingMargin) : @"trailingMargin", - @(NSLayoutAttributeCenterXWithinMargins) : @"centerXWithinMargins", - @(NSLayoutAttributeCenterYWithinMargins) : @"centerYWithinMargins", -#endif - - }; - - }); - return descriptionMap; -} - - -+ (NSDictionary *)layoutPriorityDescriptionsByValue { - static dispatch_once_t once; - static NSDictionary *descriptionMap; - dispatch_once(&once, ^{ -#if TARGET_OS_IPHONE || TARGET_OS_TV - descriptionMap = @{ - @(MASLayoutPriorityDefaultHigh) : @"high", - @(MASLayoutPriorityDefaultLow) : @"low", - @(MASLayoutPriorityDefaultMedium) : @"medium", - @(MASLayoutPriorityRequired) : @"required", - @(MASLayoutPriorityFittingSizeLevel) : @"fitting size", - }; -#elif TARGET_OS_MAC - descriptionMap = @{ - @(MASLayoutPriorityDefaultHigh) : @"high", - @(MASLayoutPriorityDragThatCanResizeWindow) : @"drag can resize window", - @(MASLayoutPriorityDefaultMedium) : @"medium", - @(MASLayoutPriorityWindowSizeStayPut) : @"window size stay put", - @(MASLayoutPriorityDragThatCannotResizeWindow) : @"drag cannot resize window", - @(MASLayoutPriorityDefaultLow) : @"low", - @(MASLayoutPriorityFittingSizeCompression) : @"fitting size", - @(MASLayoutPriorityRequired) : @"required", - }; -#endif - }); - return descriptionMap; -} - -#pragma mark - description override - -+ (NSString *)descriptionForObject:(id)obj { - if ([obj respondsToSelector:@selector(mas_key)] && [obj mas_key]) { - return [NSString stringWithFormat:@"%@:%@", [obj class], [obj mas_key]]; - } - return [NSString stringWithFormat:@"%@:%p", [obj class], obj]; -} - -- (NSString *)description { - NSMutableString *description = [[NSMutableString alloc] initWithString:@"<"]; - - [description appendString:[self.class descriptionForObject:self]]; - - [description appendFormat:@" %@", [self.class descriptionForObject:self.firstItem]]; - if (self.firstAttribute != NSLayoutAttributeNotAnAttribute) { - [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.firstAttribute)]]; - } - - [description appendFormat:@" %@", self.class.layoutRelationDescriptionsByValue[@(self.relation)]]; - - if (self.secondItem) { - [description appendFormat:@" %@", [self.class descriptionForObject:self.secondItem]]; - } - if (self.secondAttribute != NSLayoutAttributeNotAnAttribute) { - [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.secondAttribute)]]; - } - - if (self.multiplier != 1) { - [description appendFormat:@" * %g", self.multiplier]; - } - - if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) { - [description appendFormat:@" %g", self.constant]; - } else { - if (self.constant) { - [description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)]; - } - } - - if (self.priority != MASLayoutPriorityRequired) { - [description appendFormat:@" ^%@", self.class.layoutPriorityDescriptionsByValue[@(self.priority)] ?: [NSNumber numberWithDouble:self.priority]]; - } - - [description appendString:@">"]; - return description; -} - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/View+MASAdditions.h b/iOS_Tips/Pods/Masonry/Masonry/View+MASAdditions.h deleted file mode 100644 index f7343d26..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/View+MASAdditions.h +++ /dev/null @@ -1,111 +0,0 @@ -// -// UIView+MASAdditions.h -// Masonry -// -// Created by Jonas Budelmann on 20/07/13. -// Copyright (c) 2013 cloudling. All rights reserved. -// - -#import "MASUtilities.h" -#import "MASConstraintMaker.h" -#import "MASViewAttribute.h" - -/** - * Provides constraint maker block - * and convience methods for creating MASViewAttribute which are view + NSLayoutAttribute pairs - */ -@interface MAS_VIEW (MASAdditions) - -/** - * following properties return a new MASViewAttribute with current view and appropriate NSLayoutAttribute - */ -@property (nonatomic, strong, readonly) MASViewAttribute *mas_left; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_top; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_right; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottom; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_leading; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_trailing; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_width; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_height; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_centerX; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_centerY; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_baseline; -@property (nonatomic, strong, readonly) MASViewAttribute *(^mas_attribute)(NSLayoutAttribute attr); - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - -@property (nonatomic, strong, readonly) MASViewAttribute *mas_firstBaseline; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_lastBaseline; - -#endif - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - -@property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_topMargin; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomMargin; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_leadingMargin; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_trailingMargin; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_centerXWithinMargins; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_centerYWithinMargins; - -#endif - -#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) - -@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuide API_AVAILABLE(ios(11.0),tvos(11.0)); -@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0)); -@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0)); -@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0)); -@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0)); - -#endif - -/** - * a key to associate with this view - */ -@property (nonatomic, strong) id mas_key; - -/** - * Finds the closest common superview between this view and another view - * - * @param view other view - * - * @return returns nil if common superview could not be found - */ -- (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view; - -/** - * Creates a MASConstraintMaker with the callee view. - * Any constraints defined are added to the view or the appropriate superview once the block has finished executing - * - * @param block scope within which you can build up the constraints which you wish to apply to the view. - * - * @return Array of created MASConstraints - */ -- (NSArray *)mas_makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; - -/** - * Creates a MASConstraintMaker with the callee view. - * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. - * If an existing constraint exists then it will be updated instead. - * - * @param block scope within which you can build up the constraints which you wish to apply to the view. - * - * @return Array of created/updated MASConstraints - */ -- (NSArray *)mas_updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; - -/** - * Creates a MASConstraintMaker with the callee view. - * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. - * All constraints previously installed for the view will be removed. - * - * @param block scope within which you can build up the constraints which you wish to apply to the view. - * - * @return Array of created/updated MASConstraints - */ -- (NSArray *)mas_remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/View+MASAdditions.m b/iOS_Tips/Pods/Masonry/Masonry/View+MASAdditions.m deleted file mode 100644 index 4fa07b4f..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/View+MASAdditions.m +++ /dev/null @@ -1,186 +0,0 @@ -// -// UIView+MASAdditions.m -// Masonry -// -// Created by Jonas Budelmann on 20/07/13. -// Copyright (c) 2013 cloudling. All rights reserved. -// - -#import "View+MASAdditions.h" -#import - -@implementation MAS_VIEW (MASAdditions) - -- (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *))block { - self.translatesAutoresizingMaskIntoConstraints = NO; - MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; - block(constraintMaker); - return [constraintMaker install]; -} - -- (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *))block { - self.translatesAutoresizingMaskIntoConstraints = NO; - MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; - constraintMaker.updateExisting = YES; - block(constraintMaker); - return [constraintMaker install]; -} - -- (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block { - self.translatesAutoresizingMaskIntoConstraints = NO; - MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; - constraintMaker.removeExisting = YES; - block(constraintMaker); - return [constraintMaker install]; -} - -#pragma mark - NSLayoutAttribute properties - -- (MASViewAttribute *)mas_left { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeft]; -} - -- (MASViewAttribute *)mas_top { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTop]; -} - -- (MASViewAttribute *)mas_right { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRight]; -} - -- (MASViewAttribute *)mas_bottom { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottom]; -} - -- (MASViewAttribute *)mas_leading { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeading]; -} - -- (MASViewAttribute *)mas_trailing { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailing]; -} - -- (MASViewAttribute *)mas_width { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeWidth]; -} - -- (MASViewAttribute *)mas_height { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeHeight]; -} - -- (MASViewAttribute *)mas_centerX { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterX]; -} - -- (MASViewAttribute *)mas_centerY { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterY]; -} - -- (MASViewAttribute *)mas_baseline { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBaseline]; -} - -- (MASViewAttribute *(^)(NSLayoutAttribute))mas_attribute -{ - return ^(NSLayoutAttribute attr) { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:attr]; - }; -} - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - -- (MASViewAttribute *)mas_firstBaseline { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeFirstBaseline]; -} -- (MASViewAttribute *)mas_lastBaseline { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLastBaseline]; -} - -#endif - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - -- (MASViewAttribute *)mas_leftMargin { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeftMargin]; -} - -- (MASViewAttribute *)mas_rightMargin { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRightMargin]; -} - -- (MASViewAttribute *)mas_topMargin { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTopMargin]; -} - -- (MASViewAttribute *)mas_bottomMargin { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottomMargin]; -} - -- (MASViewAttribute *)mas_leadingMargin { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeadingMargin]; -} - -- (MASViewAttribute *)mas_trailingMargin { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailingMargin]; -} - -- (MASViewAttribute *)mas_centerXWithinMargins { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterXWithinMargins]; -} - -- (MASViewAttribute *)mas_centerYWithinMargins { - return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterYWithinMargins]; -} - -#endif - -#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) - -- (MASViewAttribute *)mas_safeAreaLayoutGuide { - return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; -} -- (MASViewAttribute *)mas_safeAreaLayoutGuideTop { - return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeTop]; -} -- (MASViewAttribute *)mas_safeAreaLayoutGuideBottom { - return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; -} -- (MASViewAttribute *)mas_safeAreaLayoutGuideLeft { - return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeLeft]; -} -- (MASViewAttribute *)mas_safeAreaLayoutGuideRight { - return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeRight]; -} - -#endif - -#pragma mark - associated properties - -- (id)mas_key { - return objc_getAssociatedObject(self, @selector(mas_key)); -} - -- (void)setMas_key:(id)key { - objc_setAssociatedObject(self, @selector(mas_key), key, OBJC_ASSOCIATION_RETAIN_NONATOMIC); -} - -#pragma mark - heirachy - -- (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view { - MAS_VIEW *closestCommonSuperview = nil; - - MAS_VIEW *secondViewSuperview = view; - while (!closestCommonSuperview && secondViewSuperview) { - MAS_VIEW *firstViewSuperview = self; - while (!closestCommonSuperview && firstViewSuperview) { - if (secondViewSuperview == firstViewSuperview) { - closestCommonSuperview = secondViewSuperview; - } - firstViewSuperview = firstViewSuperview.superview; - } - secondViewSuperview = secondViewSuperview.superview; - } - return closestCommonSuperview; -} - -@end diff --git a/iOS_Tips/Pods/Masonry/Masonry/View+MASShorthandAdditions.h b/iOS_Tips/Pods/Masonry/Masonry/View+MASShorthandAdditions.h deleted file mode 100644 index 1c19a942..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/View+MASShorthandAdditions.h +++ /dev/null @@ -1,133 +0,0 @@ -// -// UIView+MASShorthandAdditions.h -// Masonry -// -// Created by Jonas Budelmann on 22/07/13. -// Copyright (c) 2013 Jonas Budelmann. All rights reserved. -// - -#import "View+MASAdditions.h" - -#ifdef MAS_SHORTHAND - -/** - * Shorthand view additions without the 'mas_' prefixes, - * only enabled if MAS_SHORTHAND is defined - */ -@interface MAS_VIEW (MASShorthandAdditions) - -@property (nonatomic, strong, readonly) MASViewAttribute *left; -@property (nonatomic, strong, readonly) MASViewAttribute *top; -@property (nonatomic, strong, readonly) MASViewAttribute *right; -@property (nonatomic, strong, readonly) MASViewAttribute *bottom; -@property (nonatomic, strong, readonly) MASViewAttribute *leading; -@property (nonatomic, strong, readonly) MASViewAttribute *trailing; -@property (nonatomic, strong, readonly) MASViewAttribute *width; -@property (nonatomic, strong, readonly) MASViewAttribute *height; -@property (nonatomic, strong, readonly) MASViewAttribute *centerX; -@property (nonatomic, strong, readonly) MASViewAttribute *centerY; -@property (nonatomic, strong, readonly) MASViewAttribute *baseline; -@property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr); - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - -@property (nonatomic, strong, readonly) MASViewAttribute *firstBaseline; -@property (nonatomic, strong, readonly) MASViewAttribute *lastBaseline; - -#endif - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - -@property (nonatomic, strong, readonly) MASViewAttribute *leftMargin; -@property (nonatomic, strong, readonly) MASViewAttribute *rightMargin; -@property (nonatomic, strong, readonly) MASViewAttribute *topMargin; -@property (nonatomic, strong, readonly) MASViewAttribute *bottomMargin; -@property (nonatomic, strong, readonly) MASViewAttribute *leadingMargin; -@property (nonatomic, strong, readonly) MASViewAttribute *trailingMargin; -@property (nonatomic, strong, readonly) MASViewAttribute *centerXWithinMargins; -@property (nonatomic, strong, readonly) MASViewAttribute *centerYWithinMargins; - -#endif - -#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) - -@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0)); -@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0)); -@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0)); -@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0)); - -#endif - -- (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; -- (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; -- (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; - -@end - -#define MAS_ATTR_FORWARD(attr) \ -- (MASViewAttribute *)attr { \ - return [self mas_##attr]; \ -} - -@implementation MAS_VIEW (MASShorthandAdditions) - -MAS_ATTR_FORWARD(top); -MAS_ATTR_FORWARD(left); -MAS_ATTR_FORWARD(bottom); -MAS_ATTR_FORWARD(right); -MAS_ATTR_FORWARD(leading); -MAS_ATTR_FORWARD(trailing); -MAS_ATTR_FORWARD(width); -MAS_ATTR_FORWARD(height); -MAS_ATTR_FORWARD(centerX); -MAS_ATTR_FORWARD(centerY); -MAS_ATTR_FORWARD(baseline); - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - -MAS_ATTR_FORWARD(firstBaseline); -MAS_ATTR_FORWARD(lastBaseline); - -#endif - -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - -MAS_ATTR_FORWARD(leftMargin); -MAS_ATTR_FORWARD(rightMargin); -MAS_ATTR_FORWARD(topMargin); -MAS_ATTR_FORWARD(bottomMargin); -MAS_ATTR_FORWARD(leadingMargin); -MAS_ATTR_FORWARD(trailingMargin); -MAS_ATTR_FORWARD(centerXWithinMargins); -MAS_ATTR_FORWARD(centerYWithinMargins); - -#endif - -#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) - -MAS_ATTR_FORWARD(safeAreaLayoutGuideTop); -MAS_ATTR_FORWARD(safeAreaLayoutGuideBottom); -MAS_ATTR_FORWARD(safeAreaLayoutGuideLeft); -MAS_ATTR_FORWARD(safeAreaLayoutGuideRight); - -#endif - -- (MASViewAttribute *(^)(NSLayoutAttribute))attribute { - return [self mas_attribute]; -} - -- (NSArray *)makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { - return [self mas_makeConstraints:block]; -} - -- (NSArray *)updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { - return [self mas_updateConstraints:block]; -} - -- (NSArray *)remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { - return [self mas_remakeConstraints:block]; -} - -@end - -#endif diff --git a/iOS_Tips/Pods/Masonry/Masonry/ViewController+MASAdditions.h b/iOS_Tips/Pods/Masonry/Masonry/ViewController+MASAdditions.h deleted file mode 100644 index 79fd1fa7..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/ViewController+MASAdditions.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// UIViewController+MASAdditions.h -// Masonry -// -// Created by Craig Siemens on 2015-06-23. -// -// - -#import "MASUtilities.h" -#import "MASConstraintMaker.h" -#import "MASViewAttribute.h" - -#ifdef MAS_VIEW_CONTROLLER - -@interface MAS_VIEW_CONTROLLER (MASAdditions) - -/** - * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute - */ -@property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop; -@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom; - - -@end - -#endif diff --git a/iOS_Tips/Pods/Masonry/Masonry/ViewController+MASAdditions.m b/iOS_Tips/Pods/Masonry/Masonry/ViewController+MASAdditions.m deleted file mode 100644 index 2f5139fa..00000000 --- a/iOS_Tips/Pods/Masonry/Masonry/ViewController+MASAdditions.m +++ /dev/null @@ -1,39 +0,0 @@ -// -// UIViewController+MASAdditions.m -// Masonry -// -// Created by Craig Siemens on 2015-06-23. -// -// - -#import "ViewController+MASAdditions.h" - -#ifdef MAS_VIEW_CONTROLLER - -@implementation MAS_VIEW_CONTROLLER (MASAdditions) - -- (MASViewAttribute *)mas_topLayoutGuide { - return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; -} -- (MASViewAttribute *)mas_topLayoutGuideTop { - return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop]; -} -- (MASViewAttribute *)mas_topLayoutGuideBottom { - return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; -} - -- (MASViewAttribute *)mas_bottomLayoutGuide { - return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; -} -- (MASViewAttribute *)mas_bottomLayoutGuideTop { - return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; -} -- (MASViewAttribute *)mas_bottomLayoutGuideBottom { - return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; -} - - - -@end - -#endif diff --git a/iOS_Tips/Pods/Masonry/README.md b/iOS_Tips/Pods/Masonry/README.md deleted file mode 100644 index d4286576..00000000 --- a/iOS_Tips/Pods/Masonry/README.md +++ /dev/null @@ -1,415 +0,0 @@ -# Masonry [![Build Status](https://travis-ci.org/SnapKit/Masonry.svg?branch=master)](https://travis-ci.org/SnapKit/Masonry) [![Coverage Status](https://img.shields.io/coveralls/SnapKit/Masonry.svg?style=flat-square)](https://coveralls.io/r/SnapKit/Masonry) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ![Pod Version](https://img.shields.io/cocoapods/v/Masonry.svg?style=flat) - -**Masonry is still actively maintained, we are committed to fixing bugs and merging good quality PRs from the wider community. However if you're using Swift in your project, we recommend using [SnapKit](https://github.com/SnapKit/SnapKit) as it provides better type safety with a simpler API.** - -Masonry is a light-weight layout framework which wraps AutoLayout with a nicer syntax. Masonry has its own layout DSL which provides a chainable way of describing your NSLayoutConstraints which results in layout code that is more concise and readable. -Masonry supports iOS and Mac OS X. - -For examples take a look at the **Masonry iOS Examples** project in the Masonry workspace. You will need to run `pod install` after downloading. - -## What's wrong with NSLayoutConstraints? - -Under the hood Auto Layout is a powerful and flexible way of organising and laying out your views. However creating constraints from code is verbose and not very descriptive. -Imagine a simple example in which you want to have a view fill its superview but inset by 10 pixels on every side -```obj-c -UIView *superview = self.view; - -UIView *view1 = [[UIView alloc] init]; -view1.translatesAutoresizingMaskIntoConstraints = NO; -view1.backgroundColor = [UIColor greenColor]; -[superview addSubview:view1]; - -UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10); - -[superview addConstraints:@[ - - //view1 constraints - [NSLayoutConstraint constraintWithItem:view1 - attribute:NSLayoutAttributeTop - relatedBy:NSLayoutRelationEqual - toItem:superview - attribute:NSLayoutAttributeTop - multiplier:1.0 - constant:padding.top], - - [NSLayoutConstraint constraintWithItem:view1 - attribute:NSLayoutAttributeLeft - relatedBy:NSLayoutRelationEqual - toItem:superview - attribute:NSLayoutAttributeLeft - multiplier:1.0 - constant:padding.left], - - [NSLayoutConstraint constraintWithItem:view1 - attribute:NSLayoutAttributeBottom - relatedBy:NSLayoutRelationEqual - toItem:superview - attribute:NSLayoutAttributeBottom - multiplier:1.0 - constant:-padding.bottom], - - [NSLayoutConstraint constraintWithItem:view1 - attribute:NSLayoutAttributeRight - relatedBy:NSLayoutRelationEqual - toItem:superview - attribute:NSLayoutAttributeRight - multiplier:1 - constant:-padding.right], - - ]]; -``` -Even with such a simple example the code needed is quite verbose and quickly becomes unreadable when you have more than 2 or 3 views. -Another option is to use Visual Format Language (VFL), which is a bit less long winded. -However the ASCII type syntax has its own pitfalls and its also a bit harder to animate as `NSLayoutConstraint constraintsWithVisualFormat:` returns an array. - -## Prepare to meet your Maker! - -Heres the same constraints created using MASConstraintMaker - -```obj-c -UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10); - -[view1 mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.equalTo(superview.mas_top).with.offset(padding.top); //with is an optional semantic filler - make.left.equalTo(superview.mas_left).with.offset(padding.left); - make.bottom.equalTo(superview.mas_bottom).with.offset(-padding.bottom); - make.right.equalTo(superview.mas_right).with.offset(-padding.right); -}]; -``` -Or even shorter - -```obj-c -[view1 mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.equalTo(superview).with.insets(padding); -}]; -``` - -Also note in the first example we had to add the constraints to the superview `[superview addConstraints:...`. -Masonry however will automagically add constraints to the appropriate view. - -Masonry will also call `view1.translatesAutoresizingMaskIntoConstraints = NO;` for you. - -## Not all things are created equal - -> `.equalTo` equivalent to **NSLayoutRelationEqual** - -> `.lessThanOrEqualTo` equivalent to **NSLayoutRelationLessThanOrEqual** - -> `.greaterThanOrEqualTo` equivalent to **NSLayoutRelationGreaterThanOrEqual** - -These three equality constraints accept one argument which can be any of the following: - -#### 1. MASViewAttribute - -```obj-c -make.centerX.lessThanOrEqualTo(view2.mas_left); -``` - -MASViewAttribute | NSLayoutAttribute -------------------------- | -------------------------- -view.mas_left | NSLayoutAttributeLeft -view.mas_right | NSLayoutAttributeRight -view.mas_top | NSLayoutAttributeTop -view.mas_bottom | NSLayoutAttributeBottom -view.mas_leading | NSLayoutAttributeLeading -view.mas_trailing | NSLayoutAttributeTrailing -view.mas_width | NSLayoutAttributeWidth -view.mas_height | NSLayoutAttributeHeight -view.mas_centerX | NSLayoutAttributeCenterX -view.mas_centerY | NSLayoutAttributeCenterY -view.mas_baseline | NSLayoutAttributeBaseline - -#### 2. UIView/NSView - -if you want view.left to be greater than or equal to label.left : -```obj-c -//these two constraints are exactly the same -make.left.greaterThanOrEqualTo(label); -make.left.greaterThanOrEqualTo(label.mas_left); -``` - -#### 3. NSNumber - -Auto Layout allows width and height to be set to constant values. -if you want to set view to have a minimum and maximum width you could pass a number to the equality blocks: -```obj-c -//width >= 200 && width <= 400 -make.width.greaterThanOrEqualTo(@200); -make.width.lessThanOrEqualTo(@400) -``` - -However Auto Layout does not allow alignment attributes such as left, right, centerY etc to be set to constant values. -So if you pass a NSNumber for these attributes Masonry will turn these into constraints relative to the view’s superview ie: -```obj-c -//creates view.left = view.superview.left + 10 -make.left.lessThanOrEqualTo(@10) -``` - -Instead of using NSNumber, you can use primitives and structs to build your constraints, like so: -```obj-c -make.top.mas_equalTo(42); -make.height.mas_equalTo(20); -make.size.mas_equalTo(CGSizeMake(50, 100)); -make.edges.mas_equalTo(UIEdgeInsetsMake(10, 0, 10, 0)); -make.left.mas_equalTo(view).mas_offset(UIEdgeInsetsMake(10, 0, 10, 0)); -``` - -By default, macros which support [autoboxing](https://en.wikipedia.org/wiki/Autoboxing#Autoboxing) are prefixed with `mas_`. Unprefixed versions are available by defining `MAS_SHORTHAND_GLOBALS` before importing Masonry. - -#### 4. NSArray - -An array of a mixture of any of the previous types -```obj-c -make.height.equalTo(@[view1.mas_height, view2.mas_height]); -make.height.equalTo(@[view1, view2]); -make.left.equalTo(@[view1, @100, view3.right]); -```` - -## Learn to prioritize - -> `.priority` allows you to specify an exact priority - -> `.priorityHigh` equivalent to **UILayoutPriorityDefaultHigh** - -> `.priorityMedium` is half way between high and low - -> `.priorityLow` equivalent to **UILayoutPriorityDefaultLow** - -Priorities are can be tacked on to the end of a constraint chain like so: -```obj-c -make.left.greaterThanOrEqualTo(label.mas_left).with.priorityLow(); - -make.top.equalTo(label.mas_top).with.priority(600); -``` - -## Composition, composition, composition - -Masonry also gives you a few convenience methods which create multiple constraints at the same time. These are called MASCompositeConstraints - -#### edges - -```obj-c -// make top, left, bottom, right equal view2 -make.edges.equalTo(view2); - -// make top = superview.top + 5, left = superview.left + 10, -// bottom = superview.bottom - 15, right = superview.right - 20 -make.edges.equalTo(superview).insets(UIEdgeInsetsMake(5, 10, 15, 20)) -``` - -#### size - -```obj-c -// make width and height greater than or equal to titleLabel -make.size.greaterThanOrEqualTo(titleLabel) - -// make width = superview.width + 100, height = superview.height - 50 -make.size.equalTo(superview).sizeOffset(CGSizeMake(100, -50)) -``` - -#### center -```obj-c -// make centerX and centerY = button1 -make.center.equalTo(button1) - -// make centerX = superview.centerX - 5, centerY = superview.centerY + 10 -make.center.equalTo(superview).centerOffset(CGPointMake(-5, 10)) -``` - -You can chain view attributes for increased readability: - -```obj-c -// All edges but the top should equal those of the superview -make.left.right.and.bottom.equalTo(superview); -make.top.equalTo(otherView); -``` - -## Hold on for dear life - -Sometimes you need modify existing constraints in order to animate or remove/replace constraints. -In Masonry there are a few different approaches to updating constraints. - -#### 1. References -You can hold on to a reference of a particular constraint by assigning the result of a constraint make expression to a local variable or a class property. -You could also reference multiple constraints by storing them away in an array. - -```obj-c -// in public/private interface -@property (nonatomic, strong) MASConstraint *topConstraint; - -... - -// when making constraints -[view1 mas_makeConstraints:^(MASConstraintMaker *make) { - self.topConstraint = make.top.equalTo(superview.mas_top).with.offset(padding.top); - make.left.equalTo(superview.mas_left).with.offset(padding.left); -}]; - -... -// then later you can call -[self.topConstraint uninstall]; -``` - -#### 2. mas_updateConstraints -Alternatively if you are only updating the constant value of the constraint you can use the convience method `mas_updateConstraints` instead of `mas_makeConstraints` - -```obj-c -// this is Apple's recommended place for adding/updating constraints -// this method can get called multiple times in response to setNeedsUpdateConstraints -// which can be called by UIKit internally or in your code if you need to trigger an update to your constraints -- (void)updateConstraints { - [self.growingButton mas_updateConstraints:^(MASConstraintMaker *make) { - make.center.equalTo(self); - make.width.equalTo(@(self.buttonSize.width)).priorityLow(); - make.height.equalTo(@(self.buttonSize.height)).priorityLow(); - make.width.lessThanOrEqualTo(self); - make.height.lessThanOrEqualTo(self); - }]; - - //according to apple super should be called at end of method - [super updateConstraints]; -} -``` - -### 3. mas_remakeConstraints -`mas_updateConstraints` is useful for updating a set of constraints, but doing anything beyond updating constant values can get exhausting. That's where `mas_remakeConstraints` comes in. - -`mas_remakeConstraints` is similar to `mas_updateConstraints`, but instead of updating constant values, it will remove all of its constraints before installing them again. This lets you provide different constraints without having to keep around references to ones which you want to remove. - -```obj-c -- (void)changeButtonPosition { - [self.button mas_remakeConstraints:^(MASConstraintMaker *make) { - make.size.equalTo(self.buttonSize); - - if (topLeft) { - make.top.and.left.offset(10); - } else { - make.bottom.and.right.offset(-10); - } - }]; -} -``` - -You can find more detailed examples of all three approaches in the **Masonry iOS Examples** project. - -## When the ^&*!@ hits the fan! - -Laying out your views doesn't always goto plan. So when things literally go pear shaped, you don't want to be looking at console output like this: - -```obj-c -Unable to simultaneously satisfy constraints.....blah blah blah.... -( - "=5000)]>", - "", - "", - "" -) - -Will attempt to recover by breaking constraint -=5000)]> -``` - -Masonry adds a category to NSLayoutConstraint which overrides the default implementation of `- (NSString *)description`. -Now you can give meaningful names to views and constraints, and also easily pick out the constraints created by Masonry. - -which means your console output can now look like this: - -```obj-c -Unable to simultaneously satisfy constraints......blah blah blah.... -( - "", - "= 5000>", - "", - "" -) - -Will attempt to recover by breaking constraint -= 5000> -``` - -For an example of how to set this up take a look at the **Masonry iOS Examples** project in the Masonry workspace. - -## Where should I create my constraints? - -```objc -@implementation DIYCustomView - -- (id)init { - self = [super init]; - if (!self) return nil; - - // --- Create your views here --- - self.button = [[UIButton alloc] init]; - - return self; -} - -// tell UIKit that you are using AutoLayout -+ (BOOL)requiresConstraintBasedLayout { - return YES; -} - -// this is Apple's recommended place for adding/updating constraints -- (void)updateConstraints { - - // --- remake/update constraints here - [self.button remakeConstraints:^(MASConstraintMaker *make) { - make.width.equalTo(@(self.buttonSize.width)); - make.height.equalTo(@(self.buttonSize.height)); - }]; - - //according to apple super should be called at end of method - [super updateConstraints]; -} - -- (void)didTapButton:(UIButton *)button { - // --- Do your changes ie change variables that affect your layout etc --- - self.buttonSize = CGSize(200, 200); - - // tell constraints they need updating - [self setNeedsUpdateConstraints]; -} - -@end -``` - -## Installation -Use the [orsome](http://www.youtube.com/watch?v=YaIZF8uUTtk) [CocoaPods](http://github.com/CocoaPods/CocoaPods). - -In your Podfile ->`pod 'Masonry'` - -If you want to use masonry without all those pesky 'mas_' prefixes. Add #define MAS_SHORTHAND to your prefix.pch before importing Masonry ->`#define MAS_SHORTHAND` - -Get busy Masoning ->`#import "Masonry.h"` - -## Code Snippets - -Copy the included code snippets to ``~/Library/Developer/Xcode/UserData/CodeSnippets`` to write your masonry blocks at lightning speed! - -`mas_make` -> ` [<#view#> mas_makeConstraints:^(MASConstraintMaker *make) { - <#code#> - }];` - -`mas_update` -> ` [<#view#> mas_updateConstraints:^(MASConstraintMaker *make) { - <#code#> - }];` - -`mas_remake` -> ` [<#view#> mas_remakeConstraints:^(MASConstraintMaker *make) { - <#code#> - }];` - -## Features -* Not limited to subset of Auto Layout. Anything NSLayoutConstraint can do, Masonry can do too! -* Great debug support, give your views and constraints meaningful names. -* Constraints read like sentences. -* No crazy macro magic. Masonry won't pollute the global namespace with macros. -* Not string or dictionary based and hence you get compile time checking. - -## TODO -* Eye candy -* Mac example project -* More tests and examples - diff --git a/iOS_Tips/Pods/Pods.xcodeproj/project.pbxproj b/iOS_Tips/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index b7702e85..00000000 --- a/iOS_Tips/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,2981 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 0096B5A8BA8E4F2BFD8839D0FE7CD696 /* MASLayoutConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C3AE50C738678F7E82112FDB4A8E70C /* MASLayoutConstraint.m */; }; - 00986AC306A77F203295619535AF853F /* GPUImagePerlinNoiseFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 20BC00B3DDB29110A58176CE51605FD4 /* GPUImagePerlinNoiseFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 00BC50439EB78BC024C8271F5FC50579 /* GPUImageMultiplyBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 61E2A63537B14F7A60668071C08241DE /* GPUImageMultiplyBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 012A87349E85A8CA10E4AD07361E6D86 /* GPUImageExclusionBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E272A947106122CD1F27C631D653DA4 /* GPUImageExclusionBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0172B10DE456AE5736FD887F0CEB74AF /* YYWebImageOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 48F476DACC4D9202F44C5407ACDA8410 /* YYWebImageOperation.m */; }; - 01C95E537574ABC59799352D0AD70028 /* GPUImageRawDataInput.m in Sources */ = {isa = PBXBuildFile; fileRef = D3B1D10EA9F731D0F5F681A4CAEDE5D6 /* GPUImageRawDataInput.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 01DA5C61D7BA40621EC5460EED38200E /* GPUImageBilateralFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = C6C160D9019636230267BE3289CF1EF8 /* GPUImageBilateralFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 029F819514A66087992EE035796FB9F2 /* GPUImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A1109257C4F91B78B674D3ED606F875 /* GPUImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 03182402D9CC511877544D993D1FFA9E /* GPUImageSepiaFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 71669CD78F52A5CA28F626C8A16A194C /* GPUImageSepiaFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0319334D0B9B8B673C0BAEAC13FFE1FB /* GPUImageMissEtikateFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E01E00886BEDC0765B232733C255C1C /* GPUImageMissEtikateFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 032FBF65C1B7C211B28D54B160B1612D /* GPUImageHarrisCornerDetectionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = FABBE2C4A63D29A135EB2E35769CF66E /* GPUImageHarrisCornerDetectionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 044D6E9E03CB8ECD6E58801E7C6C527A /* GPUImageHueBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = C080FC8084166668F65F78ED0AA4A69B /* GPUImageHueBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 05C61347A8543E701B094D915BD5C838 /* GPUImageRawDataOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = A1BDF8E1519711BE1634F7B98C1BE5A4 /* GPUImageRawDataOutput.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 06EB7CC11A03D75FD2DA07D284685F73 /* YYModel-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 55DC707CC4179395588164EA0C8D4DF8 /* YYModel-dummy.m */; }; - 076971540B7FE20B66B50A6DBEC80064 /* GPUImageLineGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FA9A4C47EC9F4059DAB7AADC578E5AF /* GPUImageLineGenerator.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 089AB5F862A3EF9A0218037D8C73DB9D /* GPUImageColorDodgeBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F83E8DB73761A3F59617E28A1A9351E /* GPUImageColorDodgeBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 097C32010AB76B1FE9C162A2A1876ECE /* GPUImagePolkaDotFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B933CA3EC0B18A8DB363F31A85D1268 /* GPUImagePolkaDotFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 0AAAED8B75B6AD69452465FD9596FD0D /* YYCache-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F066292FE00E22395481D12B85DCF15 /* YYCache-dummy.m */; }; - 0AEA27BF85DB689C14FB34D0FEBDB851 /* GPUImageTextureOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 621DA413177A46757ACA5C0C17FE0C8C /* GPUImageTextureOutput.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 0B1B3B1DB51A07B13F0A363BC22F59A2 /* GPUImageChromaKeyBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = B11AD2552FDB15FF1C538A2621C8454E /* GPUImageChromaKeyBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0B6FE241DFB3843F412B6468A8F4D2E2 /* YYKVStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = E17C159C87DA98A853415C410757984D /* YYKVStorage.m */; }; - 0B8E7DAF6EF79317C606AAF3BDF1B166 /* NSObject+YYModel.h in Headers */ = {isa = PBXBuildFile; fileRef = D4336A5672C30CDB1EBF2ABE41670A08 /* NSObject+YYModel.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0BB1F971030D1518F9CF319E9D4DC1AD /* GPUImageHistogramEqualizationFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B93FEAD1B3DB233D4B21EB7567E5E3A0 /* GPUImageHistogramEqualizationFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 0BD4E21F29F34FB17265C7BD9887C84D /* YYMemoryCache.h in Headers */ = {isa = PBXBuildFile; fileRef = AFB401E05E9C8DEA8B23609216EB64E5 /* YYMemoryCache.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0CE8DDB17A7E7660B35605B8139FE3B3 /* GPUImageToneCurveFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = FB638C9B72C7E7F1B16A43E90A8BF20E /* GPUImageToneCurveFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 0D257609B3B75A4CBFFBD05133D61391 /* YYImageCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = ECF46625DB05146F6E98B2E53445EFC8 /* YYImageCoder.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0DFAF263663A062127902C54C6983A09 /* GPUImageAdaptiveThresholdFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 00D7FBFB94E92C7589C179A64EA9B9E1 /* GPUImageAdaptiveThresholdFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 0E7080397F8B5AE0B8A3D7AF280BB094 /* GPUImageGaussianBlurFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 291AEAB6C085560A71960DDDD62ACD1A /* GPUImageGaussianBlurFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 0F1318DD0AD76D96EB95DA11FE97A2C1 /* GPUImageLightenBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = DFE90665F8A100159773904C5A2F8967 /* GPUImageLightenBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0F9FB5E7A6BC661FC3F8852F4FC69D86 /* GPUImageFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F455391A9616D714CC8874A51F7EE6 /* GPUImageFramework.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 115ACCE253A886181B55773DDC70D6ED /* MASViewConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = F1A5C4493663A851186ED81654C1C388 /* MASViewConstraint.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 11E619FEA09D4BF81ACE5C2921D00B19 /* GPUImageBoxBlurFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 202D068CFDA5C22DA922D9FD075D1806 /* GPUImageBoxBlurFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 15237712FC9D46A2037F26E70353D2EA /* GPUImageOverlayBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 80F0F94732C9BFC491C85042FF7D14A5 /* GPUImageOverlayBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1646382FCB4B9AE1130EC8ACEDA90598 /* YYImage.m in Sources */ = {isa = PBXBuildFile; fileRef = AC24421A335214257CD3748289F31E7D /* YYImage.m */; }; - 168FB6A74A76E3979C4E47BBADF7DBFE /* GPUImageVideoCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FE5C658FDFFD20E3BCD7C36D40923A3 /* GPUImageVideoCamera.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 16B07BF8A572D2B926D42CEB9A6491ED /* GPUImageWeakPixelInclusionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 092384ABCABB5474EAF3E9D8F02DF29F /* GPUImageWeakPixelInclusionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 16BEA757C13C39AF5F5FCDB143AF53A9 /* GPUImagePinchDistortionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 870991E39050AAA48FC751AB989A0CEE /* GPUImagePinchDistortionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 17EF299F850C9C8628F34469C37013DD /* GPUImageAddBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C250AC091347FFBBF15D1616FB339BA /* GPUImageAddBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 180A83B65E6DDB6EB746870CF41325A1 /* GPUImageDivideBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 40BEB1831EED3C7A7E80C4057D3DA022 /* GPUImageDivideBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 1860650813D77F0191C8979285AEFC40 /* GPUImageChromaKeyFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3193AAC04525E3412D850A3D7AD99612 /* GPUImageChromaKeyFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 18A409862FE2BD9E7AEB7F8C443A2EEA /* GPUImageAverageLuminanceThresholdFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 722AE0C698ABB0490DECD454A56B78D5 /* GPUImageAverageLuminanceThresholdFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 19436D75D39F5FEC5CFC10989E8D21E7 /* GPUImageRGBClosingFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BBCCF9A4A7C3B7E1D6638E2D15B2B83 /* GPUImageRGBClosingFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 19E2053A876C0F6A156C00BC10116E4B /* GPUImageSobelEdgeDetectionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 38948BFE21048F7C6D91B1281E521F1B /* GPUImageSobelEdgeDetectionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 1C02510C4D6500A7A376A57169D955DC /* GPUImageVoronoiConsumerFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 83FF0DCFBB0CF862F4E2370485036696 /* GPUImageVoronoiConsumerFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1E5D56FF58658F9F45723CA2940489EE /* MASConstraintMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = C8E3D2D6BFE3A6A5011A9A78D5041D6B /* MASConstraintMaker.m */; }; - 1EE8655B7099DFDF91AB09854A782014 /* GPUImageParallelCoordinateLineTransformFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = E9AD39DB2F1E55880567989B269FAC3D /* GPUImageParallelCoordinateLineTransformFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 1FDB79E9550E8876B19B618E78F53309 /* GPUImagePixellateFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = D2C5AB16BD22FA6146D9733E98392177 /* GPUImagePixellateFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 203ECB87C9B02B1B8BAAF78D8A62A1DE /* GPUImageMonochromeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = A21D094A16257D428FAE0B259CD960F5 /* GPUImageMonochromeFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 20E327AE2E71D49D773CD130992DCE16 /* GPUImageRGBOpeningFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = CD17316111B32EDFB414E2DB7107670D /* GPUImageRGBOpeningFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 21D3457D9AA054C835BB17F56A79041D /* GPUImageMissEtikateFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = F448306B3687298FFAD025EB2DDD73EF /* GPUImageMissEtikateFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2280B1BE277126BD771028C12BD6A59E /* GPUImageLocalBinaryPatternFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = DD88158BB140DD22AAFBE5A81587E42D /* GPUImageLocalBinaryPatternFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 23AE0543B10B548DC5EA894199172600 /* GPUImageHSBFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3262E2097D957FBD0444889742CB1C80 /* GPUImageHSBFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 23FBD272CA96DCB898B9271EB71F7D51 /* GPUImageRGBDilationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 31F4DFCE2BAF8205326A79D123842D37 /* GPUImageRGBDilationFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 247F37C5897D9F02668D125EFFB75B59 /* GPUImagePicture+TextureSubimage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E9095CF9176D72147052B3FD215EF7F /* GPUImagePicture+TextureSubimage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 24D5BD2976FC932DE4ADAEB93A0479F6 /* GPUImageMaskFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 21B2916276232C456951467038D3E2FF /* GPUImageMaskFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 2516CA9197EA00286EFFAAD3A11402C5 /* GPUImageLookupFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = D5AB4ADA23B1748AB0ED4BB1DB527C69 /* GPUImageLookupFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2607BC411D43A5440E53234F8AB482C8 /* CALayer+YYWebImage.m in Sources */ = {isa = PBXBuildFile; fileRef = C05B47CD66C71D9CAAF1627186D1C6DE /* CALayer+YYWebImage.m */; }; - 26A8C66FE48977B328358F9F2BF641A0 /* GPUImageGaussianBlurFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E170213BF8AB60A888762910A4745B2B /* GPUImageGaussianBlurFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2702708CF3F7B8F8C71CD04CE0E0407B /* GPUImageWhiteBalanceFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEA48B785F73A0492D9D729976FD86B /* GPUImageWhiteBalanceFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 28A79E1849CD533B44B7BEFEB7E23FCD /* GPUImageMosaicFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9ADFE335A749F6242A5501FC31B4EDB2 /* GPUImageMosaicFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 29065AD49ABF0ECB23CF05B75B448A05 /* GPUImageTwoPassFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A7E3C6A77B24BBCAF360A95E890B7F76 /* GPUImageTwoPassFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 293D641452CDA50B1DE046BB9B5105B1 /* GPUImageHarrisCornerDetectionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CE39347324DF5B3FC2761B6D191DA9C /* GPUImageHarrisCornerDetectionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 29B8B5BB202D5EAB464A41B22DE1B5BC /* GPUImageSharpenFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = BBB88E5B5C49D8640CAD758ACB9A6965 /* GPUImageSharpenFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2A056E4E0CB5341CF83B2902850B496C /* GPUImageLowPassFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B86F3F70B22B26EC06C5C412D9B9733 /* GPUImageLowPassFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 2A0981C33E3E8401ECD3482994B3BCBF /* GPUImageTransformFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E48FED45DEF3A3929689CA91C2C802C /* GPUImageTransformFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2AD9C4FEB3BDBD7AFABEFC1D2D16A04C /* GPUImageSepiaFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DADF97A372B96269C7E574FFD19EA84 /* GPUImageSepiaFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 2B3F38B85111F3D785A806C971FE2F23 /* GPUImageLevelsFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6460B60CAEB361F43B409D943DD5919E /* GPUImageLevelsFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2C41DD251C08A607AB0D65FD88E3A066 /* YYCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 160895B89A8B29B177F36E3AF17C2C11 /* YYCache.m */; }; - 2D98C578934FC343F36EE6FE89BFDB11 /* GPUImageHueBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = F53E198F369DD7B29FDFD1E67D7FEF92 /* GPUImageHueBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 2DF0E53968A631FCBDD17A7F6476285E /* GPUImageBilateralFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 77A6428D36533AF050B1E9F92BF82FD8 /* GPUImageBilateralFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2EEFD3082E5C0D943EB927EE0E18FCB1 /* GPUImageSoftEleganceFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 525E00D440284C93311DF077591CDA15 /* GPUImageSoftEleganceFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2F701A9E49DDA3C1A240D28CC2285636 /* GPUImageHoughTransformLineDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = 6CA047F4F7C29EBD892E71642C0B6FD0 /* GPUImageHoughTransformLineDetector.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 2F71447BF395AFE0424A0173E1D3941B /* GPUImageColorBurnBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 917747700EB9C26B29A0199F357B3B12 /* GPUImageColorBurnBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 307069FED8CBB5FD30C15FC7C0A62182 /* GPUImageFramebuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = DEC5E896CBBBB4368B3D73E3B6DF98AF /* GPUImageFramebuffer.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 31D6CA90C42E5C93B586480348B000A3 /* GPUImageSoftLightBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF69C635DEFF07CF03F7EC5C93EECC6 /* GPUImageSoftLightBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 32EE5B60261B8BC36AFE11DF61DF7FE8 /* GPUImageAmatorkaFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 42C7A8AF75309C3CA628C0B8775A0F0B /* GPUImageAmatorkaFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 332F47F53E6998F86527587E29CA5D9E /* NSObject+YYModel.m in Sources */ = {isa = PBXBuildFile; fileRef = B72EC130B00BB80835F63C15885EEB06 /* NSObject+YYModel.m */; }; - 3477F92624D8C9133F3041A79491FA59 /* GPUImageBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = 571C0946C15922F37A4FF9DC53636F23 /* GPUImageBuffer.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 3490572882298AE0C0313A3214E36B06 /* GPUImagePerlinNoiseFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E75C8905888A317693F48FC06029AC84 /* GPUImagePerlinNoiseFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3506EE5862108B2A8C41A20D99355F18 /* GPUImageDirectionalSobelEdgeDetectionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5D87CE6703E1941A5580858F307A6D /* GPUImageDirectionalSobelEdgeDetectionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3561CB57DDD73F8AFA84BF0E76ABB946 /* GPUImageLanczosResamplingFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 37B3E429270DF855D2663E4BE0DCE666 /* GPUImageLanczosResamplingFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 35CB55CABE07087AB199A17790384536 /* GPUImageStillCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A630DEACFD6C33B16EABFCBA7B10B6B /* GPUImageStillCamera.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 35CBA794B313B0A704877F12F8D1ABFA /* GPUImageMovie.m in Sources */ = {isa = PBXBuildFile; fileRef = 68CD24B140838D08A6E5DD6A70FD8923 /* GPUImageMovie.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 36C40AACF03A24A362EB39C429249959 /* GPUImagePicture+TextureSubimage.m in Sources */ = {isa = PBXBuildFile; fileRef = C1703B1CC3A8EF46F7E0BC97EF312B15 /* GPUImagePicture+TextureSubimage.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 3726AB2B00A42F73A0124907B9ACC3A9 /* GPUImageTwoInputCrossTextureSamplingFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 59C6E40234EEDDD4087F2CFFF63582D0 /* GPUImageTwoInputCrossTextureSamplingFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 37CE879D95C30445360AD6D0C1FA7CC4 /* GPUImageSourceOverBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 074228E092340DEFE657CAF4F22AF822 /* GPUImageSourceOverBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 394A129E507245FF105966F376AB1C41 /* GPUImageTiltShiftFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = C0C8CE6B752A1D6DC908E8EBC379636C /* GPUImageTiltShiftFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 39A315F02A4702D5670CB93A5C9BEEEA /* GPUImageZoomBlurFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 0274C1DACB9A0794CFD00841FAE59E3D /* GPUImageZoomBlurFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 3A87E2458C94D01EEEC9538DB032AC9D /* GPUImageHistogramGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CEEEBC4B26A07F17E3509809AE7C514 /* GPUImageHistogramGenerator.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3A8C1A0178B01AD26430FC5B130F5E0D /* GPUImageGrayscaleFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 751129785F65D4A3EA3332CE56D280DD /* GPUImageGrayscaleFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 3AA724CDE56C03778D0D8C6C614C28E5 /* GPUImageCrosshatchFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8897A494B1993654654BD96F0352C036 /* GPUImageCrosshatchFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3B055578547C840E193F2BCB94BF4C02 /* YYSpriteSheetImage.h in Headers */ = {isa = PBXBuildFile; fileRef = D9580A4EE8AFE8DD3E68A776F88E557B /* YYSpriteSheetImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3B7BB04082AF2620E265A3088B2B4D0D /* GPUImageAlphaBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 462A9647EF473D7371FF63E7DF5E9FB1 /* GPUImageAlphaBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 3BF8C851F81EBF3411E82F9E1C793DAE /* GPUImageLanczosResamplingFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = B015E5C22E17335E3A77DFA9908BB606 /* GPUImageLanczosResamplingFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3E31203B357CAE0A15DB0850091BB79B /* GPUImagePicture.h in Headers */ = {isa = PBXBuildFile; fileRef = B8113E2BE805826C2206219087AF2FEB /* GPUImagePicture.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 3E63B4119CD44378A1093476E54E2474 /* GPUImageBulgeDistortionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B600C9B478F0D9AD34362F46737F82C5 /* GPUImageBulgeDistortionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 40B61558F93F007E0435D240EBA4A5E4 /* GPUImageKuwaharaFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 82C6F83D1D031E0F313B5E11137E072B /* GPUImageKuwaharaFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 410F226804ABA48DDADFB2C40CDBDF90 /* UIImageView+YYWebImage.h in Headers */ = {isa = PBXBuildFile; fileRef = B4080351977D02914F701E5AF2820E28 /* UIImageView+YYWebImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 41CC5477C7CC1FCAFA0486B4710DB563 /* GPUImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 295A7F01A1F9CE9A049C72379F8EC892 /* GPUImageView.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 42947699890A199B08A896144A878D80 /* MASViewAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E7EB13B2D474F8DE4852C033BF689FB /* MASViewAttribute.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 42EF3318A12DEA2D31B64DA77EFE2FB3 /* GPUImageHistogramFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8472059D35BC092DEF41EC2604D795FB /* GPUImageHistogramFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 43392130FF1BA22BCD40F201F94DF7C0 /* GPUImageExposureFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = EA2A44D6FF0F9ACEE1DADC1A14F2854D /* GPUImageExposureFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 436BC7F553DA755100A82BA0F05483D5 /* GPUImageHighlightShadowFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 10015A94BC5970A447441E41EFA84CC4 /* GPUImageHighlightShadowFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 441A09967A85ABE244200F5B5E6EC9A3 /* GPUImageHighlightShadowFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2988FF2F5DA771E11045F136F9BD4F0A /* GPUImageHighlightShadowFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 443DCC9EACB122059801B326E959DD2D /* YYImageCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E5E02B856C988A000B10E5E5512B56A /* YYImageCoder.m */; }; - 4478C2AC2D38DD361F0F23A0C5B79C41 /* GPUImageVignetteFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FE18CDF175FE55AE74C18EF88123854 /* GPUImageVignetteFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 44ABF3A14712E8B399B82DF3A2967A0A /* GPUImageMosaicFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = D24C3AB3AE7CD24FB83746C901F281BA /* GPUImageMosaicFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 44B2A991A256252267B769DAE2328918 /* GPUImageFilterPipeline.m in Sources */ = {isa = PBXBuildFile; fileRef = 2EAC8FE75CB608768A2CEA2F31EDF290 /* GPUImageFilterPipeline.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 463C05A520F9F187AA59A4532ED2DC98 /* GPUImageSmoothToonFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B81F4796AC0D72D4F1B2047D5A0E8AC0 /* GPUImageSmoothToonFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 46692A2E77157B00827182C8DC686F72 /* View+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = C4193CD804FDADD82E3B8FE1883F6D29 /* View+MASAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 468E8582953579A3237E9B07A4290809 /* GPUImageSphereRefractionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B8043D2AA30371284EF62F7AE00669A6 /* GPUImageSphereRefractionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 46FBEAFB68F195DBF93DEE185B5B821E /* GPUImageToneCurveFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D6604B45B92B4410C171D7E0C6B4939 /* GPUImageToneCurveFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4720A768E07B694895699C1A455D433B /* YYWebImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 8DEFD1186E4AE1006B42EF52538073A3 /* YYWebImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 472C8A534A872D0B6D85286483E6D753 /* YYDiskCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B515D86A399467A37FA4BA15B8B0887 /* YYDiskCache.m */; }; - 47699E5E05076562ACB35B1C71C13347 /* GPUImageLinearBurnBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AF1FBA24B5573418B3316CD3B2CAF8B /* GPUImageLinearBurnBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 47AD0E032FC7AA3EEB930742976CB88D /* GPUImageLineGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 2276B332FA8EDDC35FE32348D3EB368C /* GPUImageLineGenerator.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 47DDAD3895F510382B2D81B70B620529 /* GPUImageXYDerivativeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = C8EFB486F7011880B250BD588AF6B03A /* GPUImageXYDerivativeFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4B1D960FF8280CC54413CABB5D2F2A2E /* GPUImageiOSBlurFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 79F32CA2AC9383860E5A101F3891F01F /* GPUImageiOSBlurFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4B29282458432763173D54C2F5B21719 /* GPUImageThresholdedNonMaximumSuppressionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 99007670CCD9C91A8F619B9CEA906413 /* GPUImageThresholdedNonMaximumSuppressionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4B3E8A322CC1A802C18F4D2BC353D07B /* GPUImageSobelEdgeDetectionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E16FF3BBD2E461C6B31F4D28293DEC1F /* GPUImageSobelEdgeDetectionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4BA1A0406DD78FE4D11CF77A531CF5C3 /* GPUImageMovieComposition.m in Sources */ = {isa = PBXBuildFile; fileRef = E9BE79BD70E8A2BBB669B77DE76E87B2 /* GPUImageMovieComposition.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 4CE091F886EC6324673EFE0AEBBEA0FE /* MASConstraint+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = F73A13F286165F4836D8D7D4AAC5C284 /* MASConstraint+Private.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4D71EEBCF009BD38CDBDCB7FF48E9D3D /* YYMemoryCache.m in Sources */ = {isa = PBXBuildFile; fileRef = D6DEC4D0701355737F042ABE9389A98E /* YYMemoryCache.m */; }; - 4EC8896E34902FB81D8ECE3CBCE43F22 /* GPUImageLaplacianFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = B49CFF15CC2A8F9BE7A7F6E9858CF4A9 /* GPUImageLaplacianFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 4F9FCCD41B5DB358F6471868A7AF0FF8 /* GPUImageDifferenceBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DF64883F152558549C53B4951455B9B /* GPUImageDifferenceBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 4FCB792F4D09A7A6EC830F3F09E57E3E /* GPUImageHistogramGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 49E415F2BA5768C469A662DF8C823B3C /* GPUImageHistogramGenerator.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 4FF8537039C6FB3E87DCC9F4A0390D2F /* GPUImageErosionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F2C1EF174D0C89A1ECD8D871814D3C5 /* GPUImageErosionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 501A410F165BE59627833296C733AD55 /* GPUImageCannyEdgeDetectionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A0B5C9037C5004A4E5533B5FE12C1BE7 /* GPUImageCannyEdgeDetectionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 50C2B02BB91270A6EB35F60571F06E54 /* GPUImageThresholdSketchFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = BBE357EF73F92D80EB2A32F6C9ADC813 /* GPUImageThresholdSketchFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5107E16FCC65F65EC492836E724F0BFE /* GPUImageFramebufferCache.m in Sources */ = {isa = PBXBuildFile; fileRef = EE42EB7F34AB1582A3A5744A834BD119 /* GPUImageFramebufferCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 527FC696CFE9E79296FAE22B581EDF93 /* GPUImageOutput.h in Headers */ = {isa = PBXBuildFile; fileRef = 43471FC538F7533EBC5AA010B09E0958 /* GPUImageOutput.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 52914E62535E485DD3712D4563197A4E /* GPUImageFASTCornerDetectionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 71D502A5B132B8E2D515B9A975C85309 /* GPUImageFASTCornerDetectionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 531132F9F82136C7E0089691EF9D1836 /* GPUImagePrewittEdgeDetectionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5021D951EBE0EE5ACBFF0A1D5BF60EC2 /* GPUImagePrewittEdgeDetectionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 53C1EE743E9410FE7276FA94A236289F /* GPUImagePrewittEdgeDetectionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 414E85F24E79E32F8EA8031796253C7F /* GPUImagePrewittEdgeDetectionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 54A44219E060C802B200A9A82B8F403C /* YYImage-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6641303C0E807B1DB7DE0B014814E30A /* YYImage-dummy.m */; }; - 54AC6004FE0F928E06D79A88364B08C2 /* GPUImageThresholdEdgeDetectionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 240C513A27F958A5DE57B92A02EA4229 /* GPUImageThresholdEdgeDetectionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 54C308204D830A23ADC5E7E77F11FAD9 /* GPUImageAverageColor.m in Sources */ = {isa = PBXBuildFile; fileRef = F3FB9DB94CA9285178C40FCA640755A3 /* GPUImageAverageColor.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 55E840167C4D134B42027183FE12AA5F /* GPUImageMotionBlurFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 488651029866527C3B2644FD81E92587 /* GPUImageMotionBlurFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 572D05B146EAA3EF5530A0D0E34904A0 /* MASViewConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = E48C3FA68C009689F44837B466401AA1 /* MASViewConstraint.m */; }; - 57AE9C0FF97670789648FCFFCF23A28F /* YYCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E5AC46F45E4451E72AC537BB70B1812 /* YYCache.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5934E71FD7CE977980F1F3E0FBB0589D /* GPUImageRGBErosionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 080F15FCC36CE02B5AA7B6A38D2A6F1C /* GPUImageRGBErosionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 596D6C47B56C81DAAF4AEFD6EBE90E4E /* YYAnimatedImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = BAA4F2B29058FE252D949D0C32390318 /* YYAnimatedImageView.m */; }; - 59EA578EED8BAC126FDC60C32AE11521 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D6496F72C325C292BB59F2D94A654A2 /* NSLayoutConstraint+MASDebugAdditions.m */; }; - 5C176EB69346C558230FA62C8FF9445C /* GPUImageSoftEleganceFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = AB5B9F20F2CC4E7B1E64873C8F4C7DEB /* GPUImageSoftEleganceFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 5D6023B887E0BCB76115B617532A5390 /* YYWebImageOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 019AEDB1F84B03733946BD4BAABB969C /* YYWebImageOperation.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5E8E7BB740E167DE322057CBF4E4ACFF /* GPUImageLuminanceRangeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A22790AD2F8E9488E3E272090ACDE88B /* GPUImageLuminanceRangeFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5EAB582B3DAE152158E656DDCD462408 /* GPUImageGrayscaleFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C138582918D37CF364E6D3C9898D68F /* GPUImageGrayscaleFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5ECA6D4026DE7F909DD178B2DBF665FB /* GPUImageTwoPassTextureSamplingFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = F4CCD104A376890D8A12507C5239B8B1 /* GPUImageTwoPassTextureSamplingFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5F285812B5CDF5D9FD0533372DA93B36 /* GPUImageRawDataInput.h in Headers */ = {isa = PBXBuildFile; fileRef = F8F996C485D25C0141065FF489D1BA53 /* GPUImageRawDataInput.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5F7E38F771E8D6181B8C72C5D8C10C14 /* GPUImageFramebuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = 838B4FE7CBA73D00A0885739EF9AA694 /* GPUImageFramebuffer.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 608A35BC3D8DA3484591875607E5D90C /* GPUImageColorBurnBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 73B8731A5CF568F198781C8412733FB0 /* GPUImageColorBurnBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 60CBB436C809283781907EA30C935F35 /* GPUImageContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 69BEFC89CA92FA91FB606E547079BABE /* GPUImageContext.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 63546D4E91CCFC991D704AA7E55D3EF4 /* GPUImageRGBClosingFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 56D2D8153149A60C61AB14238CE5A721 /* GPUImageRGBClosingFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 639230154DADB35273109F737BA51C7D /* UIButton+YYWebImage.h in Headers */ = {isa = PBXBuildFile; fileRef = F38E818E85AFE98DD31A606DB69D79D5 /* UIButton+YYWebImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 63F87C318437740E8202E4D3DD0826FA /* MASCompositeConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = AF50E9AAD19F008B707D7D8F7EACA2D3 /* MASCompositeConstraint.m */; }; - 64000452C59702057A087C4A76CFE687 /* GPUImagePosterizeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 69E5EB77E2A5E329FE60A250611BF2FC /* GPUImagePosterizeFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 647A2EAB797A3D68176CC3AC101F2F1A /* GPUImageFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = DCDB8D6607C77835C1EC75EB9F36E5C5 /* GPUImageFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6480781DB47D05BF915975DC8A7B61BE /* GPUImageKuwaharaRadius3Filter.h in Headers */ = {isa = PBXBuildFile; fileRef = 29114F4BF994DD99DA8B15BD714B5488 /* GPUImageKuwaharaRadius3Filter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 65E88072A2BDC576BFC85E67EF9FBBC6 /* MASUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = CE8B3FE478847A7AAD2B21BC40809B56 /* MASUtilities.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 66ED1E95B81405D02E043A58017D95F0 /* GPUImageMotionBlurFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 34804E531C9635A205640CD71C357B77 /* GPUImageMotionBlurFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 67EE0DDBEB2517F5B04D04B93226A9BC /* GPUImagePicture.m in Sources */ = {isa = PBXBuildFile; fileRef = B4F3FFA58FE342F21294920E38929E3F /* GPUImagePicture.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 686489D54A6EA62779A0F4C34D29934F /* GPUImageMovieComposition.h in Headers */ = {isa = PBXBuildFile; fileRef = 00BAF7C4E2492F63C9589A48B9A174F5 /* GPUImageMovieComposition.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 68BCD2A517C5CB6DF61FE1187DD63266 /* GPUImageColorDodgeBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F6459CEEE271680736FA479FD981BD4 /* GPUImageColorDodgeBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 694F36DE0A2C6B75B53CA842A09C450C /* GPUImageDissolveBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 27A2C6937109C3C8643FB3E370CDBE29 /* GPUImageDissolveBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 69FC4C251095ED7B8667F599EE032BF9 /* GPUImageHardLightBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 784B2008FD82B473DC377FEEC4B7EFD4 /* GPUImageHardLightBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 6A92349242C40DAA199A7FB7C7ACDCC1 /* GPUImageHalftoneFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B3AB6691A881BF883BB176FDAB07FBA /* GPUImageHalftoneFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 6AABC70C8EF035909F5A2D3DC6B5FA4A /* GPUImageTwoInputFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A8C055AB3C18A2E3FE4F47E4F66E5A /* GPUImageTwoInputFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 6B18BAD834E408DE82E33DB82DD63168 /* YYImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 094F16B0BD56037708312F6A3D1774F3 /* YYImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6B40D4EB83F51507D03ACD5FDBBEF888 /* GPUImageDifferenceBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 64B98E97EBB4B89FF8C0A73B4905060A /* GPUImageDifferenceBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6BA2489921F50583559CC1BB13DB8B42 /* MKAnnotationView+YYWebImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 9680F05DBD64586E9AB59F33EA7E289F /* MKAnnotationView+YYWebImage.m */; }; - 6CD33B44569EC746123A3B3684E2CE91 /* GPUImageTwoInputCrossTextureSamplingFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0CA0BA0CC8335A694D5350A133298DB3 /* GPUImageTwoInputCrossTextureSamplingFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6D8EBA9E4E1129A31580B8B4D7345A8F /* GPUImageDissolveBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 63157528C8EC3BBA57A086A9E876519F /* GPUImageDissolveBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6D957B3608267293F263AC16C250F6FD /* GPUImageMovie.h in Headers */ = {isa = PBXBuildFile; fileRef = 3918FDF9EBD2B1FA91FD529E6E34785A /* GPUImageMovie.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6DA9CE75744CD9CAD2A497743A002CB3 /* _YYWebImageSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D59E89941BC318DF7FC1D5BC49895CD /* _YYWebImageSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6F1483002AE6E1A074656FE296A380DC /* GPUImageLuminosity.m in Sources */ = {isa = PBXBuildFile; fileRef = CFC1905D68B43955A7ECC39E228564DC /* GPUImageLuminosity.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 6FA721F4651B626AD252155EAC6BF7F4 /* GPUImageNonMaximumSuppressionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = BDD3B32644BC93C7355A1C520C495A48 /* GPUImageNonMaximumSuppressionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 6FFCB41E003AD80298DCDC27CBD24248 /* GPUImagePolarPixellateFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CD5AC12DA2322B95DFCB7F7D42FBD49 /* GPUImagePolarPixellateFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 701EB7C0B4375EE2BF4F17FDDA91C3D7 /* GPUImageAmatorkaFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 15E496E703C5AD87E7989377C681D73B /* GPUImageAmatorkaFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 703D0714CF1905012533BA95ECFFF425 /* GPUImageRawDataOutput.h in Headers */ = {isa = PBXBuildFile; fileRef = 08FB776087C19D638AA775DF1EA2E6A6 /* GPUImageRawDataOutput.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 70E9D98EAD51C5A686AAD7DCDF267C0A /* GPUImage3x3TextureSamplingFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 115B979659F12A2946B4CE9FB629FC55 /* GPUImage3x3TextureSamplingFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 70F45CBA5AE0D7F59DDD9340AB3BD317 /* GPUImagePolkaDotFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = CA5BC3210A0DC9C52CF983E3FBA33D3D /* GPUImagePolkaDotFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 715144603B1E95E5FD199B6A820F3FC8 /* GPUImageLuminosity.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F06970C1605988B31A04FC0D429E908 /* GPUImageLuminosity.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 71F48775913C25AC156501B0EC59BFEA /* GPUImageClosingFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FE16BE5263EBF1D2F9145482FAE76E3 /* GPUImageClosingFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 72492130AA1799D5BE6B9446C7836BD7 /* YYImageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 372EFFE9AC19817C164303970B18F910 /* YYImageCache.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 72DDDD2224AE6BE60BA942D9CF3856DF /* GPUImageErosionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 48C35BCA747620F3BF149953BFDC422D /* GPUImageErosionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 7385628E7B625A9614D3044DE5AC3385 /* GPUImageTwoPassFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 84948E8F3C90A486BDED1DDC42DD9B6D /* GPUImageTwoPassFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 749A8557351FDA52225E717CA8D80719 /* GPUImageColorPackingFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E3174DCAC3A1A90A069C1EFAE99859F /* GPUImageColorPackingFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 74BEC30868283F25D6D5F8ABFF0BE76B /* GLProgram.h in Headers */ = {isa = PBXBuildFile; fileRef = 36A3F94120C780455E9F79C31D756DEC /* GLProgram.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 75345833F7677B391F6B3AA4468CEA21 /* GPUImageSwirlFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B1CF0307FA26395C0EBDD879BF40EE7F /* GPUImageSwirlFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 75F2628186AF80E8B6B39E6A27F104A6 /* GPUImageRGBDilationFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 87611103457106E50CE6DF1459C428CF /* GPUImageRGBDilationFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 76429EB123F7CB8020EB29A82765DFDB /* GPUImageWhiteBalanceFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E9EBE53088D96916DD20443C82AFBDE7 /* GPUImageWhiteBalanceFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 76C328BA20BD9A30ECE8FC13577088CC /* GPUImageOpeningFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 250D4D5BDE79FE3FB3D8E6BDF13C6F79 /* GPUImageOpeningFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 7706E5C445117A81B0442E5C19F7AF84 /* GPUImageExposureFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 985698BFE05D67C00294DF094B379513 /* GPUImageExposureFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7A4F580731F192D5E8C6AF86AB44FBF3 /* GPUImageGaussianSelectiveBlurFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = AF4FAC2BFB19ABFAB2B98973CF3F2F19 /* GPUImageGaussianSelectiveBlurFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7A67C46F6E32AA2E17FC8CC92649971D /* YYSpriteSheetImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 86B55374AABE32E7869673D68D81265B /* YYSpriteSheetImage.m */; }; - 7B6553286815200C94E24B0AD34C3E42 /* GPUImageRGBErosionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 96B10DB742FBE734F2EE564DC1808399 /* GPUImageRGBErosionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7BBADDA4A51EDD4DB7B9178A2AD9B6F0 /* GPUImage3x3TextureSamplingFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = D41C9CF88307CC423AE666B56182E5B9 /* GPUImage3x3TextureSamplingFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 7CAD51A1A08B950CEBA05C4DBA95DDA4 /* GPUImageHighPassFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 30871DDE7586CFF91A2ACC7F23FF6105 /* GPUImageHighPassFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 7CCCD7A77FF08770AD9EB67866E33E57 /* GPUImageLinearBurnBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = A3CD8B04FB70BC53E721DA44020D04B1 /* GPUImageLinearBurnBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 7CF2AC7A3B3ED03B30C1E4ED662B0551 /* MASLayoutConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D5623738ABFF1744B71396958D31566 /* MASLayoutConstraint.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7D9CEFE99BDDDF6D1AD696E3A8E3C349 /* GPUImageDivideBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 47104284B40E3FE25D823BBBF6BBD751 /* GPUImageDivideBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7DC9EA1A80CD849FA3A67BB8813C16F1 /* MKAnnotationView+YYWebImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 01B971D8030BF11EC3D14181720444C4 /* MKAnnotationView+YYWebImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7F421D9C31DC0525924101675B8EE24E /* GPUImageDarkenBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = BE4970CD6356FFFAA48E1613FE580EB0 /* GPUImageDarkenBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7F4CA66F56ECEC45306530ABA32178DD /* GPUImageLocalBinaryPatternFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E8B488F92B9569C2D4E2C544410035E4 /* GPUImageLocalBinaryPatternFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7F834C5C649E322048D41F16488A8520 /* GPUImage-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A0042D79436E9C952B47D4763A1C4AE /* GPUImage-dummy.m */; }; - 7FA724745C6C17A6466F449C11EC81E9 /* GPUImageSharpenFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 20C5BE19C1459E39FC196D7A94B0CBE9 /* GPUImageSharpenFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 7FB5C3196DB87FB6E92DABE225494BDC /* GPUImageCannyEdgeDetectionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 048641897F1CF7D044ACD0D40581C549 /* GPUImageCannyEdgeDetectionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 8087873FCF7C582C567FBC9E7866FC00 /* GPUImageOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = FD794A0352171C16DFE53E0AB396C398 /* GPUImageOutput.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 8194C101551A2584D8E3344E0FABD8F7 /* GPUImageToonFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 80DCA9ABD24683C3D8FAE083D96F58E5 /* GPUImageToonFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 81F811A56B6724F7E8E2D25364E595E3 /* NSArray+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E11AAC1475379E882BBED87C93CA898B /* NSArray+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8230F51E5396B2EA356525E246B13E65 /* GPUImageDarkenBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6872FC509316C9B4DCA67FFA969849E6 /* GPUImageDarkenBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 82844D6EFDF6891200BBCD3A4C9C54AB /* GPUImageFASTCornerDetectionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 50E15C340F7D31DE893B684AFF6EC189 /* GPUImageFASTCornerDetectionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 832DE22BB0C9275FF031A74E88D0BFD6 /* GPUImageContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 6679F37F751FAB9174C4595A35CF4822 /* GPUImageContext.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8372234603432285BBF01ED1A21DCF08 /* GPUImageMotionDetector.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE0EB4E232A38B13CACAA200001C7D9 /* GPUImageMotionDetector.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 83788DC3CB98DF8D12BB87500570D4FC /* GPUImageLevelsFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF00EBDB95094FD4257D5613DD330E0 /* GPUImageLevelsFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 83A1B04E0BA640C7FB29FAA7A629B328 /* GPUImageSingleComponentGaussianBlurFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C8EF79EE8E13A7229E1AF925AEC3BC4 /* GPUImageSingleComponentGaussianBlurFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 83A21AF2AA24EC617540C8FBDADA56CF /* YYFrameImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D1011A9244B271E11F082989E181A6D /* YYFrameImage.m */; }; - 858B891B75D0F43A511C03E9CCEA9E8C /* GPUImageParallelCoordinateLineTransformFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = F412634986B6427C47BFE33290B76D0C /* GPUImageParallelCoordinateLineTransformFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8620831289FD8F3A3595EAF6DAE7138F /* GPUImageRGBOpeningFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8E625D6539753D6AC67978B97C5D7C /* GPUImageRGBOpeningFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 86BA3E6F0F738FB8D5FA5E4F469C8694 /* GLProgram.m in Sources */ = {isa = PBXBuildFile; fileRef = B938A512490439A79E04F0C9697CD365 /* GLProgram.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 87AF8CBBDCBB0C50612AB69D6D742742 /* GPUImageKuwaharaRadius3Filter.m in Sources */ = {isa = PBXBuildFile; fileRef = 453BE721D27626D4753B1F021A0126F4 /* GPUImageKuwaharaRadius3Filter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 8845BDFA0653F4E71762578DB183BCDB /* GPUImageLightenBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = ECEA2E9EE22767E7510CE7AA87771919 /* GPUImageLightenBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 89215341FB58A6E29005197E676AC1FC /* GPUImageSwirlFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = BEFFA1F44D79B03904E27FC68BA02324 /* GPUImageSwirlFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 89360CB1E03A04FD4E4E35444535B5CB /* GPUImageXYDerivativeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BB60AA6A277030CEA93B362B1061701 /* GPUImageXYDerivativeFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 8A5D33655584772DCD0CF3C4EECCE0BA /* GPUImageSubtractBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B841981319C7EF7EE2877086FCA683E5 /* GPUImageSubtractBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 8BFFBA9AD7ADDBA5B802F107161884F1 /* GPUImageHoughTransformLineDetector.m in Sources */ = {isa = PBXBuildFile; fileRef = CF2F73298D0AAD1A41B6CB86926D9317 /* GPUImageHoughTransformLineDetector.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 8CE29353E6184B70D568D3B99E94D149 /* GPUImageLookupFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E5657C2668E3B4C728034FA1EA9A0A4 /* GPUImageLookupFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 8DF2798CBFBF2B27970A065636E5350C /* GPUImageColorInvertFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B63E6AF28713967F264112F9450B3F8C /* GPUImageColorInvertFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 8E64B342157226991EE54B8F6152A1A4 /* GPUImageFalseColorFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = ED7087E1AAD6DCA511A73A2D2B30D6B4 /* GPUImageFalseColorFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8E75885AC38F2FD27A93B5365669B7D1 /* GPUImageCrosshairGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 795CA168A9604FBD8784D73FA8C9DE4A /* GPUImageCrosshairGenerator.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 8E76ED19F995FA81CFA03FF86BF480D8 /* GPUImageAverageLuminanceThresholdFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F1724BCB76C8A64AA536BCED3D812D4 /* GPUImageAverageLuminanceThresholdFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8F136A8285B1AA9501C02EBE717D9749 /* YYDiskCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 926120A3C10BB72D3539005BC5D12636 /* YYDiskCache.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8F2F540C8BCC922C80CB0EEC85AE2CB6 /* GPUImageAddBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5002004ECCBA2AFB115693A8FF292F8D /* GPUImageAddBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8F87A31C7C5DCF2BFC9E7A9A9831DE3F /* GPUImageStretchDistortionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 22245274C4F286C6221A887D6CD7F1AE /* GPUImageStretchDistortionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 8FA19489C4BAAB00154C1E14F0692F3E /* GPUImageMultiplyBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = CF78B4B80A067EF3C1E69807978B0212 /* GPUImageMultiplyBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 90A044FA9883FAB9D1BC675A7BCCAD39 /* GPUImageDilationFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = DF18464EBC41D32FBD924D4FBD3DCF7D /* GPUImageDilationFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 9194B58ACE900ED6BAE6AD92E24A2CFF /* MASConstraintMaker.h in Headers */ = {isa = PBXBuildFile; fileRef = 5E64875CACD9293F8463A7DEB77900AF /* MASConstraintMaker.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 92AE518A0FBE98A0DF863B8DF7AC1FF3 /* GPUImageLuminosityBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A827A26F6AFD11185014B81B1EDDC257 /* GPUImageLuminosityBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 92BF70E9D3285561EB404A7C4A4A6DEE /* MASCompositeConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 1601092CB8E312022FDE49393A610FA4 /* MASCompositeConstraint.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 93A3C001CF21FF9A011DBE76D08E6FD9 /* GPUImageContrastFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 78FB8998E490B19D8A2CFE9E092F2132 /* GPUImageContrastFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 940FA559831E8663F4C3C2CFAB214B86 /* GPUImageSolidColorGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = B43D8D3315443CDCAF2566D64DDEE04B /* GPUImageSolidColorGenerator.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 942B26BBAD3D8D03EE64EADAA91984F4 /* GPUImageThresholdSketchFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = EB47C074A601454370424E7CFB464BCF /* GPUImageThresholdSketchFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 958FD4275823EA710C09035D28BC5BB6 /* GPUImageNormalBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 49B9B7911201EAA735B877B4E99D31D9 /* GPUImageNormalBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 9679F252AD137F1DC4749381E3238620 /* GPUImageMovieWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 21CD080746E9E7BC9C0BA1E1A2EDF8F0 /* GPUImageMovieWriter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 969CB0062DE1F74E8011E8AD2A79DD6A /* GPUImageHazeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CAC7D39500D3FC8B5E4380E69FFBCCA /* GPUImageHazeFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 9AE51F7A10F7D2A41DB5AE00A230DEA2 /* YYKVStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 41E7FFB3E5D0BA8ABC62E1A89D3063A8 /* YYKVStorage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9AF58F81BAD92835CEEDBB31C74435DB /* GPUImageTextureInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 2428E8C70A2E6595B6031EC3C1851FEF /* GPUImageTextureInput.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9B2FF85F49CFCBFD69ABF044B8AF17CA /* GPUImagePinchDistortionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4272FC95B847753C0B6BA23100C3957E /* GPUImagePinchDistortionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9B3F3992A312CBF772A509E737CD7230 /* GPUImageThreeInputFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A14EDB5BB818BEE5CEE11AB9273F285 /* GPUImageThreeInputFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9B8A55EA1B0232CA9B99B1F3B67595F4 /* GPUImageSubtractBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A0251929026FA746DAF38200C6045F2 /* GPUImageSubtractBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9F1608BD340BF4B02A5B88CA03707AA1 /* GPUImageFramebufferCache.h in Headers */ = {isa = PBXBuildFile; fileRef = D17E8A9196C94BC7F7B14D0D08A31A90 /* GPUImageFramebufferCache.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9F1EDF344FCF17EE6EF5A072D727E3A7 /* GPUImageToonFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = CE8390129A638BE0F4AE19C96CACE467 /* GPUImageToonFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9FA8C873F74D9C40A96BE74F017385CB /* GPUImageCropFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 69E7B0C997A3206F5C0D10C360A6D957 /* GPUImageCropFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A07E94BD19655E823533CEFB4DBDD203 /* GPUImageStretchDistortionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A94921FCB9C25F627D3B1EB025EB097 /* GPUImageStretchDistortionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A10B6F1BD9FC2A0A3BD16B0CA7951F83 /* GPUImageUnsharpMaskFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F0C80FAC0118D3106441EE7BCBCFF00 /* GPUImageUnsharpMaskFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - A1CB7B78C1D3374BAEA9A2BCC3A25656 /* GPUImageRGBFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E747934866906927486DC94DEC4581B /* GPUImageRGBFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A25BA1791E1B279225964FA5CB18271B /* GPUImagePosterizeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 43A18B72D843666583E43734D2462B4F /* GPUImagePosterizeFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - A2EA584895A489FC00301707BF956355 /* YYWebImage-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 68619D6BC015E7B9AD2E0EF3660EC99B /* YYWebImage-dummy.m */; }; - A3307B8FB6EE0A049DBAE3AA4D2C6DA0 /* View+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 82945F15766B165DCCA8DA4BC2C4BD87 /* View+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A407D6E4E7732ABCAB9C121D415AF3E6 /* GPUImageHistogramEqualizationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = F478792CD6750762D653D4B974565731 /* GPUImageHistogramEqualizationFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A5ECEA60FC0AADF57283128443C642E7 /* GPUImagePixellatePositionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DA0D34140F270C03A5A2D7F4CC54517 /* GPUImagePixellatePositionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A6D788652DBBA97BB929B66E8FABF5FC /* GPUImageOpeningFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = F2F67F28D47899C70E83AA9305D4E341 /* GPUImageOpeningFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A7208F4AAB19736637ED7314D63F7D2E /* GPUImageGaussianSelectiveBlurFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B2CFE441A1614F51B47AA982B4E448B /* GPUImageGaussianSelectiveBlurFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - A722D1944A6F15819EA75CAC4A65CD8D /* GPUImageMedianFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 34284363F58BE296025C3C9CBD8F317C /* GPUImageMedianFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - A834995186E9FE7D0150677B989DDD8B /* GPUImageLuminanceThresholdFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C17752936CF711DF066A5BA091BFA81 /* GPUImageLuminanceThresholdFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - A853401FDAA9E7088AD5028D09787374 /* GPUImageKuwaharaFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = AC97F32440360E91D0907B1696EFA925 /* GPUImageKuwaharaFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - A893FFB0F9137E298D6752729850D1D6 /* MASViewAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B4EE9ADF2AF51D5C395568406645F72 /* MASViewAttribute.m */; }; - AA3AEE471C21B1B2381CAAEA54557674 /* GPUImageSourceOverBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = FD17D6790093A05DE5D3FEA809D11BAA /* GPUImageSourceOverBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - AA6F89A3BB414439A39AD2FE6C4B6C5A /* GPUImageAlphaBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B03CEF081AF2EB3E5F9FF382D2515F8 /* GPUImageAlphaBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AAD0F39A4AA032B8C0C0B40EA7441E94 /* GPUImageBulgeDistortionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = FB24E4E098F3B7DE3B8F4ACF2BC28A28 /* GPUImageBulgeDistortionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AB11AF112E43D1FF1522A8844564CD74 /* GPUImageMovieWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = A17B47159361544A9A5041BCADFB2DA3 /* GPUImageMovieWriter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - AC6FF619E5FDA1335F97C3C9E4C4276B /* GPUImageFalseColorFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 34E2DEEB4F0ADF11F9C9E23D43C1A3B6 /* GPUImageFalseColorFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - AD8503BD62763B8ACD0D4FFF1E8C56A2 /* GPUImageSaturationBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F37E42BC4BE8E0517824BABC9869273 /* GPUImageSaturationBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AFB6AFAD5CDE82433B7EF710AEABFFEC /* GPUImageGlassSphereFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 169DF30CA515684B51A770DE262AC808 /* GPUImageGlassSphereFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AFD895639FCE8E367E47C39C13807509 /* GPUImageWeakPixelInclusionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 894067B7B8B143B196F909226A542245 /* GPUImageWeakPixelInclusionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B129AF9904B49BDEBFA2CBE15CD8C832 /* GPUImageColorPackingFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B231C196006B4B6C3DD281978E5EB74 /* GPUImageColorPackingFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - B16B792802266C47B1C05A7938DB2FDD /* GPUImageEmbossFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E126A469B8B4CA1D5708D0C66DBCB45 /* GPUImageEmbossFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - B1E3E64D5F9CBBA0AC445152F0502EAA /* GPUImageCrosshairGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 611CC398C3A952328326F836188CEC88 /* GPUImageCrosshairGenerator.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B20A0E5D8F9BCED1A82793C4BE9E7258 /* Masonry.h in Headers */ = {isa = PBXBuildFile; fileRef = CAD1753F08C939B747A9310D6E2C7CCD /* Masonry.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B631B16F2CBE7157B23476CBDCE715E5 /* GPUImageContrastFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = D66E3D513B5531F7F4B074A1AEC523B8 /* GPUImageContrastFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B78DB212BF2C1ADB6DCF09953314CABD /* GPUImageMaskFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = FF5ACE2C67EA5C6E02ED4D4FBD28FBA7 /* GPUImageMaskFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B79E092F5B29C5C8B7359493C043A4DE /* GPUImageSoftLightBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A0D905911F4E966E46571AE6336725F8 /* GPUImageSoftLightBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B80DB3332DCA3B96D6208277A30E39F1 /* YYWebImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F3286B04ABC750B2DA6269CDAB9A3B0 /* YYWebImageManager.m */; }; - B82BCA913A74C5C17CF67BB48430A6E9 /* GPUImageFilterGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 10AF522841E0BF1975899E1F731DDF5D /* GPUImageFilterGroup.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B8835F0715C5DCFFDB7FED7098B47596 /* GPUImageHalftoneFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E82866E758AEDE0697B2D6542D52887E /* GPUImageHalftoneFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B893623350B4E001365E48E0AC5D1F91 /* UIButton+YYWebImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 0920AF97BC9AA2C404C3E60972978562 /* UIButton+YYWebImage.m */; }; - B8DBBA903BF381C26A07E80FB3B673F2 /* GPUImageCrosshatchFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B5497DA96594CCECE8E15AC43C9A2C6B /* GPUImageCrosshatchFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - B946AFB1A725D85E07F645A7EF086383 /* NSArray+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 05C8A3D41E95FB4EF796E14A592986C7 /* NSArray+MASAdditions.m */; }; - B9A2408D5950F5547F7D82E84217F63E /* GPUImageAverageColor.h in Headers */ = {isa = PBXBuildFile; fileRef = D4A60FDE318E3C0F278D020D96060453 /* GPUImageAverageColor.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BB2A9B9161E5F0AECC9F3CC31F6D85F6 /* GPUImageSaturationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 219E2548D3FF4C96F4ED257B47311123 /* GPUImageSaturationFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BBD0DCB580B12F696F7240575892FAA2 /* GPUImageGammaFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F07509067BACE67AB5E9CE46DBB3EE /* GPUImageGammaFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - BC130E24128D66199EF316BA62B7FE30 /* GPUImageLuminanceRangeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 94F2208CD8400EF9A4FE9B63DAC5E6E0 /* GPUImageLuminanceRangeFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - BD451674A244E95543E0CE56FEB2DDD4 /* GPUImageDilationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 856409B61D04B0A9D91A67DFFB1C680D /* GPUImageDilationFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BE93BA2DA12D718619AAA3F8216D29F4 /* GPUImageThreeInputFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8736944B2594030670245A252F39B7FA /* GPUImageThreeInputFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - BF4117E228B603963206D603A99B6CB0 /* GPUImageBrightnessFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = FA45E049B5B5153FBD3529680C70E520 /* GPUImageBrightnessFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - BFBF5806B8FB170749BF71FCFA77096D /* GPUImageMonochromeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = C3415B253778A17AB9D9E9539C59982E /* GPUImageMonochromeFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C05FC6699632FE712174ED875A605410 /* ViewController+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EEB662CC37ABBC8474275EEA42AB477 /* ViewController+MASAdditions.m */; }; - C0CE23B393799A65CB7626FED30D8B87 /* GPUImageDirectionalNonMaximumSuppressionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1495EAEF4EC6B8FB6E18881881B3573B /* GPUImageDirectionalNonMaximumSuppressionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - C0F421E2359654EEC935728ECFE098C8 /* GPUImageOpacityFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = A0A98FEBD19728184776073D5B656C40 /* GPUImageOpacityFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - C1819B0277FEA363D59F734D9AD8AA4B /* GPUImageColorMatrixFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = F56DBD12B11C3994DFB4255B1D7CC1D8 /* GPUImageColorMatrixFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - C2480784B8731B3505C36BEC36F43F77 /* GPUImageHardLightBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 94E26D38916B6B7C099A974F7D4801BB /* GPUImageHardLightBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C249EDF7D50D5A7BEA1C40AABCE51E7D /* YYFrameImage.h in Headers */ = {isa = PBXBuildFile; fileRef = BD8A6D912B9DADCD91A8CECBE8D365BF /* YYFrameImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C3215C21113B7017773F61D8E2C0F05C /* GPUImageNobleCornerDetectionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E5AE2B148F45F4E8B8FB0225084DEE18 /* GPUImageNobleCornerDetectionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C33E9361A533400A28DEE54586144691 /* Pods-DarkMode-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B166651BD2944A773F9537AEC00AF13 /* Pods-DarkMode-dummy.m */; }; - C36D1358DE52DDFE9561872046B15CDA /* GPUImageClosingFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = BD9B919D49630BD01C44E78237FBD863 /* GPUImageClosingFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - C38CB6D5CA3A24003E2314F3ED91BBA8 /* GPUImagePixellateFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D99E942362A4061252F3303E92A955A /* GPUImagePixellateFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - C3D1B9C0AB90607D224B2440ADDDBF7D /* GPUImageChromaKeyBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 76CEE856E426B01553F3D79A1347C109 /* GPUImageChromaKeyBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - C465BDCDDAD3B3CD57F1C64294A1533A /* GPUImageNonMaximumSuppressionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A7B42C55528946ABE27DCA7F4A86E7A /* GPUImageNonMaximumSuppressionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - C4E5DEC7DF514A359AA062C7F13C95A4 /* GPUImageSketchFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = F167A2004301C4034FFB0D96A262B99D /* GPUImageSketchFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C564C8D042998164475E13AD54B0A294 /* MBProgressHUD.h in Headers */ = {isa = PBXBuildFile; fileRef = 768B4BE6A62741EA37180E7EC67437C1 /* MBProgressHUD.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C74D2E856ADC8139CD00DBD184061B23 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 36454A100B7DDEDEA1E782EF2E9E27AC /* NSLayoutConstraint+MASDebugAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C7710525EC84D4EB1FAF4D571DB64D90 /* GPUImage3x3ConvolutionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B209441C9B2647C1E347736EE8FC64A /* GPUImage3x3ConvolutionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - C7920681F0164686C56327ED3C6AAC58 /* View+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EBD52032DCAFDAEC06FD991BB8695A8 /* View+MASAdditions.m */; }; - C7FD66D3D320095B45AD9D39EF1B858B /* MBProgressHUD-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C7EBDF59E4597071BF464EFAC596030 /* MBProgressHUD-dummy.m */; }; - C8533435ED95323AD49B5ABA46309592 /* GPUImageColorBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = DC785C323CE09EC09CDC2F8014081C38 /* GPUImageColorBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - C90957CDE1F88C80D792F3CCBBBD86E7 /* GPUImagePoissonBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = D54971E35D67E4E2B0A20F8CD8BDB2D4 /* GPUImagePoissonBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - CA07E0D65A9F569E68A647D3A422C028 /* _YYWebImageSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 216F8CFBA824F61AE51F0BE1FB37998B /* _YYWebImageSetter.m */; }; - CBC2808292742C287F16EC38D82C57EB /* GPUImageVideoCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB88636BCAA89B17531BEAC2B7677B4 /* GPUImageVideoCamera.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - CC46255DAABC498A35F70078C1A566BD /* YYModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 31214193F010827DB7A59D7F34A65AF0 /* YYModel.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CC997265C47D1D37F34774F5E59DFCA2 /* GPUImageThresholdEdgeDetectionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 36B4A09ADA586EFD92A79ECD4C0E35A8 /* GPUImageThresholdEdgeDetectionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - CCC7F68CE9545A177EC9EA20AA2AE9C5 /* GPUImageCGAColorspaceFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2119B781CCC19BD3D0A42F303D2E7812 /* GPUImageCGAColorspaceFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CDCBBC093C8294D84332E954BD1A80E4 /* GPUImageSketchFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F81E2DA24707028F902CA5D2165F3AF /* GPUImageSketchFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - CDE62540A3FD2D838E06A3FCAB1EE58E /* GPUImageiOSBlurFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 864D6DEE6397881CD3F0FCBC2443BB60 /* GPUImageiOSBlurFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - CDF22D54534615D38B7CB2ECF4C15367 /* GPUImageColorBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 16D91E4D58A94C5524A115536224EA76 /* GPUImageColorBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CE8EAEC4550BF203A6D4A25FB8FF772F /* GPUImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = FC2B794A56EF9D2701B9021759093037 /* GPUImageView.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - D0AA94BD089FEAD90D37D172CE9803B5 /* GPUImageMotionDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = 2715DCC6112CFACF55C762832D38626D /* GPUImageMotionDetector.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D0C48086A9D1C8721C57BC59E3ABC9B4 /* GPUImageLowPassFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = BA371A875E27E7EE7D0FCD1007D94CF2 /* GPUImageLowPassFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D0D36AA4AD8C0D0B5D667B37FE3F9EF2 /* GPUImageUIElement.m in Sources */ = {isa = PBXBuildFile; fileRef = F11B4258E3FA4A8841B1604E377E7F3D /* GPUImageUIElement.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - D29C5C66C8885349266175C1D749F02F /* GPUImageHazeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E63C05F85CF505C1F4F6C1F2A5264989 /* GPUImageHazeFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D379D3AECD4C3EDBD261235D63E260FF /* GPUImageScreenBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = F1C3D508DA7E563DEA7799B00D9E2113 /* GPUImageScreenBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D3AF12B25881D1AAF4DE417F1D5407B9 /* GPUImageLuminosityBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA72D587A6A6B053532804FF36E8E46 /* GPUImageLuminosityBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - D3E0F67215B94615E748A1D2C98439AD /* GPUImage3x3ConvolutionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = BE0B9D8C884083422794279D51378D71 /* GPUImage3x3ConvolutionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D5193E9E46629B96BDEB10DAEF57582D /* GPUImageHSBFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DC692CA9FD5C1A42113F450FA649F67 /* GPUImageHSBFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D5A4349BFFC852AA31E14DFB14A47976 /* GPUImageTwoPassTextureSamplingFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D16559576FCC95A4CD46C46C5DE443 /* GPUImageTwoPassTextureSamplingFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - D5FC0D8E4622A03DA9AD9C7D2FD993E1 /* YYAnimatedImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 87B89822E64C2B0270C48FB5310A947F /* YYAnimatedImageView.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D6438BA4F863AE0A7891F212EE3C06D0 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = B5319E1423AA1E35ADBA7A3B04DF598E /* MBProgressHUD.m */; }; - D72EE0E749232B2C899702FC1C9402BB /* Masonry-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E5C1184106339F84D7D501170074B1B4 /* Masonry-dummy.m */; }; - D73DFCB550FD90D81582D87DEC5FBFBB /* GPUImageTextureOutput.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E198F28897BDB4F191CE84351A84102 /* GPUImageTextureOutput.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D8AC3A3A9FC2C585805D8130985DFA64 /* GPUImageAdaptiveThresholdFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 129DAE9BAABDCB922089CE7D3BDF76EC /* GPUImageAdaptiveThresholdFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D90E1DB2985F031A249C1CD1D7A48AF6 /* GPUImageNormalBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 35D609B903920B4F5B05401FBC7E489D /* GPUImageNormalBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D90E2B61D12B3135282EC3264A4B6699 /* GPUImageSaturationFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1577D323A093A5E9B341C97A2C56FDFF /* GPUImageSaturationFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - D945A64F6CF78BE653585C4ACE0E24EF /* GPUImageBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 527337E5AE7218053824FE826DE95FB6 /* GPUImageBuffer.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D9742F495FB317A0EDED886CDEC37049 /* GPUImageVoronoiConsumerFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = E7ED5325591277156B4BB5CC580E9723 /* GPUImageVoronoiConsumerFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - D9760E3346290F95407D7DC02CE7CBCC /* GPUImageColorMatrixFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A040C6DAEB250520DDAB80B89F5BDE6B /* GPUImageColorMatrixFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D98126521560BEA4D6CB57439643C89E /* CALayer+YYWebImage.h in Headers */ = {isa = PBXBuildFile; fileRef = B9A029945B47FB73CDE3CC37104F813F /* CALayer+YYWebImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D983E144A1EAF9EF20BFD31AEBD9BEBF /* GPUImageColorInvertFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 467740B1EE1788F570B996D82E451066 /* GPUImageColorInvertFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D9EBD120B2572956219EB5E69C9987DB /* GPUImageTransformFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B452C9C925DADC958E77C39081288F /* GPUImageTransformFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - DA13233E99DAD01F4F1CF918A1828173 /* GPUImageFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FAE5EFDF6BAE35B5464066D6F82F34E /* GPUImageFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - DA49D1C675F5679D26CB9069A7269185 /* GPUImageSmoothToonFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CF95A800A5428B6D2C82CDC82A21CD5 /* GPUImageSmoothToonFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DB5CD837D88F4C0A6E260922756085EB /* GPUImageGaussianBlurPositionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 404551280AEA0058459B3385F82AFBBA /* GPUImageGaussianBlurPositionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - DC4A074004FA5271EA709589DFCBEB15 /* GPUImageHueFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = C7E61395FE8E961D58658EFC5FE914A3 /* GPUImageHueFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - DCDB85FBCE034BD943E4CAD37FE90B79 /* GPUImagePixellatePositionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = AB79E1A4A66A6C04AB9D9EBE73E0A218 /* GPUImagePixellatePositionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - DF95FC4FF9019EEB2C9717A8BE4F2EFE /* GPUImageShiTomasiFeatureDetectionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 254E957A25195EAAC2658009BDAEEBBD /* GPUImageShiTomasiFeatureDetectionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E0D741EB912B03FB998FF163F941827A /* GPUImageBoxBlurFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 03A0D571B1A527AB8B7B3CA882F4D673 /* GPUImageBoxBlurFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E275F7BF40EC2FB17B2ED9029FF06BCA /* GPUImageTiltShiftFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 05AE57422D69487A72FEC0CB766E61D0 /* GPUImageTiltShiftFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E2F119888DA6312834DB6A2E84FF5906 /* YYClassInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = D65307FDE17DBA7A0B3A73E64332F870 /* YYClassInfo.m */; }; - E3FDBC252DF4EE97EF2A47F9FD299138 /* GPUImageFilterGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 675DA2B87C4D3A22040B4457A6387B04 /* GPUImageFilterGroup.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - E584CF8B9CA73334B373D6AEC20870CF /* GPUImageDirectionalSobelEdgeDetectionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB2E93FCE91E7C240F7A5418610E8 /* GPUImageDirectionalSobelEdgeDetectionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - E5C0807D620C0E07706C6C00F87B7D7D /* GPUImageSphereRefractionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 844471BB500349B7E35E4D0A96389D2F /* GPUImageSphereRefractionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E611F7A8E5966E6E2E68224A3F4F42EB /* GPUImagePolarPixellateFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 228003B3476B41761F56C932AA1DE129 /* GPUImagePolarPixellateFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E692F6CB653BDF7FCCE2A253E019F409 /* GPUImageMedianFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = AB9AABEFA3783A1EFB3AF263028EA22E /* GPUImageMedianFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E73E4ED481B67985D7794448CA5DE53A /* GPUImageThresholdedNonMaximumSuppressionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C2E5E0DB6558AF1D582E8DD0D244EB /* GPUImageThresholdedNonMaximumSuppressionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - E76935CFF4AF327F8D9A7C1935F7D900 /* ViewController+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C0B54E85F3F7357A3084FAC6447AFF1 /* ViewController+MASAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E7AF1651C307635FC4A9E52F6911B3B3 /* GPUImageChromaKeyFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 12F2B7D58256DFE9C2869DEE816D2FDD /* GPUImageChromaKeyFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E84C5D01F33A6C9AFFFA1B009D4BD25E /* GPUImageStillCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 77F4D03A5C3A7B3755BD05C6BC87D853 /* GPUImageStillCamera.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E8D139B563E36F0BA0C9F5B2B20C75B1 /* GPUImageGlassSphereFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EB243D1C497784152C266E096C23C6C /* GPUImageGlassSphereFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - E9129B8F2C4716BB0E04A8AA7DF489ED /* GPUImageRGBFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 97BB1E9D14B5C9A8E04954127CF899DD /* GPUImageRGBFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - EA2FCF7789C782BE597B4A462E5AC8D7 /* GPUImageSaturationBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B76EEE6CDA11AED2C0DF42954264E2E4 /* GPUImageSaturationBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - EA5E2729A6E87C922CDF98A3ACB985BC /* GPUImageHighPassFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A6F1BA241429526CAA01D945FD69E28 /* GPUImageHighPassFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EAAE5E8238A63B075863D7007624DA43 /* GPUImageHistogramFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D6101DA1E24CEAF212864D149AAA311 /* GPUImageHistogramFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - EB0DC31314035D14CF7D560816C5820A /* GPUImageNobleCornerDetectionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4D069CFC80E40C0955894061DC5082 /* GPUImageNobleCornerDetectionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - EB663E3E1EB4BB670DC29B77DB330135 /* MASConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 13093D7BD9574A7D40FB42A21DB87F15 /* MASConstraint.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EB76EA09E1FC065CB6203F5F602D76F0 /* GPUImageGammaFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = FC8FF675218469A34772983792A93F7D /* GPUImageGammaFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EB847D328F7F2D583D63181D9829991A /* GPUImageHueFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 04EED508463C74DA6E7C59026CB90BE8 /* GPUImageHueFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - ED1F02433F3A912D677F43E1FF11A86D /* GPUImageCropFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = BA29045FFD62C4F2F08018346E53B773 /* GPUImageCropFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - ED6CA2C4FFF084A9C6BC0C3058F2FC0E /* GPUImageCGAColorspaceFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B748550FB21BB7C03E6327054546AAD9 /* GPUImageCGAColorspaceFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - EE936A6838005A5ED1BC5F74BE37B7BD /* MASConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = B31F1147C4556865B64D707FEE8CCC97 /* MASConstraint.m */; }; - EEF7E74667C5176B5F1554D7184F2A6A /* GPUImageEmbossFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 83180B57DF37B3555ED1B68472C45C2C /* GPUImageEmbossFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EFD2E46C54A13C1D9D72DE9F8531AD92 /* GPUImageZoomBlurFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A10226B00432CC14F57C84CDA29A0B6 /* GPUImageZoomBlurFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F0088DAB471D5A3F2924964CD410BE41 /* GPUImageOpacityFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = D20E7200664BDC1CA23F83B69DB2AF00 /* GPUImageOpacityFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F06B38D5B6F52BE9B44E382F020D6B31 /* GPUImageShiTomasiFeatureDetectionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5388C8B9509AE2A725C77FB08EAB1262 /* GPUImageShiTomasiFeatureDetectionFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - F1750C9B60511FA4C2FFA9326C53194F /* GPUImageTwoInputFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 537E9A1D3C9B19E06AD252A90F35F4FC /* GPUImageTwoInputFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F1B75048874B8773E5568E6D3ACA12E4 /* NSArray+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = BE81F8031495E743E805E3F1ABB005EE /* NSArray+MASAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F240CA1217BACD2BA4C0B0EB15F62EF8 /* GPUImageExclusionBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4B2BBB528CEAFC918860127115B034 /* GPUImageExclusionBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - F2FD414ADEF65434E578A08DF0676F0D /* GPUImageJFAVoronoiFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AB2E9FBA9B5DC6C3B50148EBA2EB69C /* GPUImageJFAVoronoiFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - F3E6FD4C3F7B20EDF489236C6EC945DF /* GPUImageFilterPipeline.h in Headers */ = {isa = PBXBuildFile; fileRef = 11CCBC30AD14409191CFABD8D074A58D /* GPUImageFilterPipeline.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F4026D5FBB3EB246FEF59DA6B805FDAD /* GPUImagePoissonBlendFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = F776E442B4C1CDFEF257F6134CBE90D0 /* GPUImagePoissonBlendFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F40E6B5DD24C45C5E16A11F8CB40482C /* GPUImageSingleComponentGaussianBlurFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4284D70C7F26D1B5D00CB148C3E562E1 /* GPUImageSingleComponentGaussianBlurFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - F4147D4455B06FAC3BF47FD552C69DDA /* GPUImageUnsharpMaskFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A02D900146C224595943A9226D2DCAD8 /* GPUImageUnsharpMaskFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F4BA7E7FFAF565B29CC82D54B793EF78 /* GPUImageBrightnessFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 89911F978F34916A355191709CBB5802 /* GPUImageBrightnessFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F654313B55A14132792476E2B2FA2AE2 /* YYClassInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 970BB19E23C4B9B7AA3309F224CC0E71 /* YYClassInfo.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F7DDEDD5401FF5E6458969FA7EC518F5 /* GPUImageLaplacianFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 533CF0E1A935E0C8D6084DE984AA9A48 /* GPUImageLaplacianFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - F82C2A26F6554330AF6E40C05326362A /* GPUImageJFAVoronoiFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = DA29E62F007F394173C5A6E96F4EA3A1 /* GPUImageJFAVoronoiFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F8357854AE9106751D53AB8C32932F46 /* GPUImageGaussianBlurPositionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = C48D8B50088748FC4BC5FC2E0C491663 /* GPUImageGaussianBlurPositionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F8A9EC123F285CCB4262D7419CB2F813 /* GPUImageScreenBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = D4C994A6E8F57B6828552CA504C66D58 /* GPUImageScreenBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - F961EFDD9E3144F2F28EF4702C201F0A /* UIImageView+YYWebImage.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2430725CE2EF7139ADE4BBC1C7CBA8 /* UIImageView+YYWebImage.m */; }; - F96CD4E0A91280398E5A1874D2B3A5D0 /* GPUImageLuminanceThresholdFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E26335B2F22D282C8B7582834BD0A07E /* GPUImageLuminanceThresholdFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FA0845E169D8DC9A8096C6DB7BD71C75 /* YYWebImageManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C40FD404F6B8A2300E4B45AA2B6F9A8 /* YYWebImageManager.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FA31F4C6D96B604EEB4BF55DEF7087C8 /* UIImage+YYWebImage.h in Headers */ = {isa = PBXBuildFile; fileRef = F02B616DA404DA9F64E1EB8DD4C522B1 /* UIImage+YYWebImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FB62EF85A3768A158924A4FB8D21E7E4 /* UIImage+YYWebImage.m in Sources */ = {isa = PBXBuildFile; fileRef = E578EF7302261D7D50382800254764B6 /* UIImage+YYWebImage.m */; }; - FC39728CECE4A700D8315298E8649507 /* GPUImageUIElement.h in Headers */ = {isa = PBXBuildFile; fileRef = ABEA5E282030B2AACB13107445796E9B /* GPUImageUIElement.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FC4B8B12DE32CC742444EC57C78E43BB /* GPUImageOverlayBlendFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = D784A6CD68E1A5D8D6580987562CE66F /* GPUImageOverlayBlendFilter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - FC910491DAAFF857945049B0434F398D /* GPUImageDirectionalNonMaximumSuppressionFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 08FD869A4FD865D449B925CD47230E72 /* GPUImageDirectionalNonMaximumSuppressionFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FD06FC7B591A78FD113F2D10FC51592E /* GPUImageSolidColorGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D084FF6A05E8F634B9ECC121BB2F70 /* GPUImageSolidColorGenerator.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - FD3EAC5E0A791E73E27E422A197381BE /* GPUImageTextureInput.m in Sources */ = {isa = PBXBuildFile; fileRef = 6CCD41C6BD2C0E9ABB3148B70C4BC918 /* GPUImageTextureInput.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - FF641038FDDC7E524267A555915BBA70 /* GPUImageVignetteFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = FC35CED2A95AFEA26980C9D4ABC06D40 /* GPUImageVignetteFilter.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FFB553681052A094EA7516D46F2A8C9C /* YYImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = CB5A0BE4A5245E286AF7E6814CDD1436 /* YYImageCache.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 0E525382322D144157FE54A2F8279ED0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CFDAE6EB02F58B9A37CADCF439AE6082; - remoteInfo = YYCache; - }; - 11065683D1DF6005F9525BBA539466D7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 488E8C830C5A5694EE916251B9ADAADA; - remoteInfo = YYWebImage; - }; - 41577B33D18B0277BCC25CF6A140DEDD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = CFDAE6EB02F58B9A37CADCF439AE6082; - remoteInfo = YYCache; - }; - 5BB5B7F8294D2A559BA5BED33BAE2C7B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = DB13B1641D72A72D8C9AE53FF81C8950; - remoteInfo = GPUImage; - }; - 65906679C3DF4C10CE5279E1C83FA340 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 822E44240F2922DAB12018A6B649BD19; - remoteInfo = YYImage; - }; - 6E7A69E1F8BD32917A845DD8C233CA82 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 822E44240F2922DAB12018A6B649BD19; - remoteInfo = YYImage; - }; - 817CD8DC71FA3B7C4B131536ECA0F1D0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 55AF53E6C77A10ED4985E04D74A8878E; - remoteInfo = Masonry; - }; - AAC877F66336AAF9D915F41F63451BF2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 84B44807A12996D487A4A591A481D6A0; - remoteInfo = YYModel; - }; - E2F7E2998162B148B91D328B73DF9F38 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 82B0A41D3031FF27D78E17B0A9A46FB0; - remoteInfo = MBProgressHUD; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 00BAF7C4E2492F63C9589A48B9A174F5 /* GPUImageMovieComposition.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageMovieComposition.h; path = framework/Source/GPUImageMovieComposition.h; sourceTree = ""; }; - 00D7FBFB94E92C7589C179A64EA9B9E1 /* GPUImageAdaptiveThresholdFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageAdaptiveThresholdFilter.m; path = framework/Source/GPUImageAdaptiveThresholdFilter.m; sourceTree = ""; }; - 019AEDB1F84B03733946BD4BAABB969C /* YYWebImageOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYWebImageOperation.h; path = YYWebImage/YYWebImageOperation.h; sourceTree = ""; }; - 01B971D8030BF11EC3D14181720444C4 /* MKAnnotationView+YYWebImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "MKAnnotationView+YYWebImage.h"; path = "YYWebImage/Categories/MKAnnotationView+YYWebImage.h"; sourceTree = ""; }; - 0274C1DACB9A0794CFD00841FAE59E3D /* GPUImageZoomBlurFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageZoomBlurFilter.m; path = framework/Source/GPUImageZoomBlurFilter.m; sourceTree = ""; }; - 03A0D571B1A527AB8B7B3CA882F4D673 /* GPUImageBoxBlurFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageBoxBlurFilter.h; path = framework/Source/GPUImageBoxBlurFilter.h; sourceTree = ""; }; - 048641897F1CF7D044ACD0D40581C549 /* GPUImageCannyEdgeDetectionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageCannyEdgeDetectionFilter.m; path = framework/Source/GPUImageCannyEdgeDetectionFilter.m; sourceTree = ""; }; - 04EED508463C74DA6E7C59026CB90BE8 /* GPUImageHueFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHueFilter.h; path = framework/Source/GPUImageHueFilter.h; sourceTree = ""; }; - 05AE57422D69487A72FEC0CB766E61D0 /* GPUImageTiltShiftFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageTiltShiftFilter.h; path = framework/Source/GPUImageTiltShiftFilter.h; sourceTree = ""; }; - 05C8A3D41E95FB4EF796E14A592986C7 /* NSArray+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+MASAdditions.m"; path = "Masonry/NSArray+MASAdditions.m"; sourceTree = ""; }; - 074228E092340DEFE657CAF4F22AF822 /* GPUImageSourceOverBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSourceOverBlendFilter.h; path = framework/Source/GPUImageSourceOverBlendFilter.h; sourceTree = ""; }; - 07C2E5E0DB6558AF1D582E8DD0D244EB /* GPUImageThresholdedNonMaximumSuppressionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageThresholdedNonMaximumSuppressionFilter.m; path = framework/Source/GPUImageThresholdedNonMaximumSuppressionFilter.m; sourceTree = ""; }; - 080F15FCC36CE02B5AA7B6A38D2A6F1C /* GPUImageRGBErosionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageRGBErosionFilter.m; path = framework/Source/GPUImageRGBErosionFilter.m; sourceTree = ""; }; - 08FB776087C19D638AA775DF1EA2E6A6 /* GPUImageRawDataOutput.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageRawDataOutput.h; path = framework/Source/GPUImageRawDataOutput.h; sourceTree = ""; }; - 08FD869A4FD865D449B925CD47230E72 /* GPUImageDirectionalNonMaximumSuppressionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageDirectionalNonMaximumSuppressionFilter.h; path = framework/Source/GPUImageDirectionalNonMaximumSuppressionFilter.h; sourceTree = ""; }; - 0920AF97BC9AA2C404C3E60972978562 /* UIButton+YYWebImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIButton+YYWebImage.m"; path = "YYWebImage/Categories/UIButton+YYWebImage.m"; sourceTree = ""; }; - 092384ABCABB5474EAF3E9D8F02DF29F /* GPUImageWeakPixelInclusionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageWeakPixelInclusionFilter.m; path = framework/Source/GPUImageWeakPixelInclusionFilter.m; sourceTree = ""; }; - 094F16B0BD56037708312F6A3D1774F3 /* YYImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYImage.h; path = YYImage/YYImage.h; sourceTree = ""; }; - 0B4A1372A24E73913DC7C605E4BD9472 /* libPods-DarkMode.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-DarkMode.a"; path = "libPods-DarkMode.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 0C250AC091347FFBBF15D1616FB339BA /* GPUImageAddBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageAddBlendFilter.m; path = framework/Source/GPUImageAddBlendFilter.m; sourceTree = ""; }; - 0C6F4829D47D1826F47CDC4264F9F6A8 /* libYYImage.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libYYImage.a; path = libYYImage.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 0CA0BA0CC8335A694D5350A133298DB3 /* GPUImageTwoInputCrossTextureSamplingFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageTwoInputCrossTextureSamplingFilter.h; path = framework/Source/GPUImageTwoInputCrossTextureSamplingFilter.h; sourceTree = ""; }; - 0D0402BAF334A2BDC1E4932E93A77CFD /* YYModel-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "YYModel-prefix.pch"; sourceTree = ""; }; - 0D5623738ABFF1744B71396958D31566 /* MASLayoutConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASLayoutConstraint.h; path = Masonry/MASLayoutConstraint.h; sourceTree = ""; }; - 0E198F28897BDB4F191CE84351A84102 /* GPUImageTextureOutput.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageTextureOutput.h; path = framework/Source/GPUImageTextureOutput.h; sourceTree = ""; }; - 0E3174DCAC3A1A90A069C1EFAE99859F /* GPUImageColorPackingFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageColorPackingFilter.h; path = framework/Source/GPUImageColorPackingFilter.h; sourceTree = ""; }; - 0E48FED45DEF3A3929689CA91C2C802C /* GPUImageTransformFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageTransformFilter.h; path = framework/Source/GPUImageTransformFilter.h; sourceTree = ""; }; - 0F5D87CE6703E1941A5580858F307A6D /* GPUImageDirectionalSobelEdgeDetectionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageDirectionalSobelEdgeDetectionFilter.h; path = framework/Source/GPUImageDirectionalSobelEdgeDetectionFilter.h; sourceTree = ""; }; - 0F6459CEEE271680736FA479FD981BD4 /* GPUImageColorDodgeBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageColorDodgeBlendFilter.m; path = framework/Source/GPUImageColorDodgeBlendFilter.m; sourceTree = ""; }; - 10015A94BC5970A447441E41EFA84CC4 /* GPUImageHighlightShadowFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHighlightShadowFilter.m; path = framework/Source/GPUImageHighlightShadowFilter.m; sourceTree = ""; }; - 10AF522841E0BF1975899E1F731DDF5D /* GPUImageFilterGroup.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageFilterGroup.h; path = framework/Source/GPUImageFilterGroup.h; sourceTree = ""; }; - 115B979659F12A2946B4CE9FB629FC55 /* GPUImage3x3TextureSamplingFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImage3x3TextureSamplingFilter.h; path = framework/Source/GPUImage3x3TextureSamplingFilter.h; sourceTree = ""; }; - 11CCBC30AD14409191CFABD8D074A58D /* GPUImageFilterPipeline.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageFilterPipeline.h; path = framework/Source/GPUImageFilterPipeline.h; sourceTree = ""; }; - 129DAE9BAABDCB922089CE7D3BDF76EC /* GPUImageAdaptiveThresholdFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageAdaptiveThresholdFilter.h; path = framework/Source/GPUImageAdaptiveThresholdFilter.h; sourceTree = ""; }; - 12F2B7D58256DFE9C2869DEE816D2FDD /* GPUImageChromaKeyFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageChromaKeyFilter.h; path = framework/Source/GPUImageChromaKeyFilter.h; sourceTree = ""; }; - 13093D7BD9574A7D40FB42A21DB87F15 /* MASConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraint.h; path = Masonry/MASConstraint.h; sourceTree = ""; }; - 1495EAEF4EC6B8FB6E18881881B3573B /* GPUImageDirectionalNonMaximumSuppressionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageDirectionalNonMaximumSuppressionFilter.m; path = framework/Source/GPUImageDirectionalNonMaximumSuppressionFilter.m; sourceTree = ""; }; - 1577D323A093A5E9B341C97A2C56FDFF /* GPUImageSaturationFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSaturationFilter.m; path = framework/Source/GPUImageSaturationFilter.m; sourceTree = ""; }; - 15E496E703C5AD87E7989377C681D73B /* GPUImageAmatorkaFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageAmatorkaFilter.m; path = framework/Source/GPUImageAmatorkaFilter.m; sourceTree = ""; }; - 1601092CB8E312022FDE49393A610FA4 /* MASCompositeConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASCompositeConstraint.h; path = Masonry/MASCompositeConstraint.h; sourceTree = ""; }; - 160895B89A8B29B177F36E3AF17C2C11 /* YYCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYCache.m; path = YYCache/YYCache.m; sourceTree = ""; }; - 169DF30CA515684B51A770DE262AC808 /* GPUImageGlassSphereFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageGlassSphereFilter.h; path = framework/Source/GPUImageGlassSphereFilter.h; sourceTree = ""; }; - 16C4DC343FBAC71D13FF4FA9BCE10709 /* Pods-DarkMode.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DarkMode.debug.xcconfig"; sourceTree = ""; }; - 16D91E4D58A94C5524A115536224EA76 /* GPUImageColorBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageColorBlendFilter.h; path = framework/Source/GPUImageColorBlendFilter.h; sourceTree = ""; }; - 1A8E625D6539753D6AC67978B97C5D7C /* GPUImageRGBOpeningFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageRGBOpeningFilter.h; path = framework/Source/GPUImageRGBOpeningFilter.h; sourceTree = ""; }; - 1AF1FBA24B5573418B3316CD3B2CAF8B /* GPUImageLinearBurnBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLinearBurnBlendFilter.h; path = framework/Source/GPUImageLinearBurnBlendFilter.h; sourceTree = ""; }; - 1B209441C9B2647C1E347736EE8FC64A /* GPUImage3x3ConvolutionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImage3x3ConvolutionFilter.m; path = framework/Source/GPUImage3x3ConvolutionFilter.m; sourceTree = ""; }; - 1E01E00886BEDC0765B232733C255C1C /* GPUImageMissEtikateFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageMissEtikateFilter.m; path = framework/Source/GPUImageMissEtikateFilter.m; sourceTree = ""; }; - 1E272A947106122CD1F27C631D653DA4 /* GPUImageExclusionBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageExclusionBlendFilter.h; path = framework/Source/GPUImageExclusionBlendFilter.h; sourceTree = ""; }; - 1E9095CF9176D72147052B3FD215EF7F /* GPUImagePicture+TextureSubimage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "GPUImagePicture+TextureSubimage.h"; path = "framework/Source/iOS/GPUImagePicture+TextureSubimage.h"; sourceTree = ""; }; - 1F0C80FAC0118D3106441EE7BCBCFF00 /* GPUImageUnsharpMaskFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageUnsharpMaskFilter.m; path = framework/Source/GPUImageUnsharpMaskFilter.m; sourceTree = ""; }; - 1F2C1EF174D0C89A1ECD8D871814D3C5 /* GPUImageErosionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageErosionFilter.h; path = framework/Source/GPUImageErosionFilter.h; sourceTree = ""; }; - 1FFED36A657123030ABB700256D73F15 /* libMasonry.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libMasonry.a; path = libMasonry.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 202D068CFDA5C22DA922D9FD075D1806 /* GPUImageBoxBlurFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageBoxBlurFilter.m; path = framework/Source/GPUImageBoxBlurFilter.m; sourceTree = ""; }; - 20BC00B3DDB29110A58176CE51605FD4 /* GPUImagePerlinNoiseFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImagePerlinNoiseFilter.m; path = framework/Source/GPUImagePerlinNoiseFilter.m; sourceTree = ""; }; - 20C5BE19C1459E39FC196D7A94B0CBE9 /* GPUImageSharpenFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSharpenFilter.m; path = framework/Source/GPUImageSharpenFilter.m; sourceTree = ""; }; - 2119B781CCC19BD3D0A42F303D2E7812 /* GPUImageCGAColorspaceFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageCGAColorspaceFilter.h; path = framework/Source/GPUImageCGAColorspaceFilter.h; sourceTree = ""; }; - 216F8CFBA824F61AE51F0BE1FB37998B /* _YYWebImageSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = _YYWebImageSetter.m; path = YYWebImage/Categories/_YYWebImageSetter.m; sourceTree = ""; }; - 219E2548D3FF4C96F4ED257B47311123 /* GPUImageSaturationFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSaturationFilter.h; path = framework/Source/GPUImageSaturationFilter.h; sourceTree = ""; }; - 21B2916276232C456951467038D3E2FF /* GPUImageMaskFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageMaskFilter.m; path = framework/Source/GPUImageMaskFilter.m; sourceTree = ""; }; - 21CD080746E9E7BC9C0BA1E1A2EDF8F0 /* GPUImageMovieWriter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageMovieWriter.h; path = framework/Source/iOS/GPUImageMovieWriter.h; sourceTree = ""; }; - 22245274C4F286C6221A887D6CD7F1AE /* GPUImageStretchDistortionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageStretchDistortionFilter.m; path = framework/Source/GPUImageStretchDistortionFilter.m; sourceTree = ""; }; - 2276B332FA8EDDC35FE32348D3EB368C /* GPUImageLineGenerator.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLineGenerator.m; path = framework/Source/GPUImageLineGenerator.m; sourceTree = ""; }; - 228003B3476B41761F56C932AA1DE129 /* GPUImagePolarPixellateFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImagePolarPixellateFilter.h; path = framework/Source/GPUImagePolarPixellateFilter.h; sourceTree = ""; }; - 240C513A27F958A5DE57B92A02EA4229 /* GPUImageThresholdEdgeDetectionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageThresholdEdgeDetectionFilter.h; path = framework/Source/GPUImageThresholdEdgeDetectionFilter.h; sourceTree = ""; }; - 2428E8C70A2E6595B6031EC3C1851FEF /* GPUImageTextureInput.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageTextureInput.h; path = framework/Source/GPUImageTextureInput.h; sourceTree = ""; }; - 250D4D5BDE79FE3FB3D8E6BDF13C6F79 /* GPUImageOpeningFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageOpeningFilter.m; path = framework/Source/GPUImageOpeningFilter.m; sourceTree = ""; }; - 254E957A25195EAAC2658009BDAEEBBD /* GPUImageShiTomasiFeatureDetectionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageShiTomasiFeatureDetectionFilter.h; path = framework/Source/GPUImageShiTomasiFeatureDetectionFilter.h; sourceTree = ""; }; - 25B452C9C925DADC958E77C39081288F /* GPUImageTransformFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageTransformFilter.m; path = framework/Source/GPUImageTransformFilter.m; sourceTree = ""; }; - 2715DCC6112CFACF55C762832D38626D /* GPUImageMotionDetector.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageMotionDetector.h; path = framework/Source/GPUImageMotionDetector.h; sourceTree = ""; }; - 27A2C6937109C3C8643FB3E370CDBE29 /* GPUImageDissolveBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageDissolveBlendFilter.m; path = framework/Source/GPUImageDissolveBlendFilter.m; sourceTree = ""; }; - 29114F4BF994DD99DA8B15BD714B5488 /* GPUImageKuwaharaRadius3Filter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageKuwaharaRadius3Filter.h; path = framework/Source/GPUImageKuwaharaRadius3Filter.h; sourceTree = ""; }; - 291AEAB6C085560A71960DDDD62ACD1A /* GPUImageGaussianBlurFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageGaussianBlurFilter.m; path = framework/Source/GPUImageGaussianBlurFilter.m; sourceTree = ""; }; - 295A7F01A1F9CE9A049C72379F8EC892 /* GPUImageView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageView.h; path = framework/Source/iOS/GPUImageView.h; sourceTree = ""; }; - 2988FF2F5DA771E11045F136F9BD4F0A /* GPUImageHighlightShadowFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHighlightShadowFilter.h; path = framework/Source/GPUImageHighlightShadowFilter.h; sourceTree = ""; }; - 2A0042D79436E9C952B47D4763A1C4AE /* GPUImage-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "GPUImage-dummy.m"; sourceTree = ""; }; - 2B166651BD2944A773F9537AEC00AF13 /* Pods-DarkMode-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DarkMode-dummy.m"; sourceTree = ""; }; - 2B2CFE441A1614F51B47AA982B4E448B /* GPUImageGaussianSelectiveBlurFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageGaussianSelectiveBlurFilter.m; path = framework/Source/GPUImageGaussianSelectiveBlurFilter.m; sourceTree = ""; }; - 2B3AB6691A881BF883BB176FDAB07FBA /* GPUImageHalftoneFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHalftoneFilter.m; path = framework/Source/GPUImageHalftoneFilter.m; sourceTree = ""; }; - 2BB60AA6A277030CEA93B362B1061701 /* GPUImageXYDerivativeFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageXYDerivativeFilter.m; path = framework/Source/GPUImageXYDerivativeFilter.m; sourceTree = ""; }; - 2CE39347324DF5B3FC2761B6D191DA9C /* GPUImageHarrisCornerDetectionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHarrisCornerDetectionFilter.h; path = framework/Source/GPUImageHarrisCornerDetectionFilter.h; sourceTree = ""; }; - 2E5AC46F45E4451E72AC537BB70B1812 /* YYCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYCache.h; path = YYCache/YYCache.h; sourceTree = ""; }; - 2EAC8FE75CB608768A2CEA2F31EDF290 /* GPUImageFilterPipeline.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageFilterPipeline.m; path = framework/Source/GPUImageFilterPipeline.m; sourceTree = ""; }; - 30871DDE7586CFF91A2ACC7F23FF6105 /* GPUImageHighPassFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHighPassFilter.m; path = framework/Source/GPUImageHighPassFilter.m; sourceTree = ""; }; - 30A8C055AB3C18A2E3FE4F47E4F66E5A /* GPUImageTwoInputFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageTwoInputFilter.m; path = framework/Source/GPUImageTwoInputFilter.m; sourceTree = ""; }; - 31214193F010827DB7A59D7F34A65AF0 /* YYModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYModel.h; path = YYModel/YYModel.h; sourceTree = ""; }; - 3193AAC04525E3412D850A3D7AD99612 /* GPUImageChromaKeyFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageChromaKeyFilter.m; path = framework/Source/GPUImageChromaKeyFilter.m; sourceTree = ""; }; - 31F4DFCE2BAF8205326A79D123842D37 /* GPUImageRGBDilationFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageRGBDilationFilter.h; path = framework/Source/GPUImageRGBDilationFilter.h; sourceTree = ""; }; - 3262E2097D957FBD0444889742CB1C80 /* GPUImageHSBFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHSBFilter.m; path = framework/Source/GPUImageHSBFilter.m; sourceTree = ""; }; - 34284363F58BE296025C3C9CBD8F317C /* GPUImageMedianFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageMedianFilter.m; path = framework/Source/GPUImageMedianFilter.m; sourceTree = ""; }; - 34804E531C9635A205640CD71C357B77 /* GPUImageMotionBlurFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageMotionBlurFilter.h; path = framework/Source/GPUImageMotionBlurFilter.h; sourceTree = ""; }; - 34E2DEEB4F0ADF11F9C9E23D43C1A3B6 /* GPUImageFalseColorFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageFalseColorFilter.m; path = framework/Source/GPUImageFalseColorFilter.m; sourceTree = ""; }; - 35D609B903920B4F5B05401FBC7E489D /* GPUImageNormalBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageNormalBlendFilter.h; path = framework/Source/GPUImageNormalBlendFilter.h; sourceTree = ""; }; - 36454A100B7DDEDEA1E782EF2E9E27AC /* NSLayoutConstraint+MASDebugAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSLayoutConstraint+MASDebugAdditions.h"; path = "Masonry/NSLayoutConstraint+MASDebugAdditions.h"; sourceTree = ""; }; - 36A3F94120C780455E9F79C31D756DEC /* GLProgram.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GLProgram.h; path = framework/Source/GLProgram.h; sourceTree = ""; }; - 36B4A09ADA586EFD92A79ECD4C0E35A8 /* GPUImageThresholdEdgeDetectionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageThresholdEdgeDetectionFilter.m; path = framework/Source/GPUImageThresholdEdgeDetectionFilter.m; sourceTree = ""; }; - 372EFFE9AC19817C164303970B18F910 /* YYImageCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYImageCache.h; path = YYWebImage/YYImageCache.h; sourceTree = ""; }; - 375E8723E93DD1BD999307185560F30B /* Pods-DarkMode-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DarkMode-resources.sh"; sourceTree = ""; }; - 37B3E429270DF855D2663E4BE0DCE666 /* GPUImageLanczosResamplingFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLanczosResamplingFilter.m; path = framework/Source/GPUImageLanczosResamplingFilter.m; sourceTree = ""; }; - 38948BFE21048F7C6D91B1281E521F1B /* GPUImageSobelEdgeDetectionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSobelEdgeDetectionFilter.m; path = framework/Source/GPUImageSobelEdgeDetectionFilter.m; sourceTree = ""; }; - 3918FDF9EBD2B1FA91FD529E6E34785A /* GPUImageMovie.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageMovie.h; path = framework/Source/GPUImageMovie.h; sourceTree = ""; }; - 3C138582918D37CF364E6D3C9898D68F /* GPUImageGrayscaleFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageGrayscaleFilter.h; path = framework/Source/GPUImageGrayscaleFilter.h; sourceTree = ""; }; - 3C8EF79EE8E13A7229E1AF925AEC3BC4 /* GPUImageSingleComponentGaussianBlurFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSingleComponentGaussianBlurFilter.h; path = framework/Source/GPUImageSingleComponentGaussianBlurFilter.h; sourceTree = ""; }; - 3CF95A800A5428B6D2C82CDC82A21CD5 /* GPUImageSmoothToonFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSmoothToonFilter.h; path = framework/Source/GPUImageSmoothToonFilter.h; sourceTree = ""; }; - 3D59E89941BC318DF7FC1D5BC49895CD /* _YYWebImageSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = _YYWebImageSetter.h; path = YYWebImage/Categories/_YYWebImageSetter.h; sourceTree = ""; }; - 3E5E02B856C988A000B10E5E5512B56A /* YYImageCoder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYImageCoder.m; path = YYImage/YYImageCoder.m; sourceTree = ""; }; - 3E7EB13B2D474F8DE4852C033BF689FB /* MASViewAttribute.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASViewAttribute.h; path = Masonry/MASViewAttribute.h; sourceTree = ""; }; - 3F37E42BC4BE8E0517824BABC9869273 /* GPUImageSaturationBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSaturationBlendFilter.h; path = framework/Source/GPUImageSaturationBlendFilter.h; sourceTree = ""; }; - 3FA9A4C47EC9F4059DAB7AADC578E5AF /* GPUImageLineGenerator.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLineGenerator.h; path = framework/Source/GPUImageLineGenerator.h; sourceTree = ""; }; - 3FE5C658FDFFD20E3BCD7C36D40923A3 /* GPUImageVideoCamera.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageVideoCamera.h; path = framework/Source/GPUImageVideoCamera.h; sourceTree = ""; }; - 3FFF18D3BD6B92729084311D3FD98998 /* Masonry.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Masonry.release.xcconfig; sourceTree = ""; }; - 404551280AEA0058459B3385F82AFBBA /* GPUImageGaussianBlurPositionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageGaussianBlurPositionFilter.m; path = framework/Source/GPUImageGaussianBlurPositionFilter.m; sourceTree = ""; }; - 40BEB1831EED3C7A7E80C4057D3DA022 /* GPUImageDivideBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageDivideBlendFilter.m; path = framework/Source/GPUImageDivideBlendFilter.m; sourceTree = ""; }; - 414E85F24E79E32F8EA8031796253C7F /* GPUImagePrewittEdgeDetectionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImagePrewittEdgeDetectionFilter.m; path = framework/Source/GPUImagePrewittEdgeDetectionFilter.m; sourceTree = ""; }; - 41E7FFB3E5D0BA8ABC62E1A89D3063A8 /* YYKVStorage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYKVStorage.h; path = YYCache/YYKVStorage.h; sourceTree = ""; }; - 4272FC95B847753C0B6BA23100C3957E /* GPUImagePinchDistortionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImagePinchDistortionFilter.h; path = framework/Source/GPUImagePinchDistortionFilter.h; sourceTree = ""; }; - 4284D70C7F26D1B5D00CB148C3E562E1 /* GPUImageSingleComponentGaussianBlurFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSingleComponentGaussianBlurFilter.m; path = framework/Source/GPUImageSingleComponentGaussianBlurFilter.m; sourceTree = ""; }; - 42C7A8AF75309C3CA628C0B8775A0F0B /* GPUImageAmatorkaFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageAmatorkaFilter.h; path = framework/Source/GPUImageAmatorkaFilter.h; sourceTree = ""; }; - 42D084FF6A05E8F634B9ECC121BB2F70 /* GPUImageSolidColorGenerator.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSolidColorGenerator.m; path = framework/Source/GPUImageSolidColorGenerator.m; sourceTree = ""; }; - 43471FC538F7533EBC5AA010B09E0958 /* GPUImageOutput.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageOutput.h; path = framework/Source/GPUImageOutput.h; sourceTree = ""; }; - 43A18B72D843666583E43734D2462B4F /* GPUImagePosterizeFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImagePosterizeFilter.m; path = framework/Source/GPUImagePosterizeFilter.m; sourceTree = ""; }; - 43F07509067BACE67AB5E9CE46DBB3EE /* GPUImageGammaFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageGammaFilter.m; path = framework/Source/GPUImageGammaFilter.m; sourceTree = ""; }; - 446D6F21C19F21359994D8C61A378A84 /* YYImage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YYImage.release.xcconfig; sourceTree = ""; }; - 453BE721D27626D4753B1F021A0126F4 /* GPUImageKuwaharaRadius3Filter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageKuwaharaRadius3Filter.m; path = framework/Source/GPUImageKuwaharaRadius3Filter.m; sourceTree = ""; }; - 462A9647EF473D7371FF63E7DF5E9FB1 /* GPUImageAlphaBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageAlphaBlendFilter.m; path = framework/Source/GPUImageAlphaBlendFilter.m; sourceTree = ""; }; - 467740B1EE1788F570B996D82E451066 /* GPUImageColorInvertFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageColorInvertFilter.h; path = framework/Source/GPUImageColorInvertFilter.h; sourceTree = ""; }; - 47104284B40E3FE25D823BBBF6BBD751 /* GPUImageDivideBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageDivideBlendFilter.h; path = framework/Source/GPUImageDivideBlendFilter.h; sourceTree = ""; }; - 4713F7EF42A07902267E6A57EBC07D50 /* YYCache.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YYCache.release.xcconfig; sourceTree = ""; }; - 488651029866527C3B2644FD81E92587 /* GPUImageMotionBlurFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageMotionBlurFilter.m; path = framework/Source/GPUImageMotionBlurFilter.m; sourceTree = ""; }; - 48ACF38225AF5129416A1F090F6D3286 /* libYYCache.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libYYCache.a; path = libYYCache.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 48BC391B2B9B8DF60B1BC90CF239FC80 /* lookup_miss_etikate.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = lookup_miss_etikate.png; path = framework/Resources/lookup_miss_etikate.png; sourceTree = ""; }; - 48C35BCA747620F3BF149953BFDC422D /* GPUImageErosionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageErosionFilter.m; path = framework/Source/GPUImageErosionFilter.m; sourceTree = ""; }; - 48F476DACC4D9202F44C5407ACDA8410 /* YYWebImageOperation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYWebImageOperation.m; path = YYWebImage/YYWebImageOperation.m; sourceTree = ""; }; - 49B9B7911201EAA735B877B4E99D31D9 /* GPUImageNormalBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageNormalBlendFilter.m; path = framework/Source/GPUImageNormalBlendFilter.m; sourceTree = ""; }; - 49E415F2BA5768C469A662DF8C823B3C /* GPUImageHistogramGenerator.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHistogramGenerator.m; path = framework/Source/GPUImageHistogramGenerator.m; sourceTree = ""; }; - 4A0251929026FA746DAF38200C6045F2 /* GPUImageSubtractBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSubtractBlendFilter.h; path = framework/Source/GPUImageSubtractBlendFilter.h; sourceTree = ""; }; - 4A1109257C4F91B78B674D3ED606F875 /* GPUImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImage.h; path = framework/Source/GPUImage.h; sourceTree = ""; }; - 4A6F1BA241429526CAA01D945FD69E28 /* GPUImageHighPassFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHighPassFilter.h; path = framework/Source/GPUImageHighPassFilter.h; sourceTree = ""; }; - 4A7B42C55528946ABE27DCA7F4A86E7A /* GPUImageNonMaximumSuppressionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageNonMaximumSuppressionFilter.m; path = framework/Source/GPUImageNonMaximumSuppressionFilter.m; sourceTree = ""; }; - 4A94921FCB9C25F627D3B1EB025EB097 /* GPUImageStretchDistortionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageStretchDistortionFilter.h; path = framework/Source/GPUImageStretchDistortionFilter.h; sourceTree = ""; }; - 4CE0EB4E232A38B13CACAA200001C7D9 /* GPUImageMotionDetector.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageMotionDetector.m; path = framework/Source/GPUImageMotionDetector.m; sourceTree = ""; }; - 4EB243D1C497784152C266E096C23C6C /* GPUImageGlassSphereFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageGlassSphereFilter.m; path = framework/Source/GPUImageGlassSphereFilter.m; sourceTree = ""; }; - 4FC1978206616CE319648B302B05AA8A /* libYYWebImage.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libYYWebImage.a; path = libYYWebImage.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 5002004ECCBA2AFB115693A8FF292F8D /* GPUImageAddBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageAddBlendFilter.h; path = framework/Source/GPUImageAddBlendFilter.h; sourceTree = ""; }; - 5021D951EBE0EE5ACBFF0A1D5BF60EC2 /* GPUImagePrewittEdgeDetectionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImagePrewittEdgeDetectionFilter.h; path = framework/Source/GPUImagePrewittEdgeDetectionFilter.h; sourceTree = ""; }; - 504C0F55ECD0EE366A432BE3CAF79E1F /* GPUImage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = GPUImage.release.xcconfig; sourceTree = ""; }; - 50E15C340F7D31DE893B684AFF6EC189 /* GPUImageFASTCornerDetectionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageFASTCornerDetectionFilter.m; path = framework/Source/GPUImageFASTCornerDetectionFilter.m; sourceTree = ""; }; - 525E00D440284C93311DF077591CDA15 /* GPUImageSoftEleganceFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSoftEleganceFilter.h; path = framework/Source/GPUImageSoftEleganceFilter.h; sourceTree = ""; }; - 527337E5AE7218053824FE826DE95FB6 /* GPUImageBuffer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageBuffer.h; path = framework/Source/GPUImageBuffer.h; sourceTree = ""; }; - 5278FBF2D16D0E9492F81D50E1B4E389 /* GPUImage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = GPUImage.debug.xcconfig; sourceTree = ""; }; - 533CF0E1A935E0C8D6084DE984AA9A48 /* GPUImageLaplacianFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLaplacianFilter.m; path = framework/Source/GPUImageLaplacianFilter.m; sourceTree = ""; }; - 537E9A1D3C9B19E06AD252A90F35F4FC /* GPUImageTwoInputFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageTwoInputFilter.h; path = framework/Source/GPUImageTwoInputFilter.h; sourceTree = ""; }; - 5388C8B9509AE2A725C77FB08EAB1262 /* GPUImageShiTomasiFeatureDetectionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageShiTomasiFeatureDetectionFilter.m; path = framework/Source/GPUImageShiTomasiFeatureDetectionFilter.m; sourceTree = ""; }; - 53D16559576FCC95A4CD46C46C5DE443 /* GPUImageTwoPassTextureSamplingFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageTwoPassTextureSamplingFilter.m; path = framework/Source/GPUImageTwoPassTextureSamplingFilter.m; sourceTree = ""; }; - 55DC707CC4179395588164EA0C8D4DF8 /* YYModel-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "YYModel-dummy.m"; sourceTree = ""; }; - 56D2D8153149A60C61AB14238CE5A721 /* GPUImageRGBClosingFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageRGBClosingFilter.h; path = framework/Source/GPUImageRGBClosingFilter.h; sourceTree = ""; }; - 571C0946C15922F37A4FF9DC53636F23 /* GPUImageBuffer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageBuffer.m; path = framework/Source/GPUImageBuffer.m; sourceTree = ""; }; - 59C6E40234EEDDD4087F2CFFF63582D0 /* GPUImageTwoInputCrossTextureSamplingFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageTwoInputCrossTextureSamplingFilter.m; path = framework/Source/GPUImageTwoInputCrossTextureSamplingFilter.m; sourceTree = ""; }; - 5A14EDB5BB818BEE5CEE11AB9273F285 /* GPUImageThreeInputFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageThreeInputFilter.h; path = framework/Source/GPUImageThreeInputFilter.h; sourceTree = ""; }; - 5AB2E9FBA9B5DC6C3B50148EBA2EB69C /* GPUImageJFAVoronoiFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageJFAVoronoiFilter.m; path = framework/Source/GPUImageJFAVoronoiFilter.m; sourceTree = ""; }; - 5AF9D53BF78794179DA5A171FD200059 /* YYWebImage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YYWebImage.debug.xcconfig; sourceTree = ""; }; - 5B231C196006B4B6C3DD281978E5EB74 /* GPUImageColorPackingFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageColorPackingFilter.m; path = framework/Source/GPUImageColorPackingFilter.m; sourceTree = ""; }; - 5B86F3F70B22B26EC06C5C412D9B9733 /* GPUImageLowPassFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLowPassFilter.m; path = framework/Source/GPUImageLowPassFilter.m; sourceTree = ""; }; - 5B933CA3EC0B18A8DB363F31A85D1268 /* GPUImagePolkaDotFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImagePolkaDotFilter.m; path = framework/Source/GPUImagePolkaDotFilter.m; sourceTree = ""; }; - 5C0B54E85F3F7357A3084FAC6447AFF1 /* ViewController+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "ViewController+MASAdditions.h"; path = "Masonry/ViewController+MASAdditions.h"; sourceTree = ""; }; - 5C40FD404F6B8A2300E4B45AA2B6F9A8 /* YYWebImageManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYWebImageManager.h; path = YYWebImage/YYWebImageManager.h; sourceTree = ""; }; - 5D6101DA1E24CEAF212864D149AAA311 /* GPUImageHistogramFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHistogramFilter.m; path = framework/Source/GPUImageHistogramFilter.m; sourceTree = ""; }; - 5D6604B45B92B4410C171D7E0C6B4939 /* GPUImageToneCurveFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageToneCurveFilter.h; path = framework/Source/GPUImageToneCurveFilter.h; sourceTree = ""; }; - 5D7C1EBCB0F669526CC10ADAA17FB565 /* MBProgressHUD-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MBProgressHUD-prefix.pch"; sourceTree = ""; }; - 5DA7010E9B001189E58C1D4FAF928DF7 /* YYCache.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YYCache.debug.xcconfig; sourceTree = ""; }; - 5DADF97A372B96269C7E574FFD19EA84 /* GPUImageSepiaFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSepiaFilter.m; path = framework/Source/GPUImageSepiaFilter.m; sourceTree = ""; }; - 5E64875CACD9293F8463A7DEB77900AF /* MASConstraintMaker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraintMaker.h; path = Masonry/MASConstraintMaker.h; sourceTree = ""; }; - 5F066292FE00E22395481D12B85DCF15 /* YYCache-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "YYCache-dummy.m"; sourceTree = ""; }; - 5F8F677D95958C9F3D7EA1F6761CD291 /* YYImage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YYImage.debug.xcconfig; sourceTree = ""; }; - 611CC398C3A952328326F836188CEC88 /* GPUImageCrosshairGenerator.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageCrosshairGenerator.h; path = framework/Source/GPUImageCrosshairGenerator.h; sourceTree = ""; }; - 61E2A63537B14F7A60668071C08241DE /* GPUImageMultiplyBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageMultiplyBlendFilter.h; path = framework/Source/GPUImageMultiplyBlendFilter.h; sourceTree = ""; }; - 621DA413177A46757ACA5C0C17FE0C8C /* GPUImageTextureOutput.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageTextureOutput.m; path = framework/Source/GPUImageTextureOutput.m; sourceTree = ""; }; - 63157528C8EC3BBA57A086A9E876519F /* GPUImageDissolveBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageDissolveBlendFilter.h; path = framework/Source/GPUImageDissolveBlendFilter.h; sourceTree = ""; }; - 6460B60CAEB361F43B409D943DD5919E /* GPUImageLevelsFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLevelsFilter.h; path = framework/Source/GPUImageLevelsFilter.h; sourceTree = ""; }; - 64B98E97EBB4B89FF8C0A73B4905060A /* GPUImageDifferenceBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageDifferenceBlendFilter.h; path = framework/Source/GPUImageDifferenceBlendFilter.h; sourceTree = ""; }; - 6641303C0E807B1DB7DE0B014814E30A /* YYImage-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "YYImage-dummy.m"; sourceTree = ""; }; - 6679F37F751FAB9174C4595A35CF4822 /* GPUImageContext.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageContext.h; path = framework/Source/iOS/GPUImageContext.h; sourceTree = ""; }; - 675DA2B87C4D3A22040B4457A6387B04 /* GPUImageFilterGroup.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageFilterGroup.m; path = framework/Source/GPUImageFilterGroup.m; sourceTree = ""; }; - 68619D6BC015E7B9AD2E0EF3660EC99B /* YYWebImage-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "YYWebImage-dummy.m"; sourceTree = ""; }; - 6872FC509316C9B4DCA67FFA969849E6 /* GPUImageDarkenBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageDarkenBlendFilter.m; path = framework/Source/GPUImageDarkenBlendFilter.m; sourceTree = ""; }; - 68CD24B140838D08A6E5DD6A70FD8923 /* GPUImageMovie.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageMovie.m; path = framework/Source/GPUImageMovie.m; sourceTree = ""; }; - 69BEFC89CA92FA91FB606E547079BABE /* GPUImageContext.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageContext.m; path = framework/Source/iOS/GPUImageContext.m; sourceTree = ""; }; - 69E5EB77E2A5E329FE60A250611BF2FC /* GPUImagePosterizeFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImagePosterizeFilter.h; path = framework/Source/GPUImagePosterizeFilter.h; sourceTree = ""; }; - 69E7B0C997A3206F5C0D10C360A6D957 /* GPUImageCropFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageCropFilter.h; path = framework/Source/GPUImageCropFilter.h; sourceTree = ""; }; - 6CA047F4F7C29EBD892E71642C0B6FD0 /* GPUImageHoughTransformLineDetector.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHoughTransformLineDetector.h; path = framework/Source/GPUImageHoughTransformLineDetector.h; sourceTree = ""; }; - 6CCD41C6BD2C0E9ABB3148B70C4BC918 /* GPUImageTextureInput.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageTextureInput.m; path = framework/Source/GPUImageTextureInput.m; sourceTree = ""; }; - 6DA0D34140F270C03A5A2D7F4CC54517 /* GPUImagePixellatePositionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImagePixellatePositionFilter.h; path = framework/Source/GPUImagePixellatePositionFilter.h; sourceTree = ""; }; - 6DC692CA9FD5C1A42113F450FA649F67 /* GPUImageHSBFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHSBFilter.h; path = framework/Source/GPUImageHSBFilter.h; sourceTree = ""; }; - 6E126A469B8B4CA1D5708D0C66DBCB45 /* GPUImageEmbossFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageEmbossFilter.m; path = framework/Source/GPUImageEmbossFilter.m; sourceTree = ""; }; - 6E747934866906927486DC94DEC4581B /* GPUImageRGBFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageRGBFilter.h; path = framework/Source/GPUImageRGBFilter.h; sourceTree = ""; }; - 6EEB662CC37ABBC8474275EEA42AB477 /* ViewController+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "ViewController+MASAdditions.m"; path = "Masonry/ViewController+MASAdditions.m"; sourceTree = ""; }; - 6FAE5EFDF6BAE35B5464066D6F82F34E /* GPUImageFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageFilter.m; path = framework/Source/GPUImageFilter.m; sourceTree = ""; }; - 6FE16BE5263EBF1D2F9145482FAE76E3 /* GPUImageClosingFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageClosingFilter.h; path = framework/Source/GPUImageClosingFilter.h; sourceTree = ""; }; - 71669CD78F52A5CA28F626C8A16A194C /* GPUImageSepiaFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSepiaFilter.h; path = framework/Source/GPUImageSepiaFilter.h; sourceTree = ""; }; - 71D502A5B132B8E2D515B9A975C85309 /* GPUImageFASTCornerDetectionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageFASTCornerDetectionFilter.h; path = framework/Source/GPUImageFASTCornerDetectionFilter.h; sourceTree = ""; }; - 71F455391A9616D714CC8874A51F7EE6 /* GPUImageFramework.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageFramework.h; path = framework/Source/iOS/Framework/GPUImageFramework.h; sourceTree = ""; }; - 722AE0C698ABB0490DECD454A56B78D5 /* GPUImageAverageLuminanceThresholdFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageAverageLuminanceThresholdFilter.m; path = framework/Source/GPUImageAverageLuminanceThresholdFilter.m; sourceTree = ""; }; - 73B8731A5CF568F198781C8412733FB0 /* GPUImageColorBurnBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageColorBurnBlendFilter.h; path = framework/Source/GPUImageColorBurnBlendFilter.h; sourceTree = ""; }; - 751129785F65D4A3EA3332CE56D280DD /* GPUImageGrayscaleFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageGrayscaleFilter.m; path = framework/Source/GPUImageGrayscaleFilter.m; sourceTree = ""; }; - 768B4BE6A62741EA37180E7EC67437C1 /* MBProgressHUD.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = ""; }; - 76CEE856E426B01553F3D79A1347C109 /* GPUImageChromaKeyBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageChromaKeyBlendFilter.m; path = framework/Source/GPUImageChromaKeyBlendFilter.m; sourceTree = ""; }; - 77A6428D36533AF050B1E9F92BF82FD8 /* GPUImageBilateralFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageBilateralFilter.h; path = framework/Source/GPUImageBilateralFilter.h; sourceTree = ""; }; - 77F4D03A5C3A7B3755BD05C6BC87D853 /* GPUImageStillCamera.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageStillCamera.h; path = framework/Source/GPUImageStillCamera.h; sourceTree = ""; }; - 784B2008FD82B473DC377FEEC4B7EFD4 /* GPUImageHardLightBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHardLightBlendFilter.m; path = framework/Source/GPUImageHardLightBlendFilter.m; sourceTree = ""; }; - 78FB8998E490B19D8A2CFE9E092F2132 /* GPUImageContrastFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageContrastFilter.m; path = framework/Source/GPUImageContrastFilter.m; sourceTree = ""; }; - 795CA168A9604FBD8784D73FA8C9DE4A /* GPUImageCrosshairGenerator.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageCrosshairGenerator.m; path = framework/Source/GPUImageCrosshairGenerator.m; sourceTree = ""; }; - 79E8CB24F46AA9A51F87BBDF2D0AC238 /* libGPUImage.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libGPUImage.a; path = libGPUImage.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 79F32CA2AC9383860E5A101F3891F01F /* GPUImageiOSBlurFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageiOSBlurFilter.h; path = framework/Source/GPUImageiOSBlurFilter.h; sourceTree = ""; }; - 7AF69C635DEFF07CF03F7EC5C93EECC6 /* GPUImageSoftLightBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSoftLightBlendFilter.m; path = framework/Source/GPUImageSoftLightBlendFilter.m; sourceTree = ""; }; - 7B03CEF081AF2EB3E5F9FF382D2515F8 /* GPUImageAlphaBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageAlphaBlendFilter.h; path = framework/Source/GPUImageAlphaBlendFilter.h; sourceTree = ""; }; - 7B515D86A399467A37FA4BA15B8B0887 /* YYDiskCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYDiskCache.m; path = YYCache/YYDiskCache.m; sourceTree = ""; }; - 7C17752936CF711DF066A5BA091BFA81 /* GPUImageLuminanceThresholdFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLuminanceThresholdFilter.m; path = framework/Source/GPUImageLuminanceThresholdFilter.m; sourceTree = ""; }; - 7CD5AC12DA2322B95DFCB7F7D42FBD49 /* GPUImagePolarPixellateFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImagePolarPixellateFilter.m; path = framework/Source/GPUImagePolarPixellateFilter.m; sourceTree = ""; }; - 7D1011A9244B271E11F082989E181A6D /* YYFrameImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYFrameImage.m; path = YYImage/YYFrameImage.m; sourceTree = ""; }; - 7EBD52032DCAFDAEC06FD991BB8695A8 /* View+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "View+MASAdditions.m"; path = "Masonry/View+MASAdditions.m"; sourceTree = ""; }; - 7FEA48B785F73A0492D9D729976FD86B /* GPUImageWhiteBalanceFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageWhiteBalanceFilter.m; path = framework/Source/GPUImageWhiteBalanceFilter.m; sourceTree = ""; }; - 80DCA9ABD24683C3D8FAE083D96F58E5 /* GPUImageToonFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageToonFilter.m; path = framework/Source/GPUImageToonFilter.m; sourceTree = ""; }; - 80F0F94732C9BFC491C85042FF7D14A5 /* GPUImageOverlayBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageOverlayBlendFilter.h; path = framework/Source/GPUImageOverlayBlendFilter.h; sourceTree = ""; }; - 82945F15766B165DCCA8DA4BC2C4BD87 /* View+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASShorthandAdditions.h"; path = "Masonry/View+MASShorthandAdditions.h"; sourceTree = ""; }; - 82C6F83D1D031E0F313B5E11137E072B /* GPUImageKuwaharaFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageKuwaharaFilter.h; path = framework/Source/GPUImageKuwaharaFilter.h; sourceTree = ""; }; - 82F4ACE9BAABD111264FD788EF74546D /* YYWebImage-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "YYWebImage-prefix.pch"; sourceTree = ""; }; - 83180B57DF37B3555ED1B68472C45C2C /* GPUImageEmbossFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageEmbossFilter.h; path = framework/Source/GPUImageEmbossFilter.h; sourceTree = ""; }; - 838B4FE7CBA73D00A0885739EF9AA694 /* GPUImageFramebuffer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageFramebuffer.m; path = framework/Source/GPUImageFramebuffer.m; sourceTree = ""; }; - 83FF0DCFBB0CF862F4E2370485036696 /* GPUImageVoronoiConsumerFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageVoronoiConsumerFilter.h; path = framework/Source/GPUImageVoronoiConsumerFilter.h; sourceTree = ""; }; - 844471BB500349B7E35E4D0A96389D2F /* GPUImageSphereRefractionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSphereRefractionFilter.h; path = framework/Source/GPUImageSphereRefractionFilter.h; sourceTree = ""; }; - 8472059D35BC092DEF41EC2604D795FB /* GPUImageHistogramFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHistogramFilter.h; path = framework/Source/GPUImageHistogramFilter.h; sourceTree = ""; }; - 84948E8F3C90A486BDED1DDC42DD9B6D /* GPUImageTwoPassFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageTwoPassFilter.m; path = framework/Source/GPUImageTwoPassFilter.m; sourceTree = ""; }; - 856409B61D04B0A9D91A67DFFB1C680D /* GPUImageDilationFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageDilationFilter.h; path = framework/Source/GPUImageDilationFilter.h; sourceTree = ""; }; - 85B8CD154BD93A91C3B231B46DFA42BC /* lookup_soft_elegance_2.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = lookup_soft_elegance_2.png; path = framework/Resources/lookup_soft_elegance_2.png; sourceTree = ""; }; - 864D6DEE6397881CD3F0FCBC2443BB60 /* GPUImageiOSBlurFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageiOSBlurFilter.m; path = framework/Source/GPUImageiOSBlurFilter.m; sourceTree = ""; }; - 86B55374AABE32E7869673D68D81265B /* YYSpriteSheetImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYSpriteSheetImage.m; path = YYImage/YYSpriteSheetImage.m; sourceTree = ""; }; - 870991E39050AAA48FC751AB989A0CEE /* GPUImagePinchDistortionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImagePinchDistortionFilter.m; path = framework/Source/GPUImagePinchDistortionFilter.m; sourceTree = ""; }; - 8736944B2594030670245A252F39B7FA /* GPUImageThreeInputFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageThreeInputFilter.m; path = framework/Source/GPUImageThreeInputFilter.m; sourceTree = ""; }; - 87611103457106E50CE6DF1459C428CF /* GPUImageRGBDilationFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageRGBDilationFilter.m; path = framework/Source/GPUImageRGBDilationFilter.m; sourceTree = ""; }; - 87B89822E64C2B0270C48FB5310A947F /* YYAnimatedImageView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYAnimatedImageView.h; path = YYImage/YYAnimatedImageView.h; sourceTree = ""; }; - 8897A494B1993654654BD96F0352C036 /* GPUImageCrosshatchFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageCrosshatchFilter.h; path = framework/Source/GPUImageCrosshatchFilter.h; sourceTree = ""; }; - 894067B7B8B143B196F909226A542245 /* GPUImageWeakPixelInclusionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageWeakPixelInclusionFilter.h; path = framework/Source/GPUImageWeakPixelInclusionFilter.h; sourceTree = ""; }; - 89911F978F34916A355191709CBB5802 /* GPUImageBrightnessFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageBrightnessFilter.h; path = framework/Source/GPUImageBrightnessFilter.h; sourceTree = ""; }; - 8A10226B00432CC14F57C84CDA29A0B6 /* GPUImageZoomBlurFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageZoomBlurFilter.h; path = framework/Source/GPUImageZoomBlurFilter.h; sourceTree = ""; }; - 8A630DEACFD6C33B16EABFCBA7B10B6B /* GPUImageStillCamera.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageStillCamera.m; path = framework/Source/GPUImageStillCamera.m; sourceTree = ""; }; - 8AC2A96E79A66C63B15134B252A9BD15 /* lookup.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = lookup.png; path = framework/Resources/lookup.png; sourceTree = ""; }; - 8B8FAB0D627B17EDE1366984278705D9 /* libMBProgressHUD.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libMBProgressHUD.a; path = libMBProgressHUD.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 8BA72D587A6A6B053532804FF36E8E46 /* GPUImageLuminosityBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLuminosityBlendFilter.m; path = framework/Source/GPUImageLuminosityBlendFilter.m; sourceTree = ""; }; - 8BBCCF9A4A7C3B7E1D6638E2D15B2B83 /* GPUImageRGBClosingFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageRGBClosingFilter.m; path = framework/Source/GPUImageRGBClosingFilter.m; sourceTree = ""; }; - 8C3AE50C738678F7E82112FDB4A8E70C /* MASLayoutConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASLayoutConstraint.m; path = Masonry/MASLayoutConstraint.m; sourceTree = ""; }; - 8C7EBDF59E4597071BF464EFAC596030 /* MBProgressHUD-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MBProgressHUD-dummy.m"; sourceTree = ""; }; - 8CAC7D39500D3FC8B5E4380E69FFBCCA /* GPUImageHazeFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHazeFilter.m; path = framework/Source/GPUImageHazeFilter.m; sourceTree = ""; }; - 8CEEEBC4B26A07F17E3509809AE7C514 /* GPUImageHistogramGenerator.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHistogramGenerator.h; path = framework/Source/GPUImageHistogramGenerator.h; sourceTree = ""; }; - 8D6496F72C325C292BB59F2D94A654A2 /* NSLayoutConstraint+MASDebugAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSLayoutConstraint+MASDebugAdditions.m"; path = "Masonry/NSLayoutConstraint+MASDebugAdditions.m"; sourceTree = ""; }; - 8DEFD1186E4AE1006B42EF52538073A3 /* YYWebImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYWebImage.h; path = YYWebImage/YYWebImage.h; sourceTree = ""; }; - 8F06970C1605988B31A04FC0D429E908 /* GPUImageLuminosity.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLuminosity.h; path = framework/Source/GPUImageLuminosity.h; sourceTree = ""; }; - 8F3286B04ABC750B2DA6269CDAB9A3B0 /* YYWebImageManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYWebImageManager.m; path = YYWebImage/YYWebImageManager.m; sourceTree = ""; }; - 8F3589B845F9E0998764CC082B4636FE /* YYImage-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "YYImage-prefix.pch"; sourceTree = ""; }; - 8F4D069CFC80E40C0955894061DC5082 /* GPUImageNobleCornerDetectionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageNobleCornerDetectionFilter.m; path = framework/Source/GPUImageNobleCornerDetectionFilter.m; sourceTree = ""; }; - 8F83E8DB73761A3F59617E28A1A9351E /* GPUImageColorDodgeBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageColorDodgeBlendFilter.h; path = framework/Source/GPUImageColorDodgeBlendFilter.h; sourceTree = ""; }; - 917747700EB9C26B29A0199F357B3B12 /* GPUImageColorBurnBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageColorBurnBlendFilter.m; path = framework/Source/GPUImageColorBurnBlendFilter.m; sourceTree = ""; }; - 926120A3C10BB72D3539005BC5D12636 /* YYDiskCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYDiskCache.h; path = YYCache/YYDiskCache.h; sourceTree = ""; }; - 94E26D38916B6B7C099A974F7D4801BB /* GPUImageHardLightBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHardLightBlendFilter.h; path = framework/Source/GPUImageHardLightBlendFilter.h; sourceTree = ""; }; - 94F2208CD8400EF9A4FE9B63DAC5E6E0 /* GPUImageLuminanceRangeFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLuminanceRangeFilter.m; path = framework/Source/GPUImageLuminanceRangeFilter.m; sourceTree = ""; }; - 9680F05DBD64586E9AB59F33EA7E289F /* MKAnnotationView+YYWebImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "MKAnnotationView+YYWebImage.m"; path = "YYWebImage/Categories/MKAnnotationView+YYWebImage.m"; sourceTree = ""; }; - 96B10DB742FBE734F2EE564DC1808399 /* GPUImageRGBErosionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageRGBErosionFilter.h; path = framework/Source/GPUImageRGBErosionFilter.h; sourceTree = ""; }; - 970BB19E23C4B9B7AA3309F224CC0E71 /* YYClassInfo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYClassInfo.h; path = YYModel/YYClassInfo.h; sourceTree = ""; }; - 97BB1E9D14B5C9A8E04954127CF899DD /* GPUImageRGBFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageRGBFilter.m; path = framework/Source/GPUImageRGBFilter.m; sourceTree = ""; }; - 985698BFE05D67C00294DF094B379513 /* GPUImageExposureFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageExposureFilter.h; path = framework/Source/GPUImageExposureFilter.h; sourceTree = ""; }; - 99007670CCD9C91A8F619B9CEA906413 /* GPUImageThresholdedNonMaximumSuppressionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageThresholdedNonMaximumSuppressionFilter.h; path = framework/Source/GPUImageThresholdedNonMaximumSuppressionFilter.h; sourceTree = ""; }; - 9ADFE335A749F6242A5501FC31B4EDB2 /* GPUImageMosaicFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageMosaicFilter.m; path = framework/Source/GPUImageMosaicFilter.m; sourceTree = ""; }; - 9B4EE9ADF2AF51D5C395568406645F72 /* MASViewAttribute.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewAttribute.m; path = Masonry/MASViewAttribute.m; sourceTree = ""; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9D99E942362A4061252F3303E92A955A /* GPUImagePixellateFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImagePixellateFilter.m; path = framework/Source/GPUImagePixellateFilter.m; sourceTree = ""; }; - 9DF64883F152558549C53B4951455B9B /* GPUImageDifferenceBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageDifferenceBlendFilter.m; path = framework/Source/GPUImageDifferenceBlendFilter.m; sourceTree = ""; }; - 9E5657C2668E3B4C728034FA1EA9A0A4 /* GPUImageLookupFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLookupFilter.m; path = framework/Source/GPUImageLookupFilter.m; sourceTree = ""; }; - 9F1724BCB76C8A64AA536BCED3D812D4 /* GPUImageAverageLuminanceThresholdFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageAverageLuminanceThresholdFilter.h; path = framework/Source/GPUImageAverageLuminanceThresholdFilter.h; sourceTree = ""; }; - 9F81E2DA24707028F902CA5D2165F3AF /* GPUImageSketchFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSketchFilter.m; path = framework/Source/GPUImageSketchFilter.m; sourceTree = ""; }; - 9FE18CDF175FE55AE74C18EF88123854 /* GPUImageVignetteFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageVignetteFilter.m; path = framework/Source/GPUImageVignetteFilter.m; sourceTree = ""; }; - A02D900146C224595943A9226D2DCAD8 /* GPUImageUnsharpMaskFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageUnsharpMaskFilter.h; path = framework/Source/GPUImageUnsharpMaskFilter.h; sourceTree = ""; }; - A040C6DAEB250520DDAB80B89F5BDE6B /* GPUImageColorMatrixFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageColorMatrixFilter.h; path = framework/Source/GPUImageColorMatrixFilter.h; sourceTree = ""; }; - A0A98FEBD19728184776073D5B656C40 /* GPUImageOpacityFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageOpacityFilter.m; path = framework/Source/GPUImageOpacityFilter.m; sourceTree = ""; }; - A0B5C9037C5004A4E5533B5FE12C1BE7 /* GPUImageCannyEdgeDetectionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageCannyEdgeDetectionFilter.h; path = framework/Source/GPUImageCannyEdgeDetectionFilter.h; sourceTree = ""; }; - A0D905911F4E966E46571AE6336725F8 /* GPUImageSoftLightBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSoftLightBlendFilter.h; path = framework/Source/GPUImageSoftLightBlendFilter.h; sourceTree = ""; }; - A17B47159361544A9A5041BCADFB2DA3 /* GPUImageMovieWriter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageMovieWriter.m; path = framework/Source/iOS/GPUImageMovieWriter.m; sourceTree = ""; }; - A1BDF8E1519711BE1634F7B98C1BE5A4 /* GPUImageRawDataOutput.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageRawDataOutput.m; path = framework/Source/GPUImageRawDataOutput.m; sourceTree = ""; }; - A21D094A16257D428FAE0B259CD960F5 /* GPUImageMonochromeFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageMonochromeFilter.m; path = framework/Source/GPUImageMonochromeFilter.m; sourceTree = ""; }; - A22790AD2F8E9488E3E272090ACDE88B /* GPUImageLuminanceRangeFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLuminanceRangeFilter.h; path = framework/Source/GPUImageLuminanceRangeFilter.h; sourceTree = ""; }; - A3CD8B04FB70BC53E721DA44020D04B1 /* GPUImageLinearBurnBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLinearBurnBlendFilter.m; path = framework/Source/GPUImageLinearBurnBlendFilter.m; sourceTree = ""; }; - A7E3C6A77B24BBCAF360A95E890B7F76 /* GPUImageTwoPassFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageTwoPassFilter.h; path = framework/Source/GPUImageTwoPassFilter.h; sourceTree = ""; }; - A827A26F6AFD11185014B81B1EDDC257 /* GPUImageLuminosityBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLuminosityBlendFilter.h; path = framework/Source/GPUImageLuminosityBlendFilter.h; sourceTree = ""; }; - AB5B9F20F2CC4E7B1E64873C8F4C7DEB /* GPUImageSoftEleganceFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSoftEleganceFilter.m; path = framework/Source/GPUImageSoftEleganceFilter.m; sourceTree = ""; }; - AB79E1A4A66A6C04AB9D9EBE73E0A218 /* GPUImagePixellatePositionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImagePixellatePositionFilter.m; path = framework/Source/GPUImagePixellatePositionFilter.m; sourceTree = ""; }; - AB9AABEFA3783A1EFB3AF263028EA22E /* GPUImageMedianFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageMedianFilter.h; path = framework/Source/GPUImageMedianFilter.h; sourceTree = ""; }; - ABEA5E282030B2AACB13107445796E9B /* GPUImageUIElement.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageUIElement.h; path = framework/Source/GPUImageUIElement.h; sourceTree = ""; }; - AC24421A335214257CD3748289F31E7D /* YYImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYImage.m; path = YYImage/YYImage.m; sourceTree = ""; }; - AC973EBC40064F309FCCDDEC38ED1151 /* lookup_amatorka.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = lookup_amatorka.png; path = framework/Resources/lookup_amatorka.png; sourceTree = ""; }; - AC97F32440360E91D0907B1696EFA925 /* GPUImageKuwaharaFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageKuwaharaFilter.m; path = framework/Source/GPUImageKuwaharaFilter.m; sourceTree = ""; }; - AF05AFD8796F688202D7D60A24EE4B36 /* YYCache-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "YYCache-prefix.pch"; sourceTree = ""; }; - AF4FAC2BFB19ABFAB2B98973CF3F2F19 /* GPUImageGaussianSelectiveBlurFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageGaussianSelectiveBlurFilter.h; path = framework/Source/GPUImageGaussianSelectiveBlurFilter.h; sourceTree = ""; }; - AF50E9AAD19F008B707D7D8F7EACA2D3 /* MASCompositeConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASCompositeConstraint.m; path = Masonry/MASCompositeConstraint.m; sourceTree = ""; }; - AFB401E05E9C8DEA8B23609216EB64E5 /* YYMemoryCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYMemoryCache.h; path = YYCache/YYMemoryCache.h; sourceTree = ""; }; - B015E5C22E17335E3A77DFA9908BB606 /* GPUImageLanczosResamplingFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLanczosResamplingFilter.h; path = framework/Source/GPUImageLanczosResamplingFilter.h; sourceTree = ""; }; - B11AD2552FDB15FF1C538A2621C8454E /* GPUImageChromaKeyBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageChromaKeyBlendFilter.h; path = framework/Source/GPUImageChromaKeyBlendFilter.h; sourceTree = ""; }; - B1CF0307FA26395C0EBDD879BF40EE7F /* GPUImageSwirlFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSwirlFilter.m; path = framework/Source/GPUImageSwirlFilter.m; sourceTree = ""; }; - B31F1147C4556865B64D707FEE8CCC97 /* MASConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraint.m; path = Masonry/MASConstraint.m; sourceTree = ""; }; - B4080351977D02914F701E5AF2820E28 /* UIImageView+YYWebImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImageView+YYWebImage.h"; path = "YYWebImage/Categories/UIImageView+YYWebImage.h"; sourceTree = ""; }; - B43D8D3315443CDCAF2566D64DDEE04B /* GPUImageSolidColorGenerator.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSolidColorGenerator.h; path = framework/Source/GPUImageSolidColorGenerator.h; sourceTree = ""; }; - B49CFF15CC2A8F9BE7A7F6E9858CF4A9 /* GPUImageLaplacianFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLaplacianFilter.h; path = framework/Source/GPUImageLaplacianFilter.h; sourceTree = ""; }; - B4F3FFA58FE342F21294920E38929E3F /* GPUImagePicture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImagePicture.m; path = framework/Source/iOS/GPUImagePicture.m; sourceTree = ""; }; - B5319E1423AA1E35ADBA7A3B04DF598E /* MBProgressHUD.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = ""; }; - B5497DA96594CCECE8E15AC43C9A2C6B /* GPUImageCrosshatchFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageCrosshatchFilter.m; path = framework/Source/GPUImageCrosshatchFilter.m; sourceTree = ""; }; - B600C9B478F0D9AD34362F46737F82C5 /* GPUImageBulgeDistortionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageBulgeDistortionFilter.m; path = framework/Source/GPUImageBulgeDistortionFilter.m; sourceTree = ""; }; - B63E6AF28713967F264112F9450B3F8C /* GPUImageColorInvertFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageColorInvertFilter.m; path = framework/Source/GPUImageColorInvertFilter.m; sourceTree = ""; }; - B72EC130B00BB80835F63C15885EEB06 /* NSObject+YYModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSObject+YYModel.m"; path = "YYModel/NSObject+YYModel.m"; sourceTree = ""; }; - B748550FB21BB7C03E6327054546AAD9 /* GPUImageCGAColorspaceFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageCGAColorspaceFilter.m; path = framework/Source/GPUImageCGAColorspaceFilter.m; sourceTree = ""; }; - B76EEE6CDA11AED2C0DF42954264E2E4 /* GPUImageSaturationBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSaturationBlendFilter.m; path = framework/Source/GPUImageSaturationBlendFilter.m; sourceTree = ""; }; - B8043D2AA30371284EF62F7AE00669A6 /* GPUImageSphereRefractionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSphereRefractionFilter.m; path = framework/Source/GPUImageSphereRefractionFilter.m; sourceTree = ""; }; - B8113E2BE805826C2206219087AF2FEB /* GPUImagePicture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImagePicture.h; path = framework/Source/iOS/GPUImagePicture.h; sourceTree = ""; }; - B81F4796AC0D72D4F1B2047D5A0E8AC0 /* GPUImageSmoothToonFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSmoothToonFilter.m; path = framework/Source/GPUImageSmoothToonFilter.m; sourceTree = ""; }; - B841981319C7EF7EE2877086FCA683E5 /* GPUImageSubtractBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSubtractBlendFilter.m; path = framework/Source/GPUImageSubtractBlendFilter.m; sourceTree = ""; }; - B938A512490439A79E04F0C9697CD365 /* GLProgram.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GLProgram.m; path = framework/Source/GLProgram.m; sourceTree = ""; }; - B93FEAD1B3DB233D4B21EB7567E5E3A0 /* GPUImageHistogramEqualizationFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHistogramEqualizationFilter.m; path = framework/Source/GPUImageHistogramEqualizationFilter.m; sourceTree = ""; }; - B9A029945B47FB73CDE3CC37104F813F /* CALayer+YYWebImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "CALayer+YYWebImage.h"; path = "YYWebImage/Categories/CALayer+YYWebImage.h"; sourceTree = ""; }; - BA29045FFD62C4F2F08018346E53B773 /* GPUImageCropFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageCropFilter.m; path = framework/Source/GPUImageCropFilter.m; sourceTree = ""; }; - BA371A875E27E7EE7D0FCD1007D94CF2 /* GPUImageLowPassFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLowPassFilter.h; path = framework/Source/GPUImageLowPassFilter.h; sourceTree = ""; }; - BAA4F2B29058FE252D949D0C32390318 /* YYAnimatedImageView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYAnimatedImageView.m; path = YYImage/YYAnimatedImageView.m; sourceTree = ""; }; - BBB88E5B5C49D8640CAD758ACB9A6965 /* GPUImageSharpenFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSharpenFilter.h; path = framework/Source/GPUImageSharpenFilter.h; sourceTree = ""; }; - BBE357EF73F92D80EB2A32F6C9ADC813 /* GPUImageThresholdSketchFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageThresholdSketchFilter.h; path = framework/Source/GPUImageThresholdSketchFilter.h; sourceTree = ""; }; - BD8A6D912B9DADCD91A8CECBE8D365BF /* YYFrameImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYFrameImage.h; path = YYImage/YYFrameImage.h; sourceTree = ""; }; - BD9B919D49630BD01C44E78237FBD863 /* GPUImageClosingFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageClosingFilter.m; path = framework/Source/GPUImageClosingFilter.m; sourceTree = ""; }; - BDD3B32644BC93C7355A1C520C495A48 /* GPUImageNonMaximumSuppressionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageNonMaximumSuppressionFilter.h; path = framework/Source/GPUImageNonMaximumSuppressionFilter.h; sourceTree = ""; }; - BE0B9D8C884083422794279D51378D71 /* GPUImage3x3ConvolutionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImage3x3ConvolutionFilter.h; path = framework/Source/GPUImage3x3ConvolutionFilter.h; sourceTree = ""; }; - BE1BD7513325F0024AB5F0B2AA5B5308 /* YYModel.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YYModel.debug.xcconfig; sourceTree = ""; }; - BE4970CD6356FFFAA48E1613FE580EB0 /* GPUImageDarkenBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageDarkenBlendFilter.h; path = framework/Source/GPUImageDarkenBlendFilter.h; sourceTree = ""; }; - BE81F8031495E743E805E3F1ABB005EE /* NSArray+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MASAdditions.h"; path = "Masonry/NSArray+MASAdditions.h"; sourceTree = ""; }; - BEFFA1F44D79B03904E27FC68BA02324 /* GPUImageSwirlFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSwirlFilter.h; path = framework/Source/GPUImageSwirlFilter.h; sourceTree = ""; }; - BF320EFBDD4F9B7040C07E0E3056F74E /* lookup_soft_elegance_1.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = lookup_soft_elegance_1.png; path = framework/Resources/lookup_soft_elegance_1.png; sourceTree = ""; }; - C05B47CD66C71D9CAAF1627186D1C6DE /* CALayer+YYWebImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "CALayer+YYWebImage.m"; path = "YYWebImage/Categories/CALayer+YYWebImage.m"; sourceTree = ""; }; - C080FC8084166668F65F78ED0AA4A69B /* GPUImageHueBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHueBlendFilter.h; path = framework/Source/GPUImageHueBlendFilter.h; sourceTree = ""; }; - C0C8CE6B752A1D6DC908E8EBC379636C /* GPUImageTiltShiftFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageTiltShiftFilter.m; path = framework/Source/GPUImageTiltShiftFilter.m; sourceTree = ""; }; - C1703B1CC3A8EF46F7E0BC97EF312B15 /* GPUImagePicture+TextureSubimage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "GPUImagePicture+TextureSubimage.m"; path = "framework/Source/iOS/GPUImagePicture+TextureSubimage.m"; sourceTree = ""; }; - C3415B253778A17AB9D9E9539C59982E /* GPUImageMonochromeFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageMonochromeFilter.h; path = framework/Source/GPUImageMonochromeFilter.h; sourceTree = ""; }; - C4193CD804FDADD82E3B8FE1883F6D29 /* View+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASAdditions.h"; path = "Masonry/View+MASAdditions.h"; sourceTree = ""; }; - C48D8B50088748FC4BC5FC2E0C491663 /* GPUImageGaussianBlurPositionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageGaussianBlurPositionFilter.h; path = framework/Source/GPUImageGaussianBlurPositionFilter.h; sourceTree = ""; }; - C6C160D9019636230267BE3289CF1EF8 /* GPUImageBilateralFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageBilateralFilter.m; path = framework/Source/GPUImageBilateralFilter.m; sourceTree = ""; }; - C7E61395FE8E961D58658EFC5FE914A3 /* GPUImageHueFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHueFilter.m; path = framework/Source/GPUImageHueFilter.m; sourceTree = ""; }; - C8E3D2D6BFE3A6A5011A9A78D5041D6B /* MASConstraintMaker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraintMaker.m; path = Masonry/MASConstraintMaker.m; sourceTree = ""; }; - C8EFB486F7011880B250BD588AF6B03A /* GPUImageXYDerivativeFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageXYDerivativeFilter.h; path = framework/Source/GPUImageXYDerivativeFilter.h; sourceTree = ""; }; - CA5BC3210A0DC9C52CF983E3FBA33D3D /* GPUImagePolkaDotFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImagePolkaDotFilter.h; path = framework/Source/GPUImagePolkaDotFilter.h; sourceTree = ""; }; - CA6014EF6AE8930707D68E71ECA55D13 /* Pods-DarkMode.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DarkMode.release.xcconfig"; sourceTree = ""; }; - CAD1753F08C939B747A9310D6E2C7CCD /* Masonry.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Masonry.h; path = Masonry/Masonry.h; sourceTree = ""; }; - CB5A0BE4A5245E286AF7E6814CDD1436 /* YYImageCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYImageCache.m; path = YYWebImage/YYImageCache.m; sourceTree = ""; }; - CC511945A3B6F15907655303FBD595CC /* YYWebImage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YYWebImage.release.xcconfig; sourceTree = ""; }; - CD17316111B32EDFB414E2DB7107670D /* GPUImageRGBOpeningFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageRGBOpeningFilter.m; path = framework/Source/GPUImageRGBOpeningFilter.m; sourceTree = ""; }; - CE8390129A638BE0F4AE19C96CACE467 /* GPUImageToonFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageToonFilter.h; path = framework/Source/GPUImageToonFilter.h; sourceTree = ""; }; - CE8B3FE478847A7AAD2B21BC40809B56 /* MASUtilities.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASUtilities.h; path = Masonry/MASUtilities.h; sourceTree = ""; }; - CF2F73298D0AAD1A41B6CB86926D9317 /* GPUImageHoughTransformLineDetector.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHoughTransformLineDetector.m; path = framework/Source/GPUImageHoughTransformLineDetector.m; sourceTree = ""; }; - CF78B4B80A067EF3C1E69807978B0212 /* GPUImageMultiplyBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageMultiplyBlendFilter.m; path = framework/Source/GPUImageMultiplyBlendFilter.m; sourceTree = ""; }; - CFC1905D68B43955A7ECC39E228564DC /* GPUImageLuminosity.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLuminosity.m; path = framework/Source/GPUImageLuminosity.m; sourceTree = ""; }; - D17E8A9196C94BC7F7B14D0D08A31A90 /* GPUImageFramebufferCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageFramebufferCache.h; path = framework/Source/GPUImageFramebufferCache.h; sourceTree = ""; }; - D20E7200664BDC1CA23F83B69DB2AF00 /* GPUImageOpacityFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageOpacityFilter.h; path = framework/Source/GPUImageOpacityFilter.h; sourceTree = ""; }; - D24C3AB3AE7CD24FB83746C901F281BA /* GPUImageMosaicFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageMosaicFilter.h; path = framework/Source/GPUImageMosaicFilter.h; sourceTree = ""; }; - D2C5AB16BD22FA6146D9733E98392177 /* GPUImagePixellateFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImagePixellateFilter.h; path = framework/Source/GPUImagePixellateFilter.h; sourceTree = ""; }; - D3B1D10EA9F731D0F5F681A4CAEDE5D6 /* GPUImageRawDataInput.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageRawDataInput.m; path = framework/Source/GPUImageRawDataInput.m; sourceTree = ""; }; - D41C9CF88307CC423AE666B56182E5B9 /* GPUImage3x3TextureSamplingFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImage3x3TextureSamplingFilter.m; path = framework/Source/GPUImage3x3TextureSamplingFilter.m; sourceTree = ""; }; - D4336A5672C30CDB1EBF2ABE41670A08 /* NSObject+YYModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSObject+YYModel.h"; path = "YYModel/NSObject+YYModel.h"; sourceTree = ""; }; - D4A60FDE318E3C0F278D020D96060453 /* GPUImageAverageColor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageAverageColor.h; path = framework/Source/GPUImageAverageColor.h; sourceTree = ""; }; - D4C994A6E8F57B6828552CA504C66D58 /* GPUImageScreenBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageScreenBlendFilter.m; path = framework/Source/GPUImageScreenBlendFilter.m; sourceTree = ""; }; - D54971E35D67E4E2B0A20F8CD8BDB2D4 /* GPUImagePoissonBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImagePoissonBlendFilter.m; path = framework/Source/GPUImagePoissonBlendFilter.m; sourceTree = ""; }; - D5AB4ADA23B1748AB0ED4BB1DB527C69 /* GPUImageLookupFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLookupFilter.h; path = framework/Source/GPUImageLookupFilter.h; sourceTree = ""; }; - D65307FDE17DBA7A0B3A73E64332F870 /* YYClassInfo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYClassInfo.m; path = YYModel/YYClassInfo.m; sourceTree = ""; }; - D66E3D513B5531F7F4B074A1AEC523B8 /* GPUImageContrastFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageContrastFilter.h; path = framework/Source/GPUImageContrastFilter.h; sourceTree = ""; }; - D6DEC4D0701355737F042ABE9389A98E /* YYMemoryCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYMemoryCache.m; path = YYCache/YYMemoryCache.m; sourceTree = ""; }; - D784A6CD68E1A5D8D6580987562CE66F /* GPUImageOverlayBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageOverlayBlendFilter.m; path = framework/Source/GPUImageOverlayBlendFilter.m; sourceTree = ""; }; - D78C9DBE522A045B8E50F88417BA309E /* Pods-DarkMode-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DarkMode-acknowledgements.markdown"; sourceTree = ""; }; - D91BF331AAA5E77D9BEDA9C6D40DD41E /* MBProgressHUD.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MBProgressHUD.release.xcconfig; sourceTree = ""; }; - D9580A4EE8AFE8DD3E68A776F88E557B /* YYSpriteSheetImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYSpriteSheetImage.h; path = YYImage/YYSpriteSheetImage.h; sourceTree = ""; }; - DA29E62F007F394173C5A6E96F4EA3A1 /* GPUImageJFAVoronoiFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageJFAVoronoiFilter.h; path = framework/Source/GPUImageJFAVoronoiFilter.h; sourceTree = ""; }; - DA4B2BBB528CEAFC918860127115B034 /* GPUImageExclusionBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageExclusionBlendFilter.m; path = framework/Source/GPUImageExclusionBlendFilter.m; sourceTree = ""; }; - DC785C323CE09EC09CDC2F8014081C38 /* GPUImageColorBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageColorBlendFilter.m; path = framework/Source/GPUImageColorBlendFilter.m; sourceTree = ""; }; - DCDB8D6607C77835C1EC75EB9F36E5C5 /* GPUImageFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageFilter.h; path = framework/Source/GPUImageFilter.h; sourceTree = ""; }; - DD2430725CE2EF7139ADE4BBC1C7CBA8 /* UIImageView+YYWebImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImageView+YYWebImage.m"; path = "YYWebImage/Categories/UIImageView+YYWebImage.m"; sourceTree = ""; }; - DD88158BB140DD22AAFBE5A81587E42D /* GPUImageLocalBinaryPatternFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLocalBinaryPatternFilter.m; path = framework/Source/GPUImageLocalBinaryPatternFilter.m; sourceTree = ""; }; - DDB88636BCAA89B17531BEAC2B7677B4 /* GPUImageVideoCamera.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageVideoCamera.m; path = framework/Source/GPUImageVideoCamera.m; sourceTree = ""; }; - DEC5E896CBBBB4368B3D73E3B6DF98AF /* GPUImageFramebuffer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageFramebuffer.h; path = framework/Source/GPUImageFramebuffer.h; sourceTree = ""; }; - DF18464EBC41D32FBD924D4FBD3DCF7D /* GPUImageDilationFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageDilationFilter.m; path = framework/Source/GPUImageDilationFilter.m; sourceTree = ""; }; - DFE90665F8A100159773904C5A2F8967 /* GPUImageLightenBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLightenBlendFilter.h; path = framework/Source/GPUImageLightenBlendFilter.h; sourceTree = ""; }; - E11AAC1475379E882BBED87C93CA898B /* NSArray+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MASShorthandAdditions.h"; path = "Masonry/NSArray+MASShorthandAdditions.h"; sourceTree = ""; }; - E16FF3BBD2E461C6B31F4D28293DEC1F /* GPUImageSobelEdgeDetectionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSobelEdgeDetectionFilter.h; path = framework/Source/GPUImageSobelEdgeDetectionFilter.h; sourceTree = ""; }; - E170213BF8AB60A888762910A4745B2B /* GPUImageGaussianBlurFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageGaussianBlurFilter.h; path = framework/Source/GPUImageGaussianBlurFilter.h; sourceTree = ""; }; - E17C159C87DA98A853415C410757984D /* YYKVStorage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYKVStorage.m; path = YYCache/YYKVStorage.m; sourceTree = ""; }; - E26335B2F22D282C8B7582834BD0A07E /* GPUImageLuminanceThresholdFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLuminanceThresholdFilter.h; path = framework/Source/GPUImageLuminanceThresholdFilter.h; sourceTree = ""; }; - E388169E7433BC6A1E766BB6E2C53605 /* MBProgressHUD.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MBProgressHUD.debug.xcconfig; sourceTree = ""; }; - E460D5B0416D36F66EE8EC89E5D2FA0A /* libYYModel.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libYYModel.a; path = libYYModel.a; sourceTree = BUILT_PRODUCTS_DIR; }; - E48C3FA68C009689F44837B466401AA1 /* MASViewConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewConstraint.m; path = Masonry/MASViewConstraint.m; sourceTree = ""; }; - E578EF7302261D7D50382800254764B6 /* UIImage+YYWebImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImage+YYWebImage.m"; path = "YYWebImage/Categories/UIImage+YYWebImage.m"; sourceTree = ""; }; - E5AE2B148F45F4E8B8FB0225084DEE18 /* GPUImageNobleCornerDetectionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageNobleCornerDetectionFilter.h; path = framework/Source/GPUImageNobleCornerDetectionFilter.h; sourceTree = ""; }; - E5C1184106339F84D7D501170074B1B4 /* Masonry-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Masonry-dummy.m"; sourceTree = ""; }; - E63C05F85CF505C1F4F6C1F2A5264989 /* GPUImageHazeFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHazeFilter.h; path = framework/Source/GPUImageHazeFilter.h; sourceTree = ""; }; - E75C8905888A317693F48FC06029AC84 /* GPUImagePerlinNoiseFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImagePerlinNoiseFilter.h; path = framework/Source/GPUImagePerlinNoiseFilter.h; sourceTree = ""; }; - E7ED5325591277156B4BB5CC580E9723 /* GPUImageVoronoiConsumerFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageVoronoiConsumerFilter.m; path = framework/Source/GPUImageVoronoiConsumerFilter.m; sourceTree = ""; }; - E82866E758AEDE0697B2D6542D52887E /* GPUImageHalftoneFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHalftoneFilter.h; path = framework/Source/GPUImageHalftoneFilter.h; sourceTree = ""; }; - E8B488F92B9569C2D4E2C544410035E4 /* GPUImageLocalBinaryPatternFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageLocalBinaryPatternFilter.h; path = framework/Source/GPUImageLocalBinaryPatternFilter.h; sourceTree = ""; }; - E9AD39DB2F1E55880567989B269FAC3D /* GPUImageParallelCoordinateLineTransformFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageParallelCoordinateLineTransformFilter.m; path = framework/Source/GPUImageParallelCoordinateLineTransformFilter.m; sourceTree = ""; }; - E9BE79BD70E8A2BBB669B77DE76E87B2 /* GPUImageMovieComposition.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageMovieComposition.m; path = framework/Source/GPUImageMovieComposition.m; sourceTree = ""; }; - E9EBE53088D96916DD20443C82AFBDE7 /* GPUImageWhiteBalanceFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageWhiteBalanceFilter.h; path = framework/Source/GPUImageWhiteBalanceFilter.h; sourceTree = ""; }; - EA2A44D6FF0F9ACEE1DADC1A14F2854D /* GPUImageExposureFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageExposureFilter.m; path = framework/Source/GPUImageExposureFilter.m; sourceTree = ""; }; - EB47C074A601454370424E7CFB464BCF /* GPUImageThresholdSketchFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageThresholdSketchFilter.m; path = framework/Source/GPUImageThresholdSketchFilter.m; sourceTree = ""; }; - ECDB7EC80A81B25D21106D0157935999 /* GPUImage-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "GPUImage-prefix.pch"; sourceTree = ""; }; - ECEA2E9EE22767E7510CE7AA87771919 /* GPUImageLightenBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLightenBlendFilter.m; path = framework/Source/GPUImageLightenBlendFilter.m; sourceTree = ""; }; - ECF46625DB05146F6E98B2E53445EFC8 /* YYImageCoder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYImageCoder.h; path = YYImage/YYImageCoder.h; sourceTree = ""; }; - ECFEB2E93FCE91E7C240F7A5418610E8 /* GPUImageDirectionalSobelEdgeDetectionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageDirectionalSobelEdgeDetectionFilter.m; path = framework/Source/GPUImageDirectionalSobelEdgeDetectionFilter.m; sourceTree = ""; }; - ED7087E1AAD6DCA511A73A2D2B30D6B4 /* GPUImageFalseColorFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageFalseColorFilter.h; path = framework/Source/GPUImageFalseColorFilter.h; sourceTree = ""; }; - EE42EB7F34AB1582A3A5744A834BD119 /* GPUImageFramebufferCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageFramebufferCache.m; path = framework/Source/GPUImageFramebufferCache.m; sourceTree = ""; }; - EEF00EBDB95094FD4257D5613DD330E0 /* GPUImageLevelsFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageLevelsFilter.m; path = framework/Source/GPUImageLevelsFilter.m; sourceTree = ""; }; - EFE4CF43587E7DD929FB9764A673B90D /* Pods-DarkMode-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DarkMode-acknowledgements.plist"; sourceTree = ""; }; - EFFD8A1B500FDBD56314E8131E14CAA5 /* Masonry-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Masonry-prefix.pch"; sourceTree = ""; }; - F02B616DA404DA9F64E1EB8DD4C522B1 /* UIImage+YYWebImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImage+YYWebImage.h"; path = "YYWebImage/Categories/UIImage+YYWebImage.h"; sourceTree = ""; }; - F11B4258E3FA4A8841B1604E377E7F3D /* GPUImageUIElement.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageUIElement.m; path = framework/Source/GPUImageUIElement.m; sourceTree = ""; }; - F167A2004301C4034FFB0D96A262B99D /* GPUImageSketchFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageSketchFilter.h; path = framework/Source/GPUImageSketchFilter.h; sourceTree = ""; }; - F1A5C4493663A851186ED81654C1C388 /* MASViewConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASViewConstraint.h; path = Masonry/MASViewConstraint.h; sourceTree = ""; }; - F1C3D508DA7E563DEA7799B00D9E2113 /* GPUImageScreenBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageScreenBlendFilter.h; path = framework/Source/GPUImageScreenBlendFilter.h; sourceTree = ""; }; - F2F67F28D47899C70E83AA9305D4E341 /* GPUImageOpeningFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageOpeningFilter.h; path = framework/Source/GPUImageOpeningFilter.h; sourceTree = ""; }; - F38E818E85AFE98DD31A606DB69D79D5 /* UIButton+YYWebImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIButton+YYWebImage.h"; path = "YYWebImage/Categories/UIButton+YYWebImage.h"; sourceTree = ""; }; - F3FB9DB94CA9285178C40FCA640755A3 /* GPUImageAverageColor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageAverageColor.m; path = framework/Source/GPUImageAverageColor.m; sourceTree = ""; }; - F412634986B6427C47BFE33290B76D0C /* GPUImageParallelCoordinateLineTransformFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageParallelCoordinateLineTransformFilter.h; path = framework/Source/GPUImageParallelCoordinateLineTransformFilter.h; sourceTree = ""; }; - F448306B3687298FFAD025EB2DDD73EF /* GPUImageMissEtikateFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageMissEtikateFilter.h; path = framework/Source/GPUImageMissEtikateFilter.h; sourceTree = ""; }; - F478792CD6750762D653D4B974565731 /* GPUImageHistogramEqualizationFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageHistogramEqualizationFilter.h; path = framework/Source/GPUImageHistogramEqualizationFilter.h; sourceTree = ""; }; - F4CCD104A376890D8A12507C5239B8B1 /* GPUImageTwoPassTextureSamplingFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageTwoPassTextureSamplingFilter.h; path = framework/Source/GPUImageTwoPassTextureSamplingFilter.h; sourceTree = ""; }; - F53E198F369DD7B29FDFD1E67D7FEF92 /* GPUImageHueBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHueBlendFilter.m; path = framework/Source/GPUImageHueBlendFilter.m; sourceTree = ""; }; - F56DBD12B11C3994DFB4255B1D7CC1D8 /* GPUImageColorMatrixFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageColorMatrixFilter.m; path = framework/Source/GPUImageColorMatrixFilter.m; sourceTree = ""; }; - F73A13F286165F4836D8D7D4AAC5C284 /* MASConstraint+Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "MASConstraint+Private.h"; path = "Masonry/MASConstraint+Private.h"; sourceTree = ""; }; - F776E442B4C1CDFEF257F6134CBE90D0 /* GPUImagePoissonBlendFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImagePoissonBlendFilter.h; path = framework/Source/GPUImagePoissonBlendFilter.h; sourceTree = ""; }; - F8F996C485D25C0141065FF489D1BA53 /* GPUImageRawDataInput.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageRawDataInput.h; path = framework/Source/GPUImageRawDataInput.h; sourceTree = ""; }; - FA45E049B5B5153FBD3529680C70E520 /* GPUImageBrightnessFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageBrightnessFilter.m; path = framework/Source/GPUImageBrightnessFilter.m; sourceTree = ""; }; - FABBE2C4A63D29A135EB2E35769CF66E /* GPUImageHarrisCornerDetectionFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageHarrisCornerDetectionFilter.m; path = framework/Source/GPUImageHarrisCornerDetectionFilter.m; sourceTree = ""; }; - FB24E4E098F3B7DE3B8F4ACF2BC28A28 /* GPUImageBulgeDistortionFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageBulgeDistortionFilter.h; path = framework/Source/GPUImageBulgeDistortionFilter.h; sourceTree = ""; }; - FB638C9B72C7E7F1B16A43E90A8BF20E /* GPUImageToneCurveFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageToneCurveFilter.m; path = framework/Source/GPUImageToneCurveFilter.m; sourceTree = ""; }; - FC1BB8206A536BE18D03949E8E9E8D59 /* YYModel.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YYModel.release.xcconfig; sourceTree = ""; }; - FC2B794A56EF9D2701B9021759093037 /* GPUImageView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageView.m; path = framework/Source/iOS/GPUImageView.m; sourceTree = ""; }; - FC35CED2A95AFEA26980C9D4ABC06D40 /* GPUImageVignetteFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageVignetteFilter.h; path = framework/Source/GPUImageVignetteFilter.h; sourceTree = ""; }; - FC8FF675218469A34772983792A93F7D /* GPUImageGammaFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageGammaFilter.h; path = framework/Source/GPUImageGammaFilter.h; sourceTree = ""; }; - FD17D6790093A05DE5D3FEA809D11BAA /* GPUImageSourceOverBlendFilter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageSourceOverBlendFilter.m; path = framework/Source/GPUImageSourceOverBlendFilter.m; sourceTree = ""; }; - FD794A0352171C16DFE53E0AB396C398 /* GPUImageOutput.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GPUImageOutput.m; path = framework/Source/GPUImageOutput.m; sourceTree = ""; }; - FF365ED840058D960082D2B982FA9D49 /* Masonry.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Masonry.debug.xcconfig; sourceTree = ""; }; - FF5ACE2C67EA5C6E02ED4D4FBD28FBA7 /* GPUImageMaskFilter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GPUImageMaskFilter.h; path = framework/Source/GPUImageMaskFilter.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 01095FBE532CF5AA0855A20BDA54BF0B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 24D3BE854C4E97B4CB4F4B6AEB3DDA1C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3AA66CA5E57F3C1415A7D61A13C42528 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7E1F0A9AFCFD750D8D8E87867B919530 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9C058CFEB46CC50AE17D1503E2EA34E9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CE2E267127242299A42286A0A8D5DA27 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D9C15529BA839F56CA954D83368902D8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DCBC7FE987FB53FBB71A9E7155D9E871 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 105C7CB0B46A09824CEAF5904D491772 /* Support Files */ = { - isa = PBXGroup; - children = ( - 68619D6BC015E7B9AD2E0EF3660EC99B /* YYWebImage-dummy.m */, - 82F4ACE9BAABD111264FD788EF74546D /* YYWebImage-prefix.pch */, - 5AF9D53BF78794179DA5A171FD200059 /* YYWebImage.debug.xcconfig */, - CC511945A3B6F15907655303FBD595CC /* YYWebImage.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/YYWebImage"; - sourceTree = ""; - }; - 1074CCDDB3F516ED42AC73FF531270DC /* Core */ = { - isa = PBXGroup; - children = ( - 87B89822E64C2B0270C48FB5310A947F /* YYAnimatedImageView.h */, - BAA4F2B29058FE252D949D0C32390318 /* YYAnimatedImageView.m */, - BD8A6D912B9DADCD91A8CECBE8D365BF /* YYFrameImage.h */, - 7D1011A9244B271E11F082989E181A6D /* YYFrameImage.m */, - 094F16B0BD56037708312F6A3D1774F3 /* YYImage.h */, - AC24421A335214257CD3748289F31E7D /* YYImage.m */, - ECF46625DB05146F6E98B2E53445EFC8 /* YYImageCoder.h */, - 3E5E02B856C988A000B10E5E5512B56A /* YYImageCoder.m */, - D9580A4EE8AFE8DD3E68A776F88E557B /* YYSpriteSheetImage.h */, - 86B55374AABE32E7869673D68D81265B /* YYSpriteSheetImage.m */, - ); - name = Core; - sourceTree = ""; - }; - 141D0B28506AB42A59DFF063B66A5B9D /* Support Files */ = { - isa = PBXGroup; - children = ( - 2A0042D79436E9C952B47D4763A1C4AE /* GPUImage-dummy.m */, - ECDB7EC80A81B25D21106D0157935999 /* GPUImage-prefix.pch */, - 5278FBF2D16D0E9492F81D50E1B4E389 /* GPUImage.debug.xcconfig */, - 504C0F55ECD0EE366A432BE3CAF79E1F /* GPUImage.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/GPUImage"; - sourceTree = ""; - }; - 21FF95F8E6CE5D0E67ACE1DF80ED8D03 /* Support Files */ = { - isa = PBXGroup; - children = ( - 8C7EBDF59E4597071BF464EFAC596030 /* MBProgressHUD-dummy.m */, - 5D7C1EBCB0F669526CC10ADAA17FB565 /* MBProgressHUD-prefix.pch */, - E388169E7433BC6A1E766BB6E2C53605 /* MBProgressHUD.debug.xcconfig */, - D91BF331AAA5E77D9BEDA9C6D40DD41E /* MBProgressHUD.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/MBProgressHUD"; - sourceTree = ""; - }; - 378BFCD52F81F2771D1C85755501112C /* Support Files */ = { - isa = PBXGroup; - children = ( - 5F066292FE00E22395481D12B85DCF15 /* YYCache-dummy.m */, - AF05AFD8796F688202D7D60A24EE4B36 /* YYCache-prefix.pch */, - 5DA7010E9B001189E58C1D4FAF928DF7 /* YYCache.debug.xcconfig */, - 4713F7EF42A07902267E6A57EBC07D50 /* YYCache.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/YYCache"; - sourceTree = ""; - }; - 37A14F42D10EDBCCC6657E748D3F9A4A /* Support Files */ = { - isa = PBXGroup; - children = ( - E5C1184106339F84D7D501170074B1B4 /* Masonry-dummy.m */, - EFFD8A1B500FDBD56314E8131E14CAA5 /* Masonry-prefix.pch */, - FF365ED840058D960082D2B982FA9D49 /* Masonry.debug.xcconfig */, - 3FFF18D3BD6B92729084311D3FD98998 /* Masonry.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/Masonry"; - sourceTree = ""; - }; - 3B5EB31541FAB7B733903648FE8E1F55 /* Pods */ = { - isa = PBXGroup; - children = ( - 6F8E53491B9AD97EEE8695E0C7097D67 /* GPUImage */, - F6B09B74CE642AF4F9AB051723E51BB8 /* Masonry */, - 5F7F22C754196513F8C5696BE1789D15 /* MBProgressHUD */, - FD4CF277559D15A4F3FD03F6768FDB65 /* YYCache */, - 7596DCB5E576E1B05684D75984D7DEE5 /* YYImage */, - 6237A52316AD9B7195EC8FED1CABBCA1 /* YYModel */, - EE1473FB6742C310B59547D29782341E /* YYWebImage */, - ); - name = Pods; - sourceTree = ""; - }; - 4B4EDC9C48CE9C274B5A0CDEB8B1A446 /* Pods-DarkMode */ = { - isa = PBXGroup; - children = ( - D78C9DBE522A045B8E50F88417BA309E /* Pods-DarkMode-acknowledgements.markdown */, - EFE4CF43587E7DD929FB9764A673B90D /* Pods-DarkMode-acknowledgements.plist */, - 2B166651BD2944A773F9537AEC00AF13 /* Pods-DarkMode-dummy.m */, - 375E8723E93DD1BD999307185560F30B /* Pods-DarkMode-resources.sh */, - 16C4DC343FBAC71D13FF4FA9BCE10709 /* Pods-DarkMode.debug.xcconfig */, - CA6014EF6AE8930707D68E71ECA55D13 /* Pods-DarkMode.release.xcconfig */, - ); - name = "Pods-DarkMode"; - path = "Target Support Files/Pods-DarkMode"; - sourceTree = ""; - }; - 5F7F22C754196513F8C5696BE1789D15 /* MBProgressHUD */ = { - isa = PBXGroup; - children = ( - 768B4BE6A62741EA37180E7EC67437C1 /* MBProgressHUD.h */, - B5319E1423AA1E35ADBA7A3B04DF598E /* MBProgressHUD.m */, - 21FF95F8E6CE5D0E67ACE1DF80ED8D03 /* Support Files */, - ); - name = MBProgressHUD; - path = MBProgressHUD; - sourceTree = ""; - }; - 6237A52316AD9B7195EC8FED1CABBCA1 /* YYModel */ = { - isa = PBXGroup; - children = ( - D4336A5672C30CDB1EBF2ABE41670A08 /* NSObject+YYModel.h */, - B72EC130B00BB80835F63C15885EEB06 /* NSObject+YYModel.m */, - 970BB19E23C4B9B7AA3309F224CC0E71 /* YYClassInfo.h */, - D65307FDE17DBA7A0B3A73E64332F870 /* YYClassInfo.m */, - 31214193F010827DB7A59D7F34A65AF0 /* YYModel.h */, - C6C81AD3406E48E475916D291D2F3082 /* Support Files */, - ); - name = YYModel; - path = YYModel; - sourceTree = ""; - }; - 69373CF63774AD2866551D33EEBB796F /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - 4B4EDC9C48CE9C274B5A0CDEB8B1A446 /* Pods-DarkMode */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - 6E3986E9FC1C8EFD880C478B01B0EB42 /* Support Files */ = { - isa = PBXGroup; - children = ( - 6641303C0E807B1DB7DE0B014814E30A /* YYImage-dummy.m */, - 8F3589B845F9E0998764CC082B4636FE /* YYImage-prefix.pch */, - 5F8F677D95958C9F3D7EA1F6761CD291 /* YYImage.debug.xcconfig */, - 446D6F21C19F21359994D8C61A378A84 /* YYImage.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/YYImage"; - sourceTree = ""; - }; - 6F8E53491B9AD97EEE8695E0C7097D67 /* GPUImage */ = { - isa = PBXGroup; - children = ( - 36A3F94120C780455E9F79C31D756DEC /* GLProgram.h */, - B938A512490439A79E04F0C9697CD365 /* GLProgram.m */, - 4A1109257C4F91B78B674D3ED606F875 /* GPUImage.h */, - BE0B9D8C884083422794279D51378D71 /* GPUImage3x3ConvolutionFilter.h */, - 1B209441C9B2647C1E347736EE8FC64A /* GPUImage3x3ConvolutionFilter.m */, - 115B979659F12A2946B4CE9FB629FC55 /* GPUImage3x3TextureSamplingFilter.h */, - D41C9CF88307CC423AE666B56182E5B9 /* GPUImage3x3TextureSamplingFilter.m */, - 129DAE9BAABDCB922089CE7D3BDF76EC /* GPUImageAdaptiveThresholdFilter.h */, - 00D7FBFB94E92C7589C179A64EA9B9E1 /* GPUImageAdaptiveThresholdFilter.m */, - 5002004ECCBA2AFB115693A8FF292F8D /* GPUImageAddBlendFilter.h */, - 0C250AC091347FFBBF15D1616FB339BA /* GPUImageAddBlendFilter.m */, - 7B03CEF081AF2EB3E5F9FF382D2515F8 /* GPUImageAlphaBlendFilter.h */, - 462A9647EF473D7371FF63E7DF5E9FB1 /* GPUImageAlphaBlendFilter.m */, - 42C7A8AF75309C3CA628C0B8775A0F0B /* GPUImageAmatorkaFilter.h */, - 15E496E703C5AD87E7989377C681D73B /* GPUImageAmatorkaFilter.m */, - D4A60FDE318E3C0F278D020D96060453 /* GPUImageAverageColor.h */, - F3FB9DB94CA9285178C40FCA640755A3 /* GPUImageAverageColor.m */, - 9F1724BCB76C8A64AA536BCED3D812D4 /* GPUImageAverageLuminanceThresholdFilter.h */, - 722AE0C698ABB0490DECD454A56B78D5 /* GPUImageAverageLuminanceThresholdFilter.m */, - 77A6428D36533AF050B1E9F92BF82FD8 /* GPUImageBilateralFilter.h */, - C6C160D9019636230267BE3289CF1EF8 /* GPUImageBilateralFilter.m */, - 03A0D571B1A527AB8B7B3CA882F4D673 /* GPUImageBoxBlurFilter.h */, - 202D068CFDA5C22DA922D9FD075D1806 /* GPUImageBoxBlurFilter.m */, - 89911F978F34916A355191709CBB5802 /* GPUImageBrightnessFilter.h */, - FA45E049B5B5153FBD3529680C70E520 /* GPUImageBrightnessFilter.m */, - 527337E5AE7218053824FE826DE95FB6 /* GPUImageBuffer.h */, - 571C0946C15922F37A4FF9DC53636F23 /* GPUImageBuffer.m */, - FB24E4E098F3B7DE3B8F4ACF2BC28A28 /* GPUImageBulgeDistortionFilter.h */, - B600C9B478F0D9AD34362F46737F82C5 /* GPUImageBulgeDistortionFilter.m */, - A0B5C9037C5004A4E5533B5FE12C1BE7 /* GPUImageCannyEdgeDetectionFilter.h */, - 048641897F1CF7D044ACD0D40581C549 /* GPUImageCannyEdgeDetectionFilter.m */, - 2119B781CCC19BD3D0A42F303D2E7812 /* GPUImageCGAColorspaceFilter.h */, - B748550FB21BB7C03E6327054546AAD9 /* GPUImageCGAColorspaceFilter.m */, - B11AD2552FDB15FF1C538A2621C8454E /* GPUImageChromaKeyBlendFilter.h */, - 76CEE856E426B01553F3D79A1347C109 /* GPUImageChromaKeyBlendFilter.m */, - 12F2B7D58256DFE9C2869DEE816D2FDD /* GPUImageChromaKeyFilter.h */, - 3193AAC04525E3412D850A3D7AD99612 /* GPUImageChromaKeyFilter.m */, - 6FE16BE5263EBF1D2F9145482FAE76E3 /* GPUImageClosingFilter.h */, - BD9B919D49630BD01C44E78237FBD863 /* GPUImageClosingFilter.m */, - 16D91E4D58A94C5524A115536224EA76 /* GPUImageColorBlendFilter.h */, - DC785C323CE09EC09CDC2F8014081C38 /* GPUImageColorBlendFilter.m */, - 73B8731A5CF568F198781C8412733FB0 /* GPUImageColorBurnBlendFilter.h */, - 917747700EB9C26B29A0199F357B3B12 /* GPUImageColorBurnBlendFilter.m */, - 8F83E8DB73761A3F59617E28A1A9351E /* GPUImageColorDodgeBlendFilter.h */, - 0F6459CEEE271680736FA479FD981BD4 /* GPUImageColorDodgeBlendFilter.m */, - 467740B1EE1788F570B996D82E451066 /* GPUImageColorInvertFilter.h */, - B63E6AF28713967F264112F9450B3F8C /* GPUImageColorInvertFilter.m */, - A040C6DAEB250520DDAB80B89F5BDE6B /* GPUImageColorMatrixFilter.h */, - F56DBD12B11C3994DFB4255B1D7CC1D8 /* GPUImageColorMatrixFilter.m */, - 0E3174DCAC3A1A90A069C1EFAE99859F /* GPUImageColorPackingFilter.h */, - 5B231C196006B4B6C3DD281978E5EB74 /* GPUImageColorPackingFilter.m */, - 6679F37F751FAB9174C4595A35CF4822 /* GPUImageContext.h */, - 69BEFC89CA92FA91FB606E547079BABE /* GPUImageContext.m */, - D66E3D513B5531F7F4B074A1AEC523B8 /* GPUImageContrastFilter.h */, - 78FB8998E490B19D8A2CFE9E092F2132 /* GPUImageContrastFilter.m */, - 69E7B0C997A3206F5C0D10C360A6D957 /* GPUImageCropFilter.h */, - BA29045FFD62C4F2F08018346E53B773 /* GPUImageCropFilter.m */, - 611CC398C3A952328326F836188CEC88 /* GPUImageCrosshairGenerator.h */, - 795CA168A9604FBD8784D73FA8C9DE4A /* GPUImageCrosshairGenerator.m */, - 8897A494B1993654654BD96F0352C036 /* GPUImageCrosshatchFilter.h */, - B5497DA96594CCECE8E15AC43C9A2C6B /* GPUImageCrosshatchFilter.m */, - BE4970CD6356FFFAA48E1613FE580EB0 /* GPUImageDarkenBlendFilter.h */, - 6872FC509316C9B4DCA67FFA969849E6 /* GPUImageDarkenBlendFilter.m */, - 64B98E97EBB4B89FF8C0A73B4905060A /* GPUImageDifferenceBlendFilter.h */, - 9DF64883F152558549C53B4951455B9B /* GPUImageDifferenceBlendFilter.m */, - 856409B61D04B0A9D91A67DFFB1C680D /* GPUImageDilationFilter.h */, - DF18464EBC41D32FBD924D4FBD3DCF7D /* GPUImageDilationFilter.m */, - 08FD869A4FD865D449B925CD47230E72 /* GPUImageDirectionalNonMaximumSuppressionFilter.h */, - 1495EAEF4EC6B8FB6E18881881B3573B /* GPUImageDirectionalNonMaximumSuppressionFilter.m */, - 0F5D87CE6703E1941A5580858F307A6D /* GPUImageDirectionalSobelEdgeDetectionFilter.h */, - ECFEB2E93FCE91E7C240F7A5418610E8 /* GPUImageDirectionalSobelEdgeDetectionFilter.m */, - 63157528C8EC3BBA57A086A9E876519F /* GPUImageDissolveBlendFilter.h */, - 27A2C6937109C3C8643FB3E370CDBE29 /* GPUImageDissolveBlendFilter.m */, - 47104284B40E3FE25D823BBBF6BBD751 /* GPUImageDivideBlendFilter.h */, - 40BEB1831EED3C7A7E80C4057D3DA022 /* GPUImageDivideBlendFilter.m */, - 83180B57DF37B3555ED1B68472C45C2C /* GPUImageEmbossFilter.h */, - 6E126A469B8B4CA1D5708D0C66DBCB45 /* GPUImageEmbossFilter.m */, - 1F2C1EF174D0C89A1ECD8D871814D3C5 /* GPUImageErosionFilter.h */, - 48C35BCA747620F3BF149953BFDC422D /* GPUImageErosionFilter.m */, - 1E272A947106122CD1F27C631D653DA4 /* GPUImageExclusionBlendFilter.h */, - DA4B2BBB528CEAFC918860127115B034 /* GPUImageExclusionBlendFilter.m */, - 985698BFE05D67C00294DF094B379513 /* GPUImageExposureFilter.h */, - EA2A44D6FF0F9ACEE1DADC1A14F2854D /* GPUImageExposureFilter.m */, - ED7087E1AAD6DCA511A73A2D2B30D6B4 /* GPUImageFalseColorFilter.h */, - 34E2DEEB4F0ADF11F9C9E23D43C1A3B6 /* GPUImageFalseColorFilter.m */, - 71D502A5B132B8E2D515B9A975C85309 /* GPUImageFASTCornerDetectionFilter.h */, - 50E15C340F7D31DE893B684AFF6EC189 /* GPUImageFASTCornerDetectionFilter.m */, - DCDB8D6607C77835C1EC75EB9F36E5C5 /* GPUImageFilter.h */, - 6FAE5EFDF6BAE35B5464066D6F82F34E /* GPUImageFilter.m */, - 10AF522841E0BF1975899E1F731DDF5D /* GPUImageFilterGroup.h */, - 675DA2B87C4D3A22040B4457A6387B04 /* GPUImageFilterGroup.m */, - 11CCBC30AD14409191CFABD8D074A58D /* GPUImageFilterPipeline.h */, - 2EAC8FE75CB608768A2CEA2F31EDF290 /* GPUImageFilterPipeline.m */, - DEC5E896CBBBB4368B3D73E3B6DF98AF /* GPUImageFramebuffer.h */, - 838B4FE7CBA73D00A0885739EF9AA694 /* GPUImageFramebuffer.m */, - D17E8A9196C94BC7F7B14D0D08A31A90 /* GPUImageFramebufferCache.h */, - EE42EB7F34AB1582A3A5744A834BD119 /* GPUImageFramebufferCache.m */, - 71F455391A9616D714CC8874A51F7EE6 /* GPUImageFramework.h */, - FC8FF675218469A34772983792A93F7D /* GPUImageGammaFilter.h */, - 43F07509067BACE67AB5E9CE46DBB3EE /* GPUImageGammaFilter.m */, - E170213BF8AB60A888762910A4745B2B /* GPUImageGaussianBlurFilter.h */, - 291AEAB6C085560A71960DDDD62ACD1A /* GPUImageGaussianBlurFilter.m */, - C48D8B50088748FC4BC5FC2E0C491663 /* GPUImageGaussianBlurPositionFilter.h */, - 404551280AEA0058459B3385F82AFBBA /* GPUImageGaussianBlurPositionFilter.m */, - AF4FAC2BFB19ABFAB2B98973CF3F2F19 /* GPUImageGaussianSelectiveBlurFilter.h */, - 2B2CFE441A1614F51B47AA982B4E448B /* GPUImageGaussianSelectiveBlurFilter.m */, - 169DF30CA515684B51A770DE262AC808 /* GPUImageGlassSphereFilter.h */, - 4EB243D1C497784152C266E096C23C6C /* GPUImageGlassSphereFilter.m */, - 3C138582918D37CF364E6D3C9898D68F /* GPUImageGrayscaleFilter.h */, - 751129785F65D4A3EA3332CE56D280DD /* GPUImageGrayscaleFilter.m */, - E82866E758AEDE0697B2D6542D52887E /* GPUImageHalftoneFilter.h */, - 2B3AB6691A881BF883BB176FDAB07FBA /* GPUImageHalftoneFilter.m */, - 94E26D38916B6B7C099A974F7D4801BB /* GPUImageHardLightBlendFilter.h */, - 784B2008FD82B473DC377FEEC4B7EFD4 /* GPUImageHardLightBlendFilter.m */, - 2CE39347324DF5B3FC2761B6D191DA9C /* GPUImageHarrisCornerDetectionFilter.h */, - FABBE2C4A63D29A135EB2E35769CF66E /* GPUImageHarrisCornerDetectionFilter.m */, - E63C05F85CF505C1F4F6C1F2A5264989 /* GPUImageHazeFilter.h */, - 8CAC7D39500D3FC8B5E4380E69FFBCCA /* GPUImageHazeFilter.m */, - 2988FF2F5DA771E11045F136F9BD4F0A /* GPUImageHighlightShadowFilter.h */, - 10015A94BC5970A447441E41EFA84CC4 /* GPUImageHighlightShadowFilter.m */, - 4A6F1BA241429526CAA01D945FD69E28 /* GPUImageHighPassFilter.h */, - 30871DDE7586CFF91A2ACC7F23FF6105 /* GPUImageHighPassFilter.m */, - F478792CD6750762D653D4B974565731 /* GPUImageHistogramEqualizationFilter.h */, - B93FEAD1B3DB233D4B21EB7567E5E3A0 /* GPUImageHistogramEqualizationFilter.m */, - 8472059D35BC092DEF41EC2604D795FB /* GPUImageHistogramFilter.h */, - 5D6101DA1E24CEAF212864D149AAA311 /* GPUImageHistogramFilter.m */, - 8CEEEBC4B26A07F17E3509809AE7C514 /* GPUImageHistogramGenerator.h */, - 49E415F2BA5768C469A662DF8C823B3C /* GPUImageHistogramGenerator.m */, - 6CA047F4F7C29EBD892E71642C0B6FD0 /* GPUImageHoughTransformLineDetector.h */, - CF2F73298D0AAD1A41B6CB86926D9317 /* GPUImageHoughTransformLineDetector.m */, - 6DC692CA9FD5C1A42113F450FA649F67 /* GPUImageHSBFilter.h */, - 3262E2097D957FBD0444889742CB1C80 /* GPUImageHSBFilter.m */, - C080FC8084166668F65F78ED0AA4A69B /* GPUImageHueBlendFilter.h */, - F53E198F369DD7B29FDFD1E67D7FEF92 /* GPUImageHueBlendFilter.m */, - 04EED508463C74DA6E7C59026CB90BE8 /* GPUImageHueFilter.h */, - C7E61395FE8E961D58658EFC5FE914A3 /* GPUImageHueFilter.m */, - 79F32CA2AC9383860E5A101F3891F01F /* GPUImageiOSBlurFilter.h */, - 864D6DEE6397881CD3F0FCBC2443BB60 /* GPUImageiOSBlurFilter.m */, - DA29E62F007F394173C5A6E96F4EA3A1 /* GPUImageJFAVoronoiFilter.h */, - 5AB2E9FBA9B5DC6C3B50148EBA2EB69C /* GPUImageJFAVoronoiFilter.m */, - 82C6F83D1D031E0F313B5E11137E072B /* GPUImageKuwaharaFilter.h */, - AC97F32440360E91D0907B1696EFA925 /* GPUImageKuwaharaFilter.m */, - 29114F4BF994DD99DA8B15BD714B5488 /* GPUImageKuwaharaRadius3Filter.h */, - 453BE721D27626D4753B1F021A0126F4 /* GPUImageKuwaharaRadius3Filter.m */, - B015E5C22E17335E3A77DFA9908BB606 /* GPUImageLanczosResamplingFilter.h */, - 37B3E429270DF855D2663E4BE0DCE666 /* GPUImageLanczosResamplingFilter.m */, - B49CFF15CC2A8F9BE7A7F6E9858CF4A9 /* GPUImageLaplacianFilter.h */, - 533CF0E1A935E0C8D6084DE984AA9A48 /* GPUImageLaplacianFilter.m */, - 6460B60CAEB361F43B409D943DD5919E /* GPUImageLevelsFilter.h */, - EEF00EBDB95094FD4257D5613DD330E0 /* GPUImageLevelsFilter.m */, - DFE90665F8A100159773904C5A2F8967 /* GPUImageLightenBlendFilter.h */, - ECEA2E9EE22767E7510CE7AA87771919 /* GPUImageLightenBlendFilter.m */, - 1AF1FBA24B5573418B3316CD3B2CAF8B /* GPUImageLinearBurnBlendFilter.h */, - A3CD8B04FB70BC53E721DA44020D04B1 /* GPUImageLinearBurnBlendFilter.m */, - 3FA9A4C47EC9F4059DAB7AADC578E5AF /* GPUImageLineGenerator.h */, - 2276B332FA8EDDC35FE32348D3EB368C /* GPUImageLineGenerator.m */, - E8B488F92B9569C2D4E2C544410035E4 /* GPUImageLocalBinaryPatternFilter.h */, - DD88158BB140DD22AAFBE5A81587E42D /* GPUImageLocalBinaryPatternFilter.m */, - D5AB4ADA23B1748AB0ED4BB1DB527C69 /* GPUImageLookupFilter.h */, - 9E5657C2668E3B4C728034FA1EA9A0A4 /* GPUImageLookupFilter.m */, - BA371A875E27E7EE7D0FCD1007D94CF2 /* GPUImageLowPassFilter.h */, - 5B86F3F70B22B26EC06C5C412D9B9733 /* GPUImageLowPassFilter.m */, - A22790AD2F8E9488E3E272090ACDE88B /* GPUImageLuminanceRangeFilter.h */, - 94F2208CD8400EF9A4FE9B63DAC5E6E0 /* GPUImageLuminanceRangeFilter.m */, - E26335B2F22D282C8B7582834BD0A07E /* GPUImageLuminanceThresholdFilter.h */, - 7C17752936CF711DF066A5BA091BFA81 /* GPUImageLuminanceThresholdFilter.m */, - 8F06970C1605988B31A04FC0D429E908 /* GPUImageLuminosity.h */, - CFC1905D68B43955A7ECC39E228564DC /* GPUImageLuminosity.m */, - A827A26F6AFD11185014B81B1EDDC257 /* GPUImageLuminosityBlendFilter.h */, - 8BA72D587A6A6B053532804FF36E8E46 /* GPUImageLuminosityBlendFilter.m */, - FF5ACE2C67EA5C6E02ED4D4FBD28FBA7 /* GPUImageMaskFilter.h */, - 21B2916276232C456951467038D3E2FF /* GPUImageMaskFilter.m */, - AB9AABEFA3783A1EFB3AF263028EA22E /* GPUImageMedianFilter.h */, - 34284363F58BE296025C3C9CBD8F317C /* GPUImageMedianFilter.m */, - F448306B3687298FFAD025EB2DDD73EF /* GPUImageMissEtikateFilter.h */, - 1E01E00886BEDC0765B232733C255C1C /* GPUImageMissEtikateFilter.m */, - C3415B253778A17AB9D9E9539C59982E /* GPUImageMonochromeFilter.h */, - A21D094A16257D428FAE0B259CD960F5 /* GPUImageMonochromeFilter.m */, - D24C3AB3AE7CD24FB83746C901F281BA /* GPUImageMosaicFilter.h */, - 9ADFE335A749F6242A5501FC31B4EDB2 /* GPUImageMosaicFilter.m */, - 34804E531C9635A205640CD71C357B77 /* GPUImageMotionBlurFilter.h */, - 488651029866527C3B2644FD81E92587 /* GPUImageMotionBlurFilter.m */, - 2715DCC6112CFACF55C762832D38626D /* GPUImageMotionDetector.h */, - 4CE0EB4E232A38B13CACAA200001C7D9 /* GPUImageMotionDetector.m */, - 3918FDF9EBD2B1FA91FD529E6E34785A /* GPUImageMovie.h */, - 68CD24B140838D08A6E5DD6A70FD8923 /* GPUImageMovie.m */, - 00BAF7C4E2492F63C9589A48B9A174F5 /* GPUImageMovieComposition.h */, - E9BE79BD70E8A2BBB669B77DE76E87B2 /* GPUImageMovieComposition.m */, - 21CD080746E9E7BC9C0BA1E1A2EDF8F0 /* GPUImageMovieWriter.h */, - A17B47159361544A9A5041BCADFB2DA3 /* GPUImageMovieWriter.m */, - 61E2A63537B14F7A60668071C08241DE /* GPUImageMultiplyBlendFilter.h */, - CF78B4B80A067EF3C1E69807978B0212 /* GPUImageMultiplyBlendFilter.m */, - E5AE2B148F45F4E8B8FB0225084DEE18 /* GPUImageNobleCornerDetectionFilter.h */, - 8F4D069CFC80E40C0955894061DC5082 /* GPUImageNobleCornerDetectionFilter.m */, - BDD3B32644BC93C7355A1C520C495A48 /* GPUImageNonMaximumSuppressionFilter.h */, - 4A7B42C55528946ABE27DCA7F4A86E7A /* GPUImageNonMaximumSuppressionFilter.m */, - 35D609B903920B4F5B05401FBC7E489D /* GPUImageNormalBlendFilter.h */, - 49B9B7911201EAA735B877B4E99D31D9 /* GPUImageNormalBlendFilter.m */, - D20E7200664BDC1CA23F83B69DB2AF00 /* GPUImageOpacityFilter.h */, - A0A98FEBD19728184776073D5B656C40 /* GPUImageOpacityFilter.m */, - F2F67F28D47899C70E83AA9305D4E341 /* GPUImageOpeningFilter.h */, - 250D4D5BDE79FE3FB3D8E6BDF13C6F79 /* GPUImageOpeningFilter.m */, - 43471FC538F7533EBC5AA010B09E0958 /* GPUImageOutput.h */, - FD794A0352171C16DFE53E0AB396C398 /* GPUImageOutput.m */, - 80F0F94732C9BFC491C85042FF7D14A5 /* GPUImageOverlayBlendFilter.h */, - D784A6CD68E1A5D8D6580987562CE66F /* GPUImageOverlayBlendFilter.m */, - F412634986B6427C47BFE33290B76D0C /* GPUImageParallelCoordinateLineTransformFilter.h */, - E9AD39DB2F1E55880567989B269FAC3D /* GPUImageParallelCoordinateLineTransformFilter.m */, - E75C8905888A317693F48FC06029AC84 /* GPUImagePerlinNoiseFilter.h */, - 20BC00B3DDB29110A58176CE51605FD4 /* GPUImagePerlinNoiseFilter.m */, - B8113E2BE805826C2206219087AF2FEB /* GPUImagePicture.h */, - B4F3FFA58FE342F21294920E38929E3F /* GPUImagePicture.m */, - 1E9095CF9176D72147052B3FD215EF7F /* GPUImagePicture+TextureSubimage.h */, - C1703B1CC3A8EF46F7E0BC97EF312B15 /* GPUImagePicture+TextureSubimage.m */, - 4272FC95B847753C0B6BA23100C3957E /* GPUImagePinchDistortionFilter.h */, - 870991E39050AAA48FC751AB989A0CEE /* GPUImagePinchDistortionFilter.m */, - D2C5AB16BD22FA6146D9733E98392177 /* GPUImagePixellateFilter.h */, - 9D99E942362A4061252F3303E92A955A /* GPUImagePixellateFilter.m */, - 6DA0D34140F270C03A5A2D7F4CC54517 /* GPUImagePixellatePositionFilter.h */, - AB79E1A4A66A6C04AB9D9EBE73E0A218 /* GPUImagePixellatePositionFilter.m */, - F776E442B4C1CDFEF257F6134CBE90D0 /* GPUImagePoissonBlendFilter.h */, - D54971E35D67E4E2B0A20F8CD8BDB2D4 /* GPUImagePoissonBlendFilter.m */, - 228003B3476B41761F56C932AA1DE129 /* GPUImagePolarPixellateFilter.h */, - 7CD5AC12DA2322B95DFCB7F7D42FBD49 /* GPUImagePolarPixellateFilter.m */, - CA5BC3210A0DC9C52CF983E3FBA33D3D /* GPUImagePolkaDotFilter.h */, - 5B933CA3EC0B18A8DB363F31A85D1268 /* GPUImagePolkaDotFilter.m */, - 69E5EB77E2A5E329FE60A250611BF2FC /* GPUImagePosterizeFilter.h */, - 43A18B72D843666583E43734D2462B4F /* GPUImagePosterizeFilter.m */, - 5021D951EBE0EE5ACBFF0A1D5BF60EC2 /* GPUImagePrewittEdgeDetectionFilter.h */, - 414E85F24E79E32F8EA8031796253C7F /* GPUImagePrewittEdgeDetectionFilter.m */, - F8F996C485D25C0141065FF489D1BA53 /* GPUImageRawDataInput.h */, - D3B1D10EA9F731D0F5F681A4CAEDE5D6 /* GPUImageRawDataInput.m */, - 08FB776087C19D638AA775DF1EA2E6A6 /* GPUImageRawDataOutput.h */, - A1BDF8E1519711BE1634F7B98C1BE5A4 /* GPUImageRawDataOutput.m */, - 56D2D8153149A60C61AB14238CE5A721 /* GPUImageRGBClosingFilter.h */, - 8BBCCF9A4A7C3B7E1D6638E2D15B2B83 /* GPUImageRGBClosingFilter.m */, - 31F4DFCE2BAF8205326A79D123842D37 /* GPUImageRGBDilationFilter.h */, - 87611103457106E50CE6DF1459C428CF /* GPUImageRGBDilationFilter.m */, - 96B10DB742FBE734F2EE564DC1808399 /* GPUImageRGBErosionFilter.h */, - 080F15FCC36CE02B5AA7B6A38D2A6F1C /* GPUImageRGBErosionFilter.m */, - 6E747934866906927486DC94DEC4581B /* GPUImageRGBFilter.h */, - 97BB1E9D14B5C9A8E04954127CF899DD /* GPUImageRGBFilter.m */, - 1A8E625D6539753D6AC67978B97C5D7C /* GPUImageRGBOpeningFilter.h */, - CD17316111B32EDFB414E2DB7107670D /* GPUImageRGBOpeningFilter.m */, - 3F37E42BC4BE8E0517824BABC9869273 /* GPUImageSaturationBlendFilter.h */, - B76EEE6CDA11AED2C0DF42954264E2E4 /* GPUImageSaturationBlendFilter.m */, - 219E2548D3FF4C96F4ED257B47311123 /* GPUImageSaturationFilter.h */, - 1577D323A093A5E9B341C97A2C56FDFF /* GPUImageSaturationFilter.m */, - F1C3D508DA7E563DEA7799B00D9E2113 /* GPUImageScreenBlendFilter.h */, - D4C994A6E8F57B6828552CA504C66D58 /* GPUImageScreenBlendFilter.m */, - 71669CD78F52A5CA28F626C8A16A194C /* GPUImageSepiaFilter.h */, - 5DADF97A372B96269C7E574FFD19EA84 /* GPUImageSepiaFilter.m */, - BBB88E5B5C49D8640CAD758ACB9A6965 /* GPUImageSharpenFilter.h */, - 20C5BE19C1459E39FC196D7A94B0CBE9 /* GPUImageSharpenFilter.m */, - 254E957A25195EAAC2658009BDAEEBBD /* GPUImageShiTomasiFeatureDetectionFilter.h */, - 5388C8B9509AE2A725C77FB08EAB1262 /* GPUImageShiTomasiFeatureDetectionFilter.m */, - 3C8EF79EE8E13A7229E1AF925AEC3BC4 /* GPUImageSingleComponentGaussianBlurFilter.h */, - 4284D70C7F26D1B5D00CB148C3E562E1 /* GPUImageSingleComponentGaussianBlurFilter.m */, - F167A2004301C4034FFB0D96A262B99D /* GPUImageSketchFilter.h */, - 9F81E2DA24707028F902CA5D2165F3AF /* GPUImageSketchFilter.m */, - 3CF95A800A5428B6D2C82CDC82A21CD5 /* GPUImageSmoothToonFilter.h */, - B81F4796AC0D72D4F1B2047D5A0E8AC0 /* GPUImageSmoothToonFilter.m */, - E16FF3BBD2E461C6B31F4D28293DEC1F /* GPUImageSobelEdgeDetectionFilter.h */, - 38948BFE21048F7C6D91B1281E521F1B /* GPUImageSobelEdgeDetectionFilter.m */, - 525E00D440284C93311DF077591CDA15 /* GPUImageSoftEleganceFilter.h */, - AB5B9F20F2CC4E7B1E64873C8F4C7DEB /* GPUImageSoftEleganceFilter.m */, - A0D905911F4E966E46571AE6336725F8 /* GPUImageSoftLightBlendFilter.h */, - 7AF69C635DEFF07CF03F7EC5C93EECC6 /* GPUImageSoftLightBlendFilter.m */, - B43D8D3315443CDCAF2566D64DDEE04B /* GPUImageSolidColorGenerator.h */, - 42D084FF6A05E8F634B9ECC121BB2F70 /* GPUImageSolidColorGenerator.m */, - 074228E092340DEFE657CAF4F22AF822 /* GPUImageSourceOverBlendFilter.h */, - FD17D6790093A05DE5D3FEA809D11BAA /* GPUImageSourceOverBlendFilter.m */, - 844471BB500349B7E35E4D0A96389D2F /* GPUImageSphereRefractionFilter.h */, - B8043D2AA30371284EF62F7AE00669A6 /* GPUImageSphereRefractionFilter.m */, - 77F4D03A5C3A7B3755BD05C6BC87D853 /* GPUImageStillCamera.h */, - 8A630DEACFD6C33B16EABFCBA7B10B6B /* GPUImageStillCamera.m */, - 4A94921FCB9C25F627D3B1EB025EB097 /* GPUImageStretchDistortionFilter.h */, - 22245274C4F286C6221A887D6CD7F1AE /* GPUImageStretchDistortionFilter.m */, - 4A0251929026FA746DAF38200C6045F2 /* GPUImageSubtractBlendFilter.h */, - B841981319C7EF7EE2877086FCA683E5 /* GPUImageSubtractBlendFilter.m */, - BEFFA1F44D79B03904E27FC68BA02324 /* GPUImageSwirlFilter.h */, - B1CF0307FA26395C0EBDD879BF40EE7F /* GPUImageSwirlFilter.m */, - 2428E8C70A2E6595B6031EC3C1851FEF /* GPUImageTextureInput.h */, - 6CCD41C6BD2C0E9ABB3148B70C4BC918 /* GPUImageTextureInput.m */, - 0E198F28897BDB4F191CE84351A84102 /* GPUImageTextureOutput.h */, - 621DA413177A46757ACA5C0C17FE0C8C /* GPUImageTextureOutput.m */, - 5A14EDB5BB818BEE5CEE11AB9273F285 /* GPUImageThreeInputFilter.h */, - 8736944B2594030670245A252F39B7FA /* GPUImageThreeInputFilter.m */, - 240C513A27F958A5DE57B92A02EA4229 /* GPUImageThresholdEdgeDetectionFilter.h */, - 36B4A09ADA586EFD92A79ECD4C0E35A8 /* GPUImageThresholdEdgeDetectionFilter.m */, - 99007670CCD9C91A8F619B9CEA906413 /* GPUImageThresholdedNonMaximumSuppressionFilter.h */, - 07C2E5E0DB6558AF1D582E8DD0D244EB /* GPUImageThresholdedNonMaximumSuppressionFilter.m */, - BBE357EF73F92D80EB2A32F6C9ADC813 /* GPUImageThresholdSketchFilter.h */, - EB47C074A601454370424E7CFB464BCF /* GPUImageThresholdSketchFilter.m */, - 05AE57422D69487A72FEC0CB766E61D0 /* GPUImageTiltShiftFilter.h */, - C0C8CE6B752A1D6DC908E8EBC379636C /* GPUImageTiltShiftFilter.m */, - 5D6604B45B92B4410C171D7E0C6B4939 /* GPUImageToneCurveFilter.h */, - FB638C9B72C7E7F1B16A43E90A8BF20E /* GPUImageToneCurveFilter.m */, - CE8390129A638BE0F4AE19C96CACE467 /* GPUImageToonFilter.h */, - 80DCA9ABD24683C3D8FAE083D96F58E5 /* GPUImageToonFilter.m */, - 0E48FED45DEF3A3929689CA91C2C802C /* GPUImageTransformFilter.h */, - 25B452C9C925DADC958E77C39081288F /* GPUImageTransformFilter.m */, - 0CA0BA0CC8335A694D5350A133298DB3 /* GPUImageTwoInputCrossTextureSamplingFilter.h */, - 59C6E40234EEDDD4087F2CFFF63582D0 /* GPUImageTwoInputCrossTextureSamplingFilter.m */, - 537E9A1D3C9B19E06AD252A90F35F4FC /* GPUImageTwoInputFilter.h */, - 30A8C055AB3C18A2E3FE4F47E4F66E5A /* GPUImageTwoInputFilter.m */, - A7E3C6A77B24BBCAF360A95E890B7F76 /* GPUImageTwoPassFilter.h */, - 84948E8F3C90A486BDED1DDC42DD9B6D /* GPUImageTwoPassFilter.m */, - F4CCD104A376890D8A12507C5239B8B1 /* GPUImageTwoPassTextureSamplingFilter.h */, - 53D16559576FCC95A4CD46C46C5DE443 /* GPUImageTwoPassTextureSamplingFilter.m */, - ABEA5E282030B2AACB13107445796E9B /* GPUImageUIElement.h */, - F11B4258E3FA4A8841B1604E377E7F3D /* GPUImageUIElement.m */, - A02D900146C224595943A9226D2DCAD8 /* GPUImageUnsharpMaskFilter.h */, - 1F0C80FAC0118D3106441EE7BCBCFF00 /* GPUImageUnsharpMaskFilter.m */, - 3FE5C658FDFFD20E3BCD7C36D40923A3 /* GPUImageVideoCamera.h */, - DDB88636BCAA89B17531BEAC2B7677B4 /* GPUImageVideoCamera.m */, - 295A7F01A1F9CE9A049C72379F8EC892 /* GPUImageView.h */, - FC2B794A56EF9D2701B9021759093037 /* GPUImageView.m */, - FC35CED2A95AFEA26980C9D4ABC06D40 /* GPUImageVignetteFilter.h */, - 9FE18CDF175FE55AE74C18EF88123854 /* GPUImageVignetteFilter.m */, - 83FF0DCFBB0CF862F4E2370485036696 /* GPUImageVoronoiConsumerFilter.h */, - E7ED5325591277156B4BB5CC580E9723 /* GPUImageVoronoiConsumerFilter.m */, - 894067B7B8B143B196F909226A542245 /* GPUImageWeakPixelInclusionFilter.h */, - 092384ABCABB5474EAF3E9D8F02DF29F /* GPUImageWeakPixelInclusionFilter.m */, - E9EBE53088D96916DD20443C82AFBDE7 /* GPUImageWhiteBalanceFilter.h */, - 7FEA48B785F73A0492D9D729976FD86B /* GPUImageWhiteBalanceFilter.m */, - C8EFB486F7011880B250BD588AF6B03A /* GPUImageXYDerivativeFilter.h */, - 2BB60AA6A277030CEA93B362B1061701 /* GPUImageXYDerivativeFilter.m */, - 8A10226B00432CC14F57C84CDA29A0B6 /* GPUImageZoomBlurFilter.h */, - 0274C1DACB9A0794CFD00841FAE59E3D /* GPUImageZoomBlurFilter.m */, - AEC0F8FA3365AF5A65D1E737B9F44CA2 /* Resources */, - 141D0B28506AB42A59DFF063B66A5B9D /* Support Files */, - ); - name = GPUImage; - path = GPUImage; - sourceTree = ""; - }; - 7596DCB5E576E1B05684D75984D7DEE5 /* YYImage */ = { - isa = PBXGroup; - children = ( - 1074CCDDB3F516ED42AC73FF531270DC /* Core */, - 6E3986E9FC1C8EFD880C478B01B0EB42 /* Support Files */, - ); - name = YYImage; - path = YYImage; - sourceTree = ""; - }; - 992A970CDF3E62FE974C2FB731009A04 /* Products */ = { - isa = PBXGroup; - children = ( - 79E8CB24F46AA9A51F87BBDF2D0AC238 /* libGPUImage.a */, - 1FFED36A657123030ABB700256D73F15 /* libMasonry.a */, - 8B8FAB0D627B17EDE1366984278705D9 /* libMBProgressHUD.a */, - 0B4A1372A24E73913DC7C605E4BD9472 /* libPods-DarkMode.a */, - 48ACF38225AF5129416A1F090F6D3286 /* libYYCache.a */, - 0C6F4829D47D1826F47CDC4264F9F6A8 /* libYYImage.a */, - E460D5B0416D36F66EE8EC89E5D2FA0A /* libYYModel.a */, - 4FC1978206616CE319648B302B05AA8A /* libYYWebImage.a */, - ); - name = Products; - sourceTree = ""; - }; - AEC0F8FA3365AF5A65D1E737B9F44CA2 /* Resources */ = { - isa = PBXGroup; - children = ( - 8AC2A96E79A66C63B15134B252A9BD15 /* lookup.png */, - AC973EBC40064F309FCCDDEC38ED1151 /* lookup_amatorka.png */, - 48BC391B2B9B8DF60B1BC90CF239FC80 /* lookup_miss_etikate.png */, - BF320EFBDD4F9B7040C07E0E3056F74E /* lookup_soft_elegance_1.png */, - 85B8CD154BD93A91C3B231B46DFA42BC /* lookup_soft_elegance_2.png */, - ); - name = Resources; - sourceTree = ""; - }; - C6C81AD3406E48E475916D291D2F3082 /* Support Files */ = { - isa = PBXGroup; - children = ( - 55DC707CC4179395588164EA0C8D4DF8 /* YYModel-dummy.m */, - 0D0402BAF334A2BDC1E4932E93A77CFD /* YYModel-prefix.pch */, - BE1BD7513325F0024AB5F0B2AA5B5308 /* YYModel.debug.xcconfig */, - FC1BB8206A536BE18D03949E8E9E8D59 /* YYModel.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/YYModel"; - sourceTree = ""; - }; - CF1408CF629C7361332E53B88F7BD30C = { - isa = PBXGroup; - children = ( - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - D89477F20FB1DE18A04690586D7808C4 /* Frameworks */, - 3B5EB31541FAB7B733903648FE8E1F55 /* Pods */, - 992A970CDF3E62FE974C2FB731009A04 /* Products */, - 69373CF63774AD2866551D33EEBB796F /* Targets Support Files */, - ); - sourceTree = ""; - }; - D89477F20FB1DE18A04690586D7808C4 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; - EE1473FB6742C310B59547D29782341E /* YYWebImage */ = { - isa = PBXGroup; - children = ( - 3D59E89941BC318DF7FC1D5BC49895CD /* _YYWebImageSetter.h */, - 216F8CFBA824F61AE51F0BE1FB37998B /* _YYWebImageSetter.m */, - B9A029945B47FB73CDE3CC37104F813F /* CALayer+YYWebImage.h */, - C05B47CD66C71D9CAAF1627186D1C6DE /* CALayer+YYWebImage.m */, - 01B971D8030BF11EC3D14181720444C4 /* MKAnnotationView+YYWebImage.h */, - 9680F05DBD64586E9AB59F33EA7E289F /* MKAnnotationView+YYWebImage.m */, - F38E818E85AFE98DD31A606DB69D79D5 /* UIButton+YYWebImage.h */, - 0920AF97BC9AA2C404C3E60972978562 /* UIButton+YYWebImage.m */, - F02B616DA404DA9F64E1EB8DD4C522B1 /* UIImage+YYWebImage.h */, - E578EF7302261D7D50382800254764B6 /* UIImage+YYWebImage.m */, - B4080351977D02914F701E5AF2820E28 /* UIImageView+YYWebImage.h */, - DD2430725CE2EF7139ADE4BBC1C7CBA8 /* UIImageView+YYWebImage.m */, - 372EFFE9AC19817C164303970B18F910 /* YYImageCache.h */, - CB5A0BE4A5245E286AF7E6814CDD1436 /* YYImageCache.m */, - 8DEFD1186E4AE1006B42EF52538073A3 /* YYWebImage.h */, - 5C40FD404F6B8A2300E4B45AA2B6F9A8 /* YYWebImageManager.h */, - 8F3286B04ABC750B2DA6269CDAB9A3B0 /* YYWebImageManager.m */, - 019AEDB1F84B03733946BD4BAABB969C /* YYWebImageOperation.h */, - 48F476DACC4D9202F44C5407ACDA8410 /* YYWebImageOperation.m */, - 105C7CB0B46A09824CEAF5904D491772 /* Support Files */, - ); - name = YYWebImage; - path = YYWebImage; - sourceTree = ""; - }; - F6B09B74CE642AF4F9AB051723E51BB8 /* Masonry */ = { - isa = PBXGroup; - children = ( - 1601092CB8E312022FDE49393A610FA4 /* MASCompositeConstraint.h */, - AF50E9AAD19F008B707D7D8F7EACA2D3 /* MASCompositeConstraint.m */, - 13093D7BD9574A7D40FB42A21DB87F15 /* MASConstraint.h */, - B31F1147C4556865B64D707FEE8CCC97 /* MASConstraint.m */, - F73A13F286165F4836D8D7D4AAC5C284 /* MASConstraint+Private.h */, - 5E64875CACD9293F8463A7DEB77900AF /* MASConstraintMaker.h */, - C8E3D2D6BFE3A6A5011A9A78D5041D6B /* MASConstraintMaker.m */, - 0D5623738ABFF1744B71396958D31566 /* MASLayoutConstraint.h */, - 8C3AE50C738678F7E82112FDB4A8E70C /* MASLayoutConstraint.m */, - CAD1753F08C939B747A9310D6E2C7CCD /* Masonry.h */, - CE8B3FE478847A7AAD2B21BC40809B56 /* MASUtilities.h */, - 3E7EB13B2D474F8DE4852C033BF689FB /* MASViewAttribute.h */, - 9B4EE9ADF2AF51D5C395568406645F72 /* MASViewAttribute.m */, - F1A5C4493663A851186ED81654C1C388 /* MASViewConstraint.h */, - E48C3FA68C009689F44837B466401AA1 /* MASViewConstraint.m */, - BE81F8031495E743E805E3F1ABB005EE /* NSArray+MASAdditions.h */, - 05C8A3D41E95FB4EF796E14A592986C7 /* NSArray+MASAdditions.m */, - E11AAC1475379E882BBED87C93CA898B /* NSArray+MASShorthandAdditions.h */, - 36454A100B7DDEDEA1E782EF2E9E27AC /* NSLayoutConstraint+MASDebugAdditions.h */, - 8D6496F72C325C292BB59F2D94A654A2 /* NSLayoutConstraint+MASDebugAdditions.m */, - C4193CD804FDADD82E3B8FE1883F6D29 /* View+MASAdditions.h */, - 7EBD52032DCAFDAEC06FD991BB8695A8 /* View+MASAdditions.m */, - 82945F15766B165DCCA8DA4BC2C4BD87 /* View+MASShorthandAdditions.h */, - 5C0B54E85F3F7357A3084FAC6447AFF1 /* ViewController+MASAdditions.h */, - 6EEB662CC37ABBC8474275EEA42AB477 /* ViewController+MASAdditions.m */, - 37A14F42D10EDBCCC6657E748D3F9A4A /* Support Files */, - ); - name = Masonry; - path = Masonry; - sourceTree = ""; - }; - FD4CF277559D15A4F3FD03F6768FDB65 /* YYCache */ = { - isa = PBXGroup; - children = ( - 2E5AC46F45E4451E72AC537BB70B1812 /* YYCache.h */, - 160895B89A8B29B177F36E3AF17C2C11 /* YYCache.m */, - 926120A3C10BB72D3539005BC5D12636 /* YYDiskCache.h */, - 7B515D86A399467A37FA4BA15B8B0887 /* YYDiskCache.m */, - 41E7FFB3E5D0BA8ABC62E1A89D3063A8 /* YYKVStorage.h */, - E17C159C87DA98A853415C410757984D /* YYKVStorage.m */, - AFB401E05E9C8DEA8B23609216EB64E5 /* YYMemoryCache.h */, - D6DEC4D0701355737F042ABE9389A98E /* YYMemoryCache.m */, - 378BFCD52F81F2771D1C85755501112C /* Support Files */, - ); - name = YYCache; - path = YYCache; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 1AF60014033E7281EAFAD4E7CD034ABA /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 74BEC30868283F25D6D5F8ABFF0BE76B /* GLProgram.h in Headers */, - 029F819514A66087992EE035796FB9F2 /* GPUImage.h in Headers */, - D3E0F67215B94615E748A1D2C98439AD /* GPUImage3x3ConvolutionFilter.h in Headers */, - 70E9D98EAD51C5A686AAD7DCDF267C0A /* GPUImage3x3TextureSamplingFilter.h in Headers */, - D8AC3A3A9FC2C585805D8130985DFA64 /* GPUImageAdaptiveThresholdFilter.h in Headers */, - 8F2F540C8BCC922C80CB0EEC85AE2CB6 /* GPUImageAddBlendFilter.h in Headers */, - AA6F89A3BB414439A39AD2FE6C4B6C5A /* GPUImageAlphaBlendFilter.h in Headers */, - 32EE5B60261B8BC36AFE11DF61DF7FE8 /* GPUImageAmatorkaFilter.h in Headers */, - B9A2408D5950F5547F7D82E84217F63E /* GPUImageAverageColor.h in Headers */, - 8E76ED19F995FA81CFA03FF86BF480D8 /* GPUImageAverageLuminanceThresholdFilter.h in Headers */, - 2DF0E53968A631FCBDD17A7F6476285E /* GPUImageBilateralFilter.h in Headers */, - E0D741EB912B03FB998FF163F941827A /* GPUImageBoxBlurFilter.h in Headers */, - F4BA7E7FFAF565B29CC82D54B793EF78 /* GPUImageBrightnessFilter.h in Headers */, - D945A64F6CF78BE653585C4ACE0E24EF /* GPUImageBuffer.h in Headers */, - AAD0F39A4AA032B8C0C0B40EA7441E94 /* GPUImageBulgeDistortionFilter.h in Headers */, - 501A410F165BE59627833296C733AD55 /* GPUImageCannyEdgeDetectionFilter.h in Headers */, - CCC7F68CE9545A177EC9EA20AA2AE9C5 /* GPUImageCGAColorspaceFilter.h in Headers */, - 0B1B3B1DB51A07B13F0A363BC22F59A2 /* GPUImageChromaKeyBlendFilter.h in Headers */, - E7AF1651C307635FC4A9E52F6911B3B3 /* GPUImageChromaKeyFilter.h in Headers */, - 71F48775913C25AC156501B0EC59BFEA /* GPUImageClosingFilter.h in Headers */, - CDF22D54534615D38B7CB2ECF4C15367 /* GPUImageColorBlendFilter.h in Headers */, - 608A35BC3D8DA3484591875607E5D90C /* GPUImageColorBurnBlendFilter.h in Headers */, - 089AB5F862A3EF9A0218037D8C73DB9D /* GPUImageColorDodgeBlendFilter.h in Headers */, - D983E144A1EAF9EF20BFD31AEBD9BEBF /* GPUImageColorInvertFilter.h in Headers */, - D9760E3346290F95407D7DC02CE7CBCC /* GPUImageColorMatrixFilter.h in Headers */, - 749A8557351FDA52225E717CA8D80719 /* GPUImageColorPackingFilter.h in Headers */, - 832DE22BB0C9275FF031A74E88D0BFD6 /* GPUImageContext.h in Headers */, - B631B16F2CBE7157B23476CBDCE715E5 /* GPUImageContrastFilter.h in Headers */, - 9FA8C873F74D9C40A96BE74F017385CB /* GPUImageCropFilter.h in Headers */, - B1E3E64D5F9CBBA0AC445152F0502EAA /* GPUImageCrosshairGenerator.h in Headers */, - 3AA724CDE56C03778D0D8C6C614C28E5 /* GPUImageCrosshatchFilter.h in Headers */, - 7F421D9C31DC0525924101675B8EE24E /* GPUImageDarkenBlendFilter.h in Headers */, - 6B40D4EB83F51507D03ACD5FDBBEF888 /* GPUImageDifferenceBlendFilter.h in Headers */, - BD451674A244E95543E0CE56FEB2DDD4 /* GPUImageDilationFilter.h in Headers */, - FC910491DAAFF857945049B0434F398D /* GPUImageDirectionalNonMaximumSuppressionFilter.h in Headers */, - 3506EE5862108B2A8C41A20D99355F18 /* GPUImageDirectionalSobelEdgeDetectionFilter.h in Headers */, - 6D8EBA9E4E1129A31580B8B4D7345A8F /* GPUImageDissolveBlendFilter.h in Headers */, - 7D9CEFE99BDDDF6D1AD696E3A8E3C349 /* GPUImageDivideBlendFilter.h in Headers */, - EEF7E74667C5176B5F1554D7184F2A6A /* GPUImageEmbossFilter.h in Headers */, - 4FF8537039C6FB3E87DCC9F4A0390D2F /* GPUImageErosionFilter.h in Headers */, - 012A87349E85A8CA10E4AD07361E6D86 /* GPUImageExclusionBlendFilter.h in Headers */, - 7706E5C445117A81B0442E5C19F7AF84 /* GPUImageExposureFilter.h in Headers */, - 8E64B342157226991EE54B8F6152A1A4 /* GPUImageFalseColorFilter.h in Headers */, - 52914E62535E485DD3712D4563197A4E /* GPUImageFASTCornerDetectionFilter.h in Headers */, - 647A2EAB797A3D68176CC3AC101F2F1A /* GPUImageFilter.h in Headers */, - B82BCA913A74C5C17CF67BB48430A6E9 /* GPUImageFilterGroup.h in Headers */, - F3E6FD4C3F7B20EDF489236C6EC945DF /* GPUImageFilterPipeline.h in Headers */, - 307069FED8CBB5FD30C15FC7C0A62182 /* GPUImageFramebuffer.h in Headers */, - 9F1608BD340BF4B02A5B88CA03707AA1 /* GPUImageFramebufferCache.h in Headers */, - 0F9FB5E7A6BC661FC3F8852F4FC69D86 /* GPUImageFramework.h in Headers */, - EB76EA09E1FC065CB6203F5F602D76F0 /* GPUImageGammaFilter.h in Headers */, - 26A8C66FE48977B328358F9F2BF641A0 /* GPUImageGaussianBlurFilter.h in Headers */, - F8357854AE9106751D53AB8C32932F46 /* GPUImageGaussianBlurPositionFilter.h in Headers */, - 7A4F580731F192D5E8C6AF86AB44FBF3 /* GPUImageGaussianSelectiveBlurFilter.h in Headers */, - AFB6AFAD5CDE82433B7EF710AEABFFEC /* GPUImageGlassSphereFilter.h in Headers */, - 5EAB582B3DAE152158E656DDCD462408 /* GPUImageGrayscaleFilter.h in Headers */, - B8835F0715C5DCFFDB7FED7098B47596 /* GPUImageHalftoneFilter.h in Headers */, - C2480784B8731B3505C36BEC36F43F77 /* GPUImageHardLightBlendFilter.h in Headers */, - 293D641452CDA50B1DE046BB9B5105B1 /* GPUImageHarrisCornerDetectionFilter.h in Headers */, - D29C5C66C8885349266175C1D749F02F /* GPUImageHazeFilter.h in Headers */, - 441A09967A85ABE244200F5B5E6EC9A3 /* GPUImageHighlightShadowFilter.h in Headers */, - EA5E2729A6E87C922CDF98A3ACB985BC /* GPUImageHighPassFilter.h in Headers */, - A407D6E4E7732ABCAB9C121D415AF3E6 /* GPUImageHistogramEqualizationFilter.h in Headers */, - 42EF3318A12DEA2D31B64DA77EFE2FB3 /* GPUImageHistogramFilter.h in Headers */, - 3A87E2458C94D01EEEC9538DB032AC9D /* GPUImageHistogramGenerator.h in Headers */, - 2F701A9E49DDA3C1A240D28CC2285636 /* GPUImageHoughTransformLineDetector.h in Headers */, - D5193E9E46629B96BDEB10DAEF57582D /* GPUImageHSBFilter.h in Headers */, - 044D6E9E03CB8ECD6E58801E7C6C527A /* GPUImageHueBlendFilter.h in Headers */, - EB847D328F7F2D583D63181D9829991A /* GPUImageHueFilter.h in Headers */, - 4B1D960FF8280CC54413CABB5D2F2A2E /* GPUImageiOSBlurFilter.h in Headers */, - F82C2A26F6554330AF6E40C05326362A /* GPUImageJFAVoronoiFilter.h in Headers */, - 40B61558F93F007E0435D240EBA4A5E4 /* GPUImageKuwaharaFilter.h in Headers */, - 6480781DB47D05BF915975DC8A7B61BE /* GPUImageKuwaharaRadius3Filter.h in Headers */, - 3BF8C851F81EBF3411E82F9E1C793DAE /* GPUImageLanczosResamplingFilter.h in Headers */, - 4EC8896E34902FB81D8ECE3CBCE43F22 /* GPUImageLaplacianFilter.h in Headers */, - 2B3F38B85111F3D785A806C971FE2F23 /* GPUImageLevelsFilter.h in Headers */, - 0F1318DD0AD76D96EB95DA11FE97A2C1 /* GPUImageLightenBlendFilter.h in Headers */, - 47699E5E05076562ACB35B1C71C13347 /* GPUImageLinearBurnBlendFilter.h in Headers */, - 076971540B7FE20B66B50A6DBEC80064 /* GPUImageLineGenerator.h in Headers */, - 7F4CA66F56ECEC45306530ABA32178DD /* GPUImageLocalBinaryPatternFilter.h in Headers */, - 2516CA9197EA00286EFFAAD3A11402C5 /* GPUImageLookupFilter.h in Headers */, - D0C48086A9D1C8721C57BC59E3ABC9B4 /* GPUImageLowPassFilter.h in Headers */, - 5E8E7BB740E167DE322057CBF4E4ACFF /* GPUImageLuminanceRangeFilter.h in Headers */, - F96CD4E0A91280398E5A1874D2B3A5D0 /* GPUImageLuminanceThresholdFilter.h in Headers */, - 715144603B1E95E5FD199B6A820F3FC8 /* GPUImageLuminosity.h in Headers */, - 92AE518A0FBE98A0DF863B8DF7AC1FF3 /* GPUImageLuminosityBlendFilter.h in Headers */, - B78DB212BF2C1ADB6DCF09953314CABD /* GPUImageMaskFilter.h in Headers */, - E692F6CB653BDF7FCCE2A253E019F409 /* GPUImageMedianFilter.h in Headers */, - 21D3457D9AA054C835BB17F56A79041D /* GPUImageMissEtikateFilter.h in Headers */, - BFBF5806B8FB170749BF71FCFA77096D /* GPUImageMonochromeFilter.h in Headers */, - 44ABF3A14712E8B399B82DF3A2967A0A /* GPUImageMosaicFilter.h in Headers */, - 66ED1E95B81405D02E043A58017D95F0 /* GPUImageMotionBlurFilter.h in Headers */, - D0AA94BD089FEAD90D37D172CE9803B5 /* GPUImageMotionDetector.h in Headers */, - 6D957B3608267293F263AC16C250F6FD /* GPUImageMovie.h in Headers */, - 686489D54A6EA62779A0F4C34D29934F /* GPUImageMovieComposition.h in Headers */, - 9679F252AD137F1DC4749381E3238620 /* GPUImageMovieWriter.h in Headers */, - 00BC50439EB78BC024C8271F5FC50579 /* GPUImageMultiplyBlendFilter.h in Headers */, - C3215C21113B7017773F61D8E2C0F05C /* GPUImageNobleCornerDetectionFilter.h in Headers */, - 6FA721F4651B626AD252155EAC6BF7F4 /* GPUImageNonMaximumSuppressionFilter.h in Headers */, - D90E1DB2985F031A249C1CD1D7A48AF6 /* GPUImageNormalBlendFilter.h in Headers */, - F0088DAB471D5A3F2924964CD410BE41 /* GPUImageOpacityFilter.h in Headers */, - A6D788652DBBA97BB929B66E8FABF5FC /* GPUImageOpeningFilter.h in Headers */, - 527FC696CFE9E79296FAE22B581EDF93 /* GPUImageOutput.h in Headers */, - 15237712FC9D46A2037F26E70353D2EA /* GPUImageOverlayBlendFilter.h in Headers */, - 858B891B75D0F43A511C03E9CCEA9E8C /* GPUImageParallelCoordinateLineTransformFilter.h in Headers */, - 3490572882298AE0C0313A3214E36B06 /* GPUImagePerlinNoiseFilter.h in Headers */, - 247F37C5897D9F02668D125EFFB75B59 /* GPUImagePicture+TextureSubimage.h in Headers */, - 3E31203B357CAE0A15DB0850091BB79B /* GPUImagePicture.h in Headers */, - 9B2FF85F49CFCBFD69ABF044B8AF17CA /* GPUImagePinchDistortionFilter.h in Headers */, - 1FDB79E9550E8876B19B618E78F53309 /* GPUImagePixellateFilter.h in Headers */, - A5ECEA60FC0AADF57283128443C642E7 /* GPUImagePixellatePositionFilter.h in Headers */, - F4026D5FBB3EB246FEF59DA6B805FDAD /* GPUImagePoissonBlendFilter.h in Headers */, - E611F7A8E5966E6E2E68224A3F4F42EB /* GPUImagePolarPixellateFilter.h in Headers */, - 70F45CBA5AE0D7F59DDD9340AB3BD317 /* GPUImagePolkaDotFilter.h in Headers */, - 64000452C59702057A087C4A76CFE687 /* GPUImagePosterizeFilter.h in Headers */, - 531132F9F82136C7E0089691EF9D1836 /* GPUImagePrewittEdgeDetectionFilter.h in Headers */, - 5F285812B5CDF5D9FD0533372DA93B36 /* GPUImageRawDataInput.h in Headers */, - 703D0714CF1905012533BA95ECFFF425 /* GPUImageRawDataOutput.h in Headers */, - 63546D4E91CCFC991D704AA7E55D3EF4 /* GPUImageRGBClosingFilter.h in Headers */, - 23FBD272CA96DCB898B9271EB71F7D51 /* GPUImageRGBDilationFilter.h in Headers */, - 7B6553286815200C94E24B0AD34C3E42 /* GPUImageRGBErosionFilter.h in Headers */, - A1CB7B78C1D3374BAEA9A2BCC3A25656 /* GPUImageRGBFilter.h in Headers */, - 8620831289FD8F3A3595EAF6DAE7138F /* GPUImageRGBOpeningFilter.h in Headers */, - AD8503BD62763B8ACD0D4FFF1E8C56A2 /* GPUImageSaturationBlendFilter.h in Headers */, - BB2A9B9161E5F0AECC9F3CC31F6D85F6 /* GPUImageSaturationFilter.h in Headers */, - D379D3AECD4C3EDBD261235D63E260FF /* GPUImageScreenBlendFilter.h in Headers */, - 03182402D9CC511877544D993D1FFA9E /* GPUImageSepiaFilter.h in Headers */, - 29B8B5BB202D5EAB464A41B22DE1B5BC /* GPUImageSharpenFilter.h in Headers */, - DF95FC4FF9019EEB2C9717A8BE4F2EFE /* GPUImageShiTomasiFeatureDetectionFilter.h in Headers */, - 83A1B04E0BA640C7FB29FAA7A629B328 /* GPUImageSingleComponentGaussianBlurFilter.h in Headers */, - C4E5DEC7DF514A359AA062C7F13C95A4 /* GPUImageSketchFilter.h in Headers */, - DA49D1C675F5679D26CB9069A7269185 /* GPUImageSmoothToonFilter.h in Headers */, - 4B3E8A322CC1A802C18F4D2BC353D07B /* GPUImageSobelEdgeDetectionFilter.h in Headers */, - 2EEFD3082E5C0D943EB927EE0E18FCB1 /* GPUImageSoftEleganceFilter.h in Headers */, - B79E092F5B29C5C8B7359493C043A4DE /* GPUImageSoftLightBlendFilter.h in Headers */, - 940FA559831E8663F4C3C2CFAB214B86 /* GPUImageSolidColorGenerator.h in Headers */, - 37CE879D95C30445360AD6D0C1FA7CC4 /* GPUImageSourceOverBlendFilter.h in Headers */, - E5C0807D620C0E07706C6C00F87B7D7D /* GPUImageSphereRefractionFilter.h in Headers */, - E84C5D01F33A6C9AFFFA1B009D4BD25E /* GPUImageStillCamera.h in Headers */, - A07E94BD19655E823533CEFB4DBDD203 /* GPUImageStretchDistortionFilter.h in Headers */, - 9B8A55EA1B0232CA9B99B1F3B67595F4 /* GPUImageSubtractBlendFilter.h in Headers */, - 89215341FB58A6E29005197E676AC1FC /* GPUImageSwirlFilter.h in Headers */, - 9AF58F81BAD92835CEEDBB31C74435DB /* GPUImageTextureInput.h in Headers */, - D73DFCB550FD90D81582D87DEC5FBFBB /* GPUImageTextureOutput.h in Headers */, - 9B3F3992A312CBF772A509E737CD7230 /* GPUImageThreeInputFilter.h in Headers */, - 54AC6004FE0F928E06D79A88364B08C2 /* GPUImageThresholdEdgeDetectionFilter.h in Headers */, - 4B29282458432763173D54C2F5B21719 /* GPUImageThresholdedNonMaximumSuppressionFilter.h in Headers */, - 50C2B02BB91270A6EB35F60571F06E54 /* GPUImageThresholdSketchFilter.h in Headers */, - E275F7BF40EC2FB17B2ED9029FF06BCA /* GPUImageTiltShiftFilter.h in Headers */, - 46FBEAFB68F195DBF93DEE185B5B821E /* GPUImageToneCurveFilter.h in Headers */, - 9F1EDF344FCF17EE6EF5A072D727E3A7 /* GPUImageToonFilter.h in Headers */, - 2A0981C33E3E8401ECD3482994B3BCBF /* GPUImageTransformFilter.h in Headers */, - 6CD33B44569EC746123A3B3684E2CE91 /* GPUImageTwoInputCrossTextureSamplingFilter.h in Headers */, - F1750C9B60511FA4C2FFA9326C53194F /* GPUImageTwoInputFilter.h in Headers */, - 29065AD49ABF0ECB23CF05B75B448A05 /* GPUImageTwoPassFilter.h in Headers */, - 5ECA6D4026DE7F909DD178B2DBF665FB /* GPUImageTwoPassTextureSamplingFilter.h in Headers */, - FC39728CECE4A700D8315298E8649507 /* GPUImageUIElement.h in Headers */, - F4147D4455B06FAC3BF47FD552C69DDA /* GPUImageUnsharpMaskFilter.h in Headers */, - 168FB6A74A76E3979C4E47BBADF7DBFE /* GPUImageVideoCamera.h in Headers */, - 41CC5477C7CC1FCAFA0486B4710DB563 /* GPUImageView.h in Headers */, - FF641038FDDC7E524267A555915BBA70 /* GPUImageVignetteFilter.h in Headers */, - 1C02510C4D6500A7A376A57169D955DC /* GPUImageVoronoiConsumerFilter.h in Headers */, - AFD895639FCE8E367E47C39C13807509 /* GPUImageWeakPixelInclusionFilter.h in Headers */, - 76429EB123F7CB8020EB29A82765DFDB /* GPUImageWhiteBalanceFilter.h in Headers */, - 47DDAD3895F510382B2D81B70B620529 /* GPUImageXYDerivativeFilter.h in Headers */, - EFD2E46C54A13C1D9D72DE9F8531AD92 /* GPUImageZoomBlurFilter.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2697A8D6B2989B073B236F7B4BF67F30 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 92BF70E9D3285561EB404A7C4A4A6DEE /* MASCompositeConstraint.h in Headers */, - 4CE091F886EC6324673EFE0AEBBEA0FE /* MASConstraint+Private.h in Headers */, - EB663E3E1EB4BB670DC29B77DB330135 /* MASConstraint.h in Headers */, - 9194B58ACE900ED6BAE6AD92E24A2CFF /* MASConstraintMaker.h in Headers */, - 7CF2AC7A3B3ED03B30C1E4ED662B0551 /* MASLayoutConstraint.h in Headers */, - B20A0E5D8F9BCED1A82793C4BE9E7258 /* Masonry.h in Headers */, - 65E88072A2BDC576BFC85E67EF9FBBC6 /* MASUtilities.h in Headers */, - 42947699890A199B08A896144A878D80 /* MASViewAttribute.h in Headers */, - 115ACCE253A886181B55773DDC70D6ED /* MASViewConstraint.h in Headers */, - F1B75048874B8773E5568E6D3ACA12E4 /* NSArray+MASAdditions.h in Headers */, - 81F811A56B6724F7E8E2D25364E595E3 /* NSArray+MASShorthandAdditions.h in Headers */, - C74D2E856ADC8139CD00DBD184061B23 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */, - 46692A2E77157B00827182C8DC686F72 /* View+MASAdditions.h in Headers */, - A3307B8FB6EE0A049DBAE3AA4D2C6DA0 /* View+MASShorthandAdditions.h in Headers */, - E76935CFF4AF327F8D9A7C1935F7D900 /* ViewController+MASAdditions.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 30507E6E56EE9983B55BBEBE33BEA90A /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 560C9C53134D5D23E6224C71AAC09371 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 57AE9C0FF97670789648FCFFCF23A28F /* YYCache.h in Headers */, - 8F136A8285B1AA9501C02EBE717D9749 /* YYDiskCache.h in Headers */, - 9AE51F7A10F7D2A41DB5AE00A230DEA2 /* YYKVStorage.h in Headers */, - 0BD4E21F29F34FB17265C7BD9887C84D /* YYMemoryCache.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 768078E15AA23B4B19A2C12FF46E415D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 0B8E7DAF6EF79317C606AAF3BDF1B166 /* NSObject+YYModel.h in Headers */, - F654313B55A14132792476E2B2FA2AE2 /* YYClassInfo.h in Headers */, - CC46255DAABC498A35F70078C1A566BD /* YYModel.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 80C7C99747850DB02131F97B959FADB0 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6DA9CE75744CD9CAD2A497743A002CB3 /* _YYWebImageSetter.h in Headers */, - D98126521560BEA4D6CB57439643C89E /* CALayer+YYWebImage.h in Headers */, - 7DC9EA1A80CD849FA3A67BB8813C16F1 /* MKAnnotationView+YYWebImage.h in Headers */, - 639230154DADB35273109F737BA51C7D /* UIButton+YYWebImage.h in Headers */, - FA31F4C6D96B604EEB4BF55DEF7087C8 /* UIImage+YYWebImage.h in Headers */, - 410F226804ABA48DDADFB2C40CDBDF90 /* UIImageView+YYWebImage.h in Headers */, - 72492130AA1799D5BE6B9446C7836BD7 /* YYImageCache.h in Headers */, - 4720A768E07B694895699C1A455D433B /* YYWebImage.h in Headers */, - FA0845E169D8DC9A8096C6DB7BD71C75 /* YYWebImageManager.h in Headers */, - 5D6023B887E0BCB76115B617532A5390 /* YYWebImageOperation.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DAE5F9D13DD8EFD05CAF6E589EDC8C23 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D5FC0D8E4622A03DA9AD9C7D2FD993E1 /* YYAnimatedImageView.h in Headers */, - C249EDF7D50D5A7BEA1C40AABCE51E7D /* YYFrameImage.h in Headers */, - 6B18BAD834E408DE82E33DB82DD63168 /* YYImage.h in Headers */, - 0D257609B3B75A4CBFFBD05133D61391 /* YYImageCoder.h in Headers */, - 3B055578547C840E193F2BCB94BF4C02 /* YYSpriteSheetImage.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F69A1D7D9933B5C2BFB41B06C24EC219 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - C564C8D042998164475E13AD54B0A294 /* MBProgressHUD.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 488E8C830C5A5694EE916251B9ADAADA /* YYWebImage */ = { - isa = PBXNativeTarget; - buildConfigurationList = 3F177AA52C1CC43535F1A9DCF3B78737 /* Build configuration list for PBXNativeTarget "YYWebImage" */; - buildPhases = ( - 80C7C99747850DB02131F97B959FADB0 /* Headers */, - 497AEDBF5B0106E2A52E8E23D0174346 /* Sources */, - CE2E267127242299A42286A0A8D5DA27 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - D1104BEDA54FA285BE2839DED718F805 /* PBXTargetDependency */, - 1FC26DA76AAA17813ECD410079A19A5B /* PBXTargetDependency */, - ); - name = YYWebImage; - productName = YYWebImage; - productReference = 4FC1978206616CE319648B302B05AA8A /* libYYWebImage.a */; - productType = "com.apple.product-type.library.static"; - }; - 55AF53E6C77A10ED4985E04D74A8878E /* Masonry */ = { - isa = PBXNativeTarget; - buildConfigurationList = 0B9F7EAACDDA564EC328F53A4AB8CF85 /* Build configuration list for PBXNativeTarget "Masonry" */; - buildPhases = ( - 2697A8D6B2989B073B236F7B4BF67F30 /* Headers */, - 8C28688BF2BD730285E2F5DE30F8C021 /* Sources */, - 01095FBE532CF5AA0855A20BDA54BF0B /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Masonry; - productName = Masonry; - productReference = 1FFED36A657123030ABB700256D73F15 /* libMasonry.a */; - productType = "com.apple.product-type.library.static"; - }; - 614A938FC334CABC61438FB14592FCEE /* Pods-DarkMode */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8C17BE03124A4FF652DA36FB95BCEFD3 /* Build configuration list for PBXNativeTarget "Pods-DarkMode" */; - buildPhases = ( - 30507E6E56EE9983B55BBEBE33BEA90A /* Headers */, - 6D7D6FBD36BACF23BD0601611C1ED139 /* Sources */, - 24D3BE854C4E97B4CB4F4B6AEB3DDA1C /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 1D8CCC89F051C17D14E3B38FC8B47808 /* PBXTargetDependency */, - 19F4913477DF26E22CE907F59DE01F7C /* PBXTargetDependency */, - 2A49221EA0E5571525EE3FC82BF5E3A9 /* PBXTargetDependency */, - 61F8A9F2C5108EA5AC01D0AC156FD910 /* PBXTargetDependency */, - 0DB5F8867746B672CEAD27163C3A794E /* PBXTargetDependency */, - 5CD3D5F636E39C63FEABB144679F396F /* PBXTargetDependency */, - 22BFB162E190FA1451BD5D0F35603F44 /* PBXTargetDependency */, - ); - name = "Pods-DarkMode"; - productName = "Pods-DarkMode"; - productReference = 0B4A1372A24E73913DC7C605E4BD9472 /* libPods-DarkMode.a */; - productType = "com.apple.product-type.library.static"; - }; - 822E44240F2922DAB12018A6B649BD19 /* YYImage */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8D1AB1D2CF4C258BC2DA0CC48A1F8CE5 /* Build configuration list for PBXNativeTarget "YYImage" */; - buildPhases = ( - DAE5F9D13DD8EFD05CAF6E589EDC8C23 /* Headers */, - B0EE8786489CEC81AF58B7FA5377C830 /* Sources */, - D9C15529BA839F56CA954D83368902D8 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = YYImage; - productName = YYImage; - productReference = 0C6F4829D47D1826F47CDC4264F9F6A8 /* libYYImage.a */; - productType = "com.apple.product-type.library.static"; - }; - 82B0A41D3031FF27D78E17B0A9A46FB0 /* MBProgressHUD */ = { - isa = PBXNativeTarget; - buildConfigurationList = 20217F7F18136BEC6503B8147352D3E3 /* Build configuration list for PBXNativeTarget "MBProgressHUD" */; - buildPhases = ( - F69A1D7D9933B5C2BFB41B06C24EC219 /* Headers */, - 12490B6EBA14F6030F9CBD9575807097 /* Sources */, - DCBC7FE987FB53FBB71A9E7155D9E871 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MBProgressHUD; - productName = MBProgressHUD; - productReference = 8B8FAB0D627B17EDE1366984278705D9 /* libMBProgressHUD.a */; - productType = "com.apple.product-type.library.static"; - }; - 84B44807A12996D487A4A591A481D6A0 /* YYModel */ = { - isa = PBXNativeTarget; - buildConfigurationList = 07475BFF49F618F9523EA1A2F1925CD1 /* Build configuration list for PBXNativeTarget "YYModel" */; - buildPhases = ( - 768078E15AA23B4B19A2C12FF46E415D /* Headers */, - 09320F3BD0AA7E1D3B07FE201411AC58 /* Sources */, - 9C058CFEB46CC50AE17D1503E2EA34E9 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = YYModel; - productName = YYModel; - productReference = E460D5B0416D36F66EE8EC89E5D2FA0A /* libYYModel.a */; - productType = "com.apple.product-type.library.static"; - }; - CFDAE6EB02F58B9A37CADCF439AE6082 /* YYCache */ = { - isa = PBXNativeTarget; - buildConfigurationList = DF4E826F9DA37765B10F3D1B0EC4F9B2 /* Build configuration list for PBXNativeTarget "YYCache" */; - buildPhases = ( - 560C9C53134D5D23E6224C71AAC09371 /* Headers */, - 1414B7ACE73195D9F0670A0752E84BDD /* Sources */, - 7E1F0A9AFCFD750D8D8E87867B919530 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = YYCache; - productName = YYCache; - productReference = 48ACF38225AF5129416A1F090F6D3286 /* libYYCache.a */; - productType = "com.apple.product-type.library.static"; - }; - DB13B1641D72A72D8C9AE53FF81C8950 /* GPUImage */ = { - isa = PBXNativeTarget; - buildConfigurationList = E9E74E2AD7CA08D9840C4895CF07BBC1 /* Build configuration list for PBXNativeTarget "GPUImage" */; - buildPhases = ( - 1AF60014033E7281EAFAD4E7CD034ABA /* Headers */, - 456CAEA58DC1F88341774A3E1FEDD0C6 /* Sources */, - 3AA66CA5E57F3C1415A7D61A13C42528 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = GPUImage; - productName = GPUImage; - productReference = 79E8CB24F46AA9A51F87BBDF2D0AC238 /* libGPUImage.a */; - productType = "com.apple.product-type.library.static"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BFDFE7DC352907FC980B868725387E98 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1100; - LastUpgradeCheck = 1100; - }; - buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 10.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = 992A970CDF3E62FE974C2FB731009A04 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - DB13B1641D72A72D8C9AE53FF81C8950 /* GPUImage */, - 55AF53E6C77A10ED4985E04D74A8878E /* Masonry */, - 82B0A41D3031FF27D78E17B0A9A46FB0 /* MBProgressHUD */, - 614A938FC334CABC61438FB14592FCEE /* Pods-DarkMode */, - CFDAE6EB02F58B9A37CADCF439AE6082 /* YYCache */, - 822E44240F2922DAB12018A6B649BD19 /* YYImage */, - 84B44807A12996D487A4A591A481D6A0 /* YYModel */, - 488E8C830C5A5694EE916251B9ADAADA /* YYWebImage */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 09320F3BD0AA7E1D3B07FE201411AC58 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 332F47F53E6998F86527587E29CA5D9E /* NSObject+YYModel.m in Sources */, - E2F119888DA6312834DB6A2E84FF5906 /* YYClassInfo.m in Sources */, - 06EB7CC11A03D75FD2DA07D284685F73 /* YYModel-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 12490B6EBA14F6030F9CBD9575807097 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C7FD66D3D320095B45AD9D39EF1B858B /* MBProgressHUD-dummy.m in Sources */, - D6438BA4F863AE0A7891F212EE3C06D0 /* MBProgressHUD.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1414B7ACE73195D9F0670A0752E84BDD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0AAAED8B75B6AD69452465FD9596FD0D /* YYCache-dummy.m in Sources */, - 2C41DD251C08A607AB0D65FD88E3A066 /* YYCache.m in Sources */, - 472C8A534A872D0B6D85286483E6D753 /* YYDiskCache.m in Sources */, - 0B6FE241DFB3843F412B6468A8F4D2E2 /* YYKVStorage.m in Sources */, - 4D71EEBCF009BD38CDBDCB7FF48E9D3D /* YYMemoryCache.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 456CAEA58DC1F88341774A3E1FEDD0C6 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 86BA3E6F0F738FB8D5FA5E4F469C8694 /* GLProgram.m in Sources */, - 7F834C5C649E322048D41F16488A8520 /* GPUImage-dummy.m in Sources */, - C7710525EC84D4EB1FAF4D571DB64D90 /* GPUImage3x3ConvolutionFilter.m in Sources */, - 7BBADDA4A51EDD4DB7B9178A2AD9B6F0 /* GPUImage3x3TextureSamplingFilter.m in Sources */, - 0DFAF263663A062127902C54C6983A09 /* GPUImageAdaptiveThresholdFilter.m in Sources */, - 17EF299F850C9C8628F34469C37013DD /* GPUImageAddBlendFilter.m in Sources */, - 3B7BB04082AF2620E265A3088B2B4D0D /* GPUImageAlphaBlendFilter.m in Sources */, - 701EB7C0B4375EE2BF4F17FDDA91C3D7 /* GPUImageAmatorkaFilter.m in Sources */, - 54C308204D830A23ADC5E7E77F11FAD9 /* GPUImageAverageColor.m in Sources */, - 18A409862FE2BD9E7AEB7F8C443A2EEA /* GPUImageAverageLuminanceThresholdFilter.m in Sources */, - 01DA5C61D7BA40621EC5460EED38200E /* GPUImageBilateralFilter.m in Sources */, - 11E619FEA09D4BF81ACE5C2921D00B19 /* GPUImageBoxBlurFilter.m in Sources */, - BF4117E228B603963206D603A99B6CB0 /* GPUImageBrightnessFilter.m in Sources */, - 3477F92624D8C9133F3041A79491FA59 /* GPUImageBuffer.m in Sources */, - 3E63B4119CD44378A1093476E54E2474 /* GPUImageBulgeDistortionFilter.m in Sources */, - 7FB5C3196DB87FB6E92DABE225494BDC /* GPUImageCannyEdgeDetectionFilter.m in Sources */, - ED6CA2C4FFF084A9C6BC0C3058F2FC0E /* GPUImageCGAColorspaceFilter.m in Sources */, - C3D1B9C0AB90607D224B2440ADDDBF7D /* GPUImageChromaKeyBlendFilter.m in Sources */, - 1860650813D77F0191C8979285AEFC40 /* GPUImageChromaKeyFilter.m in Sources */, - C36D1358DE52DDFE9561872046B15CDA /* GPUImageClosingFilter.m in Sources */, - C8533435ED95323AD49B5ABA46309592 /* GPUImageColorBlendFilter.m in Sources */, - 2F71447BF395AFE0424A0173E1D3941B /* GPUImageColorBurnBlendFilter.m in Sources */, - 68BCD2A517C5CB6DF61FE1187DD63266 /* GPUImageColorDodgeBlendFilter.m in Sources */, - 8DF2798CBFBF2B27970A065636E5350C /* GPUImageColorInvertFilter.m in Sources */, - C1819B0277FEA363D59F734D9AD8AA4B /* GPUImageColorMatrixFilter.m in Sources */, - B129AF9904B49BDEBFA2CBE15CD8C832 /* GPUImageColorPackingFilter.m in Sources */, - 60CBB436C809283781907EA30C935F35 /* GPUImageContext.m in Sources */, - 93A3C001CF21FF9A011DBE76D08E6FD9 /* GPUImageContrastFilter.m in Sources */, - ED1F02433F3A912D677F43E1FF11A86D /* GPUImageCropFilter.m in Sources */, - 8E75885AC38F2FD27A93B5365669B7D1 /* GPUImageCrosshairGenerator.m in Sources */, - B8DBBA903BF381C26A07E80FB3B673F2 /* GPUImageCrosshatchFilter.m in Sources */, - 8230F51E5396B2EA356525E246B13E65 /* GPUImageDarkenBlendFilter.m in Sources */, - 4F9FCCD41B5DB358F6471868A7AF0FF8 /* GPUImageDifferenceBlendFilter.m in Sources */, - 90A044FA9883FAB9D1BC675A7BCCAD39 /* GPUImageDilationFilter.m in Sources */, - C0CE23B393799A65CB7626FED30D8B87 /* GPUImageDirectionalNonMaximumSuppressionFilter.m in Sources */, - E584CF8B9CA73334B373D6AEC20870CF /* GPUImageDirectionalSobelEdgeDetectionFilter.m in Sources */, - 694F36DE0A2C6B75B53CA842A09C450C /* GPUImageDissolveBlendFilter.m in Sources */, - 180A83B65E6DDB6EB746870CF41325A1 /* GPUImageDivideBlendFilter.m in Sources */, - B16B792802266C47B1C05A7938DB2FDD /* GPUImageEmbossFilter.m in Sources */, - 72DDDD2224AE6BE60BA942D9CF3856DF /* GPUImageErosionFilter.m in Sources */, - F240CA1217BACD2BA4C0B0EB15F62EF8 /* GPUImageExclusionBlendFilter.m in Sources */, - 43392130FF1BA22BCD40F201F94DF7C0 /* GPUImageExposureFilter.m in Sources */, - AC6FF619E5FDA1335F97C3C9E4C4276B /* GPUImageFalseColorFilter.m in Sources */, - 82844D6EFDF6891200BBCD3A4C9C54AB /* GPUImageFASTCornerDetectionFilter.m in Sources */, - DA13233E99DAD01F4F1CF918A1828173 /* GPUImageFilter.m in Sources */, - E3FDBC252DF4EE97EF2A47F9FD299138 /* GPUImageFilterGroup.m in Sources */, - 44B2A991A256252267B769DAE2328918 /* GPUImageFilterPipeline.m in Sources */, - 5F7E38F771E8D6181B8C72C5D8C10C14 /* GPUImageFramebuffer.m in Sources */, - 5107E16FCC65F65EC492836E724F0BFE /* GPUImageFramebufferCache.m in Sources */, - BBD0DCB580B12F696F7240575892FAA2 /* GPUImageGammaFilter.m in Sources */, - 0E7080397F8B5AE0B8A3D7AF280BB094 /* GPUImageGaussianBlurFilter.m in Sources */, - DB5CD837D88F4C0A6E260922756085EB /* GPUImageGaussianBlurPositionFilter.m in Sources */, - A7208F4AAB19736637ED7314D63F7D2E /* GPUImageGaussianSelectiveBlurFilter.m in Sources */, - E8D139B563E36F0BA0C9F5B2B20C75B1 /* GPUImageGlassSphereFilter.m in Sources */, - 3A8C1A0178B01AD26430FC5B130F5E0D /* GPUImageGrayscaleFilter.m in Sources */, - 6A92349242C40DAA199A7FB7C7ACDCC1 /* GPUImageHalftoneFilter.m in Sources */, - 69FC4C251095ED7B8667F599EE032BF9 /* GPUImageHardLightBlendFilter.m in Sources */, - 032FBF65C1B7C211B28D54B160B1612D /* GPUImageHarrisCornerDetectionFilter.m in Sources */, - 969CB0062DE1F74E8011E8AD2A79DD6A /* GPUImageHazeFilter.m in Sources */, - 436BC7F553DA755100A82BA0F05483D5 /* GPUImageHighlightShadowFilter.m in Sources */, - 7CAD51A1A08B950CEBA05C4DBA95DDA4 /* GPUImageHighPassFilter.m in Sources */, - 0BB1F971030D1518F9CF319E9D4DC1AD /* GPUImageHistogramEqualizationFilter.m in Sources */, - EAAE5E8238A63B075863D7007624DA43 /* GPUImageHistogramFilter.m in Sources */, - 4FCB792F4D09A7A6EC830F3F09E57E3E /* GPUImageHistogramGenerator.m in Sources */, - 8BFFBA9AD7ADDBA5B802F107161884F1 /* GPUImageHoughTransformLineDetector.m in Sources */, - 23AE0543B10B548DC5EA894199172600 /* GPUImageHSBFilter.m in Sources */, - 2D98C578934FC343F36EE6FE89BFDB11 /* GPUImageHueBlendFilter.m in Sources */, - DC4A074004FA5271EA709589DFCBEB15 /* GPUImageHueFilter.m in Sources */, - CDE62540A3FD2D838E06A3FCAB1EE58E /* GPUImageiOSBlurFilter.m in Sources */, - F2FD414ADEF65434E578A08DF0676F0D /* GPUImageJFAVoronoiFilter.m in Sources */, - A853401FDAA9E7088AD5028D09787374 /* GPUImageKuwaharaFilter.m in Sources */, - 87AF8CBBDCBB0C50612AB69D6D742742 /* GPUImageKuwaharaRadius3Filter.m in Sources */, - 3561CB57DDD73F8AFA84BF0E76ABB946 /* GPUImageLanczosResamplingFilter.m in Sources */, - F7DDEDD5401FF5E6458969FA7EC518F5 /* GPUImageLaplacianFilter.m in Sources */, - 83788DC3CB98DF8D12BB87500570D4FC /* GPUImageLevelsFilter.m in Sources */, - 8845BDFA0653F4E71762578DB183BCDB /* GPUImageLightenBlendFilter.m in Sources */, - 7CCCD7A77FF08770AD9EB67866E33E57 /* GPUImageLinearBurnBlendFilter.m in Sources */, - 47AD0E032FC7AA3EEB930742976CB88D /* GPUImageLineGenerator.m in Sources */, - 2280B1BE277126BD771028C12BD6A59E /* GPUImageLocalBinaryPatternFilter.m in Sources */, - 8CE29353E6184B70D568D3B99E94D149 /* GPUImageLookupFilter.m in Sources */, - 2A056E4E0CB5341CF83B2902850B496C /* GPUImageLowPassFilter.m in Sources */, - BC130E24128D66199EF316BA62B7FE30 /* GPUImageLuminanceRangeFilter.m in Sources */, - A834995186E9FE7D0150677B989DDD8B /* GPUImageLuminanceThresholdFilter.m in Sources */, - 6F1483002AE6E1A074656FE296A380DC /* GPUImageLuminosity.m in Sources */, - D3AF12B25881D1AAF4DE417F1D5407B9 /* GPUImageLuminosityBlendFilter.m in Sources */, - 24D5BD2976FC932DE4ADAEB93A0479F6 /* GPUImageMaskFilter.m in Sources */, - A722D1944A6F15819EA75CAC4A65CD8D /* GPUImageMedianFilter.m in Sources */, - 0319334D0B9B8B673C0BAEAC13FFE1FB /* GPUImageMissEtikateFilter.m in Sources */, - 203ECB87C9B02B1B8BAAF78D8A62A1DE /* GPUImageMonochromeFilter.m in Sources */, - 28A79E1849CD533B44B7BEFEB7E23FCD /* GPUImageMosaicFilter.m in Sources */, - 55E840167C4D134B42027183FE12AA5F /* GPUImageMotionBlurFilter.m in Sources */, - 8372234603432285BBF01ED1A21DCF08 /* GPUImageMotionDetector.m in Sources */, - 35CBA794B313B0A704877F12F8D1ABFA /* GPUImageMovie.m in Sources */, - 4BA1A0406DD78FE4D11CF77A531CF5C3 /* GPUImageMovieComposition.m in Sources */, - AB11AF112E43D1FF1522A8844564CD74 /* GPUImageMovieWriter.m in Sources */, - 8FA19489C4BAAB00154C1E14F0692F3E /* GPUImageMultiplyBlendFilter.m in Sources */, - EB0DC31314035D14CF7D560816C5820A /* GPUImageNobleCornerDetectionFilter.m in Sources */, - C465BDCDDAD3B3CD57F1C64294A1533A /* GPUImageNonMaximumSuppressionFilter.m in Sources */, - 958FD4275823EA710C09035D28BC5BB6 /* GPUImageNormalBlendFilter.m in Sources */, - C0F421E2359654EEC935728ECFE098C8 /* GPUImageOpacityFilter.m in Sources */, - 76C328BA20BD9A30ECE8FC13577088CC /* GPUImageOpeningFilter.m in Sources */, - 8087873FCF7C582C567FBC9E7866FC00 /* GPUImageOutput.m in Sources */, - FC4B8B12DE32CC742444EC57C78E43BB /* GPUImageOverlayBlendFilter.m in Sources */, - 1EE8655B7099DFDF91AB09854A782014 /* GPUImageParallelCoordinateLineTransformFilter.m in Sources */, - 00986AC306A77F203295619535AF853F /* GPUImagePerlinNoiseFilter.m in Sources */, - 36C40AACF03A24A362EB39C429249959 /* GPUImagePicture+TextureSubimage.m in Sources */, - 67EE0DDBEB2517F5B04D04B93226A9BC /* GPUImagePicture.m in Sources */, - 16BEA757C13C39AF5F5FCDB143AF53A9 /* GPUImagePinchDistortionFilter.m in Sources */, - C38CB6D5CA3A24003E2314F3ED91BBA8 /* GPUImagePixellateFilter.m in Sources */, - DCDB85FBCE034BD943E4CAD37FE90B79 /* GPUImagePixellatePositionFilter.m in Sources */, - C90957CDE1F88C80D792F3CCBBBD86E7 /* GPUImagePoissonBlendFilter.m in Sources */, - 6FFCB41E003AD80298DCDC27CBD24248 /* GPUImagePolarPixellateFilter.m in Sources */, - 097C32010AB76B1FE9C162A2A1876ECE /* GPUImagePolkaDotFilter.m in Sources */, - A25BA1791E1B279225964FA5CB18271B /* GPUImagePosterizeFilter.m in Sources */, - 53C1EE743E9410FE7276FA94A236289F /* GPUImagePrewittEdgeDetectionFilter.m in Sources */, - 01C95E537574ABC59799352D0AD70028 /* GPUImageRawDataInput.m in Sources */, - 05C61347A8543E701B094D915BD5C838 /* GPUImageRawDataOutput.m in Sources */, - 19436D75D39F5FEC5CFC10989E8D21E7 /* GPUImageRGBClosingFilter.m in Sources */, - 75F2628186AF80E8B6B39E6A27F104A6 /* GPUImageRGBDilationFilter.m in Sources */, - 5934E71FD7CE977980F1F3E0FBB0589D /* GPUImageRGBErosionFilter.m in Sources */, - E9129B8F2C4716BB0E04A8AA7DF489ED /* GPUImageRGBFilter.m in Sources */, - 20E327AE2E71D49D773CD130992DCE16 /* GPUImageRGBOpeningFilter.m in Sources */, - EA2FCF7789C782BE597B4A462E5AC8D7 /* GPUImageSaturationBlendFilter.m in Sources */, - D90E2B61D12B3135282EC3264A4B6699 /* GPUImageSaturationFilter.m in Sources */, - F8A9EC123F285CCB4262D7419CB2F813 /* GPUImageScreenBlendFilter.m in Sources */, - 2AD9C4FEB3BDBD7AFABEFC1D2D16A04C /* GPUImageSepiaFilter.m in Sources */, - 7FA724745C6C17A6466F449C11EC81E9 /* GPUImageSharpenFilter.m in Sources */, - F06B38D5B6F52BE9B44E382F020D6B31 /* GPUImageShiTomasiFeatureDetectionFilter.m in Sources */, - F40E6B5DD24C45C5E16A11F8CB40482C /* GPUImageSingleComponentGaussianBlurFilter.m in Sources */, - CDCBBC093C8294D84332E954BD1A80E4 /* GPUImageSketchFilter.m in Sources */, - 463C05A520F9F187AA59A4532ED2DC98 /* GPUImageSmoothToonFilter.m in Sources */, - 19E2053A876C0F6A156C00BC10116E4B /* GPUImageSobelEdgeDetectionFilter.m in Sources */, - 5C176EB69346C558230FA62C8FF9445C /* GPUImageSoftEleganceFilter.m in Sources */, - 31D6CA90C42E5C93B586480348B000A3 /* GPUImageSoftLightBlendFilter.m in Sources */, - FD06FC7B591A78FD113F2D10FC51592E /* GPUImageSolidColorGenerator.m in Sources */, - AA3AEE471C21B1B2381CAAEA54557674 /* GPUImageSourceOverBlendFilter.m in Sources */, - 468E8582953579A3237E9B07A4290809 /* GPUImageSphereRefractionFilter.m in Sources */, - 35CB55CABE07087AB199A17790384536 /* GPUImageStillCamera.m in Sources */, - 8F87A31C7C5DCF2BFC9E7A9A9831DE3F /* GPUImageStretchDistortionFilter.m in Sources */, - 8A5D33655584772DCD0CF3C4EECCE0BA /* GPUImageSubtractBlendFilter.m in Sources */, - 75345833F7677B391F6B3AA4468CEA21 /* GPUImageSwirlFilter.m in Sources */, - FD3EAC5E0A791E73E27E422A197381BE /* GPUImageTextureInput.m in Sources */, - 0AEA27BF85DB689C14FB34D0FEBDB851 /* GPUImageTextureOutput.m in Sources */, - BE93BA2DA12D718619AAA3F8216D29F4 /* GPUImageThreeInputFilter.m in Sources */, - CC997265C47D1D37F34774F5E59DFCA2 /* GPUImageThresholdEdgeDetectionFilter.m in Sources */, - E73E4ED481B67985D7794448CA5DE53A /* GPUImageThresholdedNonMaximumSuppressionFilter.m in Sources */, - 942B26BBAD3D8D03EE64EADAA91984F4 /* GPUImageThresholdSketchFilter.m in Sources */, - 394A129E507245FF105966F376AB1C41 /* GPUImageTiltShiftFilter.m in Sources */, - 0CE8DDB17A7E7660B35605B8139FE3B3 /* GPUImageToneCurveFilter.m in Sources */, - 8194C101551A2584D8E3344E0FABD8F7 /* GPUImageToonFilter.m in Sources */, - D9EBD120B2572956219EB5E69C9987DB /* GPUImageTransformFilter.m in Sources */, - 3726AB2B00A42F73A0124907B9ACC3A9 /* GPUImageTwoInputCrossTextureSamplingFilter.m in Sources */, - 6AABC70C8EF035909F5A2D3DC6B5FA4A /* GPUImageTwoInputFilter.m in Sources */, - 7385628E7B625A9614D3044DE5AC3385 /* GPUImageTwoPassFilter.m in Sources */, - D5A4349BFFC852AA31E14DFB14A47976 /* GPUImageTwoPassTextureSamplingFilter.m in Sources */, - D0D36AA4AD8C0D0B5D667B37FE3F9EF2 /* GPUImageUIElement.m in Sources */, - A10B6F1BD9FC2A0A3BD16B0CA7951F83 /* GPUImageUnsharpMaskFilter.m in Sources */, - CBC2808292742C287F16EC38D82C57EB /* GPUImageVideoCamera.m in Sources */, - CE8EAEC4550BF203A6D4A25FB8FF772F /* GPUImageView.m in Sources */, - 4478C2AC2D38DD361F0F23A0C5B79C41 /* GPUImageVignetteFilter.m in Sources */, - D9742F495FB317A0EDED886CDEC37049 /* GPUImageVoronoiConsumerFilter.m in Sources */, - 16B07BF8A572D2B926D42CEB9A6491ED /* GPUImageWeakPixelInclusionFilter.m in Sources */, - 2702708CF3F7B8F8C71CD04CE0E0407B /* GPUImageWhiteBalanceFilter.m in Sources */, - 89360CB1E03A04FD4E4E35444535B5CB /* GPUImageXYDerivativeFilter.m in Sources */, - 39A315F02A4702D5670CB93A5C9BEEEA /* GPUImageZoomBlurFilter.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 497AEDBF5B0106E2A52E8E23D0174346 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - CA07E0D65A9F569E68A647D3A422C028 /* _YYWebImageSetter.m in Sources */, - 2607BC411D43A5440E53234F8AB482C8 /* CALayer+YYWebImage.m in Sources */, - 6BA2489921F50583559CC1BB13DB8B42 /* MKAnnotationView+YYWebImage.m in Sources */, - B893623350B4E001365E48E0AC5D1F91 /* UIButton+YYWebImage.m in Sources */, - FB62EF85A3768A158924A4FB8D21E7E4 /* UIImage+YYWebImage.m in Sources */, - F961EFDD9E3144F2F28EF4702C201F0A /* UIImageView+YYWebImage.m in Sources */, - FFB553681052A094EA7516D46F2A8C9C /* YYImageCache.m in Sources */, - A2EA584895A489FC00301707BF956355 /* YYWebImage-dummy.m in Sources */, - B80DB3332DCA3B96D6208277A30E39F1 /* YYWebImageManager.m in Sources */, - 0172B10DE456AE5736FD887F0CEB74AF /* YYWebImageOperation.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6D7D6FBD36BACF23BD0601611C1ED139 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C33E9361A533400A28DEE54586144691 /* Pods-DarkMode-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8C28688BF2BD730285E2F5DE30F8C021 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63F87C318437740E8202E4D3DD0826FA /* MASCompositeConstraint.m in Sources */, - EE936A6838005A5ED1BC5F74BE37B7BD /* MASConstraint.m in Sources */, - 1E5D56FF58658F9F45723CA2940489EE /* MASConstraintMaker.m in Sources */, - 0096B5A8BA8E4F2BFD8839D0FE7CD696 /* MASLayoutConstraint.m in Sources */, - D72EE0E749232B2C899702FC1C9402BB /* Masonry-dummy.m in Sources */, - A893FFB0F9137E298D6752729850D1D6 /* MASViewAttribute.m in Sources */, - 572D05B146EAA3EF5530A0D0E34904A0 /* MASViewConstraint.m in Sources */, - B946AFB1A725D85E07F645A7EF086383 /* NSArray+MASAdditions.m in Sources */, - 59EA578EED8BAC126FDC60C32AE11521 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */, - C7920681F0164686C56327ED3C6AAC58 /* View+MASAdditions.m in Sources */, - C05FC6699632FE712174ED875A605410 /* ViewController+MASAdditions.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B0EE8786489CEC81AF58B7FA5377C830 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 596D6C47B56C81DAAF4AEFD6EBE90E4E /* YYAnimatedImageView.m in Sources */, - 83A21AF2AA24EC617540C8FBDADA56CF /* YYFrameImage.m in Sources */, - 54A44219E060C802B200A9A82B8F403C /* YYImage-dummy.m in Sources */, - 1646382FCB4B9AE1130EC8ACEDA90598 /* YYImage.m in Sources */, - 443DCC9EACB122059801B326E959DD2D /* YYImageCoder.m in Sources */, - 7A67C46F6E32AA2E17FC8CC92649971D /* YYSpriteSheetImage.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 0DB5F8867746B672CEAD27163C3A794E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = YYImage; - target = 822E44240F2922DAB12018A6B649BD19 /* YYImage */; - targetProxy = 65906679C3DF4C10CE5279E1C83FA340 /* PBXContainerItemProxy */; - }; - 19F4913477DF26E22CE907F59DE01F7C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = MBProgressHUD; - target = 82B0A41D3031FF27D78E17B0A9A46FB0 /* MBProgressHUD */; - targetProxy = E2F7E2998162B148B91D328B73DF9F38 /* PBXContainerItemProxy */; - }; - 1D8CCC89F051C17D14E3B38FC8B47808 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = GPUImage; - target = DB13B1641D72A72D8C9AE53FF81C8950 /* GPUImage */; - targetProxy = 5BB5B7F8294D2A559BA5BED33BAE2C7B /* PBXContainerItemProxy */; - }; - 1FC26DA76AAA17813ECD410079A19A5B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = YYImage; - target = 822E44240F2922DAB12018A6B649BD19 /* YYImage */; - targetProxy = 6E7A69E1F8BD32917A845DD8C233CA82 /* PBXContainerItemProxy */; - }; - 22BFB162E190FA1451BD5D0F35603F44 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = YYWebImage; - target = 488E8C830C5A5694EE916251B9ADAADA /* YYWebImage */; - targetProxy = 11065683D1DF6005F9525BBA539466D7 /* PBXContainerItemProxy */; - }; - 2A49221EA0E5571525EE3FC82BF5E3A9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Masonry; - target = 55AF53E6C77A10ED4985E04D74A8878E /* Masonry */; - targetProxy = 817CD8DC71FA3B7C4B131536ECA0F1D0 /* PBXContainerItemProxy */; - }; - 5CD3D5F636E39C63FEABB144679F396F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = YYModel; - target = 84B44807A12996D487A4A591A481D6A0 /* YYModel */; - targetProxy = AAC877F66336AAF9D915F41F63451BF2 /* PBXContainerItemProxy */; - }; - 61F8A9F2C5108EA5AC01D0AC156FD910 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = YYCache; - target = CFDAE6EB02F58B9A37CADCF439AE6082 /* YYCache */; - targetProxy = 0E525382322D144157FE54A2F8279ED0 /* PBXContainerItemProxy */; - }; - D1104BEDA54FA285BE2839DED718F805 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = YYCache; - target = CFDAE6EB02F58B9A37CADCF439AE6082 /* YYCache */; - targetProxy = 41577B33D18B0277BCC25CF6A140DEDD /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 0C8033609421B8522D89050AB6716743 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D91BF331AAA5E77D9BEDA9C6D40DD41E /* MBProgressHUD.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/MBProgressHUD/MBProgressHUD-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = MBProgressHUD; - PRODUCT_NAME = MBProgressHUD; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 110F69768B51A32FCF8FB258C2035420 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E388169E7433BC6A1E766BB6E2C53605 /* MBProgressHUD.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/MBProgressHUD/MBProgressHUD-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = MBProgressHUD; - PRODUCT_NAME = MBProgressHUD; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 196DFA3E4A09A28224918543529A1885 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - 1D61CD432BA357545CE20DC1DD4F212A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 446D6F21C19F21359994D8C61A378A84 /* YYImage.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/YYImage/YYImage-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = YYImage; - PRODUCT_NAME = YYImage; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 422D381F3D66E68EA4A8140685BA919C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 16C4DC343FBAC71D13FF4FA9BCE10709 /* Pods-DarkMode.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MACH_O_TYPE = staticlib; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 48320E0430104EE330CB43EB638D8EFC /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5DA7010E9B001189E58C1D4FAF928DF7 /* YYCache.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/YYCache/YYCache-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = YYCache; - PRODUCT_NAME = YYCache; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 60212691106A7430DFE5F00513842211 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4713F7EF42A07902267E6A57EBC07D50 /* YYCache.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/YYCache/YYCache-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = YYCache; - PRODUCT_NAME = YYCache; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 8AEEA5CC30001CB70A788717A32DBAB7 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3FFF18D3BD6B92729084311D3FD98998 /* Masonry.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/Masonry/Masonry-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = Masonry; - PRODUCT_NAME = Masonry; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97EDEBBA2A6FA148475697D9A7553A29 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5F8F677D95958C9F3D7EA1F6761CD291 /* YYImage.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/YYImage/YYImage-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = YYImage; - PRODUCT_NAME = YYImage; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - B01D14FDC83DCF9D4BE53066BEA96D05 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - B1F46ABE2AE6830CD7251657FBB06711 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5278FBF2D16D0E9492F81D50E1B4E389 /* GPUImage.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/GPUImage/GPUImage-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = GPUImage; - PRODUCT_NAME = GPUImage; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - DCCA02CF7503BD7258D5F7FF1C813190 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = CA6014EF6AE8930707D68E71ECA55D13 /* Pods-DarkMode.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MACH_O_TYPE = staticlib; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - E2FADAB2C8188790937CE35BD9000F26 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FC1BB8206A536BE18D03949E8E9E8D59 /* YYModel.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/YYModel/YYModel-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = YYModel; - PRODUCT_NAME = YYModel; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - E7A52D7D06FF60DB10CBC15785828BFA /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BE1BD7513325F0024AB5F0B2AA5B5308 /* YYModel.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/YYModel/YYModel-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = YYModel; - PRODUCT_NAME = YYModel; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - EF692C7BD110D4D561D132828EA67F5A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5AF9D53BF78794179DA5A171FD200059 /* YYWebImage.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/YYWebImage/YYWebImage-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = YYWebImage; - PRODUCT_NAME = YYWebImage; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - EFB35AA5E69F3509E6056504B3FDC11A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = CC511945A3B6F15907655303FBD595CC /* YYWebImage.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/YYWebImage/YYWebImage-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = YYWebImage; - PRODUCT_NAME = YYWebImage; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - F04C5B8FBC233D0EC8789CF3767459DD /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 504C0F55ECD0EE366A432BE3CAF79E1F /* GPUImage.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/GPUImage/GPUImage-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = GPUImage; - PRODUCT_NAME = GPUImage; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - F99870D874C7FA838E84D9C55C010CF1 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FF365ED840058D960082D2B982FA9D49 /* Masonry.debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/Masonry/Masonry-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = Masonry; - PRODUCT_NAME = Masonry; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 07475BFF49F618F9523EA1A2F1925CD1 /* Build configuration list for PBXNativeTarget "YYModel" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E7A52D7D06FF60DB10CBC15785828BFA /* Debug */, - E2FADAB2C8188790937CE35BD9000F26 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0B9F7EAACDDA564EC328F53A4AB8CF85 /* Build configuration list for PBXNativeTarget "Masonry" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F99870D874C7FA838E84D9C55C010CF1 /* Debug */, - 8AEEA5CC30001CB70A788717A32DBAB7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 20217F7F18136BEC6503B8147352D3E3 /* Build configuration list for PBXNativeTarget "MBProgressHUD" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 110F69768B51A32FCF8FB258C2035420 /* Debug */, - 0C8033609421B8522D89050AB6716743 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 3F177AA52C1CC43535F1A9DCF3B78737 /* Build configuration list for PBXNativeTarget "YYWebImage" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EF692C7BD110D4D561D132828EA67F5A /* Debug */, - EFB35AA5E69F3509E6056504B3FDC11A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 196DFA3E4A09A28224918543529A1885 /* Debug */, - B01D14FDC83DCF9D4BE53066BEA96D05 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 8C17BE03124A4FF652DA36FB95BCEFD3 /* Build configuration list for PBXNativeTarget "Pods-DarkMode" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 422D381F3D66E68EA4A8140685BA919C /* Debug */, - DCCA02CF7503BD7258D5F7FF1C813190 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 8D1AB1D2CF4C258BC2DA0CC48A1F8CE5 /* Build configuration list for PBXNativeTarget "YYImage" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97EDEBBA2A6FA148475697D9A7553A29 /* Debug */, - 1D61CD432BA357545CE20DC1DD4F212A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - DF4E826F9DA37765B10F3D1B0EC4F9B2 /* Build configuration list for PBXNativeTarget "YYCache" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 48320E0430104EE330CB43EB638D8EFC /* Debug */, - 60212691106A7430DFE5F00513842211 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E9E74E2AD7CA08D9840C4895CF07BBC1 /* Build configuration list for PBXNativeTarget "GPUImage" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B1F46ABE2AE6830CD7251657FBB06711 /* Debug */, - F04C5B8FBC233D0EC8789CF3767459DD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; -} diff --git a/iOS_Tips/Pods/Target Support Files/FBRetainCycleDetector/FBRetainCycleDetector-dummy.m b/iOS_Tips/Pods/Target Support Files/FBRetainCycleDetector/FBRetainCycleDetector-dummy.m deleted file mode 100644 index a9532e12..00000000 --- a/iOS_Tips/Pods/Target Support Files/FBRetainCycleDetector/FBRetainCycleDetector-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_FBRetainCycleDetector : NSObject -@end -@implementation PodsDummy_FBRetainCycleDetector -@end diff --git a/iOS_Tips/Pods/Target Support Files/FBRetainCycleDetector/FBRetainCycleDetector-prefix.pch b/iOS_Tips/Pods/Target Support Files/FBRetainCycleDetector/FBRetainCycleDetector-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/iOS_Tips/Pods/Target Support Files/FBRetainCycleDetector/FBRetainCycleDetector-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/iOS_Tips/Pods/Target Support Files/FBRetainCycleDetector/FBRetainCycleDetector.xcconfig b/iOS_Tips/Pods/Target Support Files/FBRetainCycleDetector/FBRetainCycleDetector.xcconfig deleted file mode 100644 index f3b8c001..00000000 --- a/iOS_Tips/Pods/Target Support Files/FBRetainCycleDetector/FBRetainCycleDetector.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FBRetainCycleDetector -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FBRetainCycleDetector" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FBRetainCycleDetector" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBRetainCycleDetector -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage-dummy.m b/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage-dummy.m deleted file mode 100644 index 92f4a7d4..00000000 --- a/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_GPUImage : NSObject -@end -@implementation PodsDummy_GPUImage -@end diff --git a/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage-prefix.pch b/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage.debug.xcconfig b/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage.debug.xcconfig deleted file mode 100644 index 3ac67a44..00000000 --- a/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage.debug.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -CLANG_MODULES_AUTOLINK = YES -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GPUImage -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/GPUImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GPUImage" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/GPUImage -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage.release.xcconfig b/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage.release.xcconfig deleted file mode 100644 index 3ac67a44..00000000 --- a/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage.release.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -CLANG_MODULES_AUTOLINK = YES -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GPUImage -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/GPUImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GPUImage" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/GPUImage -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage.xcconfig b/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage.xcconfig deleted file mode 100644 index 3ac67a44..00000000 --- a/iOS_Tips/Pods/Target Support Files/GPUImage/GPUImage.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -CLANG_MODULES_AUTOLINK = YES -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GPUImage -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/GPUImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GPUImage" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/GPUImage -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD-dummy.m b/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD-dummy.m deleted file mode 100644 index 67a74df2..00000000 --- a/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_MBProgressHUD : NSObject -@end -@implementation PodsDummy_MBProgressHUD -@end diff --git a/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD-prefix.pch b/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD.debug.xcconfig b/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD.debug.xcconfig deleted file mode 100644 index 56d33257..00000000 --- a/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD.debug.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MBProgressHUD" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/MBProgressHUD -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD.release.xcconfig b/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD.release.xcconfig deleted file mode 100644 index 56d33257..00000000 --- a/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD.release.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MBProgressHUD" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/MBProgressHUD -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD.xcconfig b/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD.xcconfig deleted file mode 100644 index 56d33257..00000000 --- a/iOS_Tips/Pods/Target Support Files/MBProgressHUD/MBProgressHUD.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MBProgressHUD" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MBProgressHUD" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/MBProgressHUD -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iOS_Tips/Pods/Target Support Files/MLeaksFinder/MLeaksFinder-dummy.m b/iOS_Tips/Pods/Target Support Files/MLeaksFinder/MLeaksFinder-dummy.m deleted file mode 100644 index f1aa9d0c..00000000 --- a/iOS_Tips/Pods/Target Support Files/MLeaksFinder/MLeaksFinder-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_MLeaksFinder : NSObject -@end -@implementation PodsDummy_MLeaksFinder -@end diff --git a/iOS_Tips/Pods/Target Support Files/MLeaksFinder/MLeaksFinder-prefix.pch b/iOS_Tips/Pods/Target Support Files/MLeaksFinder/MLeaksFinder-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/iOS_Tips/Pods/Target Support Files/MLeaksFinder/MLeaksFinder-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/iOS_Tips/Pods/Target Support Files/MLeaksFinder/MLeaksFinder.xcconfig b/iOS_Tips/Pods/Target Support Files/MLeaksFinder/MLeaksFinder.xcconfig deleted file mode 100644 index 3ae6aa07..00000000 --- a/iOS_Tips/Pods/Target Support Files/MLeaksFinder/MLeaksFinder.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MLeaksFinder -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MLeaksFinder" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FBRetainCycleDetector" "${PODS_ROOT}/Headers/Public/MLeaksFinder" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/MLeaksFinder -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iOS_Tips/Pods/Target Support Files/Masonry/Masonry-dummy.m b/iOS_Tips/Pods/Target Support Files/Masonry/Masonry-dummy.m deleted file mode 100644 index 04001b1a..00000000 --- a/iOS_Tips/Pods/Target Support Files/Masonry/Masonry-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Masonry : NSObject -@end -@implementation PodsDummy_Masonry -@end diff --git a/iOS_Tips/Pods/Target Support Files/Masonry/Masonry-prefix.pch b/iOS_Tips/Pods/Target Support Files/Masonry/Masonry-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/iOS_Tips/Pods/Target Support Files/Masonry/Masonry-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/iOS_Tips/Pods/Target Support Files/Masonry/Masonry.debug.xcconfig b/iOS_Tips/Pods/Target Support Files/Masonry/Masonry.debug.xcconfig deleted file mode 100644 index d8408858..00000000 --- a/iOS_Tips/Pods/Target Support Files/Masonry/Masonry.debug.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iOS_Tips/Pods/Target Support Files/Masonry/Masonry.release.xcconfig b/iOS_Tips/Pods/Target Support Files/Masonry/Masonry.release.xcconfig deleted file mode 100644 index d8408858..00000000 --- a/iOS_Tips/Pods/Target Support Files/Masonry/Masonry.release.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-acknowledgements.markdown b/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-acknowledgements.markdown deleted file mode 100644 index f376b042..00000000 --- a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-acknowledgements.markdown +++ /dev/null @@ -1,164 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## GPUImage - -Copyright (c) 2012, Brad Larson, Ben Cochran, Hugues Lismonde, Keitaroh Kobayashi, Alaric Cole, Matthew Clark, Jacob Gundersen, Chris Williams. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -Neither the name of the GPUImage framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -## MBProgressHUD - -Copyright © 2009-2016 Matej Bukovinski - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -## Masonry - -Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -## YYCache - -The MIT License (MIT) - -Copyright (c) 2015 ibireme - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -## YYImage - -The MIT License (MIT) - -Copyright (c) 2015 ibireme - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -## YYModel - -The MIT License (MIT) - -Copyright (c) 2015 ibireme - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -## YYWebImage - -The MIT License (MIT) - -Copyright (c) 2015 ibireme - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -Generated by CocoaPods - https://cocoapods.org diff --git a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-acknowledgements.plist b/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-acknowledgements.plist deleted file mode 100644 index c9a3f5e1..00000000 --- a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-acknowledgements.plist +++ /dev/null @@ -1,232 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2012, Brad Larson, Ben Cochran, Hugues Lismonde, Keitaroh Kobayashi, Alaric Cole, Matthew Clark, Jacob Gundersen, Chris Williams. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -Neither the name of the GPUImage framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - License - BSD - Title - GPUImage - Type - PSGroupSpecifier - - - FooterText - Copyright © 2009-2016 Matej Bukovinski - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - License - MIT - Title - MBProgressHUD - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - License - MIT - Title - Masonry - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2015 ibireme <ibireme@gmail.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - License - MIT - Title - YYCache - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2015 ibireme <ibireme@gmail.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - License - MIT - Title - YYImage - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2015 ibireme <ibireme@gmail.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - License - MIT - Title - YYModel - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2015 ibireme <ibireme@gmail.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - License - MIT - Title - YYWebImage - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-dummy.m b/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-dummy.m deleted file mode 100644 index 5c9082c5..00000000 --- a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_DarkMode : NSObject -@end -@implementation PodsDummy_Pods_DarkMode -@end diff --git a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources-Debug-input-files.xcfilelist b/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources-Debug-input-files.xcfilelist deleted file mode 100644 index 23eccc39..00000000 --- a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources-Debug-input-files.xcfilelist +++ /dev/null @@ -1,6 +0,0 @@ -${PODS_ROOT}/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources.sh -${PODS_ROOT}/GPUImage/framework/Resources/lookup.png -${PODS_ROOT}/GPUImage/framework/Resources/lookup_amatorka.png -${PODS_ROOT}/GPUImage/framework/Resources/lookup_miss_etikate.png -${PODS_ROOT}/GPUImage/framework/Resources/lookup_soft_elegance_1.png -${PODS_ROOT}/GPUImage/framework/Resources/lookup_soft_elegance_2.png \ No newline at end of file diff --git a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources-Debug-output-files.xcfilelist b/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources-Debug-output-files.xcfilelist deleted file mode 100644 index e845b86c..00000000 --- a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources-Debug-output-files.xcfilelist +++ /dev/null @@ -1,5 +0,0 @@ -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/lookup.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/lookup_amatorka.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/lookup_miss_etikate.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/lookup_soft_elegance_1.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/lookup_soft_elegance_2.png \ No newline at end of file diff --git a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources-Release-input-files.xcfilelist b/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources-Release-input-files.xcfilelist deleted file mode 100644 index 23eccc39..00000000 --- a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources-Release-input-files.xcfilelist +++ /dev/null @@ -1,6 +0,0 @@ -${PODS_ROOT}/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources.sh -${PODS_ROOT}/GPUImage/framework/Resources/lookup.png -${PODS_ROOT}/GPUImage/framework/Resources/lookup_amatorka.png -${PODS_ROOT}/GPUImage/framework/Resources/lookup_miss_etikate.png -${PODS_ROOT}/GPUImage/framework/Resources/lookup_soft_elegance_1.png -${PODS_ROOT}/GPUImage/framework/Resources/lookup_soft_elegance_2.png \ No newline at end of file diff --git a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources-Release-output-files.xcfilelist b/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources-Release-output-files.xcfilelist deleted file mode 100644 index e845b86c..00000000 --- a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources-Release-output-files.xcfilelist +++ /dev/null @@ -1,5 +0,0 @@ -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/lookup.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/lookup_amatorka.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/lookup_miss_etikate.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/lookup_soft_elegance_1.png -${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/lookup_soft_elegance_2.png \ No newline at end of file diff --git a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources.sh b/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources.sh deleted file mode 100755 index 07a29283..00000000 --- a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode-resources.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -function on_error { - echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" -} -trap 'on_error $LINENO' ERR - -if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then - # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy - # resources to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -case "${TARGETED_DEVICE_FAMILY:-}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" || true - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_resource "${PODS_ROOT}/GPUImage/framework/Resources/lookup.png" - install_resource "${PODS_ROOT}/GPUImage/framework/Resources/lookup_amatorka.png" - install_resource "${PODS_ROOT}/GPUImage/framework/Resources/lookup_miss_etikate.png" - install_resource "${PODS_ROOT}/GPUImage/framework/Resources/lookup_soft_elegance_1.png" - install_resource "${PODS_ROOT}/GPUImage/framework/Resources/lookup_soft_elegance_2.png" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_resource "${PODS_ROOT}/GPUImage/framework/Resources/lookup.png" - install_resource "${PODS_ROOT}/GPUImage/framework/Resources/lookup_amatorka.png" - install_resource "${PODS_ROOT}/GPUImage/framework/Resources/lookup_miss_etikate.png" - install_resource "${PODS_ROOT}/GPUImage/framework/Resources/lookup_soft_elegance_1.png" - install_resource "${PODS_ROOT}/GPUImage/framework/Resources/lookup_soft_elegance_2.png" -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find -L "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - else - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" - fi -fi diff --git a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode.debug.xcconfig b/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode.debug.xcconfig deleted file mode 100644 index 15aeb0bf..00000000 --- a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode.debug.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CLANG_MODULES_AUTOLINK = YES -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GPUImage" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/YYCache" "${PODS_ROOT}/Headers/Public/YYImage" "${PODS_ROOT}/Headers/Public/YYModel" "${PODS_ROOT}/Headers/Public/YYWebImage" -LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GPUImage" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/YYCache" "${PODS_CONFIGURATION_BUILD_DIR}/YYImage" "${PODS_CONFIGURATION_BUILD_DIR}/YYModel" "${PODS_CONFIGURATION_BUILD_DIR}/YYWebImage" -OTHER_LDFLAGS = $(inherited) -ObjC -l"GPUImage" -l"MBProgressHUD" -l"Masonry" -l"YYCache" -l"YYImage" -l"YYModel" -l"YYWebImage" -l"sqlite3" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AssetsLibrary" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreMedia" -framework "Foundation" -framework "ImageIO" -framework "MobileCoreServices" -framework "OpenGLES" -framework "QuartzCore" -framework "UIKit" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode.release.xcconfig b/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode.release.xcconfig deleted file mode 100644 index 15aeb0bf..00000000 --- a/iOS_Tips/Pods/Target Support Files/Pods-DarkMode/Pods-DarkMode.release.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CLANG_MODULES_AUTOLINK = YES -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GPUImage" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/YYCache" "${PODS_ROOT}/Headers/Public/YYImage" "${PODS_ROOT}/Headers/Public/YYModel" "${PODS_ROOT}/Headers/Public/YYWebImage" -LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/GPUImage" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/YYCache" "${PODS_CONFIGURATION_BUILD_DIR}/YYImage" "${PODS_CONFIGURATION_BUILD_DIR}/YYModel" "${PODS_CONFIGURATION_BUILD_DIR}/YYWebImage" -OTHER_LDFLAGS = $(inherited) -ObjC -l"GPUImage" -l"MBProgressHUD" -l"Masonry" -l"YYCache" -l"YYImage" -l"YYModel" -l"YYWebImage" -l"sqlite3" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AssetsLibrary" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreMedia" -framework "Foundation" -framework "ImageIO" -framework "MobileCoreServices" -framework "OpenGLES" -framework "QuartzCore" -framework "UIKit" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES