GoodBoyDigital/pixi.js — pull request #378 by englercj (2013-10-27 00:02:36+00:00)
Title: Enable per-texture scale filtering

Bringing this back up, I figure if we cache the last smoothing value we can make it switch smoothing only when necessary. Since it is likely that many applications will only use one scale mode (either nearest or linear) you can set the default mode to use:

```js
PIXI.Texture.SCALE_MODE.DEFAULT = PIXI.Texture.SCALE_MODE.NEAREST;
```

This will make all textures created *after this value is set* have the `NEAREST` scale mode enabled. This works because the `.scaleMode` property of textures is set to `PIXI.Texture.SCALE_MODE.DEFAULT` when the object is created.

If only Nearest or only Linear is used for all textures there is no performance degradation; if multiple are used the swapping is negligible. Note that any performance concern only exist for the CanvasRenderer, webgl performance is not effected at all.