kangax/fabric.js — pull request #1497 by wuboy0307 (2014-07-17 23:18:20+00:00)
Title: apply filter function to fabric canvas

Since fabric canvas itself is also a valid canvas, we can easily apply filter function with fabric.Image.filters klasses. However, if applying filters all the time may cause performance issue due to lots of pixel manipulating. I also add a flag "isApplyFilter" to determine whether to apply filters (I believe there would be better solution. Maybe only apply filter when release canvas object? binding to onMouseUp?).
```
var canvas = new fabric.Canvas(htmlCanvas);
canvas.filters = [new fabric.Image.filters.Brightness({brightness: 200}), new fabric.Image.filters.Grayscale()];
canvas.previewFilter();
```