mozilla/pdf.js — pull request #3171 by kkujala (2013-04-28 21:04:53+00:00)
Title: Use only one temp canvas for patterns

This fixes a regression #3153 which was introduced by #2177.
The temp vanvases that are being created are not being re-used, which lead
to high memory use.

Instead of creating multiple temporary canvases, we have only one temp canvas. Only the size of the canvas changes. Also a pattern id no longer pre-created, instead it is created when the pattern is really needed.

In my system the memory use was much lower with the patch.