History log of /external/skia/src/lazy/SkCachingPixelRef.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/src/lazy/SkCachingPixelRef.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/src/lazy/SkCachingPixelRef.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/src/lazy/SkCachingPixelRef.cpp
e13af711d4ff9031c9ed3054a4c33a56a0c62e1f 13-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of https://codereview.chromium.org/132643007/
Reason for revert: broken tests

TBR=
NOTREECHECKS=true
NOTRY=true
BUG=

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13058 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
f0b56e74485d59465194b21f89fa3bc3a7962ac6 13-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert of https://codereview.chromium.org/129423002/"

fixed new api references in unit tests

This reverts commit ffc0058e1fbcbd69617e1f41b2dce5b5765ff99e.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13057 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
9b06ba4c91484d09565ff4a572d8c5af15dd429e 13-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of https://codereview.chromium.org/129423002/
Reason for revert: broke tests (compile)

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

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13056 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
dd9ea9262cb61b545fcf414fbde677eb2b62fee4 13-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add SkBitmap::installPixelRef()

BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13055 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
d0419b1fe781ed21d4aa0dc80df6b3e79ed37e46 06-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "Revert "Revert of https://codereview.chromium.org/110593003/"""

This reverts commit aaa89649590323fe40f52439d9a9a3376bb3b8ae.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12910 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
ba82bd11e2c055f885b2327aa230d2dac8b53f03 06-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "Revert of https://codereview.chromium.org/110593003/""

This reverts commit 0fef787f33aa38109a0c8427e0098d997efdd5ff.

failed in chrome: https://codereview.chromium.org/124503002/

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12906 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
98272d91421c52211e0e0137f494c1cad01c3c68 04-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@12901 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
927138977fa256a6719baf74221882555b24008f 03-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert of https://codereview.chromium.org/110593003/"

This reverts commit c7abb25b25ba8b97948371d2bf0a2e3e78468f73.

and fixes the ashmem break

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12887 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
27f890219b09e4774da75e6a11ec82849eadae5a 03-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of https://codereview.chromium.org/110593003/
Reason for revert: SkImageRef_ashmem doesn't compile

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

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12884 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
f1ce05288a8fee6e691c3dff5db9dcd47818060f 03-Jan-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add onNewLockPixels, that returns rowbytes and relies on info in pixelref

This reverts commit 890a6ec633c1f54891104a072a8964b4c2c81af9.

BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12883 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.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/src/lazy/SkCachingPixelRef.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/src/lazy/SkCachingPixelRef.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/src/lazy/SkCachingPixelRef.cpp
bf790232f6d94b54239dbc210d8beee7411ca458 13-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Update all callsites to use info for pixelrefs

#define SK_SUPPORT_LEGACY_PIXELREF_CONSTRUCTOR in chrome to keep old API signature (for now)

BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12677 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
0daa1adb03b4b1fc11d854cb7754416ac05a31e8 13-Dec-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reverting r12665 & r12666 (Remove duplicate impl for SkImageInfo flattening) due to Chromium/Blink compilation errors

https://codereview.chromium.org/112603003/



git-svn-id: http://skia.googlecode.com/svn/trunk@12667 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
93b40594b78ab40170b5a7fa0811fa95ab8fc30f 13-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remvoe duplicate impl for SkImageInfo flattening
Add onNewLockPixels

This reverts commit bb8eff6a70c52b7644391cfd4f4d21bf7294a6bf.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12665 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
c83a91f4721739f05f9df51d496d50b5d028b132 13-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert of https://codereview.chromium.org/112783004/"

This reverts commit 3293fe57a7507541e9040eab880dcd82c43881f4.

Conflicts:
src/core/SkScaledImageCache.cpp

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12663 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
281713e4d4d77e086a0053351da6f7358d3cf4b6 12-Dec-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of https://codereview.chromium.org/112783004/
Reason for revert: Failing assert on Android

R=scroggo@google.com, halcanary@google.com, reed@google.com, rmistry@google.com
TBR=halcanary@google.com, reed@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12646 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
772d8524cef44f973abde368a69f8d17b55c6d74 12-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> ensure that we call onUnlock only when we onLock succeeded

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12642 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
398337b3a5d66a7db5d36a3b5182e4407e2292f7 11-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "remvoe duplicate impl for SkImageInfo flattening"

Reason: breaks chrome_mac_tests which still have non-imageinfo constructors

This reverts commit a06b8cf60b39bda93e9ef1a73579007b2b930d29.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12631 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
f3aead2829fa515f790631ee65784a7b9b073343 11-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> remvoe duplicate impl for SkImageInfo flattening

Revert "Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap.""""""

This reverts commit eabd6b2ed4e494b323c08f32358f45950a0368c3.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12624 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
6a32add491cc736aab95561d137909cd7c5d65ef 11-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."""""

This reverts commit d08eca87a0bef10112a211de540f89656a80b86a.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12623 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
6965a0a2df9d35cd0a25e1738f0388272d03f399 11-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap.""""

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12622 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
2ebc10dd12a6fe55fda37a9bd5b1e0c1c1e08232 06-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."""

This reverts commit 5f035e90d6dea0139a4f204b634e7b7b3b4976d7.

Reverting because it breaks chrome/blink due to new SkPixelRef constructor arg.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12551 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
473f0aa2bb218e50fce5e19063f8c8fdaf57fad4 06-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap.""

This reverts commit 4174afb18a9746bbad2a06c0ec2d4ad35f72d790.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12547 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
5b132b28da61e89cdcb84e95f30a58f8184739fc 06-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."

This reverts commit 154e08b2f5904ef533da694e3510befcb9a3f3e2.

revert due to warnings

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12538 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.cpp
3e89524e747b513986abfeeea00b6fac79593f26 06-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12537 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.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/src/lazy/SkCachingPixelRef.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/src/lazy/SkCachingPixelRef.cpp
2614418aee9f12e07a4483e32f72ee5393ed12ba 07-Nov-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@12161 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/lazy/SkCachingPixelRef.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/src/lazy/SkCachingPixelRef.cpp