loop over all color and alpha types

Bug: skia:7614

Change-Id: Ib51c7e280044b0817ddddd562090b95496547680
Reviewed-on: https://skia-review.googlesource.com/108061
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
Mike Klein 2018-02-16 10:08:10 -05:00 committed by Skia Commit-Bot
parent 3f5e72c5d7
commit 30dc8f960a

View File

@ -1102,9 +1102,9 @@ DEF_TEST(surface_image_unity, reporter) {
};
const int32_t sizes[] = { 0, 1, 1 << 15, 1 << 16, 1 << 28, 1 << 29, 1 << 30, -1 };
for (int cti = 0; cti < kLastEnum_SkColorType; ++cti) {
for (int cti = 0; cti <= kLastEnum_SkColorType; ++cti) {
SkColorType ct = static_cast<SkColorType>(cti);
for (int ati = 0; ati < kLastEnum_SkAlphaType; ++ati) {
for (int ati = 0; ati <= kLastEnum_SkAlphaType; ++ati) {
SkAlphaType at = static_cast<SkAlphaType>(ati);
for (int32_t size : sizes) {
do_test(SkImageInfo::Make(1, size, ct, at));