Added frameInterval ivar to allow for the skipping of frames when live blurring is in effect.
Added workaround to avoid crashing when the superview's superlayer isn't on screen, the superview is part of the current view hierarchy, and we're attempting to change frame/bounds/center. This can be removed when we migrate to a CALayer subclass for 2.0.
Use NSUInteger instead of uint_fast32_t, as the generated assembly is identical and NSUInteger is a more familiar type to ObjC developers.
Missed one instance of uint_fast32_t from before
Check the window instead of the superview's superlayer for a smarter workaround. If the window ivar is set, then we know that there should be a layer tree that we can render to a bitmap.
Cleaner solution, monitoring the status of self.window through UIView callbacks to determine when it is safe to blur.
Spacing
More spacing woes resolved.
Cover case where LFGlassView's window ivar is set to nil, which happens when one of its parent views is removed from a view tree associated with a UIWindow object and _not_ immediately added to another view tree with a UIWindow object. (For instance, with -removeFromSuperview)
Added -blurIfPossible instance method to blur once even when the -liveBlurring property is set to NO
Check for NOT empty
Rearranged properties in header file
Changed method name to 'blurOnceIfPossible', to avoid confusion and distinguish it further from live blurring.
Don't start blurring when the window is present; there's an interesting issue that happens where -renderInContext: fails and eventually crashes the app if we call it immediately within -didMoveToWindow, but not before or after that.
Start live blurring in layoutSubviews to compensate for the lack of ability to start live blurring when the window ivar changes to a non-nil reference.
Check for the presentationLayer in -blurOnceIfPossible. As this returns a _copy_ of a CALayer object, this is not something I want to check in -refresh, but for a one-time blur, it's alright.
Remove the check for the window and superview ivars in -blurOnceIfPossible. Verifying -presentationLayer takes care of that.
Remove the -removeFromSuperview implementation, as checking the window ivar in -didMoveToWindow does the same job but better.
Avoid calling -recreateImageBuffers when we don't need it.
Got around the issue where a -renderInContext: call would be delayed when the LFGlassView's window would change by retaining the CGContexts before -renderInContext: is called. This delay would cause the CGContext used by -renderInContext: to potentially expire when a method like -setFrame:, -setBounds or -setCenter: would release the original context and add a new one in its place.