fix WBMP image will get null color table when draw in RGB565 Canvas
authorDerek Sollenberger <djsollen@google.com>
Tue, 8 Jul 2014 12:23:31 +0000 (08:23 -0400)
committerDerek Sollenberger <djsollen@google.com>
Tue, 8 Jul 2014 12:23:31 +0000 (08:23 -0400)
commit56a6b6ba9dcb85700c0fd11c1d097e06dc9e1a6b
tree9bb5c5b0058df8da40c3c8f4747d395990b8c619
parenta26bbb95a64c1507ba81d39b971f079f3f9c5646
fix WBMP image will get null color table when draw in RGB565 Canvas

Symptom: draw Index8 to RGB565 will using SkColorTable::lock16BitCache and return a null array.
Root Cause:lock16BitCache return null pointer because default type is kPremul_SkAlphaType
Solution: WBMP color table should be kOpaque_SkAlphaType
Reproduce steps: draw a WBMP with a matrix that apply rotate and transform

This patch was proposed by arthur_hung at htc.com to the AOSP project.

R=reed@google.com, scroggo@google.com

Review URL: https://codereview.chromium.org/377443007
src/images/SkImageDecoder_wbmp.cpp