aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
Commit message (Collapse)AuthorAge
* SkImage::makeColorSpace(): Fix nullptr->sRGB bug with picture imagesGravatar Matt Sarett2017-06-05
| | | | | | | | Bug: 729352 Change-Id: I5ad5e2121ce87dc154528bfd9ec0f3e9253ed792 Reviewed-on: https://skia-review.googlesource.com/18590 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Make instantiate return a BooleanGravatar Robert Phillips2017-06-05
| | | | | | | | | | | | From an off-line conversation: The longer term idea will be to create a helper class isolates the ability to instantiate proxies until flush time. The peek* methods could then be moved to GrSurfaceProxy. Change-Id: I8e8c02c098475b77d515791c0d6b81f7e4a327dd Reviewed-on: https://skia-review.googlesource.com/18076 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Implement an SkImage backed by a Android hardware bufferGravatar Stan Iliev2017-06-02
| | | | | | | | | | | | | | Create a new SkImage public API to make an image from an Android hardware buffer. Implementation is using a SkImageGenerator derived class GrAndroidBufferImageGenerator. A new EGLImage texture is created, which is then wrapped with GrTextureProxy. Bug: skia: Change-Id: I610a4c5a58198686ce7c03e9a0adad3f9d2342e0 Reviewed-on: https://skia-review.googlesource.com/17789 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* [Reland] Relocate shaders to own dirGravatar Florin Malita2017-05-30
| | | | | | | | | | | Consolidate all shader impls under src/shaders/. (reland of https://skia-review.googlesource.com/c/17927/) Change-Id: I7918bdc1aafe842ed194412ba95b9ae53a2ec1d7 Reviewed-on: https://skia-review.googlesource.com/18146 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Hide ctors of SkShader, SkImage & SkColorSpaceGravatar Florin Malita2017-05-26
| | | | | | | | | To prevent external clients from subclassing. Change-Id: I60a3833bf64019aea2f537850ca2a1ae38bb8767 Reviewed-on: https://skia-review.googlesource.com/18038 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Relocate shaders to own dir"Gravatar Stan Iliev2017-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fabe0b26d05624ce7374f6ca89bd66df6142534e. Reason for revert: Last android roll failed with "external/skia/src/effects/SkGaussianEdgeShader.h:11:10: fatal error: 'SkShaderBase.h' file not found" Original change's description: > Relocate shaders to own dir > > Consolidate all shader impls under src/shaders/. > > Change-Id: I450e37541214704c1ad9e379d9d753b7cc62fac3 > Reviewed-on: https://skia-review.googlesource.com/17927 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Herb Derby <herb@google.com> > TBR=mtklein@google.com,herb@google.com,fmalita@chromium.org,reed@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Idbb2b75053969df1dad9d8ce0217cd39189b9ddb Reviewed-on: https://skia-review.googlesource.com/18020 Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* Relocate shaders to own dirGravatar Florin Malita2017-05-25
| | | | | | | | | Consolidate all shader impls under src/shaders/. Change-Id: I450e37541214704c1ad9e379d9d753b7cc62fac3 Reviewed-on: https://skia-review.googlesource.com/17927 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Reland of SkShaderBaseGravatar Florin Malita2017-05-25
| | | | | | | | | | Introduce a private base class (SkShaderBase), to hide implementation details from the public interface (SkShader). Change-Id: Ib1d76cde880bd51868b97408710f8bb38128e536 Reviewed-on: https://skia-review.googlesource.com/17925 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "SkShaderBase"Gravatar Florin Malita2017-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 58a756435ca3700d9766a4580bb0771a9774f603. Reason for revert: g3, Android borkage. Original change's description: > SkShaderBase > > Introduce a private base class (SkShaderBase), to hide > implementation details from the public interface (SkShader). > > Change-Id: If3ec26ca6abc9da20e3f139c11fdc023bdd85176 > Reviewed-on: https://skia-review.googlesource.com/17241 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I32b012ee466dd006c074593f211f43ed602f1078 Reviewed-on: https://skia-review.googlesource.com/17845 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* SkShaderBaseGravatar Florin Malita2017-05-24
| | | | | | | | | | Introduce a private base class (SkShaderBase), to hide implementation details from the public interface (SkShader). Change-Id: If3ec26ca6abc9da20e3f139c11fdc023bdd85176 Reviewed-on: https://skia-review.googlesource.com/17241 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Fix SkImage::onMakeColorSpace() for subset lazy imagesGravatar Matt Sarett2017-05-18
| | | | | | | | Bug: 723149 Change-Id: Ib56a77958fc1b7e026ee5ca98a46e8f014fe75d4 Reviewed-on: https://skia-review.googlesource.com/17309 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Remove GrSurfaceDesc member from GrSurfaceProxy.Gravatar Brian Salomon2017-05-17
| | | | | | | | | Stores the config, origin, and dimensions in GrSurfaceProxy, sample count in GrRenderTargetProxy, and "was constructed with mip maps" in GrTextureProxy. Change-Id: Iee058674dce49107a991cca9d083cd33e3572809 Reviewed-on: https://skia-review.googlesource.com/17209 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove GrSurfaceProxy::desc()Gravatar Brian Salomon2017-05-17
| | | | | | | | | | Adds a numStencilSamples() getter. Bug: skia: Change-Id: I1e57f19b3cb490a6214ea436622ed8128a5a9303 Reviewed-on: https://skia-review.googlesource.com/16994 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove GrRenderTargetContext::desc()Gravatar Brian Salomon2017-05-16
| | | | | | | Change-Id: I04bf4a5b443f799896f62fe7aa61b6fb5d5c9c7f Reviewed-on: https://skia-review.googlesource.com/16918 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Allow numerical color spaces with legacy renderingGravatar Matt Sarett2017-05-15
| | | | | | | | Bug: 720083 Change-Id: Ibd4dbf6ee95ac14857e8280a441f81976710e5e8 Reviewed-on: https://skia-review.googlesource.com/16700 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Pass alphaType to append_gamut_transform() to inform the clampGravatar Matt Sarett2017-05-12
| | | | | | | | | BUG=skia: Change-Id: I1a8aef36043d4091bffae95b0275fa7fa8a35c97 Reviewed-on: https://skia-review.googlesource.com/9441 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* proposed: inclusive gradients, exclusive imagesGravatar Mike Klein2017-05-11
| | | | | | | | Change-Id: I5821f823a4c0df54d4388a2f455767f58ae646b8 Reviewed-on: https://skia-review.googlesource.com/16547 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove SkCrossContextImageData and all support codeGravatar Brian Osman2017-05-11
| | | | | | | | Bug: skia: Change-Id: I8eb8cef5456c05a8e314d8404698893c7af82d13 Reviewed-on: https://skia-review.googlesource.com/16368 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Added SkImage::MakeCrossContextFromEncodedGravatar Brian Osman2017-05-09
| | | | | | | | | | | | | | | Designed for Flutter's threading architecture, with an eye to being useful to other clients. Under the hood, uses a new image generator class to lazily wrap a texture for multiple GrContexts. Re-land of https://skia-review.googlesource.com/c/14180/ Bug: skia: Change-Id: I3dd382640629b79b3058f18fee68d043566e43e5 Reviewed-on: https://skia-review.googlesource.com/15895 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* make append_gamut_tranform() never failGravatar Mike Klein2017-05-09
| | | | | | | | | | | | | | The only way it could ostensibly fail is if we get non-XYZ color spaces, which should just not happen. Assert that doesn't happen and safely do nothing instead of failing. This is one of the leaf nodes to getting SkCreateRasterPipelineBlitter to never fail. Next come SkColorFilter:: and SkShader::appendStages(). Change-Id: I5c7a8c63d0a9837e2e55208e1674796d86f45307 Reviewed-on: https://skia-review.googlesource.com/16002 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
* remove (possibly slow) call to refEncoded in getDeferredTextureImageDataGravatar Mike Reed2017-05-09
| | | | | | | | | | | | | | | - explicitly reject already-texture-backed and picture-backed Needed to add a virtual to image_base and generator to distinguish generators that can (or cannot) natively "generate" on the gpu (e.g. pictures) Bug: 646089 Change-Id: I3aea22f89b31009ecbb3bd50d88512e6532f0a0f Change-Id: I3aea22f89b31009ecbb3bd50d88512e6532f0a0f Reviewed-on: https://skia-review.googlesource.com/15765 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Added SkImage::MakeCrossContextFromEncoded"Gravatar Brian Salomon2017-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 83b1b3db36e8622f4bbc8c391d5c714e258d1e03. Reason for revert: unit test failing and asan leaks Original change's description: > Added SkImage::MakeCrossContextFromEncoded > > Designed for Flutter's threading architecture, with > an eye to being useful to other clients. Under the > hood, uses a new image generator class to lazily wrap > a texture for multiple GrContexts. > > Bug: skia: > Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b > Reviewed-on: https://skia-review.googlesource.com/14180 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1f0bf580aa0ea2d132e18b64ff610ddac9d073a7 Reviewed-on: https://skia-review.googlesource.com/15892 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Added SkImage::MakeCrossContextFromEncodedGravatar Brian Osman2017-05-08
| | | | | | | | | | | | | Designed for Flutter's threading architecture, with an eye to being useful to other clients. Under the hood, uses a new image generator class to lazily wrap a texture for multiple GrContexts. Bug: skia: Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b Reviewed-on: https://skia-review.googlesource.com/14180 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* SkImage::isValidGravatar Brian Osman2017-05-08
| | | | | | | | | | | | Lets clients know if an image is drawable to a particular GrContext (or to CPU). Checks for abandoned GrContexts beneath GPU backed images, as well as context mis-match. Bug: skia: Change-Id: Ibe88c7ce8091f965c14f6023a3597be4b70c3f99 Reviewed-on: https://skia-review.googlesource.com/15801 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reland "Add SkImage::makeColorSpace() with correct transfer fn behavior"Gravatar Matt Sarett2017-05-04
| | | | | | | | | | | Completes implementation for lazy and raster images. gpu is still a TODO. Bug: skia:6553 Change-Id: I898e4464ffc91442c7f98669f1203dd5c203621b Reviewed-on: https://skia-review.googlesource.com/15307 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Add SkImage::makeColorSpace() with correct transfer fn behavior"Gravatar Matt Sarett2017-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9ad0531a18f854e5a2c8034880140dd6cd3ea3c1. Reason for revert: Does not handle transfer fn behavior. Original change's description: > Add SkImage::makeColorSpace() with correct transfer fn behavior > > Completes implementation for lazy and raster images. gpu is > still a TODO. > > Bug: skia:6553 > Change-Id: I04eea5c4fb53c50c0406c2e6b6778b0e21fd85f8 > Reviewed-on: https://skia-review.googlesource.com/14403 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3830321aea7d0dc5ab38a40f3318bb53a41df383 Reviewed-on: https://skia-review.googlesource.com/15306 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add SkImage::makeColorSpace() with correct transfer fn behaviorGravatar Matt Sarett2017-05-03
| | | | | | | | | | | Completes implementation for lazy and raster images. gpu is still a TODO. Bug: skia:6553 Change-Id: I04eea5c4fb53c50c0406c2e6b6778b0e21fd85f8 Reviewed-on: https://skia-review.googlesource.com/14403 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Validate SkSpecialSurface raster infoGravatar Florin Malita2017-05-03
| | | | | | | | | | BUG=chromium:716311 Change-Id: I01ea2e77ba8920f735395dd46ef2cea78a858308 Reviewed-on: https://skia-review.googlesource.com/15230 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Make GrBackendTexture take Gr*Info refs in ctor, and copy them.Gravatar Greg Daniel2017-05-02
| | | | | | | | | Bug: skia: Change-Id: Ic05d3384fa07560fc18c52bb8ae03541a72515f7 Reviewed-on: https://skia-review.googlesource.com/14374 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Plumb the use of GrBackendRenderTarget throughout Skia""Gravatar Greg Daniel2017-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e3bd422fafc74dd3410c3de24a576635be92c3b4. Reason for revert: Pre-req changes have all landed in other projects at this point. Original change's description: > Revert "Plumb the use of GrBackendRenderTarget throughout Skia" > > This reverts commit fdd77daedbba3b7c53be74a82fb9fae891b51696. > > Reason for revert: Apparently I have a few more build files to update before this can land. > > Original change's description: > > Plumb the use of GrBackendRenderTarget throughout Skia > > > > Bug: skia: > > Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa > > Reviewed-on: https://skia-review.googlesource.com/14148 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f > Reviewed-on: https://skia-review.googlesource.com/14531 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ib7ab94aada8a7cb80fe38f24daf32f9208c5b169 Reviewed-on: https://skia-review.googlesource.com/14826 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Only store width and height on SkPixelRef (part 1)Gravatar Matt Sarett2017-04-28
| | | | | | | | | | | | Relanding https://skia-review.googlesource.com/c/14105/ in pieces to try to diagnose problems with the Chrome roll. Bug: skia:6535 Change-Id: Ic321c437ecd3cb7940a48fd73fc22b192804c67a Reviewed-on: https://skia-review.googlesource.com/14650 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
* remove unused yuv methodsGravatar Mike Reed2017-04-28
| | | | | | | | Bug: skia: Change-Id: Ie1e6c905d8989b49c2cf5c9e5fd1f383268f6480 Reviewed-on: https://skia-review.googlesource.com/14645 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Only store width and height on SkPixelRef"Gravatar Ben Wagner2017-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2cbb6662e329981840f90ef4edd62f70f69e6030. Reason for revert: Likely cause of Chromium DEPS roll failure; speculative revert. Original change's description: > Only store width and height on SkPixelRef > > Bug: skia:6535 > Change-Id: Id91e8d1e82f593be7d4b23ca5abde752f2666a77 > Reviewed-on: https://skia-review.googlesource.com/14105 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=djsollen@google.com,msarett@google.com,reed@google.com,stani@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I12a024a71833f33432d5ea8cffdfc642b8b4240a Bug: skia: Reviewed-on: https://skia-review.googlesource.com/14644 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
* Only store width and height on SkPixelRefGravatar Matt Sarett2017-04-27
| | | | | | | | Bug: skia:6535 Change-Id: Id91e8d1e82f593be7d4b23ca5abde752f2666a77 Reviewed-on: https://skia-review.googlesource.com/14105 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "Plumb the use of GrBackendRenderTarget throughout Skia"Gravatar Greg Daniel2017-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fdd77daedbba3b7c53be74a82fb9fae891b51696. Reason for revert: Apparently I have a few more build files to update before this can land. Original change's description: > Plumb the use of GrBackendRenderTarget throughout Skia > > Bug: skia: > Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa > Reviewed-on: https://skia-review.googlesource.com/14148 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f Reviewed-on: https://skia-review.googlesource.com/14531 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Fold SkImageCacherator into SkImage_LazyGravatar Brian Osman2017-04-27
| | | | | | | | | | | | | | | SkImageCacherator still exists, but only as an interface implemented (solely) by SkImage_Lazy. The only external clients are GrImageTextureMaker and SkImage_Gpu::getDeferredTextureImageData. This is probably an improvement, but doesn't go as far as I'd hoped. Bug: skia: Change-Id: I6812badfabb6924b025621b21af00cbde9c16cac Reviewed-on: https://skia-review.googlesource.com/14371 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Plumb the use of GrBackendRenderTarget throughout SkiaGravatar Greg Daniel2017-04-27
| | | | | | | | | Bug: skia: Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa Reviewed-on: https://skia-review.googlesource.com/14148 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Fix color space handling in SkImage_Gpu::getROPixelsGravatar Brian Osman2017-04-27
| | | | | | | | | | | | | | The dstColorSpace is a badly named parameter. It's a hint about where/how the returned pixels are going to be used. Raster and GPU are meant to ignore that information, codecs use it to drive our decoding heuristic. This is a re-land of https://skia-review.googlesource.com/c/10109/ Bug: skia: Change-Id: Iee006a8e014e028b4f0f2471d7152b6bccd72cb2 Reviewed-on: https://skia-review.googlesource.com/14404 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fix uncached getROPixels from GPU imagesGravatar Brian Osman2017-04-26
| | | | | | | | | | | | | We were allocating a local bitmap, but then attempting to read into an uninitialized local pixmap. The only public API that funnels the caching hint to this function is scalePixels, so I added a test (which previously failed). Bug: skia: Change-Id: Ib4370350be664935b4c85e34c70b675e6d82ba64 Reviewed-on: https://skia-review.googlesource.com/14402 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove compressed texture support from cacheratorGravatar Brian Osman2017-04-25
| | | | | | | | | | | All variants of (on)?[rR]efEncoded(Data)? no longer need a GrContext parameter. Bug: skia:5485 skia:4971 Change-Id: If4f5e785718d5522eb3df8588318ccb8a02a5749 Reviewed-on: https://skia-review.googlesource.com/14269 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Rm makeRenderTargetContext in favor of deferred version (take 3)Gravatar Robert Phillips2017-04-25
| | | | | | | | | | | This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version) TBR=bsalomon@google.com Change-Id: If81f4d9fb889c091cd37ffde133d906fb3e37773 Reviewed-on: https://skia-review.googlesource.com/14027 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Simplify SkImageCacherator slightlyGravatar Brian Osman2017-04-24
| | | | | | | | | | | | | | - lockAsBitmap supported reading back textures to a bitmap, but this was only used by one GM. Removed all of that code, and merged the two bitmap functions together. - To make the GM cleaner, don't use SkImageCacherator directly - construct actual images. Bug: skia: Change-Id: Iad17184a02a72f89ccc851fa158764d6c871befa Reviewed-on: https://skia-review.googlesource.com/14192 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Rm makeRenderTargetContext in favor of deferred version (take 2)"Gravatar Robert Phillips2017-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 02242e82e4bf94a8f6862dadb5bf347ea5e31eb5. Reason for revert: Maybe breaking Chrome DEPS roll Original change's description: > Rm makeRenderTargetContext in favor of deferred version (take 2) > > This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version) > > Change-Id: Ife77b012d09c46895884a168fc5045bd92a4b919 > Reviewed-on: https://skia-review.googlesource.com/13196 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I2607116ed743f5d313da4a7b7f056776ed907702 Reviewed-on: https://skia-review.googlesource.com/14024 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rm makeRenderTargetContext in favor of deferred version (take 2)Gravatar Robert Phillips2017-04-21
| | | | | | | | | This is a reland of: https://skia-review.googlesource.com/c/13001/ (Rm makeRenderTargetContext in favor of deferred version) Change-Id: Ife77b012d09c46895884a168fc5045bd92a4b919 Reviewed-on: https://skia-review.googlesource.com/13196 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rename SkImage_Generator to SkImage_LazyGravatar Brian Osman2017-04-20
| | | | | | | | | | | | | | This removes a long-standing source of confusion: SkImage_Generator was an image that wrapped an SkImageGenerator (with an SkImageCacherator stuck in the middle). We could choose to rename either one, but SkImageGenerator is public, so take the easy road and rename the private image subclass. Given the existence of SkImage::isLazyGenerated, this name seems appropriate. Bug: skia: Change-Id: I061ece94f48538efb1dc5548010f6ca7d438a69b Reviewed-on: https://skia-review.googlesource.com/13979 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Revert "Plumb GrBackendTexture throughout skia.""Gravatar Greg Daniel2017-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7fa5c31c2c9af834bee66d5fcf476e250076c8d6. Reason for revert: Relanding this change now that other fixes have landed. Original change's description: > Revert "Plumb GrBackendTexture throughout skia." > > This reverts commit 7da62b9059f3c1d31624a0e4da96ee5f908f9c12. > > Reason for revert: fix android roll > > Original change's description: > > Plumb GrBackendTexture throughout skia. > > > > Bug: skia: > > Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 > > Reviewed-on: https://skia-review.googlesource.com/13645 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89 > Reviewed-on: https://skia-review.googlesource.com/13773 > Reviewed-by: Stan Iliev <stani@google.com> > Commit-Queue: Stan Iliev <stani@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,stani@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I92bc074e4fe37fa5c83186afadc472c03802e8f2 Reviewed-on: https://skia-review.googlesource.com/13975 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* SkColorSpaceXformer: Add SkShader::makeColorSpace()Gravatar Matt Sarett2017-04-19
| | | | | | | | | | | | | | | Just a refactor - reimplements the shader xforms with makeColorSpace(). 11 gms have diffs. Some are down to floating precision. The old implementation would go float->fixed->float in some cases. Others are due to improvements with gradient shaders inside local matrix shaders. Bug: skia:6516 Change-Id: I424406990c5c58a47833cf4c9ef146cd3ea6c37e Reviewed-on: https://skia-review.googlesource.com/13769 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Plumb GrBackendTexture throughout skia."Gravatar Stan Iliev2017-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7da62b9059f3c1d31624a0e4da96ee5f908f9c12. Reason for revert: fix android roll Original change's description: > Plumb GrBackendTexture throughout skia. > > Bug: skia: > Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 > Reviewed-on: https://skia-review.googlesource.com/13645 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89 Reviewed-on: https://skia-review.googlesource.com/13773 Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* Plumb GrBackendTexture throughout skia.Gravatar Greg Daniel2017-04-18
| | | | | | | | Bug: skia: Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 Reviewed-on: https://skia-review.googlesource.com/13645 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add backend safe classes for passing in external texture and render targets ↵Gravatar Greg Daniel2017-04-18
| | | | | | | | | | | | | | | | | into gpu This CL adds the GrBackend* classes as well as just updates the API for SkSurface and SkImage. The implementation on SkSurface/Image and the plumbing down into Ganesh will be in an additional CL. Besides the change to use the type safe classes, we also pull the SurfaceFlags, origin, samples, out of the descriptor and pass those in directly. Bug: skia: Change-Id: I9702981fe26c3d5d7d2cbcf6977ba569d356d854 Reviewed-on: https://skia-review.googlesource.com/13122 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>