aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GifTest.cpp
Commit message (Collapse)AuthorAge
* 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