Accelerated panning and zooming for HTML and Canvas