aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/CodexTest.cpp
Commit message (Collapse)AuthorAge
* Implementing a scanline decoder for jpegGravatar msarett2015-04-29
| | | | | | BUG=skia:3257 Review URL: https://codereview.chromium.org/1092303003
* Ensure that we create a NULL codec for images with zero dimensionsGravatar msarett2015-04-23
| | | | | | | BUG=skia:3534 BUG=skia:3257 Review URL: https://codereview.chromium.org/1091043003
* SkJpegCodecGravatar msarett2015-04-15
| | | | | | | | | | | | Enables basic decoding for jpegs Includes rewinding 565, YUV, and Jpeg encoding are not yet implemented BUG=skia:3257 Review URL: https://codereview.chromium.org/1076923002
* ***Disables swizzles to 565.Gravatar msarett2015-04-09
| | | | | | | | | | | | | | | | | | | | | | | We may want to enable swizzles to 565 for images that are encoded in a format similar to 565, however, we do not want to take images that decode naturally to kN32 and then convert them to 565. ***Enable swizzles to kIndex_8. For images encoded in a color table format, we suggest that they be decoded to kIndex_8. When we decode, we only allow conversion to kIndex_8 if it matches the suggested color type (except wbmp which seems good as is). ***Modify dm to test images that decode to kIndex_8. BUG=skia:3257 BUG=skia:3440 Review URL: https://codereview.chromium.org/1055743003
* Get rid of leaks in SkCodec::NewFromStream.Gravatar scroggo2015-04-03
| | | | | | | | | | | | | | | | | | | | SkCodec::NewFromStream claims to delete the passed in SkStream on failure. This allows the caller to pass an SkStream to the function and not worry about deleting it depending on the return value. Most of our SkCodecs did not honor this contract though. Update them to delete the stream on failure. Further, update SkCodec::NewFromStream to delete the stream if it did not match any subclass, and delete the SkCodec if we decided to return NULL because it was too big. Add a test which tests streams which represent the beginnings of supported format types but do not contain enough data to create an SkCodec. The interesting part of the test is when we run it on ASAN, which will report that we leaked something without the other changes. BUG=skia:3257 Review URL: https://codereview.chromium.org/1058873006
* Ico test with embedded pngGravatar msarett2015-04-01
| | | | | | BUG=skia:3257 Review URL: https://codereview.chromium.org/1054673002
* SkCodec::onGetScanlineDecoder must call rewind.Gravatar scroggo2015-04-01
| | | | | | | | | | | | | | | | | | | | This mirrors the behavior in onGetPixels, and allows the implementation to share code for handling calls to rewindIfNeeded. This also fixes a bug where getScanlineDecoder was calling rewindIfNeeded and treating the result as a bool. In SkPngCodec, factor out the code to call rewindIfNeeded, and call it in both onGetPixels and onGetScanlineDecoder. Update the test to include testing the scanline decoder. Rename "gen" to "codec" now that it must be an SkCodec. BUG=skia:3257 Depends on https://codereview.chromium.org/1048423003/ (DIFFERENT ISSUE). Review URL: https://codereview.chromium.org/1050893002
* Acknowledge that SkIcoCodec can rewind and test it.Gravatar scroggo2015-04-01
| | | | | | | | | | | | | | Since SkIcoCodec has an SkCodec for its encoded images, backed by SkMemoryStreams, the SkMemoryStream can always rewind, and will be rewound by the sub-codec if necessary (now that SkBmpCodec and SkPngCodec support rewinding). Depends on https://codereview.chromium.org/1057483003/ and https://codereview.chromium.org/1048423003/ (DIFFERENT ISSUES). BUG=skia:3257 Review URL: https://codereview.chromium.org/1054603002
* Make SkPngCodec support rewinding properly.Gravatar scroggo2015-04-01
| | | | | | | | | | | | | | Separate out the code for reading the header, and use it to reinitialize fPng_ptr and fInfo_ptr after a rewind. Use common code to clean up fPng_ptr and fInfo_ptr, and set them to NULL and treat them as NULL as appropriate. Update the test to expect SkPngCodec to succeed. BUG=skia:3257 Review URL: https://codereview.chromium.org/1048423003
* Handle rewinds in SkBmpCodec.Gravatar scroggo2015-04-01
| | | | | | | | Factor our BMP code for reading the header, and call it after a rewind. BUG=skia:3257 Review URL: https://codereview.chromium.org/1057483003
* SkCodec: add wbmp classGravatar halcanary2015-03-27
Review URL: https://codereview.chromium.org/1006583005