aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/shaders
Commit message (Collapse)AuthorAge
* Remove color space xform from GrTextureDomain & GrSimpleTextureEffectGravatar Brian Osman2017-10-18
| | | | | | | | Bug: skia: Change-Id: I31435d334da28cce9bbc654c4b98746b03078897 Reviewed-on: https://skia-review.googlesource.com/61460 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Feed seed_shader() iota through a context pointer.Gravatar Mike Klein2017-10-18
| | | | | | | | | | As this array grows longer it causes troublesome code generation when we're compiling offline, but it's easy as an argument. Change-Id: I53526443f534f29d3bff17c3aec24a9e916c9b86 Reviewed-on: https://skia-review.googlesource.com/60564 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Convert more code to use color space xform FPGravatar Brian Osman2017-10-18
| | | | | | | | | | | Special images, image shaders, and all texture producers, as well as bicubic (which simplifies factory call sites). Bug: skia: Change-Id: I3f7c178060f25db8b659fe66e132f5ea066317b1 Reviewed-on: https://skia-review.googlesource.com/61261 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove trailing whitespace.Gravatar Ben Wagner2017-10-09
| | | | | | | | | | | Also adds a presubmit to prevent adding trailing whitespace to source code in the future. Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6 Reviewed-on: https://skia-review.googlesource.com/57380 Reviewed-by: Ravi Mistry <rmistry@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* initClassID no longer auto-allocates idsGravatar Ethan Nicholas2017-10-09
| | | | | | | | | | | | | Auto-allocated IDs mean that the IDs depend upon the order in which classes happen to get initialized and are therefore not consistent from run to run. This change paves the way for a persistent shader cache by fixing the IDs in an enum. Bug: skia: Change-Id: I3e923c6c54f41b3b3eb616458abee83e0909c09f Reviewed-on: https://skia-review.googlesource.com/56401 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fold clamp_{x,y} into the gathers.Gravatar Mike Klein2017-09-22
| | | | | | | | | | | | | | | | | | | All three image tile modes go through exclusive_clamp() and then a gather today, so we can move the work of exclusive_clamp() into eac gather_ stage, eliminating the need for clamp_{x,y} stages. Luckily, we've got a convenient place to bottleneck this, ptr_and_ix(), which works out the pointer and vector of indices to load for gathers. This deletes SkRasterPipeline_repeat_tiling unit test, which now no longer exactly makes sense. It tests that repeat_x does that clamp, but that's now done automatically outside that stage. Change-Id: I24637ef60921bec7aa00082984c0c6a49dd86ca9 Reviewed-on: https://skia-review.googlesource.com/50260 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* switched SkSL's temporary 'highfloat' type back to 'float'Gravatar Ethan Nicholas2017-09-22
| | | | | | | | Bug: skia: Change-Id: If0debae7318b6b5b4a7cb85d458996a09931127e Reviewed-on: https://skia-review.googlesource.com/48760 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* re-land of new SkSL precisionsGravatar Ethan Nicholas2017-09-18
| | | | | | | | Bug: skia: Change-Id: Ic1deb3db2cbda6ca45f93dee99832971a36a2119 Reviewed-on: https://skia-review.googlesource.com/47841 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Delete the legacy linear gradient implGravatar Florin Malita2017-09-18
| | | | | | | | | | Dead code at this point. Change-Id: I0eb705195446ec084ead49c9f712bf19d8892305 Reviewed-on: https://skia-review.googlesource.com/48020 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "Revert "Revert "Switched highp float to highfloat and mediump float ↵Gravatar Ethan Nicholas2017-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | to half.""" This reverts commit 05d5a13fea6246648de7e41358ed338d53c85ea2. Reason for revert: looks like it broke filterfastbounds Original change's description: > Revert "Revert "Switched highp float to highfloat and mediump float to half."" > > This reverts commit 1d816b92bb7cf2258007f3f74ffd143b89f25d01. > > Bug: skia: > Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1 > Reviewed-on: https://skia-review.googlesource.com/46464 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> TBR=bsalomon@google.com,ethannicholas@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: Iddf6aef2ab084aa73da7ceebdfc303a1d2b80cde Reviewed-on: https://skia-review.googlesource.com/47441 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Revert "Switched highp float to highfloat and mediump float to half.""Gravatar Ethan Nicholas2017-09-15
| | | | | | | | | | This reverts commit 1d816b92bb7cf2258007f3f74ffd143b89f25d01. Bug: skia: Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1 Reviewed-on: https://skia-review.googlesource.com/46464 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* make most of SkColorPriv.h privateGravatar Cary Clark2017-09-15
| | | | | | | | | | | | | created new file src/core/SkColorData.h for internal consumption. Note that many of the functions there are unused as well. Bug: skia: 6898 R: reed@google.com Change-Id: I25bfd5a9c21f53558c4ca65a77eb5d322d897c6d Reviewed-on: https://skia-review.googlesource.com/46848 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Remove symmetric three stop special caseGravatar Brian Osman2017-09-12
| | | | | | | | | | | | Just let the general three-stop shader handle all three-stop gradients. Also, pre-compute values derived from the middle stop to remove all division (and actually convert computation to FMA form). Bug: skia: Change-Id: I1aae069d929d1a942c38aa2e2f3fd5fb7d9b2f10 Reviewed-on: https://skia-review.googlesource.com/45800 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add general three-stop analytic gradient shaderGravatar Brian Osman2017-09-11
| | | | | | | | | | | | | | | | This fixes an Android rendering bug where radial gradients were being used for "clipping" (via DstIn blend mode). The gradient stops were placed at (0, 0.999, 1), which caused our table quantization to drop the last stop. kThree_ColorType now means "0, any t, 1". The old (special-case) kThree_ColorType is now called kSymmetricThree_ColorType. Bug: skia: Change-Id: I96a0b9e679f2d537862a3e097f7e3446474914ea Reviewed-on: https://skia-review.googlesource.com/45260 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Rework GrSamplerParams to be more compact and use its own wrap mode enum.Gravatar Brian Salomon2017-09-07
| | | | | | | | | The main change is to make GrSamplerParams smaller by making its enums have byte-sized underlying types. The rest is cosmetic. Change-Id: Ib71ea50612d24619a85e463826c6b8dfb9b445e3 Reviewed-on: https://skia-review.googlesource.com/43200 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* fold params into StageRecGravatar Mike Reed2017-08-29
| | | | | | | | | | | | | pre-CL before trying to add a hint-rect field to allow shaders to "optimize" their stages for a given restriction in device space - e.g. if the shader's intrinsic domain is contained, it won't need to tile/clamp Bug: skia: Change-Id: Ia2da557691da25f31e4b9e3f53c3bc6709b89083 Reviewed-on: https://skia-review.googlesource.com/40224 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Use the 4f impl for legacy/8888 linear gradientsGravatar Florin Malita2017-08-29
| | | | | | | | | | | | | | | This is a partial revert of https://skia-review.googlesource.com/c/20280, adding back L32 support for 4f gradients and switching off the legacy impl. If it sticks, we should be able to completely delete the legacy gradient code. Change-Id: Iaa6d722ea4dfd8e4d959bb76eca815a30ca7098f Reviewed-on: https://skia-review.googlesource.com/31425 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* remove code associated with legacy affine imageshadersGravatar Mike Reed2017-08-23
| | | | | | | | | | | requires https://skia-review.googlesource.com/c/33180 CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Bug: skia: Change-Id: I226e120cc5aebe393bda8bc069e7927fdc981a0e Reviewed-on: https://skia-review.googlesource.com/36800 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* use rasterpipeline if localmatrix is rotated or skewed for imagesGravatar Mike Reed2017-08-21
| | | | | | | | | Bug: skia: Change-Id: Ib269b5b9d79b055fe614aaacfd7e0d05d48f6085 Reviewed-on: https://skia-review.googlesource.com/33180 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* remove unused flag for rotated imageshadersGravatar Mike Reed2017-08-21
| | | | | | | | Bug: skia: Change-Id: I9066ec33a9742f6937cc61ff0afafd13af809222 Reviewed-on: https://skia-review.googlesource.com/36741 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Add back raster pipeline image tiling guardGravatar Florin Malita2017-08-18
| | | | | | | | | | | | | (SK_SUPPORT_LEGACY_TILED_BITMAPS) We have a couple of M61 regressions related to this change. Adding the guard back in case we decide to revert. TBR= Change-Id: I0703e61d70aa919b71ff9711ec28bcfc67e3e84a Reviewed-on: https://skia-review.googlesource.com/36120 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Switched highp float to highfloat and mediump float to half."Gravatar Brian Salomon2017-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 88d99c63878c2d3d340120f0321676f72afcb4f0. Reason for revert: Believed to be causing unit test failures in Chrome roll: https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/364433 https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.android%2Flinux_android_rel_ng%2F364433%2F%2B%2Frecipes%2Fsteps%2Fcontent_browsertests__with_patch__on_Android%2F0%2Flogs%2FWebRtcCaptureFromElementBrowserTest.VerifyCanvasWebGLCaptureColor%2F0 Original change's description: > Switched highp float to highfloat and mediump float to half. > > The ultimate goal is to end up with "float" and "half", but this > intermediate step uses "highfloat" so that it is clear if I missed a > "float" somewhere. Once this lands, a subsequent CL will switch all > "highfloats" back to "floats". > > Bug: skia: > Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca > Reviewed-on: https://skia-review.googlesource.com/31000 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,csmartdalton@google.com,ethannicholas@google.com Change-Id: I8bfa97547ac3920d433665f161d27df3f15c83aa No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/35705 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Switched highp float to highfloat and mediump float to half.Gravatar Ethan Nicholas2017-08-16
| | | | | | | | | | | | | The ultimate goal is to end up with "float" and "half", but this intermediate step uses "highfloat" so that it is clear if I missed a "float" somewhere. Once this lands, a subsequent CL will switch all "highfloats" back to "floats". Bug: skia: Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca Reviewed-on: https://skia-review.googlesource.com/31000 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Replace SkFAIL with SK_ABORT.Gravatar Ben Wagner2017-08-16
| | | | | | | | | | | | SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically changes uses of SkFAIL to SK_ABORT in preparation for its removal. The related sk_throw macro will be changed independently, due to needing to actually clean up its users. Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb Reviewed-on: https://skia-review.googlesource.com/35284 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.Gravatar Brian Salomon2017-08-11
| | | | | | | Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008 Reviewed-on: https://skia-review.googlesource.com/32760 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* use rasterpipeline for images if matrix is >= scale+translateGravatar Mike Reed2017-08-08
| | | | | | | | | Bug: skia: Change-Id: I36112fe54c6f2d0965d0b88f0291d7ffe0902715 Reviewed-on: https://skia-review.googlesource.com/30480 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Remove unneeded GrGradientEffect Tegra3 workaroundGravatar Florin Malita2017-08-08
| | | | | | | | | | | | The workaround for canUseMinAndAbsTogether() is implemented in GLSLCodeGenerator, so presumably not needed here. (https://cs.chromium.org/chromium/src/third_party/skia/src/sksl/SkSLGLSLCodeGenerator.cpp?rcl=0ac06e47269a40c177747310a613d213c95d1d6d&l=223) Change-Id: Id8179ff17b929ed2d79ef9463c0f2008f3591b00 Reviewed-on: https://skia-review.googlesource.com/32181 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Relocate gradient negative fract() workaround to GLSLCodeGeneratorGravatar Florin Malita2017-08-08
| | | | | | | Change-Id: If5aba5b266f86f677b6e63b0f79792f1d3213336 Reviewed-on: https://skia-review.googlesource.com/32202 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Streamline GrGradientEffect mirror tilingGravatar Florin Malita2017-08-08
| | | | | | | | | Using the same branch-less method as raster pipeline. Change-Id: Iaaa36330dbf49961bdfc288cad031d891d8ff589 Reviewed-on: https://skia-review.googlesource.com/31280 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Consolidate GrGradientEffect analytical implsGravatar Florin Malita2017-08-08
| | | | | | | | | There's a lot of commonality, we can share more code. Change-Id: I6528358763459c4e8af17fe5f6763752cfffdf39 Reviewed-on: https://skia-review.googlesource.com/31023 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Tiling support for GrGradientEffect kTwo_ColorType/kThree_ColorTypeGravatar Florin Malita2017-08-08
| | | | | | | | | | | | | | | (re-land of https://skia-review.googlesource.com/c/30780) Currently only the hard-stop specializations support tiling. Consolidate the tiling code and expand to kTwo_ColorType, kThree_ColorType also. BUG=6925 Change-Id: I017b4accba30e87367e139333e96246cb362b6a4 Reviewed-on: https://skia-review.googlesource.com/31422 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* simplify shaderbase -- remove shaderproc -- no measurable speed diffGravatar Mike Reed2017-08-07
| | | | | | | | Bug: skia: Change-Id: Id355e3e480847fe78f904735e59353c4eb3ba2bb Reviewed-on: https://skia-review.googlesource.com/31560 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Avoid int overflow in LinearGradientContext::shade4_dx_clampGravatar Florin Malita2017-08-07
| | | | | | | Change-Id: I86e01aa00b14f8a4b6e64169821768ab5ece9aa3 Reviewed-on: https://skia-review.googlesource.com/31481 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* remove unused shadeSpanAlpha -- handled by rasterpipelineGravatar Mike Reed2017-08-07
| | | | | | | | Bug: skia: Change-Id: If13510cbc340b920342d7d4df9ce34ef1081e434 Reviewed-on: https://skia-review.googlesource.com/31420 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Remove SkLightingShader and associated classesGravatar Robert Phillips2017-08-07
| | | | | | | | Change-Id: I8050414c30dfdb5df23ca79955adc5ba3a29d3f5 Reviewed-on: https://skia-review.googlesource.com/31140 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* clean up useage of SkFloatBitsGravatar Mike Reed2017-08-07
| | | | | | | | Bug: skia: Change-Id: I6d3a0019f2fcf11feca69123e4ce6eb35de43613 Reviewed-on: https://skia-review.googlesource.com/31222 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "Tiling support for GrGradientEffect kTwo_ColorType/kThree_ColorType"Gravatar Florin Malita2017-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b86aaeb7b0841c2c23f7b36b0bb0520ce2fb3256. Reason for revert: Nexus7/Tegra3 crashing on lcdblendmodes Original change's description: > Tiling support for GrGradientEffect kTwo_ColorType/kThree_ColorType > > Currently only the hard-stop specializations support tiling. > > Consolidate the tiling code and expand to kTwo_ColorType, > kThree_ColorType also. > > Change-Id: I0c04997f563a7150a486ccc03f8121099a651c0b > Reviewed-on: https://skia-review.googlesource.com/30780 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,fmalita@chromium.org Change-Id: I89c89c630f206c3a330e4b31aa3834dfbc5cd9e0 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/31244 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Tiling support for GrGradientEffect kTwo_ColorType/kThree_ColorTypeGravatar Florin Malita2017-08-04
| | | | | | | | | | | | Currently only the hard-stop specializations support tiling. Consolidate the tiling code and expand to kTwo_ColorType, kThree_ColorType also. Change-Id: I0c04997f563a7150a486ccc03f8121099a651c0b Reviewed-on: https://skia-review.googlesource.com/30780 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* GrGradientEffect::onIsEqual() must also consider tilingGravatar Florin Malita2017-08-04
| | | | | | | | | Without this fix, the newly added GM draws incorrectly. Change-Id: Ic159ab3201c10369ad5f8151186245d8d076cc25 Reviewed-on: https://skia-review.googlesource.com/30484 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Rename append_uniform_color() to append_constant_color().Gravatar Mike Klein2017-08-03
| | | | | | | | | | | | | | | | | The color appended here is both uniform and constant, and it's the constantness that makes this custom append method useful over just append(SkRasterPipeline::uniform_color, ...). Uniform colors that are not constant have to be loaded from the pointer each time (the caller might have changed the color out-of-band), but constant uniform colors can be analyzed once and implemented with specalizations like black_color and white_color. Change-Id: I3cfc00ccc578dd915367bca7113010557181224c Reviewed-on: https://skia-review.googlesource.com/30560 Commit-Queue: Mike Klein <mtklein@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Delete legacy radial gradient implGravatar Florin Malita2017-08-02
| | | | | | | | | | Raster pipeline FTW! Change-Id: Ia2e600cf6c6e780f5a1519374c178197cf229776 Reviewed-on: https://skia-review.googlesource.com/29884 Commit-Queue: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix sweep gradient tiling w/ makeColorSpaceGravatar Florin Malita2017-08-02
| | | | | | | Change-Id: If989c2262b174af042af13cda991b999d9b6d596 Reviewed-on: https://skia-review.googlesource.com/29881 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Tiling support for SkSweepGradientGravatar Florin Malita2017-08-01
| | | | | | | | | | | | | | | | | | Expand the sweep gradient definition to include a color stop angular range ([0, 360] by default). Color stop positions in [0,1] are mapped to this range, and drawing outside is controlled by a tile mode param. This is closer to the CSS gradients spec and allows us to use fewer color stops in Blink conic gradients. Impl-wise, the remapping is effected after t calculation, and before tiling. Change-Id: I5d71be01d134404d6eb9d7e2a904ec636b39f855 Reviewed-on: https://skia-review.googlesource.com/27704 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Require clone() be implemented by GrFragmentProcessor subclassesGravatar Brian Salomon2017-07-31
| | | | | | | Change-Id: I66ba0978e5748806d563ff4f26000e4e0095ed24 Reviewed-on: https://skia-review.googlesource.com/29042 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Gradient stages cleanupGravatar Florin Malita2017-07-30
| | | | | | | | | | | | | Hoist the matrix setup into SkGradientShaderBase. Drop the bool return for adjustMatrixAndAppendStages(), and rename to appendGradientStages(). Change-Id: Iad412f638f86223e5af46a7d3dea6f768f52bcad Reviewed-on: https://skia-review.googlesource.com/26427 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Remove stale SkTwoPointConicalGradient assertGravatar Florin Malita2017-07-29
| | | | | | | | | Change-Id: If46426393e5151dad4f66ee5a54341024701e87e TBR= NOTRY=true Reviewed-on: https://skia-review.googlesource.com/28500 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Don't instantiate degenerate 2pt gradientsGravatar Florin Malita2017-07-29
| | | | | | | | | We can catch the condition at construction time, no need to defer. Change-Id: I973b9e1b79998e2b334e3a91694c793882dfd65a Reviewed-on: https://skia-review.googlesource.com/26564 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com>
* Remove now-dead SK_SUPPORT_LEGACY_GRADIENT_MATRIX_MATH codeGravatar Florin Malita2017-07-29
| | | | | | | | Change-Id: I080942c44d2ce1a018ba127944c0a477af876158 TBR= Reviewed-on: https://skia-review.googlesource.com/28480 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* renamed SkSL types in preparation for killing precision modifiersGravatar Ethan Nicholas2017-07-28
| | | | | | | | Bug: skia: Change-Id: Iff0289e25355a89cdc289a0892ed755dd1b1c900 Reviewed-on: https://skia-review.googlesource.com/27703 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Implement clone() for Gradient GrFragmentProcessorsGravatar Brian Salomon2017-07-27
| | | | | | | | | Also removes the hard stop gradient conditional compilation macro. Change-Id: Idd56b5f3061db063d650a0090406ec192acc0b53 Reviewed-on: https://skia-review.googlesource.com/27661 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>