aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
Commit message (Collapse)AuthorAge
* Remove GrResourceIOProcessor.Gravatar Brian Salomon2018-07-31
| | | | | | | | | | | | | | | | Fold its functionality into GrPrimitiveProcessor and GrFragmentProcessor. Make each have its own TextureSampler nested class. Currently the only difference is that fragment processors lose the ability to inject their samplers into the vertex shader. However, this facilitates refactoring GrPrimitiveProcessor's TextureSampler class such that the textures are specified separately from the TextureSampler. Bug: skia: Change-Id: I1e590187e7a6ae79ee3147155d397fcdcf5e4619 Reviewed-on: https://skia-review.googlesource.com/142814 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove array of TextureSampler pointers from GrIOResourceProcessor.Gravatar Brian Salomon2018-07-30
| | | | | | | | | | Instead store sampler count on base class and subclasses implement a virtual to get the ith sampler. Change-Id: I13e2447a6467a09761d8615acb4aa360b87b1476 Reviewed-on: https://skia-review.googlesource.com/141563 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove SkFastMin32Gravatar Nigel Tao2018-07-30
| | | | | | | | | | | | | | | | SkFastMin32 has been the same as SkMin32 since commit 38bad32cf52 "fold SK_CPU_HAS_CONDITION_INSTR through as always defined" was submitted in July 2013 as per https://chromiumcodereview.appspot.com/21122005 TBR=hcm@google.com The only change to the public API is removing a redundant helper from SkTypes.h Bug: skia: Change-Id: Ic6f7c7dc5612e8b7b1be3923f572ffcc13555d75 Reviewed-on: https://skia-review.googlesource.com/144242 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* add explicit accessor for sRGB singleton colorspacesGravatar Mike Klein2018-07-25
| | | | | | | | | | | | | | SkColorSpace::MakeSRGB().get() is scary, and causes more ref/unref pairs than strictly necessary for these singletons. This time the implementation is still in SkColorSpace.cpp, so these should really work as singletons. Change-Id: I40f2942c8dcde3040663a04c4f5330aca90868ae Reviewed-on: https://skia-review.googlesource.com/143305 Auto-Submit: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Reland "update SkToSRGBColorFilter color management"Gravatar Mike Klein2018-07-25
| | | | | | | | | | | | | | | | | This is a reland of 8b5092671b1d0802e88b5202f67ceb94c9e5d236 Original change's description: > update SkToSRGBColorFilter color management > > Change-Id: Ia4a8bbc9d983bb5cfa02ba62c922efa1fa879d9b > Reviewed-on: https://skia-review.googlesource.com/141054 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> Change-Id: Ide55dd34a701a518be11856ecffbacf30954dc64 Reviewed-on: https://skia-review.googlesource.com/143321 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* rename to Merge patheffectGravatar Mike Reed2018-07-19
| | | | | | | | Bug: skia: Change-Id: Ieca0e71bc0ee6ce33f4f14605fe60d1fc61044ad Reviewed-on: https://skia-review.googlesource.com/142509 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* add new patheffectsGravatar Mike Reed2018-07-18
| | | | | | | | Bug: skia: Change-Id: Icc94eafbb26a097d5032cdb4f6e2e0f52a4e1025 Reviewed-on: https://skia-review.googlesource.com/141961 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Reland "SkDEBUGF: use __VA_ARGS__"Gravatar Hal Canary2018-07-18
| | | | | | | | | | | | | | | | | This is a reland of 2267a092356d17f6444502dc92491485ccf24341 Original change's description: > SkDEBUGF: use __VA_ARGS__ > > Change-Id: I42a47e821ff7a7f6cec65b38a8216cabbf0acfce > Reviewed-on: https://skia-review.googlesource.com/139860 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Hal Canary <halcanary@google.com> Change-Id: Ia06567e441a414f4dcdbe5663160082f889f9fef Reviewed-on: https://skia-review.googlesource.com/141762 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "update SkToSRGBColorFilter color management"Gravatar Robert Phillips2018-07-13
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8b5092671b1d0802e88b5202f67ceb94c9e5d236. Reason for revert: Test if this broke Android roll Original change's description: > update SkToSRGBColorFilter color management > > Change-Id: Ia4a8bbc9d983bb5cfa02ba62c922efa1fa879d9b > Reviewed-on: https://skia-review.googlesource.com/141054 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: Ib34bc4375447fe88a80d9b6d19dae87c4c41d0d5 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/141180 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* update SkToSRGBColorFilter color managementGravatar Mike Klein2018-07-12
| | | | | | | Change-Id: Ia4a8bbc9d983bb5cfa02ba62c922efa1fa879d9b Reviewed-on: https://skia-review.googlesource.com/141054 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Remove SkDrawFilter.Gravatar Ben Wagner2018-07-12
| | | | | | | | | Change-Id: I0204a9522e828c87bb7c6c20ae34ce51161442af Reviewed-on: https://skia-review.googlesource.com/137895 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* collapse parametric_{r,g,b} into parametric, remove _a and gamma_dstGravatar Mike Klein2018-07-11
| | | | | | | | | | | | | parametric_a and gamma_dst were unused outside of unit tests. In all other cases, we always use parametric_{r,g,b} together and always pass them the same argument. So we can collapse them into a single stage like gamma and to/from_srgb. Change-Id: I08cea896c7744f97b4f4bf9e029f5d643e45e177 Reviewed-on: https://skia-review.googlesource.com/140576 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Revert "SkDEBUGF: use __VA_ARGS__"Gravatar Robert Phillips2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2267a092356d17f6444502dc92491485ccf24341. Reason for revert: It looks like Google 3 is failing to compile w/ this CL Original change's description: > SkDEBUGF: use __VA_ARGS__ > > Change-Id: I42a47e821ff7a7f6cec65b38a8216cabbf0acfce > Reviewed-on: https://skia-review.googlesource.com/139860 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Hal Canary <halcanary@google.com> TBR=mtklein@google.com,halcanary@google.com,reed@google.com Change-Id: I3aab490f3d2fea103fc915ca01cb0e294df86739 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/140660 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* SkDEBUGF: use __VA_ARGS__Gravatar Hal Canary2018-07-11
| | | | | | | Change-Id: I42a47e821ff7a7f6cec65b38a8216cabbf0acfce Reviewed-on: https://skia-review.googlesource.com/139860 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Expand testing of SkMatrix::decomposeScaleGravatar Robert Phillips2018-07-10
| | | | | | | | Bug: skia:7211 Change-Id: If03ad1d364b33e174d91010ca250cd6c2d2f67c2 Reviewed-on: https://skia-review.googlesource.com/140185 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add color type to the image filter DAG's OutputPropertiesGravatar Brian Osman2018-07-06
| | | | | | | | | | | | Don't try to guess the pixel config to use for intermediates. Instead, just make the intermediates in the same color type (and space) as the final destination. This removes some no-longer-correct logic that was using sRGB configs, resulting in linear blending and precision loss. Change-Id: I627c47193a9f2889c3dc121170ff3e7d5d315fa0 Reviewed-on: https://skia-review.googlesource.com/139547 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Replace isGammaCorrect with isLinearlyBlendedGravatar Brian Osman2018-07-03
| | | | | | | | | | | | | | | | | | | | We were using isGammaCorrect (presence of a color space) to trigger rendering effects that should only apply when doing linear blending. Rename and redefine that function to fix many of those issues. In a few places, we really do care about the color space. The big win here is text rendering, which is now the same on legacy gl and glsrgb configs. Also left some comments about our desire to do something smarter for text in the future. Bug: skia: Change-Id: I94106e95f5f81aaa0a28dbaccd65f5d94cf0de67 Reviewed-on: https://skia-review.googlesource.com/139109 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* move blurimagefilter.cpp back into effectsGravatar Mike Reed2018-06-26
| | | | | | | | Bug: skia: Change-Id: I5711a9a8fcd135344e75cb4b505bd06044414c85 Reviewed-on: https://skia-review.googlesource.com/137581 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Validate transformed SkPaintImageFilter rectsGravatar Adrienne Walker2018-06-25
| | | | | | | | | | These can be transformed into invalid rects, so don't try to draw them. Bug: chromium: 852048 Change-Id: I95a8b86557e550453efb0896f6d559a843f47d2a Reviewed-on: https://skia-review.googlesource.com/135924 Commit-Queue: Adrienne Walker <enne@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com>
* abort really big path fuzzingGravatar Cary Clark2018-06-21
| | | | | | | | | | | | | | | | | | | | | | This adds a couple of special cases to stop the fuzzer from timing out. The first occurs when the fuzzer generates a very large path with very large quads. Count the subdivisions and stop after a while. The second occurs with a normal path and 1D path effect with a very small advance. Count the points and stop after a while. R=reed@google.com,bsalomon@google.com,kjlubick@google.com Bug: oss-fuzz:8349,oss-fuzz:8805 Change-Id: I86130e3f512f48e5a39335412435eabc245ed193 Reviewed-on: https://skia-review.googlesource.com/135709 Reviewed-by: Kevin Lubick <kjlubick@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com> Auto-Submit: Cary Clark <caryclark@skia.org>
* Move GrGLSL.h from include/private to src/gpu/glsl.Gravatar Brian Salomon2018-06-19
| | | | | | | | | | Nothing public was including this and it was included unnecessarily in many places. Change-Id: Iee960b3e67981ab41af7442cc43391f2f57eb551 Reviewed-on: https://skia-review.googlesource.com/135787 Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* move imagefilters into separate dir and flag for build.gnGravatar Mike Reed2018-06-19
| | | | | | | | | | Requires https://chromium-review.googlesource.com/c/chromium/src/+/1105062 Bug: skia: Change-Id: I948056234efa57c0f727a61d5fb3258034de5199 Reviewed-on: https://skia-review.googlesource.com/135566 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Stop using SkTSwap.Gravatar Ben Wagner2018-06-19
| | | | | | | | | | | | | Use std::swap instead. It does not appear that any external user specializes SkTSwap, but some may still use it. This removes all use in Skia so that SkTSwap can later be removed in a smaller CL. After that the <utility> include can be removed from SkTypes.h. Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753 Reviewed-on: https://skia-review.googlesource.com/135578 Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove GrNonlinearColorSpaceXformEffectGravatar Brian Osman2018-06-18
| | | | | | | | | | | Convert all uses to GrColorSpaceXformEffect Change-Id: Icc9d093a00450001c1b915db7a8676c9c66073b1 Reviewed-on: https://skia-review.googlesource.com/132090 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Remove string.h from SkTypes.hGravatar Ben Wagner2018-06-15
| | | | | | | Change-Id: I2be84f37ea11a386206a96d2fef6e0fc9464e21b Reviewed-on: https://skia-review.googlesource.com/135264 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove GrPixelConfig argument to GrColorSpaceXform[Effect]::MakeGravatar Brian Osman2018-06-14
| | | | | | | | | | | This was for sRGB configs, which are no longer treated special. Pulling this out of https://skia-review.googlesource.com/c/skia/+/132090 to land separately. Change-Id: Id04c4e82ad4ffe375cfd384490839b0488e54d44 Reviewed-on: https://skia-review.googlesource.com/134843 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* clean up SkPicture includeGravatar Cary Clark2018-06-12
| | | | | | | | | | | | | | | | | Get SkPicture.h ready for documenting. - remove private methods - move private forward declarations - name parameters R=reed@google.com, bsalomon@google.com Bug: skia:6898 Change-Id: I28829111203d8ae2a4661cf02c99023403aa0df0 Reviewed-on: https://skia-review.googlesource.com/134120 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@google.com>
* rebaseGravatar Cary Clark2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia Additionally some bookmaker changes take into account recent additions of typedef comments and the generated header comment. Original change's description: > Revert "remove toString" > > This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > Reason for revert: broke flutter > > Original change's description: > > remove toString > > > > toString may have been used by obsolete debugger only > > find out if that is so > > > > R=​brianosman@google.com,bsalomon@google.com > > > > Docs-Preview: https://skia.org/?cl=119894 > > Bug:830651 > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > > Reviewed-on: https://skia-review.googlesource.com/119894 > > Commit-Queue: Cary Clark <caryclark@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c TBR=bsalomon@google.com,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Reviewed-on: https://skia-review.googlesource.com/129623 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@google.com> Docs-Preview: https://skia.org/?cl=133583 Bug: 830651 Change-Id: If8499e796be63580ad419e150e94d43e8b89de1b Reviewed-on: https://skia-review.googlesource.com/133583 Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>
* Remove GrPaint::setGammaCorrectGravatar Brian Osman2018-06-04
| | | | | | | | | | | | | | Driving this from the presence of a color space makes no sense in the new world, we should always be treating sRGB as such (end-to-end). Change-Id: If3d8e740793321a2b1294ff72b04558d3b96cb53 Reviewed-on: https://skia-review.googlesource.com/131784 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Dest color space no longer impacts mipmaps or texture samplingGravatar Brian Osman2018-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PS5: Removes SkDestinationSurfaceColorMode, tracking of mipmap mode on GrTexture, sRGB decode state per-texture. Because we were often choosing sRGB configs for RGB color types, legacy rendering would then be incorrect (too dark). So... PS7: Stops ever using sRGB pixel configs when translating image info or color type. Also removes a bunch of GrCaps bits and a GrContextOption that are no longer relevant. PS9: Adjusts surface creation unit test expectations, and changes the raster rules accordingly. At this point, sRGB configs are (obviously) going to be broken. Locally, I ran 8888, gl, and the gbr- versions of both. Across all GMs x configs, there are 13 diffs. 12 are GMs that create surfaces with a color-space attached (and thus, the offscreen is no longer getting sRGB pixel config). The only remainder constructs an SkPictureImageGenerator, (with an attached color space) and renders it to the gbr-gl canvas, which triggers a a tagged surface inside the generator. Bug: skia: Change-Id: Ie5edfa157dd799f3121e8173fc4f97f6c8ed6789 Reviewed-on: https://skia-review.googlesource.com/131282 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Reland "remove toString""Gravatar Cary Clark2018-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 92e37b6d79f12ccfaaf7671413316952d182267d. Reason for revert: toString still used by flutter Original change's description: > Reland "remove toString" > > This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. > > Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia > > Original change's description: > > Revert "remove toString" > > > > This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > > > Reason for revert: broke flutter > > > > Original change's description: > > > remove toString > > > > > > toString may have been used by obsolete debugger only > > > find out if that is so > > > > > > R=​brianosman@google.com,bsalomon@google.com > > > > > > Docs-Preview: https://skia.org/?cl=119894 > > > Bug:830651 > > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > > > Reviewed-on: https://skia-review.googlesource.com/119894 > > > Commit-Queue: Cary Clark <caryclark@google.com> > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > > > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: 830651 > > Reviewed-on: https://skia-review.googlesource.com/129340 > > Reviewed-by: Cary Clark <caryclark@google.com> > > Commit-Queue: Cary Clark <caryclark@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Bug: 830651 > Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34 > Reviewed-on: https://skia-review.googlesource.com/129623 > Reviewed-by: Cary Clark <caryclark@skia.org> > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Cary Clark <caryclark@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org Change-Id: Iafc59ffc1b3db67c520ba31bf12d68e1b46c0ea2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 830651 Reviewed-on: https://skia-review.googlesource.com/131082 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Reland "remove toString"Gravatar Cary Clark2018-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia Original change's description: > Revert "remove toString" > > This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > Reason for revert: broke flutter > > Original change's description: > > remove toString > > > > toString may have been used by obsolete debugger only > > find out if that is so > > > > R=​brianosman@google.com,bsalomon@google.com > > > > Docs-Preview: https://skia.org/?cl=119894 > > Bug:830651 > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > > Reviewed-on: https://skia-review.googlesource.com/119894 > > Commit-Queue: Cary Clark <caryclark@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 830651 > Reviewed-on: https://skia-review.googlesource.com/129340 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Cary Clark <caryclark@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 830651 Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34 Reviewed-on: https://skia-review.googlesource.com/129623 Reviewed-by: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* warmup, remove clamping in append_gamut_transform()Gravatar Mike Klein2018-05-30
| | | | | | | | | | | | | | Clamping here seems inconsistent with our color pipeline model, and with the existing GPU impl. The SkRasterPipeline store stages already do clamp when storing unorms, and table-lookup stages clamp their inputs, so it should be safe. While refactoring, slim its interface down a bit. Change-Id: I4772457fdf90e483834d034f02974d7a859cbe24 Reviewed-on: https://skia-review.googlesource.com/130902 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* remove defines and add commasGravatar Cary Clark2018-05-21
| | | | | | | | | | | | | | | | | | | | | | | | Preparation for generating bookmaker files for all remaining interfaces Standardize enum and enum classes by including a comma after the last entry. Replace flatten-related #define in public interfaces with their equivalent. The motivation is to give documentation something to refer to. An alternative would be to move part or all of this out of the public interface; something I can work on in a follow-up CL. R=reed@google.com,bsalomon@google.com Bug: skia:6898 Change-Id: I4b865f6ec3d8f5d31e50448fef7d2714510302f0 Reviewed-on: https://skia-review.googlesource.com/129312 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
* Revert "remove toString"Gravatar Cary Clark2018-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. Reason for revert: broke flutter Original change's description: > remove toString > > toString may have been used by obsolete debugger only > find out if that is so > > R=​brianosman@google.com,bsalomon@google.com > > Docs-Preview: https://skia.org/?cl=119894 > Bug:830651 > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > Reviewed-on: https://skia-review.googlesource.com/119894 > Commit-Queue: Cary Clark <caryclark@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 830651 Reviewed-on: https://skia-review.googlesource.com/129340 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* remove toStringGravatar Cary Clark2018-05-20
| | | | | | | | | | | | | | toString may have been used by obsolete debugger only find out if that is so R=brianosman@google.com,bsalomon@google.com Docs-Preview: https://skia.org/?cl=119894 Bug:830651 Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd Reviewed-on: https://skia-review.googlesource.com/119894 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fix fuzzer bug i.e., compute the correct repeated dst domainGravatar Robert Phillips2018-05-18
| | | | | | | | BUG: oss-fuzz:8367 Change-Id: Ib5a9bf6e8446459db88016176e4c22397a3f1965 Reviewed-on: https://skia-review.googlesource.com/129184 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Prevent SkMatrixConvolutionImageFilter from allocating large buffers it ↵Gravatar Kevin Lubick2018-05-18
| | | | | | | | | | can't fill Bug: skia:7937 Change-Id: I71a5673939b3d91864a4b788e1e3a520b0ee04dd Reviewed-on: https://skia-review.googlesource.com/129179 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
* Add SkIRect::adjust methodGravatar Robert Phillips2018-05-18
| | | | | | | Change-Id: Ib18d1a82944524e20d5d72912d8db7a823c470de Reviewed-on: https://skia-review.googlesource.com/128884 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Fix bugs related to SkMatrixConvolutionImageFilter in repeat modeGravatar Robert Phillips2018-05-18
| | | | | | | | | This should fix most of the fuzzer complaints Change-Id: I47a616e78b47bd162cbef647b03f5c1f23017c6f Reviewed-on: https://skia-review.googlesource.com/129165 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix srcBounds computation in SkMatrixConvolutionImageFilterGravatar Robert Phillips2018-05-17
| | | | | | | | | | | Note that this does change the behavior of the cropRect for the repeated case. The cropRect now only acts as a hard clip on the output. BUG= skia:7766 Change-Id: I1d66678bc797cd4835701cd20c36e68b22ac880a Reviewed-on: https://skia-review.googlesource.com/127338 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Return nullptr when ReadBuffer becomes invalidGravatar Kevin Lubick2018-05-17
| | | | | | | | | | | | | | | | | This especially helps in SkDrawLooper because we can bail out early instead of looping for a potentially long time, e.g. when fuzzed input says count is a large number. This also cleans up validate in a few spots, and adds validateCanReadN as a helper function. Bug: skia:7937 Change-Id: Ic5eff357c8cadc91eeafc6e39c78c570ba74df2f Reviewed-on: https://skia-review.googlesource.com/128847 Commit-Queue: Kevin Lubick <kjlubick@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Minor refactoring to image filtersGravatar Robert Phillips2018-05-14
| | | | | | | | | | This pulls the boring parts out of: https://skia-review.googlesource.com/c/skia/+/127338 (Fix srcBounds computation in SkMatrixConvolutionImageFilter) TBR=bsalomon@google.com Change-Id: Iade788fcc96c4c16989d13e7592030a6a1d3f170 Reviewed-on: https://skia-review.googlesource.com/127573 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* detect overflow for morphologyGravatar Mike Reed2018-05-13
| | | | | | | | Bug: oss-fuzz:8236 Change-Id: Iae911d995cbfed77c5d332f615da1a8d9b487c21 Reviewed-on: https://skia-review.googlesource.com/127703 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Make GrCaps and GrShaderCaps private.Gravatar Brian Salomon2018-05-11
| | | | | | | | | Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps(). Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866 Reviewed-on: https://skia-review.googlesource.com/127389 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Validate readByteArrayAsData sizeGravatar Florin Malita2018-05-10
| | | | | | | | | | | | Check that the reader has enough data before attempting to allocate the buffer. Also update to return nullptr on read failures. Change-Id: Ia1ea8f611bad95cf3a4493b12582ac3fa7c2b00f Reviewed-on: https://skia-review.googlesource.com/127129 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Just pass color glyph masks to filters.Gravatar Ben Wagner2018-04-27
| | | | | | | | | | | | | | | Allow the filters to try to apply themselves to the color mask. Most mask filters will just return false, but allow them the opprotunity. This removes the behavior of trying to create a mask from the color mask. This updates the blur mask filter to handle kARGB32_Format directly by using just the alpha (which mirrors current behavior). Change-Id: I15eb736060ecf9b24aca874758c167b74d9ebc22 Reviewed-on: https://skia-review.googlesource.com/124185 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>