CALayer.compositingFilter works on ObjectiveC but not in swift
<p>Some swift code below, they are both clean projects, the ObjC code works, the swift code doesn't? identical as far as I can see, but failing under swift. The images display but the filter isn't applied in the swift one, works fine in the objC (OS X 10.11.3 Swift 2.2 Xcode 7.3)</p>

<pre><code>import Foundation
import Cocoa

class MyView : NSView {
    let layer1 = CALayer()
    let layer2 = CALayer()
    let filter = CIFilter(name: "CILuminosityBlendMode")

    override func awakeFromNib() {

            wantsLayer = true

            layer!.addSublayer(layer1)

            if let imageRef = NSImage(named: "Back.jpg")
            {
                layer1.contents = imageRef
                layer1.anchorPoint = CGPointMake(0, 0)
                layer1.bounds = CGRectMake(0,0, imageRef.size.width, imageRef.size.height);
            }


            layer!.addSublayer(layer2)
            if let imageRef = NSImage(named: "Front.jpg")
            {
                layer2.contents = imageRef
                layer2.anchorPoint = CGPointMake(0, 0)
                layer2.bounds = CGRectMake(0,0, imageRef.size.width, imageRef.size.height);
            }

            layerUsesCoreImageFilters = true
            layer2.compositingFilter = [filter!]

    }

}
</code></pre>

<p>Some ObjC code</p>

<p>the MyView.h file</p>

<pre><code>@interface MyView : NSView {

    CALayer*    backLayer;
    CALayer*    frontLayer;

}
</code></pre>

<p>and the MyView.m</p>

<pre><code>#import &lt;Foundation/Foundation.h&gt;
#import "MyView.H"
#import &lt;QuartzCore/QuartzCore.h&gt;

@implementation MyView

- (void)awakeFromNib {

    [self setWantsLayer:YES];

    backLayer   = [CALayer layer];
    [self.layer addSublayer:backLayer];


    NSImage *nsimage = [NSImage imageNamed: @"Back.jpg"];
    backLayer.contents = nsimage;
    backLayer.anchorPoint = CGPointMake(0, 0);
    backLayer.bounds = CGRectMake(0,0, nsimage.size.width, nsimage.size.height);


    frontLayer  = [CALayer layer];
    [self.layer addSublayer:frontLayer];

    nsimage = [NSImage imageNamed: @"Front.jpg"];
    frontLayer.contents = nsimage;
    frontLayer.anchorPoint = CGPointMake(0, 0);
    frontLayer.bounds = CGRectMake(0,0, nsimage.size.width, nsimage.size.height);

    [self setLayerUsesCoreImageFilters:YES];

    CIFilter* filter = [CIFilter filterWithName:@"CILuminosityBlendMode"];
    frontLayer.compositingFilter = filter;
}
@end
</code></pre>