Implement on-the-fly image resizing (down-scaling).

Implement on-the-fly image resizing (down-scaling) for WebP images.
The image decoder is aware of the device memory constriant via
SampleSize set by the application like Webkit/WebCore.
sampleSize=1 implies no down-scaling. Likewise, SampleSize=2 implies
resizing image width & height by a factor of '1/2', resulting in '1/4'th
size for the decoded image.
SampleSize is merely a hint from the application to the decoder. Decoder
may choose to ignore this hint and decode the image at full scale.
Native WebP image decoder (new APIs) supports on-the-fly resizing.
Making the Skia-WebP decoder 'SampleSize' aware and implementing the
on-the-fly resizing in this change.

Change-Id: Ibbd62baf4a6ad2d3904aafb22807f4513641e64c
1 file changed