Fix failure exits from JPEG onBuildTileIndex.
authorscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 7 Aug 2013 21:02:32 +0000 (21:02 +0000)
committerscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 7 Aug 2013 21:02:32 +0000 (21:02 +0000)
commita1a515474de376708d8361d95af2f680ea01fe60
treed0f6d8073e72bdcb684507cdd5af1109104932ce
parent2fe638ef064a32b768d320c796f4fe6a8c9b9d80
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
src/images/SkImageDecoder_libjpeg.cpp