Fix failure exits from JPEG onBuildTileIndex.

The setjmp exited without deleting the SkJPEGImageIndex, and
another exit condition deleted the huffman index even though
it had not been created yet. Create member functions on
SkJPEGImageIndex to make the jpeg calls so it can keep track
of what has been created, and avoid destroying anything else.

Remove unnecessary lines to set values to their default values.

Move all SkJPEGImageIndex code entirely inside #ifdef ANDROID
blocks, since no piece of it is used except by ANDROID only
code.

BUG=skia:1471
R=djsollen@google.com, mtklein@google.com

Review URL: https://codereview.chromium.org/21891007

git-svn-id: http://skia.googlecode.com/svn/trunk@10628 2bbb7eff-a529-9590-31e7-b0007b416f81
1 file changed