History log of /external/skia/tests/CachedDecodingPixelRefTest.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6c22573edb234ad14df947278cfed010669a39a7 10-Jun-2014 reed <reed@chromium.org> hide SkBitmap::setConfig

patch from issue 325733002

TBR=scroggo

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/322963002
/external/skia/tests/CachedDecodingPixelRefTest.cpp
00f8d6c75d22ce8f95f932c5b101354b196fa0df 29-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert of add colortable support to imagegenerator (https://codereview.chromium.org/304443003/)"

Fix is to add colortable param to installPixels()

This reverts commit 924205aaf2e0c3c65dda13e0eaccde3e7b2a5c40.

BUG=skia:
R=scroggo@google.com, reed@chromium.org

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14958 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
924205aaf2e0c3c65dda13e0eaccde3e7b2a5c40 28-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of add colortable support to imagegenerator (https://codereview.chromium.org/304443003/)

Reason for revert:
failing tests

Original issue's description:
> add colortable support to imagegenerator
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14916

R=halcanary@google.com, scroggo@google.com
TBR=halcanary@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14917 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
b263985850a7a74ccd5fda2abb057b04f7254e41 28-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> add colortable support to imagegenerator

BUG=skia:
R=halcanary@google.com, scroggo@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14916 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.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/CachedDecodingPixelRefTest.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/CachedDecodingPixelRefTest.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/CachedDecodingPixelRefTest.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/CachedDecodingPixelRefTest.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/CachedDecodingPixelRefTest.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/CachedDecodingPixelRefTest.cpp
cf2f00872c559c892bb4b466bf678c7667490cce 04-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> SkDiscardableMemoryPool to abstract class

Motivation - we want to keep our public headers small.

R=scroggo@google.com, reed@google.com

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14063 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
709ca75f032d7c60eb53c5840524a875a3a6cdb1 24-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> SkOnce: add option to call another cleanup function once at exit.

Use this to clean up empty SkData and SkPathRef.

Current leaks:
Leaked SkRefCntBase: 40
Leaked SkFlattenable: 32
Leaked SkPixelRef: 32
Leaked SkMallocPixelRef: 32
Leaked SkFontConfigInterface: 1
Leaked SkWeakRefCnt: 1
Leaked SkTypeface: 1
Leaked SkFontMgr: 1
Leaked SkDataTable: 3
Leaked SkImage: 1
Leaked ???: 1
Leaked ???: 1

BUG=skia:
R=halcanary@google.com, reed@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13180 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.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/CachedDecodingPixelRefTest.cpp
227c24673196f5f06bee85e7e9aa067be90e1359 24-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Resolve a few memory leaks in tests.

Purge the global scaled image cache after use in tests. The cache was
right to hold on to the pixels indefinitely, but this change makes it
easier to run down actual memory leaks.

Add SK_DECLARE_INST_COUNT to several classes.

BUG=skia:
R=reed@google.com

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13171 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.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/CachedDecodingPixelRefTest.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/CachedDecodingPixelRefTest.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/CachedDecodingPixelRefTest.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/CachedDecodingPixelRefTest.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/CachedDecodingPixelRefTest.cpp
1d0654f69d1d0c3bb565fba018a11c77f25bc55e 12-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> be sure to unlock the discardablememory before deleting it

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12658 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
edd370f949a457f5d8f7a62efdaf685d4caf46fe 10-Dec-2013 halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sk_API for SkImageGenerator and SkInstallDiscardablePixelRef

Added SK_API to SkImageGenerator (already in include/).

Moved SkDiscardablePixelRef::Install to SkInstallDiscardablePixelRef,
added SK_API to that function, and moved declaration to
SkImageGenerator.h

This keeps the SkDiscardablePixelRef internal to Skia, but exposes a
method to install it into a bitmap.

Modifed tests that rely on this functio to use new version.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12612 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
bc55eec80ef376208b3c1bfc65d8dc8b672d59f0 10-Dec-2013 halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement SkAshmemDiscardableMemory

- Implement ashmem-backed SkDiscardableMemory subclass:
This class in only accesible via the SkDiscardableMemory::Create()
function, which replaces the mock implementation in
SkDiscardableMemory_none.cpp

- Added SkDiscardableMemory_ashmem.cpp to the Android port of Skia
Removed SkDiscardableMemory_none.cpp from the Android port.

- Added DiscardableMemoryTest.
Still needs work.

- SkDiscardablePixelRef Bugfix:
onLockPixels() now calls SkDELETE on the SkDiscardableMemory pointer
when it fails to unlock.

- Improved documentation inside ashmem.h

BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12608 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
726b97a3c497cdec2fb9f7fd01da4109e2e5ac46 06-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@12524 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
2c7c7ee47d75e7815ea8db05e924ab55958cb402 05-Dec-2013 halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache

Removed SkBitmapFactory since no clients were using it. New cache
selection mechanism can simply pass a SkDiscardableMemory::Factory
into the SkDiscardablePixelRef if non-default SkDiscardableMemory
should be used. Removed BitmapFactoryTest.

SkDiscardableMemory::Factory interface. Android will need this
functionality in the future inside their BitmapFactory.

Removed SkLazyPixelRef, since it's functionality is now subsumed into
SkDiscardablePixelRef. Removed LazyPixelRef test.

Modified SkDiscardablePixelRef to optionally allow it to use a
SkDiscardableMemory::Factory. This tiny change makes it a replacement
for SkLazyPixelRef. This functioanlity is also necessary for moving
Android over to SkDiscardablePixelRef from SkImageRef in a later CL.
Added a test for this.

SkDecodingImageGenerator::Install can optionally pass a factory in to
SkDiscardablePixelRef.

Removed SkImageCache, SkLruImageCache, and SkPurgeableImageCache.
This functionality can be handled much more cleanly by
SkDiscardableMemory.

New SkDiscardableMemoryPool class to replace SkLruImageCache. In a
later CL, we will replace SkImageRef_GlobalPool (used by android) as
well. This is a concrete implementation of
SkDiscardableMemory::Factory. Added a test for this.

modified gm/factory.cpp to remove dependnce on SkBitmapFactory +
SkLruImageCache. Now uses SkDecodingImageGenerator +
SkDiscardablePixelRef + SkDiscardableMemoryPool.

SkImageDecoder::Target replaces SkBitmapFactory::Target. The
DecodeMemoryToTarget function may disappear in the future.

Moved SkLazyCachingPixelRef::DecodeProc replaces
SkBitmapFactory::DecodeProc. This is a short term change, since
another CL changes SkLazyCachingPixelRef to use SkImageGenerator
instead of DecodeProc.

Modified DrawBitmapRectTest to use SkDiscardablePixelRef instead of
SkLazyPixelRef.

tools/LazyDecodeBitmap.cpp now uses SkDecodingImageGenerator +
SkDiscardablePixelRef instead of a SkBitmapFactory.

bench_pictures uses the Global SkDiscardableMemoryPool instead of a
global gLruImageCache.

R=reed@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12515 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
dcfebfa823fe09886f996b66f223c1deb37c16d1 05-Dec-2013 halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix MacOS build error from 36d08c5c90c7

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12506 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
36d08c5c90c7607cd559769f7a9c2b3364eeba85 05-Dec-2013 halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> SkCachingPixelRef to use SkImageGenerator

- Remove SkLazyCachingPixelRef class.

- Refactor unit tests.

BUG=
R=reed@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12505 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
ad04eb49f5d3f324e6b85411c776d7466c1fef92 21-Nov-2013 halcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add SkImageGenerator Interface

- Add SkDiscardablePixelRef class that uses SkDiscardableMemory and
a SkImageGenerator.

- Add SkDecodingImageGenerator class as an example of a
SkImageGenerator.

- Add DecodingImageGenerator unit test.

- Add SkBasicDiscardableMemory implmentation for unit tests only.

R=reed@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12341 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
6e3e42296b0d7a93325146d9c9a7e23ef90760fe 06-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Break up SkLazyPixelRef functionally into class hierarchy.

The reason for this CL is to allow greater decoder flexibility.
Chrome currently uses its own decoding functions. These allow for
greater flexibility in dealing with images with multiple frames or
partial data. The DecodeProc function was not flexible enough to
handle these. Instead of asking the decoder to squeeze everything
into the DecodeProc, we now ask the downstream library to inherit from
SkCachingPixelRef. If WebKit's LazyDecodingPixelRef is re-tooled to
inherit from SkCachingPixelRef, then it can make use of Skia's caching
ability while still allowing it to deal with multiple frames, scaling,
subsetting, and partial data.

- The abstract SkCachingPixelRef class handles caching the decoded
data in a SkScaledImageCache. This class relies on the virtual
functions onDecodeInfo() and onDecode() to do the actual decoding
of data.

- The SkLazyCachingPixelRef class is derived from SkCachingPixelRef.
It provides an implementation of onDecodeInfo() and onDecode() in
terms of calls to a SkBitmapFactory::DecodeProc function. It also
provides an Install() static method which installs a new
SkLazyCachingPixelRef into a SkBitmap.

SkLazyCachingPixelRef exists for two reasons: to test
SkCachingPixelRef within Skia and as an example for downstream
developers to make their own classes that inherit from
SkCachingPixelRef.

- The CachedDecodingPixelRefTest was updated to test the
SkLazyCachingPixelRef class and indirectly the SkCachingPixelRef
class.

BUG=
R=reed@google.com, scroggo@google.com

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12149 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
2bd8b8100529c96c81c30f749f672f4caf775b04 01-Nov-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> move SkImage::ColorType into SkColorType

objective -- move clients over to SkImage

tasks
- use SkImageInfo instead of SkBitmap::Config
- add support for colortables to SkImage
- add drawImage to SkCanvas
- return SkImage from readPixels

This CL works towards the first task

R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12077 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
b77f0f4ae560e97cc4cd2758752d955549017c3c 30-Oct-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@12013 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/tests/CachedDecodingPixelRefTest.cpp
7585479202f1fe0b6a0a9dcd27697b56154706f4 29-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Allow SkLazyPixelRef to use SkScaledImageCache

- SkScaledImageCache:
- Add new FindAndLock/AddAndLock variants that work well with
SkLazyPixelRefs (take width, height, generation_id).
- Add static versions of these new variants.

- SkLazyPixelRef:
- If NULL passed in as SkImageCache* in the constructor, it will
now default to using the static SkScaledImageCache methods to
cache decoded images.
- If (fImageCache==NULL), the default allocator can be changed
with the setAllocator method. If (fImageCache!=NULL), the
SkImageCache handles allocation.

- CachedDecodingPixelRefTest to test the new functionality.

BUG=
R=scroggo@google.com, mtklein@google.com, reed@google.com

Author: halcanary@google.com

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

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