diff options
author | msarett <msarett@google.com> | 2016-03-01 12:12:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-01 12:12:27 -0800 |
commit | 7f7ec206de39fde8dc490e9feb0f65322af1b989 (patch) | |
tree | 03bcf8f57a63d0c1039b853679e65cdbad613507 /tests/IndexedPngOverflowTest.cpp | |
parent | 4a98cdb7612493a062358cebd1141c9bcaa37ab1 (diff) |
Fix bug in SkGifCodec / Switch SkImageDec tests to use Codec
SkImageDecoder is still used throughout tests, tools, gms etc.
Deleting it from tests is an easy first step.
Bonus is that we add tests of SkCodec.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1733863003
Review URL: https://codereview.chromium.org/1733863003
Diffstat (limited to 'tests/IndexedPngOverflowTest.cpp')
-rw-r--r-- | tests/IndexedPngOverflowTest.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/IndexedPngOverflowTest.cpp b/tests/IndexedPngOverflowTest.cpp index 78f8d94b1a..f516898a1a 100644 --- a/tests/IndexedPngOverflowTest.cpp +++ b/tests/IndexedPngOverflowTest.cpp @@ -5,10 +5,9 @@ * found in the LICENSE file. */ +#include "CodecPriv.h" #include "SkBitmap.h" #include "SkCanvas.h" -#include "SkForceLinking.h" -#include "SkImageDecoder.h" #include "SkImageInfo.h" #include "SkSurface.h" #include "Test.h" @@ -31,10 +30,7 @@ unsigned char gPng[] = { DEF_TEST(IndexedPngOverflow, reporter) { SkBitmap image; - SkForceLinking(false); - bool success = SkImageDecoder::DecodeMemory( - gPng, sizeof(gPng), &image, SkColorType::kUnknown_SkColorType, - SkImageDecoder::kDecodePixels_Mode); + bool success = decode_memory(gPng, sizeof(gPng), &image); REPORTER_ASSERT(reporter, success); SkAutoTUnref<SkSurface> surface(SkSurface::NewRaster(SkImageInfo::MakeN32Premul(20, 1))); |