mozilla-b2g/gaia — pull request #6563 by davidflanagan (2012-11-22 00:29:11+00:00)
Title: Bug 809782 - display image previews instead of full size

This pull request modifies the Frame class used by the Gallery app so that when displaying an image, if the image has an embedded preview, and the preview is big enough, it display that preview instead of decoding the full image.

The tricky part here is handling zooms, because in order to zoom in we have to switch from the preview image to the full-size image. And doing this smoothly without having the screen flash or go blank turns out to be kind of hard. The solution here ends up relying on MozAfterPaint events.

@dominickuo will you review, please