diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-11 18:21:45 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-11 18:21:45 +0000 |
commit | 61e96cd44624c9faceb625519c1b29775b161f45 (patch) | |
tree | 8df9411f754568cfa13f4b9b63fcb626da13f2fc /tests | |
parent | 44546f85d9170d9dbbb0423813c339c1def30074 (diff) |
SkBitmap now really stores SkImageInfo -- config is just a ruse
BUG=skia:
R=scroggo@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/159653004
git-svn-id: http://skia.googlecode.com/svn/trunk@13411 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ImageDecodingTest.cpp | 5 | ||||
-rw-r--r-- | tests/PixelRefTest.cpp | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp index 81f900660d..2e0225a261 100644 --- a/tests/ImageDecodingTest.cpp +++ b/tests/ImageDecodingTest.cpp @@ -333,10 +333,7 @@ static SkPixelRef* install_pixel_ref(SkBitmap* bitmap, SkASSERT(stream != NULL); SkASSERT(stream->rewind()); SkASSERT(stream->unique()); - SkColorType colorType; - if (!SkBitmapConfigToColorType(bitmap->config(), &colorType)) { - return NULL; - } + SkColorType colorType = bitmap->colorType(); SkDecodingImageGenerator::Options opts(sampleSize, ditherImage, colorType); SkAutoTDelete<SkImageGenerator> gen( SkDecodingImageGenerator::Create(stream, opts)); diff --git a/tests/PixelRefTest.cpp b/tests/PixelRefTest.cpp index c0bdf54c25..aeb3070eac 100644 --- a/tests/PixelRefTest.cpp +++ b/tests/PixelRefTest.cpp @@ -30,7 +30,7 @@ static void test_info(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, success); success = bitmap.asImageInfo(&info); REPORTER_ASSERT(reporter, success == gRec[i].fExpectedSuccess); - if (gRec[i].fExpectedSuccess) { + if (success && gRec[i].fExpectedSuccess) { REPORTER_ASSERT(reporter, info.fAlphaType == gRec[i].fAlphaType); REPORTER_ASSERT(reporter, info.fColorType == gRec[i].fExpectedColorType); } |