Android 2.3.3 release 1.1
Do not merge.

Backport changes/fixes related to tile-based decoder from Honeycomb to
Gingerbread.

Bug: 3309014

////////////////////////////////////////////////////////////////////
This is a combination of 3 commits.

Fix 3071104, where decodeRegion returned false for some large image.

decodeRegion() returns false when it cannot find a suitable color config
for SkScaledBitmapSampler. Currently SkScaledBitmapSampler does not
support RGB_565. If cinfo->out_color_space is set to RGB_565 and we
require SkScaledBitmapSampler to do the extra sampling, we will fail in
finding a suitable color config for SkScaledBitmapSampler.

To fix it, we add support of RGB_565 into SkSclaedBitmapSampler.

Change-Id: I506f4f8c55518ff356345e616e16c4b4cd0712de

Fix 3117581, where BitmapRegionDecoder fails in building tile index for
PNG files.

The virtual method of building tile index in SkImageDecoder was changed to onBuildTileIndex().
SkPNGImageDecoder needs to override the method.

Change-Id: I7c78844a4d4f7aadff5fa8fa1aa99173317139b2

Add fPreferQualityOverSpeed to SkImageDecoder.

Currently the field only affects JPEG decode, in that when it is set
to true, we choose a more accurate, but slightly slower, IDCT method.

Bug: 3238925
/////////////////////////////////////////////////////////////////////
5 files changed