aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkMaskSwizzler.h
Commit message (Collapse)AuthorAge
* Add F16, SkColorSpaceXform support to SkBmpCodecGravatar Matt Sarett2016-11-03
| | | | | | | | | | | BUG=skia:4895 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4390 Change-Id: I9cb727e7f13816b0ac882f62ec635a4528c3a524 Reviewed-on: https://skia-review.googlesource.com/4390 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Add F16, SkColorSpaceXform support to SkBmpCodec"Gravatar Matt Sarett2016-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d851795e7992565c1eb2b9474ee5ad01d1a01fad. Reason for revert: <INSERT REASONING HERE> Original change's description: > Add F16, SkColorSpaceXform support to SkBmpCodec > > BUG=skia:4895 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4300 > > Change-Id: I2f2b8d3854ea3a8c5904dd3c5bea0342e2be9789 > Reviewed-on: https://skia-review.googlesource.com/4300 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > Speculative revert for MSAN TBR=borenet@google.com,msarett@google.com,scroggo@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ie48c03c0c3156267763fbcf96818477567c5069d Reviewed-on: https://skia-review.googlesource.com/4378 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Add F16, SkColorSpaceXform support to SkBmpCodecGravatar Matt Sarett2016-11-03
| | | | | | | | | | | BUG=skia:4895 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4300 Change-Id: I2f2b8d3854ea3a8c5904dd3c5bea0342e2be9789 Reviewed-on: https://skia-review.googlesource.com/4300 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Implement Fill() for incomplete decodes to RGBA_F16Gravatar msarett2016-09-13
| | | | | | | | | Before this patch, we would hit an SkASSERT(false). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335203002 Review-Url: https://codereview.chromium.org/2335203002
* Delete reallyHasAlpha() from SkCodecGravatar msarett2016-01-11
| | | | | | | | TBR=reed BUG=skia:3582 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1557403002 Review URL: https://codereview.chromium.org/1557403002
* Fix SkSwizzler bugGravatar msarett2015-10-16
| | | | | | | | | | | | | | | Now, that we are subsetting, fX0 is not necessarily less than fSrcWidth (since fSrcWidth is really the subset width). Ex: We may want a 10 pixel subset starting twenty pixels from the left edge. In that case, fX0=20 and fSrcWidth=10. Let's rename the width as fSubsetWidth to avoid confusion and remove the check. BUG=skia: Review URL: https://codereview.chromium.org/1407603003
* Add subsetting to SkScanlineDecoderGravatar msarett2015-10-13
| | | | | | | | | | | | This CL allows the SkScanlineDecoder to decode partial scanlines. This is a first step in efficiently implementing subsetting in SkScaledCodec. BUG=skia:4209 Review URL: https://codereview.chromium.org/1390213002
* Fill incomplete images in SkCodec parent classGravatar msarett2015-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | Rather than implementing some sort of "fill" in every SkCodec subclass for incomplete images, let's make the parent class handle this situation. This includes an API change to SkCodec.h SkCodec::getScanlines() now returns the number of lines it read successfully, rather than an SkCodec::Result enum. getScanlines() most often fails on an incomplete input, in which case it is useful to know how many lines were successfully decoded - this provides more information than kIncomplete vs kSuccess. We do lose information when the API is used improperly, as we are no longer able to return kInvalidParameter or kScanlineNotStarted. Known Issues: Does not work for incomplete fFrameIsSubset gifs. Does not work for incomplete icos. BUG=skia: Review URL: https://codereview.chromium.org/1332053002
* Move all knowledge of X sampling into SkScaledCodecGravatar scroggo2015-10-02
| | | | | | | | | | | | | | | | | | | | | | | Prior to this CL, each SkCodec subclass that allows sampling does an extra check in onStartScanlineDecode to determine whether the X dimension is supported for sampling. Remove this check, and provide a way for SkScaledCodec to directly access the SkSwizzler, and update it to do sampling. This way, the SkCodec knows nothing of sampling, but we can still save the extra step of sampling afterwards. FIXME: SkBmpRLECodec still calls SkScaledCodec::DimensionsSupported. It seems like it could directly support sampling, rather than dealing with SkScaledCodec (partially). Add a new base class for SkSwizzler. It allows updating the swizzler after it was created, which is done by SkScaledCodec. Modify SkSwizzler's constructor/factory function to stop taking any info about sampling, assume the sample size is one, and move modifying that into a virtual function overridden from the base class. BUG=skia:4284 Review URL: https://codereview.chromium.org/1372973002
* Scanline decoding for bmpGravatar msarett2015-08-31
| | | | | | | | | | | | | Redesigns SkScanlineDecoder.h to indicate the ordering in which the scanlines are provided Refactors SkSwizzler::Fill() to include the zeroInit check and to actually be correct. BUG=skia:3257 BUG=skia:4198 Review URL: https://codereview.chromium.org/1287423002
* Split SkBmpCodec into three separate classesGravatar msarett2015-08-06
| | | | | | | | | | | | | | Will regress behavior on gold on test32bfv4.bmp, where we will no longer fix transparent decodes. TODO: Start fixing transparent decodes again, or decide that we don't want to fix them and remove isTransparent from SkSwizzler. I think this may become more clear when I start implementing the scanline decoder. BUG=skia: Review URL: https://codereview.chromium.org/1258863008
* Pass the destination pointer to next() in SkSwizzlerGravatar msarett2015-07-27
| | | | | | | | | | | Per our discussion, we can make the swizzler simpler and more usable for SkCodec and SkScanlineDecoder by only having a single version of next() which takes a pointer to the srcRow and a pointer to the dstRow. BUG=skia: Review URL: https://codereview.chromium.org/1256373002
* Adding swizzles for bmp:Gravatar msarett2015-03-18
| | | | | | | | | | We now support kN32 and kRGB_565 color types. Additionally, we support premul, unpremul, and opaque alpha types. Unpremul is currently untested as we cannot currently draw to unpremul. BUG=skia: Review URL: https://codereview.chromium.org/1013743003
* Revert "Revert of fix for invalid for loop syntax broke build (patchset #1 ↵Gravatar msarett2015-03-16
| | | | | | | | | | | | | | | | id:1 of https://codereview.chromium.org/1007373003/)" This reverts commit d18475854ce232de71c5463e0654f459d4abfd43. Revert "Revert "Implementation of image decoding for bmp files, in accordance with the new API."" This reverts commit dfdec78a5d02e8690998741a9fe5b71a08ca3232. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1016443003
* Revert "Implementation of image decoding for bmp files, in accordance with ↵Gravatar msarett2015-03-16
| | | | | | | | | | | | | the new API." This reverts commit 3675874468de7228944ce21922e6ec863f5f2310. BUG=skia: NOTREECHECKS=true NOTRY=true TBR= Review URL: https://codereview.chromium.org/1012873002
* Implementation of image decoding for bmp files, in accordance with the new API.Gravatar msarett2015-03-16
Currently decodes to opaque and unpremul. Tested on local test suite. BUG=skia:3257 Review URL: https://codereview.chromium.org/947283002