aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImage_Raster.cpp
Commit message (Collapse)AuthorAge
* hide lockpixels api behind flagGravatar Mike Reed2017-04-17
| | | | | | | | | | | | | | guarded by SK_SUPPORT_OBSOLETE_LOCKPIXELS needs https://codereview.chromium.org/2820873002/# to land first Bug: skia:6481 Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09 Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09 Reviewed-on: https://skia-review.googlesource.com/13580 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Reed <reed@google.com>
* clean ups in SkPixelRefGravatar Mike Reed2017-04-11
| | | | | | | | | | | - isLazyGenerated no longer needed - requestLock does not need a virtual Bug: skia:4328 Change-Id: I56ab5ee1e10f2a20332eb58464a2a48b487101e6 Reviewed-on: https://skia-review.googlesource.com/13195 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Support parametric transfer functions in SkImage_Raster::onMakeColorSpace()Gravatar Matt Sarett2017-04-03
| | | | | | | | BUG=skia:6456 Change-Id: Ib94bba9db669562a9b2b64fff56ebe40a2bc0096 Reviewed-on: https://skia-review.googlesource.com/11122 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Use SkTransferFunctionBehavior for raster pixel conversionsGravatar Matt Sarett2017-03-28
| | | | | | | | | | | Fixes some gbr-8888 behaviors. BUG=skia: Change-Id: I1351b043129f7ed0e125bfdb626a0ecaf64c15cc Reviewed-on: https://skia-review.googlesource.com/10169 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Remove GrFragmentProcessor-derived class' GrTexture-based ctorsGravatar Robert Phillips2017-03-27
| | | | | | | | | | | | | | | | | | | | | | Split out into: https://skia-review.googlesource.com/c/8881/ (Switch GrTextureStripAtlas over to GrTextureProxies) https://skia-review.googlesource.com/c/8942/ (Wrap cached GrTextures in GrTextureProxies (e.g., blur profiles, nine-patch blurs, etc.)) https://skia-review.googlesource.com/c/8997/ (Clean up/remove unused GrFragmentProcessor-derived ctors) https://skia-review.googlesource.com/c/9191/ (Switch SkImageGenerator over to generating GrTextureProxies) https://skia-review.googlesource.com/c/9448/ (Switch GrYUVProvider over to GrTextureProxies) https://skia-review.googlesource.com/c/9559/ (Preparatory Proxification) https://skia-review.googlesource.com/c/9626/ (Consolidate Proxy caching code in GrResourceProvider) https://skia-review.googlesource.com/c/9683/ (More pre-emptive proxification) https://skia-review.googlesource.com/c/9917/ (Make experimental Perlin noise shader take texture proxies) https://skia-review.googlesource.com/c/9961/ (rename makeCopyForTextureParams to isACopyNeededForTextureParams) https://skia-review.googlesource.com/c/9945/ (Make SkImageCacherator be deferred) https://skia-review.googlesource.com/c/10180/ (Add new proxy-based DetermineDomainMode w/ test) Change-Id: Ia33389d92360e542a9d2bf395948deb04d017465 Reviewed-on: https://skia-review.googlesource.com/8823 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make SkGr.h GrTexture-freeGravatar Robert Phillips2017-03-23
| | | | | | | | | Minor cleanup. Change-Id: Ide69516c686450e6441368382c86444da6a74937 Reviewed-on: https://skia-review.googlesource.com/9950 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Mark overridden destructors with 'override' and remove 'virtual'Gravatar Brian Salomon2017-03-22
| | | | | | | | | This silences a new warning in clang 5.0 Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8 Reviewed-on: https://skia-review.googlesource.com/10006 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Remove SkImage_Base::asTextureRef (in favor of asTextureProxyRef)Gravatar Robert Phillips2017-03-22
| | | | | | | | | Minor consolidation/clean-up Change-Id: I9f8ba794cfb95b33dd60ada0e734ddd2f5f21710 Reviewed-on: https://skia-review.googlesource.com/9947 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Improve color type handling in SkImage_Base::makeColorSpace()Gravatar Matt Sarett2017-03-22
| | | | | | | | | | | | Color space xforms with Alpha8 images are no-ops. Other xforms should use 8888 as dst color type. BUG=skia: Change-Id: Iede3d94d23c8f4c3dabdaa5450af7b5bfff8d24f Reviewed-on: https://skia-review.googlesource.com/9996 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* SkImage_Raster: Keep tmp in scope while it is in useGravatar Matt Sarett2017-03-21
| | | | | | | | | BUG=skia: Change-Id: Ida1457ad7489f23804b8e4317e283c1dce0f6fc6 Reviewed-on: https://skia-review.googlesource.com/9918 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix discardable memory bot by calling lockPixels()Gravatar Matt Sarett2017-03-20
| | | | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE BUG=skia: Change-Id: I684226544f0e1f0234257ba88f6f2e56c32d5706 Reviewed-on: https://skia-review.googlesource.com/9783 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Revert "Add color spin test for SkColorSpaceXformCanvas""Gravatar Mike Klein2017-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 73e21af21390c2806eb1350253233903808edd6b. Reason for revert: I will fix the broken bot next week. Original change's description: > Revert "Add color spin test for SkColorSpaceXformCanvas" > > This reverts commit cb01aec63bcb3dee52afcf3605bcd64166b873c0. > > Reason for revert: Breaks Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE > > Original change's description: > > Add color spin test for SkColorSpaceXformCanvas > > > > Also changes behavior to treat nullptr srcs as sRGB. > > > > Testing locally, it looks like 353 gms have no diffs from 8888. > > There are 269 diffs - some are fine (gms that do color space stuff) > > and some are bugs. > > > > BUG=skia: > > > > Change-Id: I55c2825f4f4b857e0b0a0ec050c6db82ac881492 > > Reviewed-on: https://skia-review.googlesource.com/9738 > > Reviewed-by: Brian Osman <brianosman@google.com> > > Commit-Queue: Matt Sarett <msarett@google.com> > > > > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reviews@skia.org > # Not skipping CQ checks because original CL landed > 1 day ago. > BUG=skia: > > Change-Id: I70bb69f747b863d267494e37a60888a51ab0184c > Reviewed-on: https://skia-review.googlesource.com/9823 > Reviewed-by: Eric Boren <borenet@google.com> > Commit-Queue: Eric Boren <borenet@google.com> > TBR=borenet@google.com,mtklein@google.com,msarett@google.com,reviews@skia.org,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia: Change-Id: I766382e6655f614042cded84f547f9fd5b109fca Reviewed-on: https://skia-review.googlesource.com/9879 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "Add color spin test for SkColorSpaceXformCanvas"Gravatar Eric Boren2017-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cb01aec63bcb3dee52afcf3605bcd64166b873c0. Reason for revert: Breaks Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE Original change's description: > Add color spin test for SkColorSpaceXformCanvas > > Also changes behavior to treat nullptr srcs as sRGB. > > Testing locally, it looks like 353 gms have no diffs from 8888. > There are 269 diffs - some are fine (gms that do color space stuff) > and some are bugs. > > BUG=skia: > > Change-Id: I55c2825f4f4b857e0b0a0ec050c6db82ac881492 > Reviewed-on: https://skia-review.googlesource.com/9738 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reviews@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia: Change-Id: I70bb69f747b863d267494e37a60888a51ab0184c Reviewed-on: https://skia-review.googlesource.com/9823 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Eric Boren <borenet@google.com>
* More pre-emptive proxificationGravatar Robert Phillips2017-03-16
| | | | | | | | | These methods are not called yet. This CL is broken out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors) Change-Id: I2bf38202750e91e66a8044a790ccfe34d59e08a7 Reviewed-on: https://skia-review.googlesource.com/9683 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add color spin test for SkColorSpaceXformCanvasGravatar Matt Sarett2017-03-15
| | | | | | | | | | | | | | | Also changes behavior to treat nullptr srcs as sRGB. Testing locally, it looks like 353 gms have no diffs from 8888. There are 269 diffs - some are fine (gms that do color space stuff) and some are bugs. BUG=skia: Change-Id: I55c2825f4f4b857e0b0a0ec050c6db82ac881492 Reviewed-on: https://skia-review.googlesource.com/9738 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Begin implementation of SkImage_Base::makeColorSpaceGravatar Matt Sarett2017-03-14
| | | | | | | | | | | | | | Originally: https://skia-review.googlesource.com/9622 CQ_INCLUDE_TRYBOTS=skia.primary:Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release,Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-Android BUG=skia: Change-Id: I7ef1daaab32892399e3333e4b2fc75d70a1900e4 Reviewed-on: https://skia-review.googlesource.com/9651 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "Begin implementation of SkImage_Base::makeColorSpace"Gravatar Mike Reed2017-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 98629efdde9236e444d7b3fa644eaab3a1301566. Reason for revert: unittest failures Failures: ../../../tests/ImageTest.cpp:1099 0x28 == SkGetPackedR32(*p3Bitmap.getAddr32(0, 0)) ../../../tests/ImageTest.cpp:1100 0x40 == SkGetPackedG32(*p3Bitmap.getAddr32(0, 0)) ../../../tests/ImageTest.cpp:1101 0x5E == SkGetPackedB32(*p3Bitmap.getAddr32(0, 0)) Original change's description: > Begin implementation of SkImage_Base::makeColorSpace > > BUG=skia: > > Change-Id: Idf946faa64dad32a28070a430926a8225dbf6e5a > Reviewed-on: https://skia-review.googlesource.com/9622 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I6ce2a28ca581f7d01322588c2435133d8c6a2435 Reviewed-on: https://skia-review.googlesource.com/9649 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Begin implementation of SkImage_Base::makeColorSpaceGravatar Matt Sarett2017-03-14
| | | | | | | | | BUG=skia: Change-Id: Idf946faa64dad32a28070a430926a8225dbf6e5a Reviewed-on: https://skia-review.googlesource.com/9622 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Partially defer SkImage_GpuGravatar Robert Phillips2017-03-10
| | | | | | | | | One of SkImageCacherator, GrBitmapTextureMaker, GrImageTextureMaker, GrTextureAdjuster, GrTextureProducer or SkImage has to take the first step. This is probably the least odd of the options. Change-Id: Ie167034553451f4b3633a5a1548dbd4d75839b3d Reviewed-on: https://skia-review.googlesource.com/9488 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make SkGr.h private and remove unused functionsGravatar Brian Osman2017-03-08
| | | | | | | | | BUG=skia: Change-Id: I6699d00c5412ed9d9bf14b032a08b06b1c766bce Reviewed-on: https://skia-review.googlesource.com/9398 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Make raster pipeline support all pixel conversionsGravatar Matt Sarett2017-02-14
| | | | | | | | | | | BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Idc76999d0f5591a567b3976cb9db829c350e4be2 Reviewed-on: https://skia-review.googlesource.com/8304 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Revert "Always make SkImageShaders in heap.""Gravatar Herb Derby2017-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 07f665efb918f68e406b76a78d0b76d5c714f16c. Reason for revert: Android code moved from priv api to real api Original change's description: > Revert "Always make SkImageShaders in heap." > > This reverts commit ff590a12441002d281254ec6a86070ac0a19263f. > > Reason for revert: This breaks the android roll because they are using > a private call. Updating android tests to use new api. > > Original change's description: > > Always make SkImageShaders in heap. > > > > I made a couple of measurments, and it looks like any differences is > > well below the noise threshold. > > > > Just for the record run1: .9991 of baseline and run2 .9988 of baseline. > > I was using top25 .skps as workload. > > > > TBR=mtklein@google.com > > > > Change-Id: If4fa06e5d5df72fb67dbb4bbb99c926f05765897 > > Reviewed-on: https://skia-review.googlesource.com/8341 > > Reviewed-by: Herb Derby <herb@google.com> > > Commit-Queue: Herb Derby <herb@google.com> > > > > TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: Ibdaafc796702e250933b62e5f4abb5e2ce8d40c0 > Reviewed-on: https://skia-review.googlesource.com/8393 > Commit-Queue: Herb Derby <herb@google.com> > Reviewed-by: Herb Derby <herb@google.com> > TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I320b5ebf707d74ffafd8b70d69646b74a30f0ae8 Reviewed-on: https://skia-review.googlesource.com/8407 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Revert "Always make SkImageShaders in heap."Gravatar Herb Derby2017-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ff590a12441002d281254ec6a86070ac0a19263f. Reason for revert: This breaks the android roll because they are using a private call. Updating android tests to use new api. Original change's description: > Always make SkImageShaders in heap. > > I made a couple of measurments, and it looks like any differences is > well below the noise threshold. > > Just for the record run1: .9991 of baseline and run2 .9988 of baseline. > I was using top25 .skps as workload. > > TBR=mtklein@google.com > > Change-Id: If4fa06e5d5df72fb67dbb4bbb99c926f05765897 > Reviewed-on: https://skia-review.googlesource.com/8341 > Reviewed-by: Herb Derby <herb@google.com> > Commit-Queue: Herb Derby <herb@google.com> > TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ibdaafc796702e250933b62e5f4abb5e2ce8d40c0 Reviewed-on: https://skia-review.googlesource.com/8393 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Always make SkImageShaders in heap.Gravatar Herb Derby2017-02-13
| | | | | | | | | | | | | | | I made a couple of measurments, and it looks like any differences is well below the noise threshold. Just for the record run1: .9991 of baseline and run2 .9988 of baseline. I was using top25 .skps as workload. TBR=mtklein@google.com Change-Id: If4fa06e5d5df72fb67dbb4bbb99c926f05765897 Reviewed-on: https://skia-review.googlesource.com/8341 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Continue making Ganesh use absolute texture coordinates - take 2Gravatar Robert Phillips2017-01-20
| | | | | | | | | | | | The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix) Relanding of: https://skia-review.googlesource.com/c/6977/ Change-Id: Ibc9b9e354f7fc23b1a6e6e4fe7c9fe3cef771c02 Reviewed-on: https://skia-review.googlesource.com/7265 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Delete SkMakeImageFromPixelRefGravatar Matt Sarett2017-01-05
| | | | | | | | | | | There are no callers. BUG=skia: Change-Id: Ie743fc61cc0a0ca755d4e3fdab8a5985fa35fbd3 Reviewed-on: https://skia-review.googlesource.com/6598 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* SkBitmap::setPixelRef(): less reference churnGravatar Hal Canary2016-12-12
| | | | | | | | | BUG=skia: Change-Id: I9657e4af5fcc808f9175ff336155374ccc77999d Reviewed-on: https://skia-review.googlesource.com/5461 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Plumb dst color space in many places, rather than "mode"Gravatar Brian Osman2016-12-09
| | | | | | | | | | | | | | | | | This is less to type in most cases, and gives us more information (for things like picture-backed images, where we need to know all about the destination surface). Additionally, strip out the plumbing entirely for bitmap sources, where we don't need to know anything. BUG=skia: Change-Id: I4deff6c7c345fcf62eb08b2aff0560adae4313da Reviewed-on: https://skia-review.googlesource.com/5748 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* GrTextureProducer cleanup, phase two: Producer, Adjuster, MakerGravatar Brian Osman2016-11-28
| | | | | | | | | | | | | | | | Previously: GrTextureProducer, GrTextureAdjuster, and GrTextureMaker were all in GrTextureParamsAdjuster.h. Now they're each in their own header. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5202 Change-Id: I17fa9057b11511aa4d3e15569ea1c378cfec4c80 Reviewed-on: https://skia-review.googlesource.com/5202 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* GrTextureProducer cleanup, phase one: Bitmap and Image makersGravatar Brian Osman2016-11-28
| | | | | | | | | | | | | | | Split these into their own files, and actually name the files after the classes they contain. The top three classes in the hierarchy still need attention, but those are going to be trickier. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5195 Change-Id: I295f4d50e35748eac38a31f302e14b5b62653c55 Reviewed-on: https://skia-review.googlesource.com/5195 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* remove SkPixelRef::refEncodedData()Gravatar Hal Canary2016-11-22
| | | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5001 Change-Id: I15dba4f44c762ab69a23eb8a77adff5f63763e30 Reviewed-on: https://skia-review.googlesource.com/5001 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Support decoding images to multiple formats, depending on usageGravatar Brian Osman2016-11-21
| | | | | | | | | | | | | | | | | | | | | | | | Our codec generator will now preserve any asked-for color space, and convert the encoded data to that representation. Cacherator now allows decoding an image to both legacy (nullptr color space), and color-correct formats. In color-correct mode, we choose the best decoded format, based on the original properties, and our backend's capabilities. Preference is given to the native format, when it's already texturable (sRGB 8888 or F16 linear). Otherwise, we prefer linear F16, and fall back to sRGB when that's not an option. Re-land (and fix) of: https://skia-review.googlesource.com/c/4438/ https://skia-review.googlesource.com/c/4796/ BUG=skia:5907 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4838 Change-Id: I20ff972ffe1c7e6535ddc501e2a8ab8c246e4061 Reviewed-on: https://skia-review.googlesource.com/4838 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Rename GrTextureParams to GrSamplerParamsGravatar Brian Salomon2016-11-17
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4965 Change-Id: I7d52e81c670e92ca96117284f44b274ce3cc3671 Reviewed-on: https://skia-review.googlesource.com/4965 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Support decoding images to multiple formats, depending on usage"Gravatar Brian Osman2016-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c73a1ecbed64652b3d7aa8dc6face9a2205ce830. Reason for revert: ANGLE and CommandBuffer failures Original change's description: > Support decoding images to multiple formats, depending on usage > > Our codec generator will now preserve any asked-for color space, and > convert the encoded data to that representation. Cacherator now > allows decoding an image to both legacy (nullptr color space), and > color-correct formats. In color-correct mode, we choose the best > decoded format, based on the original properties, and our backend's > capabilities. Preference is given to the native format, when it's > already texturable (sRGB 8888 or F16 linear). Otherwise, we prefer > linear F16, and fall back to sRGB when that's not an option. > > BUG=skia:5907 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4438 > > Change-Id: I847c243dcfb72d8c0f1f6fc73c09547adea933f0 > Reviewed-on: https://skia-review.googlesource.com/4438 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > TBR=mtklein@google.com,bsalomon@google.com,msarett@google.com,brianosman@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1818f937464573d601f64e5a1f1eb43f5a778f4e Reviewed-on: https://skia-review.googlesource.com/4832 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Support decoding images to multiple formats, depending on usageGravatar Brian Osman2016-11-15
| | | | | | | | | | | | | | | | | | | | Our codec generator will now preserve any asked-for color space, and convert the encoded data to that representation. Cacherator now allows decoding an image to both legacy (nullptr color space), and color-correct formats. In color-correct mode, we choose the best decoded format, based on the original properties, and our backend's capabilities. Preference is given to the native format, when it's already texturable (sRGB 8888 or F16 linear). Otherwise, we prefer linear F16, and fall back to sRGB when that's not an option. BUG=skia:5907 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4438 Change-Id: I847c243dcfb72d8c0f1f6fc73c09547adea933f0 Reviewed-on: https://skia-review.googlesource.com/4438 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Enable SkImage_pinAsTexture to signal if the operation succeeded.Gravatar Derek Sollenberger2016-11-09
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4488 Change-Id: Id667f385b172e4a56faa9324066f57295af30ef3 Reviewed-on: https://skia-review.googlesource.com/4488 Commit-Queue: Derek Sollenberger <djsollen@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Rename SkSourceGammaTreatment to SkDestinationSurfaceColorModeGravatar Brian Osman2016-11-09
| | | | | | | | | | | | | | | This is much more explicit about what that type represents (are we in legacy mode or not), which also makes it suitable for other (upcoming) usage. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4529 Change-Id: Iacb397c34e7765f1ca86c0195bc622b2be4d9acf Reviewed-on: https://skia-review.googlesource.com/4529 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add alpha type to texture producerGravatar brianosman2016-08-18
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250403003 Review-Url: https://codereview.chromium.org/2250403003
* Add alphaType() to SkImageGravatar brianosman2016-08-17
| | | | | | | | | | | | | | Keep isOpaque as a convenience method -- many places really only need to know that for optimization purposes (SrcOver -> Src, etc...). In all the places where we pull data back out or convert to another object and need to supply an SkImageInfo, we can avoid losing information about premulness. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250663002 Review-Url: https://codereview.chromium.org/2250663002
* fix no-gpu buildGravatar reed2016-08-17
| | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2253073003 TBR=robertphilips NOTREECHECKS=true Review-Url: https://codereview.chromium.org/2253073003
* pin as texture apiGravatar reed2016-08-17
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241353002 Review-Url: https://codereview.chromium.org/2241353002
* use tmp allocator for images in temp shadersGravatar reed2016-08-05
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222593003 Review-Url: https://codereview.chromium.org/2222593003
* rename FoceCopyMode to SkCopyPixelModeGravatar reed2016-08-05
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2220603002 Review-Url: https://codereview.chromium.org/2220603002
* Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.Gravatar bungeman2016-08-02
| | | | | | | This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004 Review-Url: https://codereview.chromium.org/2206633004
* implement isABitmap for imageshader, return localmatrix for bitmap's implGravatar reed2016-08-01
| | | | | | | | | For imageshader, I only return true if the image is explicitly raster-backed. I do not return true for texture, nor for generator (i.e. lazy/picture) backed. Is that ok? BUG=skia:5592 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197323002 Review-Url: https://codereview.chromium.org/2197323002
* make an image from a mutable bitmapGravatar reed2016-08-01
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2199813002 Review-Url: https://codereview.chromium.org/2199813002
* remove/deprecate SkBitmap::getTexture, as it now always returns falseGravatar reed2016-07-25
| | | | | | | | | oh happy day BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175873002 Review-Url: https://codereview.chromium.org/2175873002
* Add new SkSourceGammaTreatment enum, used in situations like mipmap ↵Gravatar brianosman2016-06-06
| | | | | | | | | construction, where we need to know if we should respect (vs. ignore) the gamma encoding of sRGB tagged images. Plumb that extensively. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2037413002 Review-Url: https://codereview.chromium.org/2037413002
* Add onImageInfo call to SkImage_Base.Gravatar herb2016-04-19
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1903483003 Review URL: https://codereview.chromium.org/1903483003
* images with offset bitmap don't share genidGravatar halcanary2016-03-24
| | | | | | | BUG=skia:5096 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813793002 Review URL: https://codereview.chromium.org/1813793002