Read pixels in BGRA non-premul mode in few tests
authorkkinnunen <kkinnunen@nvidia.com>
Fri, 6 Mar 2015 15:16:00 +0000 (07:16 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 6 Mar 2015 15:16:01 +0000 (07:16 -0800)
commita9d9a392380952006303d83c35a63a32dffd0b36
tree610a08e6b43280fecabdf66d2135c2acfcb6b847
parent96e02a8f3f356085073de4a3d897dcc4e0931455
Read pixels in BGRA non-premul mode in few tests

The tests assert on Sk_ColorGREEN, which is in BRGA non-premul. Read the
pixels in same color format.

Currently the tests pass on all platforms because GREEN is fully opaque
and the component stays in the same place both on BGRA and
RGBA. However, hypothetically somebody could copy-paste the assertion
for further tests but use, say, RED. This creates latent error that is
only visible on some platforms like mac.

Review URL: https://codereview.chromium.org/989463002
tests/ImageFilterTest.cpp
tests/SkImageTest.cpp