aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPictureImageGenerator.h
Commit message (Collapse)AuthorAge
* Remove old lazy image decoding heuristic logicGravatar Brian Osman2018-07-11
| | | | | | | | | | | This led to removing a lot of transfer function behavior code. There is more that could be done, and we need to add in decoding to dst color space, but this CL is almost entirely mechanical. Change-Id: I91b2169f95aadcfaacdd2b9821bb1a01ce53f9a6 Reviewed-on: https://skia-review.googlesource.com/140349 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add api for passing mipped hint into ImageGenerator onGenerateTextureGravatar Greg Daniel2017-10-11
| | | | | | | | | | | | This does not actually add any additional functionality to the generators. Once this lands I will enable the generators one at a time to more easily monitor the effects of each one. Bug: skia: Change-Id: I382a1acfaebcbf9ad44c9873b87cdbbe02a13602 Reviewed-on: https://skia-review.googlesource.com/57083 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Make SkImage_Lazy::onMakeColorSpace return a SkImage_LazyGravatar Christopher Cameron2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | Make SkImage_Lazy::onMakeColorSpace return a new SkImage_Lazy with the color space of SkImage_Lazy::fInfo changed. Update the call to SkImageGenerator::getPixels to specify image info with this new color space. Update the call to SkImageGenerator::generateTexture to specify this new color space. Update SkPictureImageGenerator to respect the color space argument. Add a SkTransferFunctionBehavior argument to SkImageGenerator::generateTexture to indicate if color conversion is to be doing using an xform canvas. Update Generator_GrYUVProvider::refAsTextureProxy to include a color conversion step to respect this new color space. TBR=reed@google.com Bug:739559 Change-Id: I156a858884659e9dfae739a653bab2ef89274959 Reviewed-on: https://skia-review.googlesource.com/21605 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Christopher Cameron <ccameron@chromium.org> Reviewed-by: Christopher Cameron <ccameron@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Add support for SkImageGenerator creating external texturesGravatar Stan Iliev2017-06-08
| | | | | | | | | | | Copy the SkImageGenerator texture if tiling is needed and original texture target is GR_GL_TEXTURE_EXTERNAL. Bug: skia: Change-Id: I98f5acc3883e2060b1a35f80633b02b08a706107 Reviewed-on: https://skia-review.googlesource.com/18268 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* Add new SkImageGenerator::getPixels() API, deprecate the oldGravatar Matt Sarett2017-05-12
| | | | | | | | | | | | This is fairly aggressive in that it will break any client that is currently using SkImageGenerator with kIndex8. I'm guessing that we don't have any clients doing that. Bug: skia:6620 Change-Id: Ifd16f5232bb3a9f759c225315c57492d917ed9ca Reviewed-on: https://skia-review.googlesource.com/16601 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@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>
* SkColorSpaceXformCanvas: Use when drawing picture imagesGravatar Matt Sarett2017-04-21
| | | | | | | | | | | | | The new code path is triggered by SkImage::makeColorSpace() when the image is picture backed. Fixes 3 gms in gbr-8888 config. Bug: skia:6516 Change-Id: I397903eb0f926834efd277f30265339518777920 Reviewed-on: https://skia-review.googlesource.com/14034 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Switch SkImageGenerator over to generating GrTextureProxiesGravatar Robert Phillips2017-03-03
| | | | | | | | | | | It does not seem irrational for generateTexture to always receive a valid GrContext. lockAsBitmap can do as it pleases. This is split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors) Change-Id: I8aebc813a8a3a7d694b7369c2c9810e2164fe16e Reviewed-on: https://skia-review.googlesource.com/9191 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* return and take SkImageGenerator as unique_ptrGravatar Mike Reed2017-02-15
| | | | | | | | | | BUG=skia: Change-Id: I4bc11042dd1dbf1eabd40af206027bc65acc3186 Reviewed-on: https://skia-review.googlesource.com/8444 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* removed unused code around scaled generatorsGravatar Mike Reed2017-02-15
| | | | | | | | | | BUG=skia: Change-Id: I9e042cd9343e0f29032f84ee17b4b316214ec693 Reviewed-on: https://skia-review.googlesource.com/8403 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* SkPictureImageGenerator.h include guardGravatar Hal Canary2017-02-15
| | | | | | | Change-Id: I6d9894ce3db427985c000b431fb79388c211b70c Reviewed-on: https://skia-review.googlesource.com/8455 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Picture backed images must have a bit depth and color spaceGravatar Matt Sarett2017-02-14
Enforce that picture backed images created by the public API must have a non-null SkColorSpace. SkPictureShader uses a private call to get around this restriction. BUG=skia: Change-Id: I2fc11a8ffe583035d09e83abf40b827fbf575321 Reviewed-on: https://skia-review.googlesource.com/8415 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>