History log of /external/skia/tests/ImageDecodingTest.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
bcbc1788b478b1e54079318ad073e8490aa66fae 18-Jun-2014 tfarina <tfarina@chromium.org> Refactor how we handle resources path in Tests.

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
/external/skia/tests/ImageDecodingTest.cpp
bfefc7c95fc0e8ebd5000c68f6d16e1a3ea0e71e 13-Jun-2014 reed <reed@chromium.org> hide Config in SkImageDecoder -- use SkColorType instead

patch from issue 334613003

TBR=scroggo

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/334793002
/external/skia/tests/ImageDecodingTest.cpp
99ffe24200d8940ceba20f6fbf8c460f994d3cd1 03-Jun-2014 krajcevski <krajcevski@google.com> Initial KTX file decoder

R=bsalomon@google.com, robertphillips@google.com, halcanary@google.com, reed@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/302333002
/external/skia/tests/ImageDecodingTest.cpp
a3264e53ee3f3c5d6a2c813df7e44b5b96d207f2 30-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert of setConfig -> setInfo (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
/external/skia/tests/ImageDecodingTest.cpp
d0f824cfbd8951bb948b19d7ff5dce028ce557a5 29-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of setConfig -> setInfo (https://codereview.chromium.org/308683005/)

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
/external/skia/tests/ImageDecodingTest.cpp
986d681f3e7a7eb6febd9df9fe21a8d277ba2296 29-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> setConfig -> setInfo

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
/external/skia/tests/ImageDecodingTest.cpp
2d970b5128f7270cd01a93e4ce68d0c3ea67ac71 27-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> hide discardable factory from public imagegenerator api

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
/external/skia/tests/ImageDecodingTest.cpp
e5a8e66668a1594e49b2c221f26da4c6d2a4e99f 23-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> move ashmem switching logic to SkDiscardableMemory::Create

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
/external/skia/tests/ImageDecodingTest.cpp
8cf81e0f4fa2a8054ac4cea1e7490028809cb893 22-May-2014 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Simple PKM image decoder.

https://codereview.chromium.org/292663011/



git-svn-id: http://skia.googlecode.com/svn/trunk@14852 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
b7acbfe0ee940863b5e2350b0b0c3795e01751f5 09-May-2014 halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Flatten resources directory

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
/external/skia/tests/ImageDecodingTest.cpp
f9dc07c80a9ec65863b883ca9a2537c8fea1f8c5 09-May-2014 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Flatten resources directory"

Review URL: https://codereview.chromium.org/278033002

git-svn-id: http://skia.googlecode.com/svn/trunk@14679 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
e5e96021a05f22ffbb72a201790bd67bff4f8a93 09-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Flatten resources directory

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
/external/skia/tests/ImageDecodingTest.cpp
915b972a818d0279eb926af38ba6952daa17a63e 24-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Reland "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

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
/external/skia/tests/ImageDecodingTest.cpp
28fcae2ec77eb16a79e155f8d788b20457f1c951 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (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
/external/skia/tests/ImageDecodingTest.cpp
96edc2459820f0f60ea9b57959c1e5018ef95e28 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (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
/external/skia/tests/ImageDecodingTest.cpp
d923288e50b5a69afb0bdd5c161191b24cab8345 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (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
/external/skia/tests/ImageDecodingTest.cpp
757ebd20ef284b6428eb9f4b9b69826cc3640a82 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> 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

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
/external/skia/tests/ImageDecodingTest.cpp
149e9a107c356b0151433fb23c2b1c8d0634947c 09-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Rename kPMColor_SkColorType to kN32_SkColorType.

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
/external/skia/tests/ImageDecodingTest.cpp
d591b7513fb807b6e399acb18456a6e2fee1fd54 03-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Properly set alpha type in webp decode. (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
/external/skia/tests/ImageDecodingTest.cpp
a455965d92ea0416df02325bc3b74118115bd9db 03-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> 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
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
/external/skia/tests/ImageDecodingTest.cpp
deee496cd30070e52556dcb538c2e5eb39b66b81 13-Feb-2014 mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> replace setConfig+allocPixels with single call

BUG=skia:

Review URL: https://codereview.chromium.org/162643002

git-svn-id: http://skia.googlecode.com/svn/trunk@13426 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
61e96cd44624c9faceb625519c1b29775b161f45 11-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> SkBitmap now really stores SkImageInfo -- config is just a ruse

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
/external/skia/tests/ImageDecodingTest.cpp
1195a28892d37ae9632e81e1bc2407cf644522d2 11-Feb-2014 mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "SkBitmap now really stores SkImageInfo -- config is just a ruse"

BUG=skia:

Review URL: https://codereview.chromium.org/147733004

git-svn-id: http://skia.googlecode.com/svn/trunk@13395 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
169a0ed50a5e451711c341795572e7177a540a24 11-Feb-2014 mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> SkBitmap now really stores SkImageInfo -- config is just a ruse

(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
/external/skia/tests/ImageDecodingTest.cpp
8f6884aab8aecd7657cf3f9cdbc682f0deca29c5 24-Jan-2014 tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Cleanup: Sanitize the order of includes under tests/

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
/external/skia/tests/ImageDecodingTest.cpp
58674817a7a5003556a1d0b5b8fa522782a729fa 22-Jan-2014 tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove unnamed namespace usage from tests/

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
/external/skia/tests/ImageDecodingTest.cpp
e2eac8b2fd8966cc9af51f8d40151dad6c591d2e 14-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Move macros from TestClassDef.h to Test.h

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
/external/skia/tests/ImageDecodingTest.cpp
a9325fa237dde2654bc841c2bb0a05fc3e57696a 10-Jan-2014 halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add REPORTF test macro.

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
/external/skia/tests/ImageDecodingTest.cpp
862020763d9d2fb1900b2c84e55dadf46482246d 03-Jan-2014 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@12875 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
3d50ea1b87132833d7eab38964f40315ba553205 02-Jan-2014 halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add Options to SkDecodingImageGenerator, simplify API.

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
/external/skia/tests/ImageDecodingTest.cpp
dedd44adea3b87faea4bcd833c6a508a6db8fcfd 20-Dec-2013 halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix Red/Blue decoding problem in WebP.

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
/external/skia/tests/ImageDecodingTest.cpp
1ad518bf38184ae820f31f9b79dfb4e4daf5841a 18-Dec-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of https://codereview.chromium.org/93703004/
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
/external/skia/tests/ImageDecodingTest.cpp
d665dc4c100f73272422dd17b4dd2c5d57a6b6de 18-Dec-2013 halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add Options to SkDecodingImageGenerator, simplify API.

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
/external/skia/tests/ImageDecodingTest.cpp
e4fafb146e85cdfcf9d5418597b6818aa0754ada 12-Dec-2013 tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Use DEFINE_TESTCLASS_SHORT macro in tests.

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
/external/skia/tests/ImageDecodingTest.cpp
a0b266d8170211d9f2a6f90ba9c889f0c1b6d1b6 04-Dec-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove deprecated setPrefConfigTable.

Safe once its only caller (in Android) has been updated.

BUG=skia:1874
R=reed@google.com

Review URL: https://codereview.chromium.org/99473004

git-svn-id: http://skia.googlecode.com/svn/trunk@12491 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
d6bab0238655dbab24dfe92bd0b16b464310a8c7 02-Dec-2013 rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reverting r12427

git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
5b39f5ba9c339d1e4dae391fee9ec1396feec180 02-Dec-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
11f392ed531f05e8de6b6af6ae607f90aeb080c6 26-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "remove kA1_Config, as it is no longer supported""

This reverts commit 36d712f2d4c5c79719280ad95523e6aaa88b068e.

BUG=
R=rmistry@google.com, mtklein@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/86483002

git-svn-id: http://skia.googlecode.com/svn/trunk@12392 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
72e7808d62c02f0371135b1c152bd00b73f62479 25-Nov-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "remove kA1_Config, as it is no longer supported"

This reverts commit 2d72d8b242eac6e9d30228f5b0a407236491c369.

git-svn-id: http://skia.googlecode.com/svn/trunk@12387 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
2a1f4464d150d2dc8c3fe2f39e9fb3503b7f4f54 25-Nov-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> remove kA1_Config, as it is no longer supported

BUG=
R=djsollen@google.com

Review URL: https://codereview.chromium.org/83093005

git-svn-id: http://skia.googlecode.com/svn/trunk@12384 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
3c996f8a15e5d8fada9550d978e9b5344b81d276 24-Oct-2013 bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement charToGlyph on remaining ports.

R=reed@google.com

Review URL: https://codereview.chromium.org/22859070

git-svn-id: http://skia.googlecode.com/svn/trunk@11955 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
8d2392487cd97e68c0a71da9fd5d2b42ecac5ec8 01-Oct-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add an option on SkImageDecoder to skip writing 0s.

Only implemented for PNG.

Add a getter and setter, and sets the default to false in the
constructor. Also copies the setting in copyFieldsToOther.

Fix an indpendent bug where fDitherImage was not being copied in
copyFieldsToOther.

In SkScaledBitmapSampler::begin, consolidate the settings passed in
by passing a const reference to the decoder. The decoder can be
referenced for its settings of dither, unpremultiplied, and now
skipping writing zeroes. Update callers to use the new API. In png
decoder, rather than passing around a pointer to an initial
read of getDitherImage, and potentially changing it, look at the
field on the decoder itself, and modify it directly. This is a
change in behavior - now if that same decoder is used to decode
a different image, the dither setting has changed. I think this is
okay because A) the typical use case is to use a new decoder for
each decode, B) we do not make any promises that a decode does not
change the decoder and C) it makes the code in SkScaledBitmapSampler
much cleaner.

In SkScaledBitmapScampler, add new row procs for skipping zeroes. Now
that choosing the row proc has five dimensions (src config, dst config,
dither, skip writing zeroes, unpremultiplied), use a new method: each
src/dst combination has a function for choosing the right proc depending
on the decoder.

SkScaledBitmapScampler::RowProc is now public for convenience.

Remove Sample_Gray_D8888_Unpremul, which is effectively no different
from Sample_Gray_D8888.

In cases where unpremultiplied was trivial, such as 565 and when
sampling from gray, decoding may now succeed.

Add a benchmark (currently disabled) for comparing the speed of skipping
writing zeroes versus not skipping. For this particular image, which is
mostly transparent pixels, normal decoding took about 3.6 milliseconds,
while skipping zeroes in the decode took only about 2.5 milliseconds
(this is on a Nexus 4). Presumably it would be slower on an image
with a small amount of transparency, but there will be no slowdown
for an image which reports that it has no transparency.

In SkImageRef_ashmem, always skip writing zeroes, since ashmem
memory is guaranteed to be initialized to 0.

Add a flag to skip writing zeroes in skimage.

Add a regression test for choosing the rowproc to ensure I did not
change any behavior accidentally.

BUG=skia:1661
R=reed@google.com

Review URL: https://codereview.chromium.org/24269006

git-svn-id: http://skia.googlecode.com/svn/trunk@11558 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
b5571b3324cf18629a255ec85e189447069c9b14 25-Sep-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Change SkImageDecoders to take an SkStreamRewindable.

Only affects factories, static functions that will use the factories,
and subset decoding, which all require rewinding. The decoders
themselves continue to take an SkStream. This is merely documentation
stating which functions will possibly rewind the passed in SkStream.

This is part of the general change to coordinate SkStreams with
Android's streams, which don't necessarily support rewinding in all
cases.

Update callers to use SkStreamRewindable.

BUG=skia:1572
R=bungeman@google.com, reed@google.com

Review URL: https://codereview.chromium.org/23477009

git-svn-id: http://skia.googlecode.com/svn/trunk@11460 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
9dfac2366ddc39f259f0a77cfa9470c6d6111a82 16-Sep-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Suppress test output.

This output is for debugging purposes, and does not report an error.

BUG=skia:1616

Review URL: https://codereview.chromium.org/24110003

git-svn-id: http://skia.googlecode.com/svn/trunk@11292 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
d79277f67824392876b82cf5635cc11f819e64df 07-Aug-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Support decoding subsets from JPG on Android.

Previously we only supported it for the framework. Making this
change allows us to test subset decoding in skimage, to make sure
we don't break it.

Will require rebaselining android skimage results.

R=djsollen@google.com

Review URL: https://codereview.chromium.org/21612003

git-svn-id: http://skia.googlecode.com/svn/trunk@10625 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
826d63af970dca7c47f4cded1cfcb918bc5785a9 18-Jul-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add test to ensure buildTileIndex stores SkStream.

PNG fails this test without https://codereview.chromium.org/19185006/

R=djsollen@google.com

Review URL: https://codereview.chromium.org/19555004

git-svn-id: http://skia.googlecode.com/svn/trunk@10163 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
f698c8262df397a7015662e91b1a727e1134c418 18-Jul-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Allow decoding JPEG into A8.

If the original image is grayscale, allow decoding into A8.

Change the size of PrefConfigTable to allow for 8bit gray, a new source config.

Add a new sampler to SkScaledBitmapSampler to 'convert' to A8.

FIXME: Should there be a dithered option for gray scale?

R=reed@google.com

Review URL: https://codereview.chromium.org/18083026

git-svn-id: http://skia.googlecode.com/svn/trunk@10157 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
daaea2d51f145fd43221a2b923721b218c8ff777 14-Jun-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Fixes for unpremul decode.

SkImageDecoder_CG.cpp:
If a non opaque bitmap was decoded, and the caller wants
unpremultiplied, unpremultiply the colors.

Always use the RGB colorspace, since the other colorspaces
do not match the desired bitmap format.

ImageDecodingTest:
Allow for a difference of 1 in each color component when comparing
the result of premultiplying the unpremultiplied decode with the
premultiplied decode, since I found an image (in WEBP format) where
the unpremultiplied colors did not compare perfectly in my comparison.

R=reed@google.com

Review URL: https://codereview.chromium.org/17084012

git-svn-id: http://skia.googlecode.com/svn/trunk@9628 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp
2bbc2c945bb0ecf18fd6473af74ad1a2f5e727a7 14-Jun-2013 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add an option to create unpremultiplied bitmaps.
Currently they cannot be used directly by Skia, but
the pixels can be used elsewhere.

SkImageDecoder:
Add functions to require unpremultiplied output
and query the presence of the requirement

SkImageDecoder_libpng:
SkImageDecoder_libwebp:
SkImageDecoder_WIC:
Respect the requirement for unpremultiplied output.
TODO: Fix SkImageDecoder_CG.

SkScaledBitmapSampler:
Add procs to skip premultiplication and a boolean
parameter to use those procs.

ImageDecodingTest:
Test unpremultiplied bitmap decoding.

SampleUnpremul:
Add a sample which allows visually comparing between the
unpremultiplied version (copied into a premultiplied bitmap,
since drawing unpremultiplied is not currently supported)
and a premultiplied version of image files.

gm.h:
Add a getter for the resource path, so Samples can use it.

As of patch set 13, https://codereview.chromium.org/16816016/
and https://codereview.chromium.org/16983004/, which were
approved separately.

R=reed@google.com

Review URL: https://codereview.chromium.org/16410009

git-svn-id: http://skia.googlecode.com/svn/trunk@9612 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/ImageDecodingTest.cpp