aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ImageDecodingTest.cpp
Commit message (Collapse)AuthorAge
* SkCodec: add wbmp classGravatar halcanary2015-03-27
| | | | Review URL: https://codereview.chromium.org/1006583005
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* Make SkStream *not* ref counted.Gravatar scroggo2015-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkStream is a stateful object, so it does not make sense for it to have multiple owners. Make SkStream inherit directly from SkNoncopyable. Update methods which previously called SkStream::ref() (e.g. SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(), which required the existing owners to call SkStream::unref()) to take ownership of their SkStream parameters and delete when done (including on failure). Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some cases this means heap allocating streams that were previously stack allocated. Respect ownership rules of SkTypeface::CreateFromStream() and SkImageDecoder::buildTileIndex(). Update the comments for exceptional methods which do not affect the ownership of their SkStream parameters (e.g. SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be explicit about ownership. Remove test_stream_life, which tested that buildTileIndex() behaved correctly when SkStream was a ref counted object. The test does not make sense now that it is not. In SkPDFStream, remove the SkMemoryStream member. Instead of using it, create a new SkMemoryStream to pass to fDataStream (which is now an SkAutoTDelete). Make other pdf rasterizers behave like SkPDFDocumentToBitmap. SkPDFDocumentToBitmap delete the SkStream, so do the same in the following pdf rasterizers: SkPopplerRasterizePDF SkNativeRasterizePDF SkNoRasterizePDF Requires a change to Android, which currently treats SkStreams as ref counted objects. Review URL: https://codereview.chromium.org/849103004
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* add ImageGenerator::NewFromData to porting layerGravatar reed2015-01-07
| | | | | | BUG=skia:3275 Review URL: https://codereview.chromium.org/834633006
* Qualify the return value of SkImageDecoder::decodeGravatar scroggo2014-10-22
| | | | | | | | | | | | | | | | | | | | | | | Add a new enum to differentiate between a complete decode and a partial decode (with the third value being failure). Return this value from SkImageDecoder::onDecode (in all subclasses, plus SkImageDecoder_empty) and ::decode. For convenience, if the enum is treated as a boolean, success and partial success are both considered true. Note that the static helper functions (DecodeFile etc) still return true and false (for one thing, this allows us to continue to use SkImageDecoder::DecodeMemory as an SkPicture::InstallPixelRefProc in SkPicture::CreateFromStream). Also correctly report failure in SkASTCImageDecoder::onDecode when SkTextureCompressor::DecompressBufferFromFormat fails. BUG=skia:3037 BUG:b/17419670 Review URL: https://codereview.chromium.org/647023006
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* make allocPixels throw on failureGravatar reed2014-09-02
| | | | | | | | | BUG=skia: R=mtklein@google.com, fmalita@google.com, fmalita@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/510423005
* Add astcbitmap to gm slides.Gravatar krajcevski2014-08-07
| | | | | | | | | | | Add additional ASTC formats. Add astc image decoder files. R=reed@google.com, robertphillips@google.com, halcanary@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/444093002
* Revert of - Add astcbitmap to gm slides ↵Gravatar krajcevski2014-08-07
| | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/444093002/) Reason for revert: Breaking DM Original issue's description: > - Add astcbitmap to gm slides > - Add additional ASTC formats > - Add astc image decoder files > > Committed: https://skia.googlesource.com/skia/+/2fc05823fed4b9649338f3029cd1ba05ef49a02f R=reed@google.com, robertphillips@google.com, halcanary@google.com TBR=halcanary@google.com, reed@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true Author: krajcevski@google.com Review URL: https://codereview.chromium.org/447343002
* - Add astcbitmap to gm slidesGravatar krajcevski2014-08-07
| | | | | | | | | | | - Add additional ASTC formats - Add astc image decoder files R=reed@google.com, robertphillips@google.com, halcanary@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/444093002
* add a libjpeg testGravatar halcanary2014-08-01
| | | | | | | | | | | | This tests for a bug in libjpeg where INT32 is typedefed to long and memory is written to outside of the array. BUG=skia:2791 R=djsollen@google.com, mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/435753002
* Cleanup: Rename SkOSPath functions.Gravatar tfarina2014-07-28
| | | | | | | | | | | | | | | | Mostly for brevity and matches better with Python: Python | Old C++ | New C++ os.path.join | SkOSPath::SkPathJoin | SkOSPath::Join os.path.basename | SkOSPath::SkBasename | SkOSPath::Basename BUG=None TEST=make all R=mtklein@google.com, bsalomon@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/428443002
* disable new test on windowsGravatar halcanary2014-07-28
| | | | | | | | | | | R=bensong@google.com, djsollen@google.com TBR=bensong@google.com, djsollen@google.com CQ_EXTRA_TRYBOTS=tryserver.skia:Test-Win7-ShuttleA-HD2000-x86_64-Release-Trybot NOTREECHECKS=true Author: halcanary@google.com Review URL: https://codereview.chromium.org/424833002
* If decoder doesn't ouput indexed color, don't check colortableGravatar halcanary2014-07-28
| | | | | | | | | R=djsollen@google.com, bungeman@google.com TBR=bungeman@google.com, djsollen@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/427593002
* SkDiscardablePixelRef returns correct indexed color on relock.Gravatar halcanary2014-07-28
| | | | | | | | R=djsollen@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/428603002
* Cleanup usage of GetResourcePath() after commit ↵Gravatar tfarina2014-07-01
| | | | | | | | | | | | | | | | | bcbc1788b478b1e54079318ad073e8490aa66fae. There was a clean up opportunity left over after https://skia.googlesource.com/skia/+/bcbc1788b478b1e54079318ad073e8490aa66fae, that could make use of the default parameter of GetResourcePath() function to make some call sites cleaner. We decided to make it in a separate CL to make reviewer's and author's life easier, so we could catch errors and/or mistakes easily. BUG=None TEST=make all && out/Debug/dm && out/Debug/SampleApp R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/351133003
* Refactor how we handle resources path in Tests.Gravatar tfarina2014-06-18
| | | | | | | | | | | | | This idea emerged while doing https://codereview.chromium.org/321723002/ (commit 880914c35c8f7fc2e9c57134134c883baf66e538). BUG=None TEST=make tests && out/Debug/tests R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/346453002
* hide Config in SkImageDecoder -- use SkColorType insteadGravatar reed2014-06-12
| | | | | | | | | | patch from issue 334613003 TBR=scroggo Author: reed@chromium.org Review URL: https://codereview.chromium.org/334793002
* Initial KTX file decoderGravatar krajcevski2014-06-03
| | | | | | | | R=bsalomon@google.com, robertphillips@google.com, halcanary@google.com, reed@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/302333002
* Revert "Revert of setConfig -> setInfo ↵Gravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | | | | (https://codereview.chromium.org/308683005/)" This reverts commit eecaea4148805834f223681f70b6488ceba12d09. R=robertphillips@google.com, scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/301283003 git-svn-id: http://skia.googlecode.com/svn/trunk@14989 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of setConfig -> setInfo (https://codereview.chromium.org/308683005/)Gravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: broke all Windows bots Original issue's description: > setConfig -> setInfo > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=14978 R=robertphillips@google.com, reed@google.com TBR=reed@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: epoger@google.com Review URL: https://codereview.chromium.org/302053002 git-svn-id: http://skia.googlecode.com/svn/trunk@14979 2bbb7eff-a529-9590-31e7-b0007b416f81
* setConfig -> setInfoGravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | BUG=skia: R=robertphillips@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/308683005 git-svn-id: http://skia.googlecode.com/svn/trunk@14978 2bbb7eff-a529-9590-31e7-b0007b416f81
* hide discardable factory from public imagegenerator apiGravatar commit-bot@chromium.org2014-05-27
| | | | | | | | | | | BUG=skia: R=halcanary@google.com, scroggo@google.com, djsollen@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/295243006 git-svn-id: http://skia.googlecode.com/svn/trunk@14889 2bbb7eff-a529-9590-31e7-b0007b416f81
* move ashmem switching logic to SkDiscardableMemory::CreateGravatar commit-bot@chromium.org2014-05-23
| | | | | | | | | | R=scroggo@google.com, reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/293283002 git-svn-id: http://skia.googlecode.com/svn/trunk@14882 2bbb7eff-a529-9590-31e7-b0007b416f81
* Simple PKM image decoder.Gravatar robertphillips@google.com2014-05-22
| | | | | | | | https://codereview.chromium.org/292663011/ git-svn-id: http://skia.googlecode.com/svn/trunk@14852 2bbb7eff-a529-9590-31e7-b0007b416f81
* Flatten resources directoryGravatar halcanary@google.com2014-05-09
| | | | | | | | | | | | | | On android trybots, the files in a subdirectory weren't being loaded onto the device. Consequently, the ImageDecoderOptions test was not testing anything. I had to relax that unit test to reflect the existing behavior of our libjpeg decoder on Android. R=djsollen@google.com Review URL: https://codereview.chromium.org/264583007 git-svn-id: http://skia.googlecode.com/svn/trunk@14682 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Flatten resources directory"Gravatar djsollen@google.com2014-05-09
| | | | | | Review URL: https://codereview.chromium.org/278033002 git-svn-id: http://skia.googlecode.com/svn/trunk@14679 2bbb7eff-a529-9590-31e7-b0007b416f81
* Flatten resources directoryGravatar commit-bot@chromium.org2014-05-09
| | | | | | | | | | | | | | | | On android trybots, the files in a subdirectory weren't being loaded onto the device. Consequently, the ImageDecoderOptions test was not testing anything. I had to relax that unit test to reflect the existing behavior of our libjpeg decoder on Android. R=djsollen@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/264583007 git-svn-id: http://skia.googlecode.com/svn/trunk@14678 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reland "Properly set alpha type in webp decode."Gravatar commit-bot@chromium.org2014-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also use the newer setConfig function. Add a test to confirm that we set the alpha type properly. Add some images with alpha for testing. (These images are also beneficial for the compare_unpremul test, which was previously not meaningful on 100% opaque images.) All of the added images are in the public domain. They were taken from https://developers.google.com/speed/webp/gallery2: yellow_rose: "Free Stock Photo in High Resolution - Yellow Rose 3 - Flowers" Image Author: Jon Sullivan This file is in the public domain. http://www.public-domain-photos.com/free-stock-photos-4/flowers/yellow-rose-3.jpg baby_tux: "baby tux for my user page" Image Author: Fizyplankton This file is in the public domain. http://www.minecraftwiki.net/images/8/85/Fizyplankton.png NOTRY=true TBR=halcanary@google.com BUG=skia:2388 Author: scroggo@google.com Review URL: https://codereview.chromium.org/252423008 git-svn-id: http://skia.googlecode.com/svn/trunk@14360 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ↵Gravatar commit-bot@chromium.org2014-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/234243002/) Reason for revert: Want to reland the original CL. Original issue's description: > Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/) > > Reason for revert: > breaking the Chrome deps roll. > http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio > > Original issue's description: > > Rename kPMColor_SkColorType to kN32_SkColorType. > > > > The new name better represents what this flag means. > > > > BUG=skia:2384 > > > > Committed: http://code.google.com/p/skia/source/detail?r=14117 > > TBR=reed@google.com,scroggo@google.com > NOTREECHECKS=true > NOTRY=true > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14144 R=reed@google.com, bensong@google.com TBR=bensong@google.com, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: scroggo@google.com Review URL: https://codereview.chromium.org/235523003 git-svn-id: http://skia.googlecode.com/svn/trunk@14156 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ↵Gravatar commit-bot@chromium.org2014-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/227433009/) Reason for revert: Chrome's side of define changes not easy to figure out quickly. Reverting this for DEPS roll for now. Original issue's description: > Rename kPMColor_SkColorType to kN32_SkColorType. > > The new name better represents what this flag means. > > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14117 R=reed@google.com, scroggo@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: bensong@google.com Review URL: https://codereview.chromium.org/234833003 git-svn-id: http://skia.googlecode.com/svn/trunk@14149 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ↵Gravatar commit-bot@chromium.org2014-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/234243002/) Reason for revert: fixes on the chrome side are landing (brettw), keep fingers crossed. Original issue's description: > Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/) > > Reason for revert: > breaking the Chrome deps roll. > http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio > > Original issue's description: > > Rename kPMColor_SkColorType to kN32_SkColorType. > > > > The new name better represents what this flag means. > > > > BUG=skia:2384 > > > > Committed: http://code.google.com/p/skia/source/detail?r=14117 > > TBR=reed@google.com,scroggo@google.com > NOTREECHECKS=true > NOTRY=true > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14144 R=reed@google.com, scroggo@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: bensong@google.com Review URL: https://codereview.chromium.org/233813004 git-svn-id: http://skia.googlecode.com/svn/trunk@14145 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Rename kPMColor_SkColorType to kN32_SkColorType. ↵Gravatar commit-bot@chromium.org2014-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/227433009/) Reason for revert: breaking the Chrome deps roll. http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio Original issue's description: > Rename kPMColor_SkColorType to kN32_SkColorType. > > The new name better represents what this flag means. > > BUG=skia:2384 > > Committed: http://code.google.com/p/skia/source/detail?r=14117 R=reed@google.com, scroggo@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2384 Author: bensong@google.com Review URL: https://codereview.chromium.org/234243002 git-svn-id: http://skia.googlecode.com/svn/trunk@14144 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename kPMColor_SkColorType to kN32_SkColorType.Gravatar commit-bot@chromium.org2014-04-09
| | | | | | | | | | | | | The new name better represents what this flag means. BUG=skia:2384 R=reed@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/227433009 git-svn-id: http://skia.googlecode.com/svn/trunk@14117 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Properly set alpha type in webp decode. ↵Gravatar commit-bot@chromium.org2014-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/223893002/) Reason for revert: Breaks ImageDecoding tests on several platforms. Original issue's description: > Properly set alpha type in webp decode. > > Also use the newer setConfig function. > > Add a test to confirm that we set the alpha type properly. > > Add some images with alpha for testing. (These images are also beneficial for the compare_unpremul test, which was previously not meaningful on 100% opaque images.) > > All of the added images are in the public domain. They were taken from https://developers.google.com/speed/webp/gallery2: > > yellow_rose: > "Free Stock Photo in High Resolution - Yellow Rose 3 - Flowers" > Image Author: Jon Sullivan > This file is in the public domain. > http://www.public-domain-photos.com/free-stock-photos-4/flowers/yellow-rose-3.jpg > > baby_tux: > "baby tux for my user page" > Image Author: Fizyplankton > This file is in the public domain. > http://www.minecraftwiki.net/images/8/85/Fizyplankton.png > > NOTRY=true > > Committed: http://code.google.com/p/skia/source/detail?r=14054 R=halcanary@google.com TBR=halcanary@google.com NOTREECHECKS=true NOTRY=true Author: scroggo@google.com Review URL: https://codereview.chromium.org/223903008 git-svn-id: http://skia.googlecode.com/svn/trunk@14055 2bbb7eff-a529-9590-31e7-b0007b416f81
* Properly set alpha type in webp decode.Gravatar commit-bot@chromium.org2014-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also use the newer setConfig function. Add a test to confirm that we set the alpha type properly. Add some images with alpha for testing. (These images are also beneficial for the compare_unpremul test, which was previously not meaningful on 100% opaque images.) All of the added images are in the public domain. They were taken from https://developers.google.com/speed/webp/gallery2: yellow_rose: "Free Stock Photo in High Resolution - Yellow Rose 3 - Flowers" Image Author: Jon Sullivan This file is in the public domain. http://www.public-domain-photos.com/free-stock-photos-4/flowers/yellow-rose-3.jpg baby_tux: "baby tux for my user page" Image Author: Fizyplankton This file is in the public domain. http://www.minecraftwiki.net/images/8/85/Fizyplankton.png NOTRY=true R=halcanary@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/223893002 git-svn-id: http://skia.googlecode.com/svn/trunk@14054 2bbb7eff-a529-9590-31e7-b0007b416f81
* replace setConfig+allocPixels with single callGravatar mike@reedtribe.org2014-02-13
| | | | | | | | BUG=skia: Review URL: https://codereview.chromium.org/162643002 git-svn-id: http://skia.googlecode.com/svn/trunk@13426 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkBitmap now really stores SkImageInfo -- config is just a ruseGravatar commit-bot@chromium.org2014-02-11
| | | | | | | | | | | 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
* Revert "SkBitmap now really stores SkImageInfo -- config is just a ruse"Gravatar mike@reedtribe.org2014-02-11
| | | | | | | | BUG=skia: Review URL: https://codereview.chromium.org/147733004 git-svn-id: http://skia.googlecode.com/svn/trunk@13395 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkBitmap now really stores SkImageInfo -- config is just a ruseGravatar mike@reedtribe.org2014-02-11
| | | | | | | | (edited) clone of https://codereview.chromium.org/159173004/ Review URL: https://codereview.chromium.org/159463003 git-svn-id: http://skia.googlecode.com/svn/trunk@13391 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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
* Add REPORTF test macro.Gravatar halcanary@google.com2014-01-10
| | | | | | | | | | | | | | | | | | This macro replaces: SkString str; str.printf("Foo test Expected %d got %d", x, y); reporter->reportFailed(str); with the shorter code: REPORTF(reporter, ("Foo test Expected %d got %d", x, y)); The new form also appends __FILE__:__LINE__ to the message before calling reportFailed(). BUG= R=mtklein@google.com Review URL: https://codereview.chromium.org/132843002 git-svn-id: http://skia.googlecode.com/svn/trunk@13016 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-01-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12875 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add Options to SkDecodingImageGenerator, simplify API.Gravatar halcanary@google.com2014-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: We want to remove redundant classes from Skia. To that end we want to remove SkImageRef and its subclasses and replace their uses with SkDiscardablePixelRef + SkDecodingImageGenerator. Since Android uses SkImageRef, we need to make sure that SkDecodingImageGenerator allows all of the settings that Android exposes in BitmapFactory.Options. To that end, we have created an Options struct for the SkDecodingImageGenerator which lets the client of the generator set sample size, dithering, and bitmap config. We have made the SkDecodingImageGenerator constructor private and replaced the SkDecodingImageGenerator::Install functions with a SkDecodingImageGenerator::Create functions (one for SkData and one for SkStream) which now take a SkDecodingImageGenerator::Options struct. Also added a ImageDecoderOptions test which loops through a list of sets of options and tries them on a set of 5 small encoded images. Also updated several users of SkDecodingImageGenerator::Install to follow new call signature - gm/factory.cpp, LazyDecodeBitmap.cpp, and PictureTest.cpp, CachedDecodingPixelRefTest.cpp. We also added a new ImprovedBitmapFactory Test which simulates the exact function that Android will need to modify to use this, installPixelRef() in BitmapFactory. R=reed@google.com, scroggo@google.com Committed: https://code.google.com/p/skia/source/detail?r=12744 Review URL: https://codereview.chromium.org/93703004 git-svn-id: http://skia.googlecode.com/svn/trunk@12855 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix Red/Blue decoding problem in WebP.Gravatar halcanary@google.com2013-12-20
| | | | | | | | | | | | | | Added unit test with lossless webp data. BUG=skia:1402 Will need to rebaseline webp expectations for some systems. R=scroggo@google.com Review URL: https://codereview.chromium.org/105443005 git-svn-id: http://skia.googlecode.com/svn/trunk@12803 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of https://codereview.chromium.org/93703004/Gravatar commit-bot@chromium.org2013-12-18
| | | | | | | | | | | | | | | Reason for revert: Test failures R=scroggo@google.com, djsollen@google.com, reed@google.com, halcanary@google.com TBR=djsollen@google.com, halcanary@google.com, reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/103753007 git-svn-id: http://skia.googlecode.com/svn/trunk@12747 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add Options to SkDecodingImageGenerator, simplify API.Gravatar halcanary@google.com2013-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: We want to remove redundant classes from Skia. To that end we want to remove SkImageRef and its subclasses and replace their uses with SkDiscardablePixelRef + SkDecodingImageGenerator. Since Android uses SkImageRef, we need to make sure that SkDecodingImageGenerator allows all of the settings that Android exposes in BitmapFactory.Options. To that end, we have created an Options struct for the SkDecodingImageGenerator which lets the client of the generator set sample size, dithering, and bitmap config. We have made the SkDecodingImageGenerator constructor private and replaced the SkDecodingImageGenerator::Install functions with a SkDecodingImageGenerator::Create functions (one for SkData and one for SkStream) which now take a SkDecodingImageGenerator::Options struct. Also added a ImageDecoderOptions test which loops through a list of sets of options and tries them on a set of 5 small encoded images. Also updated several users of SkDecodingImageGenerator::Install to follow new call signature - gm/factory.cpp, LazyDecodeBitmap.cpp, and PictureTest.cpp, CachedDecodingPixelRefTest.cpp. We also added a new ImprovedBitmapFactory Test which simulates the exact function that Android will need to modify to use this, installPixelRef() in BitmapFactory. R=reed@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/93703004 git-svn-id: http://skia.googlecode.com/svn/trunk@12744 2bbb7eff-a529-9590-31e7-b0007b416f81