Michael Schneider
f18c250f3e
Merge branch 'master' into feature/osx-support
2016-01-30 16:33:15 -08:00
Garrett Moon
bcb0bd9fc2
Allow maximum progressive render size to be set
2016-01-25 10:53:29 -08:00
Garrett Moon
f8671046d0
Return if radius will be less than FLT_EPSILON
2016-01-25 10:31:07 -08:00
Garrett Moon
1ee0d2563a
cleanup
2016-01-25 10:31:07 -08:00
Garrett Moon
38436d021a
Remove unneeded notification removal
2016-01-25 10:31:07 -08:00
Garrett Moon
c98d5626f2
Switch to Accelerate for blurring
...
Core Image crashes were still showing up in our stack traces
even after many speculative fixes. Lets see if accelerate does
better.
2016-01-25 10:31:07 -08:00
Garrett Moon
873e26a183
Allow blurring of progressive to be disabled
2016-01-22 14:14:17 -08:00
Garrett Moon
561251adb9
After continually seeing crashes on createCGImage:fromRect: I'm ready
...
to try some speculative fixes. This moves the rendering to a serial queue
A bit disappointing, this will be reverted if it doesn't address the crashes.
If it does… well, we'll have more to work on.
2016-01-19 12:38:37 -08:00
Michael Schneider
8df9dc00c6
Add support for OS X to library
...
Mapping generic classes like PINImage, PINImageView and PINButton to the equivalent UIKit or AppKit classes. Throughout the framework use these mappings instead of the concrete UIKit / AppKit names. Furthermore we provide a category on NSImage that is adding methods that are not available on NSImage but on UIImage.
2016-01-04 17:39:50 +01:00
Garrett Moon
b7cace0802
Revert "use NS_EXTENSION_UNAVAILABLE_IOS instead of PIN_APP_EXTENSIONS"
...
This reverts commit 464bb1921c .
2015-12-14 14:34:27 -08:00
Garrett Moon
2271a04091
Merge pull request #108 from mRs-/NS_EXTENSION_UNAVAILABLE_IOS
...
use NS_EXTENSION_UNAVAILABLE_IOS instead of PIN_APP_EXTENSIONS
2015-12-09 10:24:54 -08:00
Marius Landwehr
464bb1921c
use NS_EXTENSION_UNAVAILABLE_IOS instead of PIN_APP_EXTENSIONS
2015-12-09 07:47:15 +01:00
Garrett Moon
77e3fe563a
Need to release image if returning
2015-12-05 14:18:47 -08:00
Garrett Moon
1bac095042
Remove decode for CI progressive images
...
Previously, I'd speculatively decoded images returned from the progressive CIContext
because I'd read that doing so would move the memory from the GPU to the CPU, hopefully
making drawing faster.
I decided to test this hypothesis and by drawing the un-'decoded' image and the image
directly returned from CIContext. Here are some results:
When decoded is drawn before regular
[22486:30240049] decoded - 'regular': 0.000263
[22486:30240097] decoded - 'regular': 0.000242
[22486:30240306] decoded - 'regular': 0.000092
[22486:30240068] decoded - 'regular': 0.000384
[22486:30240096] decoded - 'regular': 0.000111
[22486:30240074] decoded - 'regular': 0.000089
[22486:30240046] decoded - 'regular': 0.000273
[22486:30240351] decoded - 'regular': 0.000250
[22486:30240307] decoded - 'regular': 0.000313
[22486:30240308] decoded - 'regular': 0.000684
[22486:30240307] decoded - 'regular': 0.000485
[22486:30240069] decoded - 'regular': 0.002414
[22486:30240052] decoded - 'regular': 0.000397
[22486:30240049] decoded - 'regular': 0.000293
[22486:30240351] decoded - 'regular': 0.000145
When regular is drawn before decoded
[22610:30246046] decoded - 'regular': 0.000056
[22610:30246030] decoded - 'regular': 0.000473
[22610:30246029] decoded - 'regular': 0.000138
[22610:30246053] decoded - 'regular': 0.000387
[22610:30246030] decoded - 'regular': -0.000006
[22610:30246026] decoded - 'regular': 0.000714
[22610:30246034] decoded - 'regular': 0.000097
[22610:30246621] decoded - 'regular': 0.000039
[22610:30246024] decoded - 'regular': 0.000121
[22610:30246662] decoded - 'regular': -0.000090
[22610:30246030] decoded - 'regular': -0.000057
[22610:30246619] decoded - 'regular': 0.000443
[22610:30246033] decoded - 'regular': 0.001297
[22610:30246623] decoded - 'regular': -0.000020
[22610:30246057] decoded - 'regular': 0.001249
[22610:30246660] decoded - 'regular': 0.000208
[22610:30246659] decoded - 'regular': 0.000048
[22610:30246709] decoded - 'regular': -0.000327
[22610:30246027] decoded - 'regular': 0.000953
[22610:30246025] decoded - 'regular': 0.001228
[22610:30246659] decoded - 'regular': 0.001141
Decoding the image makes little difference and that the difference shows that
the 'decoded' image actually takes longer to draw.
So, we'll save memory and processing time by returning the CGImage from the
context directly as opposed to attempting to decode it.
2015-12-05 13:09:14 -08:00
Garrett Moon
d09f83379b
CIImage doesn't retain its CGImage :(
2015-11-24 11:42:17 -08:00
Garrett Moon
b52d4a867a
Improve readability
2015-11-20 18:11:23 -08:00
Garrett Moon
db588e49cc
Respect the maximum size of CIContexts
2015-11-20 18:04:01 -08:00
Garrett Moon
dc0458ff3e
So, uh,
...
+ (UIImage * _Nonnull)imageWithCGImage:(CGImageRef _Nonnull)cgImage
says it returns a non-nil value but documentation says:
Return Value
A new image object for the specified Quartz image, or nil if the method could not initialize the image from the specified image reference.
So we're guarding against a nil inputImage
2015-10-14 14:40:33 -07:00
Sam Dean
c0e74f10eb
Replace @import with #import
2015-09-30 14:39:13 +01:00
Garrett Moon
4ba0affc3f
[CIFilter outputImage] can return nil, [CIContext createCGImage:fromRect:] requires a non-nil CIImage as input.
2015-09-28 17:00:16 -07:00
Garrett Moon
99b34850c7
Context should be nil'd before image source
2015-08-01 09:28:07 -07:00
Jon Parise
38d9f8e3c9
Name our locks.
2015-07-29 14:43:23 -07:00
Zev Eisenberg
c9f1796b3f
Prefix category methods.
2015-07-27 17:57:37 -04:00
Jared Sinclair
8dc2c2a4f5
fix(imports): change to module imports where relevant
2015-07-26 18:25:56 -04:00
Garrett Moon
9d2bd31f95
1.0
2015-07-22 17:29:31 -07:00