aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GifTest.cpp
Commit message (Collapse)AuthorAge
* detach -> releaseGravatar mtklein2016-03-16
| | | | | | | | | | | | | The C++ standard library uses the name "release" for the operation we call "detach". Rewriting each "detach(" to "release(" brings us a step closer to using standard library types directly (e.g. std::unique_ptr instead of SkAutoTDelete). This was a fairly blind transformation. There may have been unintentional conversions in here, but it's probably for the best to have everything uniformly say "release". BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1809733002 Review URL: https://codereview.chromium.org/1809733002
* Fix bug in SkGifCodec / Switch SkImageDec tests to use CodecGravatar msarett2016-03-01
| | | | | | | | | | | | 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
* Add a test for decoding a gif with sampleSize 4.Gravatar scroggo2015-05-14
| | | | | | | | | | | | | Prior to https://codereview.chromium.org/1085253002/, this would crash. Only happens with interlaced gif images with an odd height. (Maybe there are more restrictions?) Test image provided by zoran.jovanovic@sonymobile.com for checking in. Add include before includes. Review URL: https://codereview.chromium.org/1091053002
* Cleanup: Sanitize the order of includes under tests/Gravatar tfarina@chromium.org2014-01-24
| | | | | | | | | | | | | | | | Initially this was to make sure Test.h appeared after the Sk*.h includes. Patch generated by the following command line: $ ~/chromium/src/tools/sort-headers.py tests/*.cpp BUG=None TEST=tests R=robertphillips@google.com Review URL: https://codereview.chromium.org/145313004 git-svn-id: http://skia.googlecode.com/svn/trunk@13177 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unnamed namespace usage from tests/Gravatar tfarina@chromium.org2014-01-21
| | | | | | | | | | | | | Skia preference is to use 'static' keyword rather than use unnamed namespace. BUG=None TEST=tests R=robertphillips@google.com, bsalomon@google.com Review URL: https://codereview.chromium.org/132403008 git-svn-id: http://skia.googlecode.com/svn/trunk@13138 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move macros from TestClassDef.h to Test.hGravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | Motivation: those macros don't make any sense without the definitions in Test.h. BUG= R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/138563004 git-svn-id: http://skia.googlecode.com/svn/trunk@13074 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use DEFINE_TESTCLASS_SHORT macro in tests.Gravatar tfarina@chromium.org2013-12-12
| | | | | | | | | | | | | The three version of DEFINE_TESTCLASS macro is deprecated and thus just use the simple, short one. BUG=None TEST=out/Debug/tests R=mtklein@google.com, bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/100113004 git-svn-id: http://skia.googlecode.com/svn/trunk@12653 2bbb7eff-a529-9590-31e7-b0007b416f81
* GIF decode: optional error messages and fault tolerance.Gravatar halcanary@google.com2013-10-11
Add new runtime configuration variable, images.gif.suppressDecoderWarnings, which suppresses warning and errors from the GIF library. It defaults to "true", which is current behavior. (This setting can be changed by setting the environment variable skia_images_gif_suppressDecoderWarnings="false".) Some conditions which were errors before are now warnings: - If the image width or height is greater than the GIF screen width or height (respectively) we expand the screen to hold the image. - If the offset of the image inside the screen would place the image outside of the screen, we shift the image to fix this. - If the image lacks a color table, we create a default color table. - If the image is truncated, then the rest of the image is filled with the fill color. In all four cases, if images.gif.suppressDecoderWarnings is set to false, then a warning message is printed via SkDebugf. In the event of another kind of error, SkGIFImageDecoder::onDecode() will still return false. But with this change, if images.gif.suppressDecoderWarnings is set to false, a description of the error is printed via SkDebugf. Also, added a new unit test GifTest, which tests the deconing of both good GIf files and corrupted files that should now work with this change. This unit test is disabled on Win32, iOS, and Mac. BUG=skia:1689 R=scroggo@google.com Review URL: https://codereview.chromium.org/26743002 git-svn-id: http://skia.googlecode.com/svn/trunk@11734 2bbb7eff-a529-9590-31e7-b0007b416f81