History log of /external/skia/src/image/SkImage_Generator.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
05dd251e5e135626d170b9e77eb64729bd482169 05-Jan-2016 reed <reed@google.com> take gr-context parameter to refEncoded, indicating a desire for only gpu-specific formats

Prime motivator:
- we always call refEncoded on the generator when trying to upload
- we call it *before* we ask for raster or YUV
- for blink, this call can be very slow, as they have to cons-up their SkData the first time (and grab a mutex to do it)
- this parameter will indicate to them that we're only interested in gpu formats, which they will know if they have.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556333004

Review URL: https://codereview.chromium.org/1556333004
/external/skia/src/image/SkImage_Generator.cpp
1cf6f9b6b51bcf09d93142ba40d6c331c21f50a6 08-Dec-2015 bsalomon <bsalomon@google.com> Stop wrapping images backed by generators as bitmaps in SkGpuDevice (except when tiling)

Review URL: https://codereview.chromium.org/1510903002
/external/skia/src/image/SkImage_Generator.cpp
6868c3fccf65d297a64919a7cb74f09780c845c3 24-Nov-2015 reed <reed@google.com> optimize the disable-caching case for SkImage::readPixels

If the client wants no caching, and we haven't already cached it, pass the
caller's dst-buffer directly down to the generator, avoiding the (previous)
extra memcpy.

BUG=skia:4594

Review URL: https://codereview.chromium.org/1473373002
/external/skia/src/image/SkImage_Generator.cpp
095530389d8211895309107a4f74beefacce638c 23-Nov-2015 reed <reed@google.com> scaling API on SkPixmap

BUG=skia:4481

Review URL: https://codereview.chromium.org/1463373002
/external/skia/src/image/SkImage_Generator.cpp
afa95e270c64c9777647b6c58b796750ced57c39 12-Oct-2015 bsalomon <bsalomon@google.com> Remove image usage type enum. Use GrTextureParams instead.

BUG=skia:

Review URL: https://codereview.chromium.org/1404433002
/external/skia/src/image/SkImage_Generator.cpp
af3fbfca0ab706230c33e46af620e0044a56c83e 04-Oct-2015 reed <reed@chromium.org> SkImage doesn't use props, so don't need to store it

BUG=skia:
TBR=bsalomon

Review URL: https://codereview.chromium.org/1372153006
/external/skia/src/image/SkImage_Generator.cpp
856e9d921462136da8562f8f122d42e114cd4710 30-Sep-2015 reed <reed@google.com> Revert[4] of add ImageShader, sharing code with its Bitmap cousin

Now with GrTextureMaker subclasses to handle npot usage.

This reverts commit 476506d070dbc59b158acc1a00c34bff95ab2968.

BUG=skia:

Review URL: https://codereview.chromium.org/1370223002
/external/skia/src/image/SkImage_Generator.cpp
476506d070dbc59b158acc1a00c34bff95ab2968 28-Sep-2015 reed <reed@google.com> Revert of Revert[2] of add ImageShader, sharing code with its Bitmap cousin (patchset #11 id:200001 of https://codereview.chromium.org/1352293002/ )

Reason for revert:
guess: Need to handle NPOT support in shader case

Original issue's description:
> Revert[2] of add ImageShader, sharing code with its Bitmap cousin
>
> Adjustment from previous land : runtime check for npot-support when texture is requested for tiling.
>
> (patchset #10 id:180001 of https://codereview.chromium.org/1342113002/ )
>
> This reverts commit f2608513626264459a00388537175600b515cae2.
>
> BUG=skia:4365
>
> Committed: https://skia.googlesource.com/skia/+/fe05707c356d2a8c2c69222591d4cafbd456b4e5

TBR=fmalita@chromium.org,robertphillips@google.com,bsalomon@google.com,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4365

Review URL: https://codereview.chromium.org/1375673002
/external/skia/src/image/SkImage_Generator.cpp
fe05707c356d2a8c2c69222591d4cafbd456b4e5 25-Sep-2015 reed <reed@google.com> Revert[2] of add ImageShader, sharing code with its Bitmap cousin

Adjustment from previous land : runtime check for npot-support when texture is requested for tiling.

(patchset #10 id:180001 of https://codereview.chromium.org/1342113002/ )

This reverts commit f2608513626264459a00388537175600b515cae2.

BUG=skia:4365

Review URL: https://codereview.chromium.org/1352293002
/external/skia/src/image/SkImage_Generator.cpp
7b6945bc4e639d7cc4a49b84d492690f8e865566 24-Sep-2015 reed <reed@google.com> remove unused (by the outside) SkImage::newSurface, and simplify newImage -> newSubset

BUG=skia:

Review URL: https://codereview.chromium.org/1364443002
/external/skia/src/image/SkImage_Generator.cpp
106b12427e642d067dd5b48664eb693653853583 22-Sep-2015 mdempsky <mdempsky@chromium.org> Remove SkNEW and SkDELETE macros

This CL removes the uses of SkNEW that have resprouted since commit
385fe4d, and removes the macros entirely now that Android and Chromium
have been cleaned up to no longer depend on them.

A bunch of files implicitly depend on #include <new> from SkPostConfig.h
still though, so keep that for now. To be fixed in a followup CL.

[mtklein mucking around]
Only public API removed.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1360653004
/external/skia/src/image/SkImage_Generator.cpp
f2608513626264459a00388537175600b515cae2 18-Sep-2015 tomhudson <tomhudson@google.com> Revert of add ImageShader, sharing code with its Bitmap cousin (patchset #10 id:180001 of https://codereview.chromium.org/1342113002/ )

Reason for revert:
Failing ImageNewShaderTest on both Android (Tegra3 GPU) and iOS bots.

e.g.

/Users/chrome-bot/buildbot/skiabot-ipad4-000/build/slave/workdir/build/skia/tests/
ImageNewShaderTest.cpp:24 0 == memcmp(bm1.getPixels(), bm2.getPixels(), bm1.getSize())
ImageNewShaderTest.cpp:95 0xFFFF0000 == bmt.getColor(0, y)
ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y)
ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y)
ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y)
ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y)
ImageNewShaderTest.cpp:95 0xFFFF0000 == bmt.getColor(0, y)
...

