aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImage_Generator.cpp
Commit message (Collapse)AuthorAge
* update callsites for Make image factoriesGravatar reed2016-03-17
| | | | | | | | | | | not forced yet, as we still have the build-guard. waiting on chrome CL BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810813003 TBR= Review URL: https://codereview.chromium.org/1810813003
* Revert "Revert of add Make variations to return SkImage by sk_sp (patchset ↵Gravatar reed2016-03-11
| | | | | | | | | | | | | | | #5 id:80001 of https://codereview.chromium.org/1778393002/ )" Fix was to call get() instead of release() when passing the sp to a bare-ptr method. This reverts commit e683c56115a210b5993df9294260bb147b408bfa. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789443002 TBR= Review URL: https://codereview.chromium.org/1789443002
* Revert of add Make variations to return SkImage by sk_sp (patchset #5 ↵Gravatar robertphillips2016-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | id:80001 of https://codereview.chromium.org/1778393002/ ) Reason for revert: Experimental revert to try to clear up ASAN failures Original issue's description: > add Make variations to return SkImage by sk_sp > > some internal call-sites update, but not. Will follow-up in future to complete that. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1778393002 > > Committed: https://skia.googlesource.com/skia/+/bd73ffb83022f1f6b1997e2a91c049949e88a8a2 TBR=fmalita@chromium.org,bsalomon@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1783063002
* add Make variations to return SkImage by sk_spGravatar reed2016-03-10
| | | | | | | | | some internal call-sites update, but not. Will follow-up in future to complete that. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1778393002 Review URL: https://codereview.chromium.org/1778393002
* unify peekPixels around pixmap parameterGravatar reed2016-03-09
| | | | | | | | | | requires this chrome CL to land first https://codereview.chromium.org/1775393003/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1784563002 Review URL: https://codereview.chromium.org/1784563002
* take gr-context parameter to refEncoded, indicating a desire for only ↵Gravatar reed2016-01-05
| | | | | | | | | | | | | | | 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
* Stop wrapping images backed by generators as bitmaps in SkGpuDevice (except ↵Gravatar bsalomon2015-12-08
| | | | | | when tiling) Review URL: https://codereview.chromium.org/1510903002
* optimize the disable-caching case for SkImage::readPixelsGravatar reed2015-11-24
| | | | | | | | | | 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
* scaling API on SkPixmapGravatar reed2015-11-23
| | | | | | BUG=skia:4481 Review URL: https://codereview.chromium.org/1463373002
* Remove image usage type enum. Use GrTextureParams instead.Gravatar bsalomon2015-10-12
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1404433002
* SkImage doesn't use props, so don't need to store itGravatar reed2015-10-04
| | | | | | | BUG=skia: TBR=bsalomon Review URL: https://codereview.chromium.org/1372153006
* Revert[4] of add ImageShader, sharing code with its Bitmap cousinGravatar reed2015-09-30
| | | | | | | | | | Now with GrTextureMaker subclasses to handle npot usage. This reverts commit 476506d070dbc59b158acc1a00c34bff95ab2968. BUG=skia: Review URL: https://codereview.chromium.org/1370223002
* Revert of Revert[2] of add ImageShader, sharing code with its Bitmap cousin ↵Gravatar reed2015-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* Revert[2] of add ImageShader, sharing code with its Bitmap cousinGravatar reed2015-09-25
| | | | | | | | | | | | 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
* remove unused (by the outside) SkImage::newSurface, and simplify newImage -> ↵Gravatar reed2015-09-24
| | | | | | | | newSubset BUG=skia: Review URL: https://codereview.chromium.org/1364443002
* Remove SkNEW and SkDELETE macrosGravatar mdempsky2015-09-22
| | | | | | | | | | | | | | | 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
* Revert of add ImageShader, sharing code with its Bitmap cousin (patchset #10 ↵Gravatar tomhudson2015-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* add ImageShader, sharing code with its Bitmap cousinGravatar reed2015-09-18
| | | | | | | | | | 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
* Purge cached resources on SkImage destruction.Gravatar fmalita2015-09-18
| | | | | | | BUG=532981 R=reed@google.com,mtklein@google.com Review URL: https://codereview.chromium.org/1352883004
* share IDs between cacherator and its host-imageGravatar reed2015-09-17
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1357543002
* remove code from SK_SUPPORT_LEGACY_NEWFROMGENERATOR, eliminates caller of ↵Gravatar reed2015-09-14
| | | | | | | | deprecated SkInstallDiscardablePixelRef BUG=skia: Review URL: https://codereview.chromium.org/1344663002
* Use SkImageCacherator in SkImagesGravatar reed2015-09-10
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