aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts
Commit message (Collapse)AuthorAge
* SkRasterPipeline shader adapterGravatar Florin Malita2017-01-31
| | | | | | | | | | | | | Reland of https://skia-review.googlesource.com/c/7615. (lifted from https://skia-review.googlesource.com/c/7088/) CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I797a2f0ae80209c8637875418e08d2fa03249672 Reviewed-on: https://skia-review.googlesource.com/7731 Commit-Queue: Florin Malita <fmalita@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "SkRasterPipeline shader adapter"Gravatar Florin Malita2017-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6d11ed2951fadc281433606a8edc6774bed39735. Build failure: https://chromium-swarm.appspot.com/task?id=3403da0cdee8c210&refresh=10 ../../../src/core/SkOpts.cpp -o obj/src/core/libskia.SkOpts.o In file included from ../../../src/core/SkOpts.cpp:46: ../../../src/opts/SkRasterPipeline_opts.h:1093:11: error: no member named 'Load4' in '(anonymous namespace)::SkNx<8, float>' SkNf::Load4(buf, &r, &g, &b, &a); ~~~~~~^ 1 error generated. Leak: https://chromium-swarm.appspot.com/task?id=3403df55fd5eaa10&refresh=10 Original change's description: > SkRasterPipeline shader adapter > > (lifted from https://skia-review.googlesource.com/c/7088/) > > R=​mtklein@google.com,herb@google.com,reed@google.com > > CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD > > Change-Id: Idddb84069423c5fc535bea0a65a5b21a4d07084d > Reviewed-on: https://skia-review.googlesource.com/7615 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Mike Klein <mtklein@chromium.org> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I68c0be3398bde93cd0842baf25b025c5fe1c3df7 Reviewed-on: https://skia-review.googlesource.com/7730 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* SkRasterPipeline shader adapterGravatar Florin Malita2017-01-29
| | | | | | | | | | | | | | (lifted from https://skia-review.googlesource.com/c/7088/) R=mtklein@google.com,herb@google.com,reed@google.com CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Idddb84069423c5fc535bea0a65a5b21a4d07084d Reviewed-on: https://skia-review.googlesource.com/7615 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Really use vpmaddwd in hsw::convolve_vertical().Gravatar Mike Klein2017-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No pixel diffs. Performance on 8888 looks like an overall win. Before: micros bench 222.41 bitmap_scale_filter_64_256 40.06 bitmap_scale_filter_256_64 8.17 bitmap_scale_filter_90_10 10.32 bitmap_scale_filter_90_30 22.50 bitmap_scale_filter_90_80 1.80 bitmap_scale_filter_90_90 57.51 bitmap_scale_filter_80_90 41.99 bitmap_scale_filter_30_90 31.51 bitmap_scale_filter_10_90 After: micros bench 193.60 bitmap_scale_filter_64_256 46.26 bitmap_scale_filter_256_64 7.81 bitmap_scale_filter_90_10 9.99 bitmap_scale_filter_90_30 22.05 bitmap_scale_filter_90_80 1.96 bitmap_scale_filter_90_90 52.07 bitmap_scale_filter_80_90 37.73 bitmap_scale_filter_30_90 27.63 bitmap_scale_filter_10_90 Change-Id: I2f29366b0fd503176c5af4d825fa524e632da21b Reviewed-on: https://skia-review.googlesource.com/7630 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Graceful degredation for SkOpts_hsw.Gravatar Mike Klein2017-01-26
| | | | | | | | | | | | | __AVX2__ will not be defined if you omit -mavx2. Android does this intentionally for x86 builds. (No mobile CPU supports AVX2 AFAIK.) This should fix the Android roll. Change-Id: Ib94c862641abc11fbb46863afc53bcc049f362ad Reviewed-on: https://skia-review.googlesource.com/7633 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
* Fix variable names in convolve_vertical().Gravatar Mike Klein2017-01-26
| | | | | | | | | These new names reflect the actual pixels stored in each register. Change-Id: I8e626196cd8bcbef622e4fb87ac3566a79d3573a Reviewed-on: https://skia-review.googlesource.com/7624 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
* SkOpts_hsw ODR paranoiaGravatar Mike Klein2017-01-26
| | | | | | | | | | | | | | | | | | I'm warming back up to the idea of very careful use of SkOpts_hsw. But if we're going to do that, we need a strict header discipline. No header can be assumed to be safe without vetting, and most aren't. Today there's only one function defined in SkOpts_hsw, so this CL mostly rewrites that convolve_vertically() to use no headers beyond immintrin.h and stdint.h, both safe. It shared very little code with the others anyway, so we're not losing anything by putting it directly into SkOpts_hsw.cpp. I have also streamlined the implementation considerably to improve maintainability and readability. Change-Id: Ia03daae660e54125a0d2e2988464cfc930349e80 Reviewed-on: https://skia-review.googlesource.com/7611 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Move shader register setup to SkRasterPipelineBlitter.Gravatar Mike Klein2017-01-23
| | | | | | | | | | | | | | | | | | | | | We've been seeding the initial values of our registers to x+0.5,y+0.5, 1,0, 0,0,0,0 (useful values for shaders to start with) in all pipelines. This CL changes that to do so only when blitting, and only when we have a shader. The nicest part of this change is that SkRasterPipeline itself no longer needs to have a concept of y, or what x means. It just marches x through [x,x+n), and the blitter handles y and layers the meaning of "dst x coordinate" onto x. This ought to make SkSplicer a little easier to work with too. dm --src gm --config f16 srgb 565 all draws the same. Change-Id: I69d8c1cc14a06e5dfdd6a7493364f43a18f8dec5 Reviewed-on: https://skia-review.googlesource.com/7353 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* SkRasterPipeline: implement support for SkTableColorFilterGravatar Mike Klein2017-01-23
| | | | | | | | | | | | | This adds and uses a byte_tables stage that converts to bytes, looks up in the tables, then converts back to floats. We treat this as color filter as pure math, not considering anything colorspace related: no transfer functions, no gamut to change, etc. Change-Id: If5fefc1bcef61a0fb0ae279002a0dd1547e429ea Reviewed-on: https://skia-review.googlesource.com/7413 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove SkColorCubeFilter. It is unused.Gravatar Mike Klein2017-01-21
| | | | | | | Change-Id: Iec5fc759e331de24caea1347f9510917260d379b Reviewed-on: https://skia-review.googlesource.com/7363 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Replace raster pipeline nextafter() calls with SkNu nudgingGravatar Florin Malita2017-01-20
| | | | | | | | | | | | | | | | | | (courtesy of mtklein@) nanobench -m gradient_linear_clamp\$ --config f16 --ms 2000 -q Before: 753.66 After: 658.69 R=mtklein@google.com,herb@google.com CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ie1442da340f6cfc9aef65bec1f114c0e5db89fcb Reviewed-on: https://skia-review.googlesource.com/7351 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Just clamp to limit-epsilon.Gravatar Mike Klein2017-01-20
| | | | | | | | | | | | | I think the -0.5f was an implementation detail of Herb's bilerp that we don't need here. It happened to also be clamping us to something less than limit (limit-0.5), so we do need to replace that with a little nudge to keep us on tile. Change-Id: I4ebd32e0ad38c724a17dc8bc35d9ea228eeeca32 Reviewed-on: https://skia-review.googlesource.com/7338 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* SkRasterPipeline impl for 2-stop linear gradientsGravatar Florin Malita2017-01-20
| | | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ia2b630cf9c0826fbfc3342707c005030d0529bbc Reviewed-on: https://skia-review.googlesource.com/7186 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add F16 support to SkPNGImageEncoderGravatar Matt Sarett2017-01-19
| | | | | | | | | | | | BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ifd221365a7b9f9a4a4fc5382621e0da7189e1148 Reviewed-on: https://skia-review.googlesource.com/6526 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Reland "Respect full precision for RGB16 PNGs" (part 2)Gravatar Matt Sarett2017-01-19
| | | | | | | | | | | | | | | | | | | | | This lands all the new xform hooks but no change to src/codec. So the new decode features are turned off. I'm relanding this in pieces to try to bisect a strange MSAN error. Original CL: https://skia-review.googlesource.com/c/7085/ BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD,Build-Ubuntu-Clang-x86_64-Release-Fast Change-Id: I451a2a29c73ca475e9e7a5ded58d4948d6b8be19 Reviewed-on: https://skia-review.googlesource.com/7277 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Respect full precision for RGB16 PNGs"Gravatar Matt Sarett2017-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7a090c403da1dad6a2e19f2011158bd894a62d91. Reason for revert: <INSERT REASONING HERE> Original change's description: > Respect full precision for RGB16 PNGs > > BUG=skia: > > CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD > > Change-Id: If58d201daae97bce2f8efbc453c2ec452e682493 > Reviewed-on: https://skia-review.googlesource.com/7085 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Mike Klein <mtklein@chromium.org> > Reviewed-by: Leon Scroggins <scroggo@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@chromium.org,mtklein@google.com,msarett@google.com,scroggo@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ibd9879bc4f65ca0c2457dd0bfb5eb008d9a8f672 Reviewed-on: https://skia-review.googlesource.com/7183 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Respect full precision for RGB16 PNGsGravatar Matt Sarett2017-01-18
| | | | | | | | | | | | | BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: If58d201daae97bce2f8efbc453c2ec452e682493 Reviewed-on: https://skia-review.googlesource.com/7085 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "Optimize SkBlend by using NEON intrinsics"Gravatar Mike Klein2017-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7adde145d3913cfd67b90bf83a9ea54386a285a7. Reason for revert: may be breaking our Android One test bots. Original change's description: > Optimize SkBlend by using NEON intrinsics > > Use NEON intrinsics to check the alpha channel of the pixels. > > In some case, it's about 14 times faster than the original implementation. > > $ ./bin/droid out/arm64_release/nanobench --samples 300 --nompd --match LinearSrcOver -v > neon_opt.log > $ ./bin/compare neon_opt.log clean.log > LinearSrcOver_yellow_rose.pngVSkOptsDefault 1.8ms -> 24.9ms 13.8x > LinearSrcOver_iconstrip.pngVSkOptsDefault 5.71ms -> 69.8ms 12.2x > LinearSrcOver_plane.pngVSkOptsDefault 1.45ms -> 11ms 7.62x > LinearSrcOver_baby_tux.pngVSkOptsDefault 1.88ms -> 9.96ms 5.29x > LinearSrcOver_mandrill_512.pngVSkOptsDefault 1.41ms -> 4.62ms 3.29x > LinearSrcOver_yellow_rose.pngVSkOptsTrivial 24.9ms -> 24.9ms 1x > LinearSrcOver_yellow_rose.pngVSkOptsNonSimdCore 2.17ms -> 2.18ms 1x > LinearSrcOver_plane.pngVSkOptsTrivial 11.1ms -> 11.1ms 1x > LinearSrcOver_plane.pngVSkOptsNonSimdCore 1.5ms -> 1.5ms 1x > LinearSrcOver_mandrill_512.pngVSkOptsNonSimdCore 2.39ms -> 2.39ms 1x > LinearSrcOver_iconstrip.pngVSkOptsNonSimdCore 6.43ms -> 6.43ms 1x > LinearSrcOver_baby_tux.pngVSkOptsBruteForce 22.3ms -> 22.3ms 1x > LinearSrcOver_yellow_rose.pngVSkOptsBruteForce 45.5ms -> 45.5ms 1x > LinearSrcOver_baby_tux.pngVSkOptsNonSimdCore 2.02ms -> 2.02ms 1x > LinearSrcOver_iconstrip.pngVSkOptsTrivial 69.7ms -> 69.7ms 1x > LinearSrcOver_baby_tux.pngVSkOptsTrivial 9.96ms -> 9.95ms 1x > LinearSrcOver_mandrill_512.pngVSkOptsBruteForce 99.3ms -> 99.2ms 1x > > BUG=skia: > > CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD > > Change-Id: Ia576365578d65b771440da65fdf41f090ccf0541 > Reviewed-on: https://skia-review.googlesource.com/6860 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,bsalomon@google.com,joel.liang@arm.com,reviews@skia.org BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ie40eb5a7c27807aaf396429a82a1a2dd328c2b5b Reviewed-on: https://skia-review.googlesource.com/7036 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix out of bounds read in RP::load_tables_u16_be()Gravatar Matt Sarett2017-01-13
| | | | | | | | | | | BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I4f6dd002b03812d63bf62342c346ea21f6865466 Reviewed-on: https://skia-review.googlesource.com/7027 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Optimize SkBlend by using NEON intrinsicsGravatar Joel Liang2017-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use NEON intrinsics to check the alpha channel of the pixels. In some case, it's about 14 times faster than the original implementation. $ ./bin/droid out/arm64_release/nanobench --samples 300 --nompd --match LinearSrcOver -v > neon_opt.log $ ./bin/compare neon_opt.log clean.log LinearSrcOver_yellow_rose.pngVSkOptsDefault 1.8ms -> 24.9ms 13.8x LinearSrcOver_iconstrip.pngVSkOptsDefault 5.71ms -> 69.8ms 12.2x LinearSrcOver_plane.pngVSkOptsDefault 1.45ms -> 11ms 7.62x LinearSrcOver_baby_tux.pngVSkOptsDefault 1.88ms -> 9.96ms 5.29x LinearSrcOver_mandrill_512.pngVSkOptsDefault 1.41ms -> 4.62ms 3.29x LinearSrcOver_yellow_rose.pngVSkOptsTrivial 24.9ms -> 24.9ms 1x LinearSrcOver_yellow_rose.pngVSkOptsNonSimdCore 2.17ms -> 2.18ms 1x LinearSrcOver_plane.pngVSkOptsTrivial 11.1ms -> 11.1ms 1x LinearSrcOver_plane.pngVSkOptsNonSimdCore 1.5ms -> 1.5ms 1x LinearSrcOver_mandrill_512.pngVSkOptsNonSimdCore 2.39ms -> 2.39ms 1x LinearSrcOver_iconstrip.pngVSkOptsNonSimdCore 6.43ms -> 6.43ms 1x LinearSrcOver_baby_tux.pngVSkOptsBruteForce 22.3ms -> 22.3ms 1x LinearSrcOver_yellow_rose.pngVSkOptsBruteForce 45.5ms -> 45.5ms 1x LinearSrcOver_baby_tux.pngVSkOptsNonSimdCore 2.02ms -> 2.02ms 1x LinearSrcOver_iconstrip.pngVSkOptsTrivial 69.7ms -> 69.7ms 1x LinearSrcOver_baby_tux.pngVSkOptsTrivial 9.96ms -> 9.95ms 1x LinearSrcOver_mandrill_512.pngVSkOptsBruteForce 99.3ms -> 99.2ms 1x BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ia576365578d65b771440da65fdf41f090ccf0541 Reviewed-on: https://skia-review.googlesource.com/6860 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Attempt 3: SkRasterPipelineBlitter: support A8Gravatar Mike Klein2017-01-13
| | | | | | | | | | | Now that SkOpts_hsw.cpp no longer hooks in SkRasterPipeline_opts, it should be safe to try this again. This reverts commit 86d55b312a2649d80890ccf75f24571ada0265f1. Change-Id: I2d495600ca9d3a0f49c2e02fbaaae349cefac3a1 Reviewed-on: https://skia-review.googlesource.com/6985 Reviewed-by: Mike Klein <mtklein@chromium.org>
* Use RasterPipeline to support full precision on 16-bit RGBA pngsGravatar Matt Sarett2017-01-13
| | | | | | | | | | | | Reland of Original Change: https://skia-review.googlesource.com/6260 CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I809984dd9af225103bfbe83492a17c19da7c5e40 Reviewed-on: https://skia-review.googlesource.com/6980 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Use RasterPipeline to support full precision on 16-bit RGBA pngs"Gravatar Matt Sarett2017-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bb2339da39ab3ee59121acd911920dafcd4a2f72. Reason for revert: Breaks MSAN Original change's description: > Use RasterPipeline to support full precision on 16-bit RGBA pngs > > TODO: Support more precision on 16-bit RGB pngs > > BUG=skia: > > CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD > > Change-Id: I89dfef3b4887b9c4895c17309933883ab90ffa4d > Reviewed-on: https://skia-review.googlesource.com/6260 > Reviewed-by: Mike Reed <reed@google.com> > Reviewed-by: Leon Scroggins <scroggo@google.com> > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=mtklein@chromium.org,mtklein@google.com,msarett@google.com,scroggo@google.com,reed@google.com,reviews@skia.org BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I47579c20af033a75883e2b35567cb9c690ce54b0 Reviewed-on: https://skia-review.googlesource.com/6975 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Use RasterPipeline to support full precision on 16-bit RGBA pngsGravatar Matt Sarett2017-01-12
| | | | | | | | | | | | | | | TODO: Support more precision on 16-bit RGB pngs BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I89dfef3b4887b9c4895c17309933883ab90ffa4d Reviewed-on: https://skia-review.googlesource.com/6260 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* disable runtime detected AVX2 raster pipelinesGravatar Mike Klein2017-01-12
| | | | | | | | | | | | | It's proving too difficult to keep on top of all the ways we might cause ODR violations that crash Chrome. I'd rather focus on other ways of running the pipelines that won't have that particular problem. Our -Fast bots will keep testing and benchmarking AVX2 raster pipelines. BUG=chromium:679147,chromium:654213,chromium:664864,chromium:666707,etc. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I35ba8f5f4303107237fd78a6ce442d7c26e5fbef Reviewed-on: https://skia-review.googlesource.com/6827 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* remove xbyak experimentGravatar Mike Klein2017-01-10
| | | | | | | | | | | SkSplicer is better. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I014ec0e9fb00a8a4694d442e672c65402621dc67 Reviewed-on: https://skia-review.googlesource.com/6830 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* SkXbyak: loop inside, only bodyGravatar Mike Klein2017-01-07
| | | | | | | | | | | | SkXbyak_… 927 …JITCompiled 1x …Interpreted 1.33x …HandWritten 1.97x CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I486bbc341a38354345bfcf3d6150d1628f83f186 Reviewed-on: https://skia-review.googlesource.com/6726 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Retry "SkRasterPipelineBlitter: support A8"..."Gravatar Mike Klein2017-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f55ea6a1deb21120944d406124a2984b5009260a. Reason for revert: crbug.com/679147 Original change's description: > Retry "SkRasterPipelineBlitter: support A8"... > > ...preferring SkA8_Coverage_Blitter over SkRasterPipelineBlitter. > > I think we could make this work with SkRasterPipelineBlitter (tell it, draw white in Src mode with this mask), but the existing blitter is pretty hard to beat in efficiency and correctness. > > CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD > > > Change-Id: I72df9995c63f3334d8111c59711818cb5ed1e63c > Reviewed-on: https://skia-review.googlesource.com/6627 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,brianosman@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I6a36b4c087a52e54f4d591ded40e6a202fb77068 Reviewed-on: https://skia-review.googlesource.com/6760 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix Sk8f::Store4 (for HSW)Gravatar Matt Sarett2017-01-06
| | | | | | | | | | | | | This should fix the colorspacexform gm in Gold. https://gold.skia.org/search?head=true&include=false&limit=50&neg=false&pos=false&query=name%3Dcolorspacexform%26source_type%3Dgm&unt=true BUG=skia: Change-Id: I05e2c2c0e7d7095f6935e60ff1bf89858380335f Reviewed-on: https://skia-review.googlesource.com/6721 Commit-Queue: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add a real SkXbyak bench, implement enough to run it.Gravatar Mike Klein2017-01-06
| | | | | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD SkXbyak_… 9320 …JITCompiled 1x …Interpreted 1.24x …HandWritten 2.5x Change-Id: I37d2d255ff32dcce73d29081d506e2d67477af97 Reviewed-on: https://skia-review.googlesource.com/6697 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Avoid SkFixed overflow in decal bitmap procsGravatar Florin Malita2017-01-06
| | | | | | | | | | | | | | | | | | The check for decal mode can overflow in SkFixed. Promote to 64bit (48.16) instead. Also update can_truncate_to_fixed_for_decal() to take SkFixed params and used it in ClampX_ClampY_filter_scale_SSE2(). BUG=chromium:675444 R=reed@google.com CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I759464cdaa5c005159e38e32167fb1937e2a1d28 Reviewed-on: https://skia-review.googlesource.com/6538 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* SkXbyak basicsGravatar Mike Klein2017-01-06
| | | | | | | | | | | | A little JIT proof of concept for SkRasterPipeline, using xbyak, which is a header-only assembler. It's x86-only, but supports x86 very thoroughly, and it's very user friendly (at least as far as assembler libraries go...). CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ie17e562b0f3fff5914041badfb2c1fe4f86efab8 Reviewed-on: https://skia-review.googlesource.com/5730 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Heather Miller <hcm@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Retry "SkRasterPipelineBlitter: support A8"...Gravatar Mike Klein2017-01-06
| | | | | | | | | | | | | | ...preferring SkA8_Coverage_Blitter over SkRasterPipelineBlitter. I think we could make this work with SkRasterPipelineBlitter (tell it, draw white in Src mode with this mask), but the existing blitter is pretty hard to beat in efficiency and correctness. CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I72df9995c63f3334d8111c59711818cb5ed1e63c Reviewed-on: https://skia-review.googlesource.com/6627 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* simplify by removing _d stagesGravatar Mike Klein2017-01-06
| | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I75e232faee6ad48f65bac5b119a461280b27bbc8 Reviewed-on: https://skia-review.googlesource.com/6661 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Use stack instead of malloc() for most calls to SkRasterPipeline::run().Gravatar Mike Klein2017-01-05
| | | | | | | | | | | | | Also split bench into run/compile variants to measure the effect: Before …f16_compile 1x …f16_run 1.02x …srgb_compile 1.56x …srgb_run 1.61x After …f16_run 1x …f16_compile 1.01x …srgb_compile 1.58x …srgb_run 1.59x CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I8e65fb2acdbb05ccc0b3894f16d7646603c3e74d Reviewed-on: https://skia-review.googlesource.com/6621 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "SkRasterPipelineBlitter: support A8"Gravatar Mike Klein2017-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f44373c119290b501d4aec7385e16d12c28a1f0f. Reason for revert: MSAN Original change's description: > SkRasterPipelineBlitter: support A8 > > This adds support for loading and storing A8, then uses it in SkRasterPipelineBlitter. > > I think this handles all dst formats now: A8, 565, 8888 (by policy, sRGB only) and F16. > > CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD > > > Change-Id: Id207f6e6c56b6bfcc301d77dd23e0959bb7afba8 > Reviewed-on: https://skia-review.googlesource.com/6554 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I9ead3c3335e1776e9a1639ca0481253821505d67 Reviewed-on: https://skia-review.googlesource.com/6625 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* SkRasterPipelineBlitter: support A8Gravatar Mike Klein2017-01-05
| | | | | | | | | | | | | | This adds support for loading and storing A8, then uses it in SkRasterPipelineBlitter. I think this handles all dst formats now: A8, 565, 8888 (by policy, sRGB only) and F16. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Id207f6e6c56b6bfcc301d77dd23e0959bb7afba8 Reviewed-on: https://skia-review.googlesource.com/6554 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Retry trim another instruction off SkRasterPipeline overheadGravatar Mike Klein2017-01-04
| | | | | | | | | | | | | | | | | | | This time, with manual program memory management instead of std::vector<void*>. Using STL types from SkOpts_hsw.cpp is not safe. Things like std::vector<void*> are inlined but not anonymous, so they're deduped by the linker arbitrarily. This is bad when we pick the version compiled with AVX instructions on a machine that doesn't support AVX... std::vector<Stage> was safe before because Stage itself was anonymous. While not anonymous, std::vector<Stage> is unique to the compilation unit, because you can only refer to the anonymous Stage in the compilation unit. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_asan_rel_ng;skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I015e27583b6b6ff06b5e9f63e3f40ee6b27d6dbd Reviewed-on: https://skia-review.googlesource.com/6550 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* auto-generate _d stagesGravatar Mike Klein2017-01-04
| | | | | | | | | | | | Stage foo_d should always be the same logic as stage foo swapping r and dr, g and dg, b and db, a and da. This means we can infer their definitions. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ia0a3abb29a201c647d9ec1860211abfbc19b56ae Reviewed-on: https://skia-review.googlesource.com/6555 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "trim another instruction off SkRasterPipeline overhead"Gravatar Mike Klein2017-01-04
| | | | | | | | | | | This reverts commit e61c40707e70a2be9e32227a929173864f7895e1. Reason for revert: this and the ODR caused operations on ContiguousContainerBase::elements_, another std::vector<void*> in Chrome, to start using AVX2 instructions. Boy this is annoying... Change-Id: I2c4837ad70fdef8096db904022b0703b88c6fd6c Reviewed-on: https://skia-review.googlesource.com/6549 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* trim another instruction off SkRasterPipeline overheadGravatar Mike Klein2017-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The overhead of a stage today is 3 x86 instructions, typically looking something like this: - movq (%rdi), %rax // Load the next stage function pointer. - addq $0x10, %rdi // Step our progress ahead 16 bytes to that next stage. - jmpq *%rax // Transfer control to that stage. But if we make sure the pointer's in esi/rsi, we can use lodsd/lodsq to do those first two steps in one instruction: - lodsq (%rsi), %rax (≈ movq (%rdi), %rax; addq $0x8, %rsi). - jmpq *%rax This CL rearranges things so that we can take advantage of this and generally trim off an instruction of overhead. Instead of a vector of {Fn, ctx} pairs, we'll flatten it down into a single interlaced program vector of void*, basically just ommitting any null context pointers. We pass the pointer to program as the second argument to Fn, putting it in rsi. These two changes together make getting the next Fn to call or the current context the same cheap lodsq instruction, encapsulated as load_and_increment(). Here's how the simple "modulate" blend stage changes: vmulps %ymm4, %ymm0, %ymm0 vmulps %ymm5, %ymm1, %ymm1 vmulps %ymm6, %ymm2, %ymm2 vmulps %ymm7, %ymm3, %ymm3 movq (%rdi), %rax addq $0x10, %rdi jmpq *%rax ~~~~~~~~> vmulps %ymm4, %ymm0, %ymm0 vmulps %ymm5, %ymm1, %ymm1 vmulps %ymm6, %ymm2, %ymm2 vmulps %ymm7, %ymm3, %ymm3 lodsq (%rsi), %rax jmpq *%rax This does make getting the current context a one-time, destructive operation. It's switched from referring to ctx as a void* directly to using ctx() as a thunk that returns a void*. No stage so far has ever referred to ctx twice, and it all appears to inline, so this seems harmless. "matrix_2x3" is a good example of what stages that use context pointers end up looking like: lodsq (%rsi), %rax vbroadcastss (%rax), %ymm9 vbroadcastss 0x8(%rax), %ymm10 vbroadcastss 0x10(%rax), %ymm8 vfmadd231ps %ymm10, %ymm1, %ymm8 vfmadd231ps %ymm9, %ymm0, %ymm8 vbroadcastss 0x4(%rax), %ymm10 vbroadcastss 0xc(%rax), %ymm11 vbroadcastss 0x14(%rax), %ymm9 vfmadd231ps %ymm11, %ymm1, %ymm9 vfmadd231ps %ymm10, %ymm0, %ymm9 lodsq (%rsi), %rax vmovaps %ymm8, %ymm0 vmovaps %ymm9, %ymm1 jmpq *%rax We can't do this with MSVC, as there's no intrinsic for it I can find, and they disallow inline assembly, and rsi is not used to pass arguments to functions there anyway. ARM doesn't need it... it does this in two instructions naturally anyway. We could do this for 32-bit x86 but I'd just rather focus on x86-64. It's unclear to me that this makes things any faster, but doesn't appear to make things any slower, and makes I think both the code and disassembly simpler. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ia7b543a6718c75a33095371924003c5402b3445a Reviewed-on: https://skia-review.googlesource.com/6271 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* remove MIPS DSP optimizationsGravatar Mike Klein2016-12-21
| | | | | | | | | | | | | | | | | There are only a couple of these, primarily focused on index8 srcs and 565 dsts. The burden's starting to outweigh the benefit. No one on the team knows MIPS assembly. If we're going to try this again, I'd rather we try some sort of SkNx / compiler-intrinsic based approach, probably targeting MIPS SIMD (MSA), not this older instruction set. We already ignore these files for 64-bit MIPS. This just closes the loop on 32-bit MIPS. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD,Build-Ubuntu-Clang-mips64el-Debug-Android,Build-Ubuntu-Clang-mips64el-Release-Android,Build-Ubuntu-Clang-mipsel-Debug-Android,Build-Ubuntu-Clang-mipsel-Release-Android BUG=skia:6065 Change-Id: Iecac15b56f59625b2e743ea36e7791b90bb0b422 Reviewed-on: https://skia-review.googlesource.com/6353 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fix swapped interpretation of c and e in SkColorSpace_ICCGravatar Matt Sarett2016-12-19
| | | | | | | | | | | | | | | | The ICC errata supports the opposite of what we do. http://www.color.org/icc_specs2.xalter TBR=reed@google.com BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I18ace7f312926b264e624c30d8cb983eff5c434b Reviewed-on: https://skia-review.googlesource.com/6277 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Consolidate TILEX_LOW_BITS/TILEY_LOW_BITS -> EXTRACT_LOW_BITSGravatar Florin Malita2016-12-19
| | | | | | | | | | | R=reed@google.com CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I5450d1ae3239c9d4e70502fc042222410ac77e72 Reviewed-on: https://skia-review.googlesource.com/6265 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Added optimized sRGB/2.2 gamma stages into A2B color xformGravatar raftias2016-12-15
| | | | | | | | | | | | | | | | Hooked up existing to/from srgb, and to_2dot2 stages into SkColorSpaceXform_A2B. Added a from_2dot2 stage to the raster pipeline to complete the other direction. BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I3887af3f59f67329d7e843e7355ff54e22cc4ed0 Reviewed-on: https://skia-review.googlesource.com/5840 Commit-Queue: Robert Aftias <raftias@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "Revert "SkNx basically always is fast now.""Gravatar Mike Klein2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8ba64d1996ba6c9ecfb12132cdab7d5d99af7456. Reason for revert: does not appear to have been blocking the roll. Original change's description: > Revert "SkNx basically always is fast now." > > This reverts commit 21f783829619186442041de6008f7f58f4f6250d. > > Reason for revert: roll? > > Original change's description: > > SkNx basically always is fast now. > > > > We had this SKNX_IS_FAST hanging around from before Chrome always built with NEON. > > > > CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD > > > > Change-Id: Ia5cc0323b3ef052192e2903f961aee11eb3f82d8 > > Reviewed-on: https://skia-review.googlesource.com/5946 > > Commit-Queue: Mike Klein <mtklein@chromium.org> > > Reviewed-by: Mike Reed <reed@google.com> > > Reviewed-by: Florin Malita <fmalita@chromium.org> > > > > TBR=mtklein@chromium.org,fmalita@chromium.org,reed@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I0e57285c68eae0a64213fe29ea4cca5519777954 > Reviewed-on: https://skia-review.googlesource.com/6040 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,reviews@skia.org,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I230dd4c2abb2d14ffc302be5376b9eaacbbeafcc Reviewed-on: https://skia-review.googlesource.com/6026 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "Revert "clamp to premul when reading premul sRGB""Gravatar Mike Klein2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2e018f548d76b0688f9873c683cffc681fec40ec. Reason for revert: doesn't appear to have been the roll problem. Original change's description: > Revert "clamp to premul when reading premul sRGB" > > This reverts commit 04e10da8362a0dcabd795a4ad53f617719ca0d20. > > Reason for revert: roll? > > Change-Id: Id0a8dcd62763bd6eddde120c513ca97e098a4268 > Reviewed-on: https://skia-review.googlesource.com/6022 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,reviews@skia.org,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I399ca5e728ce6766c6707682c4c6b685681ffdeb Reviewed-on: https://skia-review.googlesource.com/6025 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "clamp to premul when reading premul sRGB"Gravatar Mike Klein2016-12-14
| | | | | | | | | | | This reverts commit 04e10da8362a0dcabd795a4ad53f617719ca0d20. Reason for revert: roll? Change-Id: Id0a8dcd62763bd6eddde120c513ca97e098a4268 Reviewed-on: https://skia-review.googlesource.com/6022 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "SkNx basically always is fast now."Gravatar Mike Klein2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 21f783829619186442041de6008f7f58f4f6250d. Reason for revert: roll? Original change's description: > SkNx basically always is fast now. > > We had this SKNX_IS_FAST hanging around from before Chrome always built with NEON. > > CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD > > Change-Id: Ia5cc0323b3ef052192e2903f961aee11eb3f82d8 > Reviewed-on: https://skia-review.googlesource.com/5946 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> > TBR=mtklein@chromium.org,fmalita@chromium.org,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I0e57285c68eae0a64213fe29ea4cca5519777954 Reviewed-on: https://skia-review.googlesource.com/6040 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* clamp to premul when reading premul sRGBGravatar Mike Klein2016-12-13
| | | | | | | | | | | | | | | It's pretty easy to start with sound premultiplied linear floats, pack those to sRGB encoded bytes, then read them back to linear floats and find them not quite premultiplied, with a color channel just a smidge greater than the alpha channel. This can happen basically any time we have different transfer functions for alpha and colors... sRGB being the only one we draw into. This is an annoying problem with no known good solution. So apply the clamp hammer. These new calls on SkRasterPipeline should make it impossible to get wrong. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I4c974f4a7b151f3f684946f1e83d06b1b288fd01 Reviewed-on: https://skia-review.googlesource.com/5945 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>