Original issue's description:
> add ImageShader, sharing code with its Bitmap cousin
>
> This is done by having abstracted the BitmapShaderContext to take a BitmapProvider, instead of just a bitmap. This allows us to share all of that code between SkBitmap and SkImage, since both are valid providers.
>
> It also means that we can simplify SkImage_Base to not need a virtual for onNewShader, since ALL images can uniformly be turned into a shader now.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0b93e3149d2cb30860c51f9f3204ae811d9a97ca

TBR=fmalita@chromium.org,bsalomon@google.com,robertphillips@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1355863002
/external/skia/src/image/SkImage_Generator.cpp
0b93e3149d2cb30860c51f9f3204ae811d9a97ca 18-Sep-2015 reed <reed@google.com> add ImageShader, sharing code with its Bitmap cousin

This is done by having abstracted the BitmapShaderContext to take a BitmapProvider, instead of just a bitmap. This allows us to share all of that code between SkBitmap and SkImage, since both are valid providers.

It also means that we can simplify SkImage_Base to not need a virtual for onNewShader, since ALL images can uniformly be turned into a shader now.

BUG=skia:

Review URL: https://codereview.chromium.org/1342113002
/external/skia/src/image/SkImage_Generator.cpp
3b0d532df72db806c255cad98538fcbb4d9678a8 18-Sep-2015 fmalita <fmalita@chromium.org> Purge cached resources on SkImage destruction.

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

Review URL: https://codereview.chromium.org/1352883004
/external/skia/src/image/SkImage_Generator.cpp
af5bf22e3bf6f2aae08e7d0b62c38656a5e983aa 17-Sep-2015 reed <reed@google.com> share IDs between cacherator and its host-image

BUG=skia:

Review URL: https://codereview.chromium.org/1357543002
/external/skia/src/image/SkImage_Generator.cpp
2bcab827872420762061f31200bedbd14e00b2c7 14-Sep-2015 reed <reed@google.com> remove code from SK_SUPPORT_LEGACY_NEWFROMGENERATOR, eliminates caller of deprecated SkInstallDiscardablePixelRef

BUG=skia:

Review URL: https://codereview.chromium.org/1344663002
/external/skia/src/image/SkImage_Generator.cpp
85d9178832f4a64c9d80ffb14cb9dab4fe0fa54a 10-Sep-2015 reed <reed@google.com> Use SkImageCacherator in SkImages

Possible follow-up changes to consider

1. Roll SkImage_Raster and _Gpu into _Generator, where the generator (or cacherator) is backed by a pre-existing texture or raster.
2. Evolve SkImageUsageType into a verb requiring stretching, and have the caller (common code) digest the caps() and usage, so that subclasses are just told what to do (stretch or not)
3. Common code/utility to convert an unstretched texture into a stretch one (and cache it) if the generator can only make an unstretched one.

BUG=skia:

Review URL: https://codereview.chromium.org/1282363002
/external/skia/src/image/SkImage_Generator.cpp