aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkCodecPriv.h
Commit message (Collapse)AuthorAge
* 565 codec color xform support: fix colortable / incomplete image behaviorGravatar Matt Sarett2017-04-04
| | | | | | | | | | | | | | | | | | This fixes a bug that was exposed when I added color space support for 565 decodes. Before this CL, we would sometimes fill incomplete images with R and B swapped. This fixes that issue. Part of the fix is the decision to do 565 xforms when building the color table (then just swizzle to 565), rather than do them per pixel after swizzling. Bug: skia: Change-Id: I09e1ec75aba09a4e288015ea746465d0c3f7d59f Reviewed-on: https://skia-review.googlesource.com/11137 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Add codec and color xform support for 565Gravatar Matt Sarett2017-03-28
| | | | | | | | Bug: skia: Change-Id: I23184acc4e17d38861d27ab81172048a24c400d2 Reviewed-on: https://skia-review.googlesource.com/10288 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Delete SkColorSpace::ColorSpaceFlagsGravatar Matt Sarett2017-03-24
| | | | | | | | | BUG=skia: Change-Id: Ia0688876915cd773614ca0c4ccd467cf6e7c603e Reviewed-on: https://skia-review.googlesource.com/10105 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Add SkTransferFunctionBehavior flag: Use in codec and encoderGravatar Matt Sarett2017-03-24
| | | | | | | | | | | | | | This is a step towards removing the non-linear blending flag from SkColorSpace. The flag on SkColorSpace used to control the premul behavior - now it is controlled by this option. BUG=skia: Change-Id: Ia29bd8c2b0596a93c6aa14332dcd9bd39e388a90 Reviewed-on: https://skia-review.googlesource.com/10008 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Enable legacy premuls in SkColorSpaceXformGravatar Matt Sarett2017-02-22
| | | | | | | | | | | | | | | | | | | | | ***Will allow for simplified Android framework code, they typically want a color correct transform followed by a gamma encoded premul. ***Chrome does the same, so this will make it easier to replace their codecs. ***Will decrease code size. Both types of premuls are moved off the fast path here - one is essentially unused in production and the other is not "encouraged". ***Will actually make the common case faster: sRGB->sRGB means no color xform, just premul in SkSwizzler. BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ia4ec1d273b6f137151f951d37c0ebf975f6b9a3e Reviewed-on: https://skia-review.googlesource.com/8848 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Improve color space support in SkImage::readPixels()Gravatar Matt Sarett2016-12-22
| | | | | | | | | | | | Correct handling of kGray, k565, k4444 etc. is still a TODO. SkImage_Generator and SkImage_Gpu are still TODOs. BUG=skia:6021 Change-Id: Ib53d97d3a866b2b4934fd85c10100855743a8fab Reviewed-on: https://skia-review.googlesource.com/6396 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Finish color space support for SkCodecGravatar Matt Sarett2016-11-07
| | | | | | | | | | | | | Implements color space xforms and F16 for SkRawCodec and SkWbmpCodec. BUG=skia:4895 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4459 Change-Id: I8c72918e46387350b49a9811ce654d26b1ab352a Reviewed-on: https://skia-review.googlesource.com/4459 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Add F16, SkColorSpaceXform support to SkGifCodecGravatar Matt Sarett2016-11-04
| | | | | | | | | | | BUG=skia:4895 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4396 Change-Id: I7c521760891852daf4f3933ecf02dc08acec64c0 Reviewed-on: https://skia-review.googlesource.com/4396 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Fix color xforms for Index8 bmpsGravatar Matt Sarett2016-11-04
| | | | | | | | | | | | | Thanks to Gold for catching this. BUG=skia:4895 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4426 Change-Id: Icc816d933e9e2fd312858a5430fa21a47722563e Reviewed-on: https://skia-review.googlesource.com/4426 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Add SkColorSpaceXform to the public APIGravatar msarett2016-10-11
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2390263002 Review-Url: https://codereview.chromium.org/2390263002
* Add BGRA as input format to SkColorSpaceXformGravatar msarett2016-09-22
| | | | | | | | | | This is immediately useful for webp and I think it's a fair guess that BGRA src formats are not uncommon. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353363008 Review-Url: https://codereview.chromium.org/2353363008
* Support Float32 output from SkColorSpaceXformGravatar msarett2016-09-16
| | | | | | | | | | | | | | | * Adds Float32 support to SkColorSpaceXform * Changes API to allows clients to ask for F32, updates clients to new API * Adds Sk4f_load4 and Sk4f_store4 to SkNx * Make use of new xform in SkGr.cpp BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Committed: https://skia.googlesource.com/skia/+/43d6651111374b5d1e4ddd9030dcf079b448ec47 Review-Url: https://codereview.chromium.org/2339233003
* Revert of Support Float32 output from SkColorSpaceXform (patchset #7 ↵Gravatar msarett2016-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:140001 of https://codereview.chromium.org/2339233003/ ) Reason for revert: Hitting an assert Original issue's description: > Support Float32 output from SkColorSpaceXform > > * Adds Float32 support to SkColorSpaceXform > * Changes API to allows clients to ask for F32, updates clients to > new API > * Adds Sk4f_load4 and Sk4f_store4 to SkNx > * Make use of new xform in SkGr.cpp > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003 > CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot > > Committed: https://skia.googlesource.com/skia/+/43d6651111374b5d1e4ddd9030dcf079b448ec47 TBR=brianosman@google.com,mtklein@google.com,scroggo@google.com,mtklein@chromium.org,bsalomon@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/2347473007
* Support Float32 output from SkColorSpaceXformGravatar msarett2016-09-16
| | | | | | | | | | | | | | * Adds Float32 support to SkColorSpaceXform * Changes API to allows clients to ask for F32, updates clients to new API * Adds Sk4f_load4 and Sk4f_store4 to SkNx * Make use of new xform in SkGr.cpp BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2339233003
* 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
* Checking for valid colorType, alphaType, colorSpace in SkCodecGravatar msarett2016-09-08
| | | | | | | | | | | | | | | | | * Refactor to share code between SkPngCodec and SkWebpCodec * Didn't end up sharing with SkJpegCodec but did refactor that code a bit * Disallow conversions to F16 with non-linear color spaces * Fail to decode if we fail to create a SkColorSpaceXform (should be an assert soon). We used to fallback on a legacy decode if we failed to create the transform. * A bunch of name changes BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293003 Committed: https://skia.googlesource.com/skia/+/7a9900d6d34e437bb24beb5524a1f6488ae138c9 Review-Url: https://codereview.chromium.org/2319293003
* Revert of Checking for valid colorType, alphaType, colorSpace in SkCodec ↵Gravatar msarett2016-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #2 id:100001 of https://codereview.chromium.org/2319293003/ ) Reason for revert: Broken perf bots Original issue's description: > Checking for valid colorType, alphaType, colorSpace in SkCodec > > * Refactor to share code between SkPngCodec and SkWebpCodec > * Didn't end up sharing with SkJpegCodec but did refactor > that code a bit > * Disallow conversions to F16 with non-linear color spaces > * Fail to decode if we fail to create a SkColorSpaceXform > (should be an assert soon). We used to fallback on a > legacy decode if we failed to create the transform. > * A bunch of name changes > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293003 > > Committed: https://skia.googlesource.com/skia/+/7a9900d6d34e437bb24beb5524a1f6488ae138c9 TBR=scroggo@google.com,brianosman@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/2328663002
* Checking for valid colorType, alphaType, colorSpace in SkCodecGravatar msarett2016-09-08
| | | | | | | | | | | | | | | | * Refactor to share code between SkPngCodec and SkWebpCodec * Didn't end up sharing with SkJpegCodec but did refactor that code a bit * Disallow conversions to F16 with non-linear color spaces * Fail to decode if we fail to create a SkColorSpaceXform (should be an assert soon). We used to fallback on a legacy decode if we failed to create the transform. * A bunch of name changes BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293003 Review-Url: https://codereview.chromium.org/2319293003
* Add color xform support to SkWebpCodecGravatar msarett2016-09-08
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2294993002 Committed: https://skia.googlesource.com/skia/+/828ed1777da74692d0c8a5834017929f5aedcc6b Review-Url: https://codereview.chromium.org/2294993002
* Revert of Add color xform support to SkWebpCodec (patchset #2 id:80001 of ↵Gravatar msarett2016-09-07
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2294993002/ ) Reason for revert: Windows bots hate it when I upload new images. Original issue's description: > Add color xform support to SkWebpCodec > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2294993002 > > Committed: https://skia.googlesource.com/skia/+/828ed1777da74692d0c8a5834017929f5aedcc6b TBR=scroggo@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/2318253004
* Add color xform support to SkWebpCodecGravatar msarett2016-09-07
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2294993002 Review-Url: https://codereview.chromium.org/2294993002
* Support color xforms for kIndex8 pngsGravatar msarett2016-08-22
| | | | | | | | | | | | | | This change started as: "Always use color xforms to premultiply". We need to be in a linear space to premultiply correctly. It became clear that we also need to support kIndex8 color xforms in order to make this change. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246143002 Review-Url: https://codereview.chromium.org/2246143002
* Perform color correction on png decodesGravatar msarett2016-08-03
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184543003 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2184543003
* Finish supporting decoding opaque to non-opaqueGravatar scroggo2016-05-20
| | | | | | | | | | | | | | | | | When decoding to 565 or Gray, allow the client to incorrectly ask for premul. When checking whether it's possible to decode to 565, return whether the source is opaque. In DM, allow decoding to 565 or Gray, even if the client also asked for premul. This fixes a bug introduced in crrev.com/1999593003 when we stopped ever requesting Opaque, resulting in us not testing 565 or Gray. BUG=skia:4616 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1996993003 Review-Url: https://codereview.chromium.org/1996993003
* Support the non-native (RGBA/BGRA) swizzleGravatar msarett2016-04-22
| | | | | | | BUG=skia:4456 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1907593004 Review URL: https://codereview.chromium.org/1907593004
* Workaround to set the sRGB flag on SkImageGeneratorGravatar msarett2016-03-23
| | | | | | | BUG=skia:4895 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820413002 Review URL: https://codereview.chromium.org/1820413002
* Parse icc profiles and exif orientation from jpeg markersGravatar msarett2016-03-21
| | | | | | | | | | New resources should be fine to add since they are already checked into chromium. BUG=skia:3834 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813273002 Review URL: https://codereview.chromium.org/1813273002
* Move SkUtils.h to src/core.Gravatar bungeman2016-02-23
| | | | Review URL: https://codereview.chromium.org/1722703003
* Fix colorType/alphaType checks in SkCodecGravatar msarett2016-02-15
| | | | | | | | | | | | | | | | Make getPixels() and startScanlineDecode() behave consistently. Require that kGray8 decodes are opaque. Assert that creating the swizzler succeeds. BUG=skia:4203 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1695473002 Committed: https://skia.googlesource.com/skia/+/c7578b6cdd03b61f076ffc7956efd952d6c301c0 Review URL: https://codereview.chromium.org/1695473002
* Revert of Fix colorType/alphaType checks in SkCodec (patchset #5 id:80001 of ↵Gravatar msarett2016-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1695473002/ ) Reason for revert: Really bad images in Gold. Original issue's description: > Fix colorType/alphaType checks in SkCodec > > Make getPixels() and startScanlineDecode() behave > consistently. > > Require that kGray8 decodes are opaque. > > Assert that creating the swizzler succeeds. > > BUG=skia:4203 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1695473002 > > Committed: https://skia.googlesource.com/skia/+/c7578b6cdd03b61f076ffc7956efd952d6c301c0 TBR=scroggo@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4203 Review URL: https://codereview.chromium.org/1694023002
* Fix colorType/alphaType checks in SkCodecGravatar msarett2016-02-12
| | | | | | | | | | | | | | Make getPixels() and startScanlineDecode() behave consistently. Require that kGray8 decodes are opaque. Assert that creating the swizzler succeeds. BUG=skia:4203 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1695473002 Review URL: https://codereview.chromium.org/1695473002
* Set sRGB flag for PNGs with an sRGB chunkGravatar msarett2016-02-04
| | | | | | | BUG=skia:3471 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1667823004 Review URL: https://codereview.chromium.org/1667823004
* Support decoding opaque to *premulGravatar scroggo2016-02-03
| | | | | | | | | | | | | | | | | | | | | | If a client requests unpremul or premul from an opaque SkCodec, support it. The opaque image can be treated as any of them, though it will be less efficient to draw than if the client had used opaque. Change the filling code (i.e. for incomplete images) to base its color on the source alpha type. Prior to adding the support to decode opaque to any, it was fine to use either source or dest (which would have yielded the same result). If the client requests non-opaque, we do not want this to switch the fill value from black to transparent. This also allows simplifying the signatures for getFillValue and onGetFillValue. In CodexTest, expect the same result when decoding opaque to *premul, and compare to the opaque version. BUG=skia:4616 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1641273003 Review URL: https://codereview.chromium.org/1641273003
* 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
* Create an SkAndroidCodec API separate from SkCodecGravatar msarett2015-10-21
| | | | | | | | | | | | We will implement this API using SkCodecs. SkAndroidCodecs will be used to implement the BitmapRegionDecoder Java API (and possibly BitmapFactory). BUG=skia: Review URL: https://codereview.chromium.org/1406223002
* 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
* Scanline decoding for gifsGravatar msarett2015-09-07
| | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/e9c10b9121887e8c300bd41357461418e061984d Review URL: https://codereview.chromium.org/1305123002
* Revert of Scanline decoding for gifs (patchset #15 id:380001 of ↵Gravatar jcgregorio2015-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1305123002/ ) Reason for revert: Breaks the build with SkScanlineDecoder.h not found: http://build.chromium.org/p/client.skia/builders/Linux%20Builder/builds/3722/steps/compile/logs/stdio ../../third_party/skia/src/utils/SkBitmapRegionCanvas.h:10:10: fatal error: 'SkScanlineDecoder.h' file not found #include "SkScanlineDecoder.h" Original issue's description: > Scanline decoding for gifs > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/e9c10b9121887e8c300bd41357461418e061984d TBR=scroggo@google.com,djsollen@google.com,msarett@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1320273004
* Scanline decoding for gifsGravatar msarett2015-09-04
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1305123002
* 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
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Support more swizzles to 565 in SkCodecGravatar scroggo2015-08-14
| | | | | | | | | | | | | | | | | | | | | | | Add more swizzling functions for swizzling to 565. Much of this code was revived from crrev.com/1055743003 (for BMP). Also added swizzling functions for WBMP. Consolidate the static function conversion_possible. In SkCodec::getPixels, check that the alphatype corresponds to the colorType. This prevents requesting 565 + non-opaque. In SkIcoCodec, report that the image is unpremul (instead of whatever the largest embedded codec thinks), but modify the requested info to have the alpha type expected/required by the embedded codec. Add tests for decoding to 565. BUG=skia:3257 BUG=skia:3683 Review URL: https://codereview.chromium.org/1277213002
* 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
* Scanline decoding for wbmpGravatar msarett2015-08-05
| | | | | | | | | | | | | | | We are also changing the wbmp to use SkSwizzler. This will allow us to take advantage of the sampling routines that are being implemented in SkSwizzler. The image in this upload came from: https://commons.wikimedia.org/wiki/File:Android_robot.png It is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. BUG=skia: Review URL: https://codereview.chromium.org/1254483004
* Remove sk_memcpy32Gravatar mtklein2015-07-27
| | | | | | | | | | | | | | | | | | | | | | | | It's only implemented on x86, where the exisiting benchmark says memcpy() is faster for all cases: Timer overhead: 24ns curr/maxrss loops min median mean max stddev samples config bench 10/10 MB 1 35.9µs 36.2µs 36.2µs 36.6µs 1% ▁▂▄▅▅▃█▄▄▅ nonrendering sk_memcpy32_100000 10/10 MB 13 2.27µs 2.28µs 2.28µs 2.29µs 0% █▄▃▅▃▁▃▅▁▄ nonrendering sk_memcpy32_10000 11/11 MB 677 91.6ns 95.9ns 94.5ns 99.4ns 3% ▅▅▅▅▅█▁▁▁▁ nonrendering sk_memcpy32_1000 11/11 MB 1171 20ns 20.9ns 21.3ns 23.4ns 6% ▁▁▇▃▃▃█▇▃▃ nonrendering sk_memcpy32_100 11/11 MB 1952 14ns 14ns 14.3ns 15.2ns 3% ▁▁██▁▁▁▁▁▁ nonrendering sk_memcpy32_10 11/11 MB 5 33.6µs 33.7µs 34.1µs 35.2µs 2% ▆▇█▁▁▁▁▁▁▁ nonrendering memcpy32_memcpy_100000 11/11 MB 18 2.12µs 2.22µs 2.24µs 2.39µs 5% ▂█▄▇█▄▇▁▁▁ nonrendering memcpy32_memcpy_10000 11/11 MB 1112 87.3ns 87.3ns 89.1ns 93.7ns 3% ▄██▄▁▁▁▁▁▁ nonrendering memcpy32_memcpy_1000 11/11 MB 2124 12.8ns 13.3ns 13.5ns 14.8ns 6% ▁▁▁█▃▃█▇▃▃ nonrendering memcpy32_memcpy_100 11/11 MB 3077 9ns 9.41ns 9.52ns 10.2ns 4% ▃█▁█▃▃▃▃▃▃ nonrendering memcpy32_memcpy_10 (Why? One fewer thing to port to SkOpts.) BUG=skia:4117 Review URL: https://codereview.chromium.org/1256763003
* Requires a minor API change to pass the color table to getScanlineDecoder, ↵Gravatar msarett2015-04-29
| | | | | | | | as we do with getPixels(). BUG=skia:3722 Review URL: https://codereview.chromium.org/1061713007
* Use a wrapper for SkDebugf in SkCodec.Gravatar scroggo2015-03-26
| | | | | | | | | | | It can be silenced or not with one flag. Always print when building for the android framework. Also remove the meaningless define of override to override. BUG=skia:3257 Review URL: https://codereview.chromium.org/1032093004
* 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