openlayers/ol3 — pull request #429 by twpayne (2013-03-24 18:28:40+00:00)
Title: Don't shrink canvas

This is another canvas tile layer renderer optimization.

Previously intermediate per-tile-layer canvases would grow or shrink according to the minimum required size. This is an expensive operation on some browsers (notably Firefox) and led to noticeable janks in while panning.

This PR prevents the canvas from shrinking. If the canvas is larger than the visible map then the extra space is used as a buffer, meaning that small movements (pans, zooms, or rotations) do not require any updates to the intermediate canvas.

This PR is built on #428.