Rendering 1px wide linear-gradient
Reported by
wowmo...@gmail.com,
Jun 5 2017
|
|||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36
Steps to reproduce the problem:
Apply a 1px wide background linear gradient to an element
Example css:
div {
background: linear-gradient(
to right,
transparent 0%,
transparent 15px,
red 15px,
red 16px,
transparent 16px,
transparent 100%
)
}
Demo: https://jsfiddle.net/Mottie/rLugxsc2/
What is the expected behavior?
The resulting line should only be 1px wide. Both Firefox and Opera render a 1 pixel wide line. Unable to test in Safari.
What went wrong?
The resulting line is 1 pixel wide with 2 pixels on either side of dithering.
Did this work before? Yes unknown
Does this work in other browsers? N/A
Chrome version: 59.0.3071.86 Channel: stable
OS Version: 10.0
Flash Version: N/A
I don't know the version of the last time I noticed this working in Chrome, but I am pretty sure it was working around 4/11/2017.
,
Jun 6 2017
I've noticed that if you resize the jsFiddle result window, the line with appear and disappear in Chrome. I forgot to mention this fact.
,
Jun 7 2017
,
Jun 7 2017
Rechecked this issue on Chrome version 59.0.3071.86 Stable, and canary 61.0.3122.0 on Windows 10 and MAC 10.12.5 and able to reproduce it. issue appears to be a non regression as seeing it from M26 Builds - Attached screen shot for the same. P.S: Unable to reproduce it on Ubuntu 14.04 for the same mentioned builds. Removing Bisect label.
,
Jun 7 2017
,
Jun 7 2017
,
Jul 5 2017
Another interesting observation is if you resize the window, the width of the dithering changes - just in case the animated gif isn't working, I uploaded the image to GitHub as well: https://user-images.githubusercontent.com/136959/27881603-f1f367ac-618e-11e7-9bbf-54a0e6580398.gif
,
Jul 6 2017
I suspect this is to do with Skia's gradient generation. Very high frequency transitions were problematic, but they were being worked on, see #117140.
,
Jul 10 2017
,
Jul 10 2017
This is a limitation of Skia's current GPU gradient implementation (256x1 filtered texture). The observed difference in behavior has to do with whether or not the platform is using accelerated/GPU rasterization by default (I can repro on Linux also by passing --force-gpu-rasterization).
,
Dec 18 2017
I think this is the same issue, 2px linear gradient disappears at larger size http://jsfiddle.net/q8v4s3zx/
,
Jul 19
Can confirm this issue on Windows 10, Chrome version 67. Come on people, this is pretty major and a year old task, please give it a higher priority and fix it. Repro here: https://codepen.io/Draccoz/pen/JBRQEz
,
Jul 19
Happens on Chrome for Android v67 as well.
,
Aug 2
,
Sep 17
,
Sep 24
The following revision refers to this bug: https://skia.googlesource.com/skia/+/dcc85fc61008f61daef4313846bdd62877fd596d commit dcc85fc61008f61daef4313846bdd62877fd596d Author: Michael Ludwig <michaelludwig@google.com> Date: Mon Sep 24 16:40:36 2018 Implement an explicit binary search-based analytic gradient colorizer Provides a reasonably flexible fragment processor that defines another colorizer implementation for gradients. It can support up to 8 interpolation intervals (which is 16 colors if every stop is a hard stop or 9 colors if every stop is a smooth transition). It supports mixtures of hard and smooth stops. It is conditionally compiled into versions specific to the interval count (so it can produce up to 8 shader variants). The GrGradientShader controller does not remove the single and dual interval colorizers, which are useful specializations of this explicit binary search colorizer. Similarly, since it can only handle up to 8 intervals, the texture colorizer is still used as a fallback. Currently it does not employ capabilities detection to determine if the hardware can support the number of required uniforms, which can become substantial for the larger gradient configurations. Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 Change-Id: Ia1f735a5019766ae4796cc22964b2913db34b95b Reviewed-on: https://skia-review.googlesource.com/155080 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Osman <brianosman@google.com> [add] https://crrev.com/dcc85fc61008f61daef4313846bdd62877fd596d/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.fp [modify] https://crrev.com/dcc85fc61008f61daef4313846bdd62877fd596d/src/gpu/GrProcessor.h [modify] https://crrev.com/dcc85fc61008f61daef4313846bdd62877fd596d/gn/sksl.gni [modify] https://crrev.com/dcc85fc61008f61daef4313846bdd62877fd596d/gn/gpu.gni [add] https://crrev.com/dcc85fc61008f61daef4313846bdd62877fd596d/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.cpp [modify] https://crrev.com/dcc85fc61008f61daef4313846bdd62877fd596d/gn/gm.gni [add] https://crrev.com/dcc85fc61008f61daef4313846bdd62877fd596d/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.h [add] https://crrev.com/dcc85fc61008f61daef4313846bdd62877fd596d/gm/analytic_gradients.cpp [modify] https://crrev.com/dcc85fc61008f61daef4313846bdd62877fd596d/src/gpu/gradients/GrGradientShader.cpp
,
Sep 24
The following revision refers to this bug: https://skia.googlesource.com/skia/+/9461dcf1306a9a9517e1545cf6d16bde05261280 commit 9461dcf1306a9a9517e1545cf6d16bde05261280 Author: Michael Ludwig <michaelludwig@google.com> Date: Mon Sep 24 19:40:54 2018 Revert "Implement an explicit binary search-based analytic gradient colorizer" This reverts commit dcc85fc61008f61daef4313846bdd62877fd596d. Reason for revert: ANGLE is frequently corrupted, particularly radial_gradient4 and mixershader Original change's description: > Implement an explicit binary search-based analytic gradient colorizer > > Provides a reasonably flexible fragment processor that defines another > colorizer implementation for gradients. It can support up to 8 > interpolation intervals (which is 16 colors if every stop is a hard stop > or 9 colors if every stop is a smooth transition). It > supports mixtures of hard and smooth stops. It is conditionally compiled > into versions specific to the interval count (so it can produce up to > 8 shader variants). > > The GrGradientShader controller does not remove the single and dual > interval colorizers, which are useful specializations of this explicit > binary search colorizer. Similarly, since it can only handle up to 8 > intervals, the texture colorizer is still used as a fallback. > > Currently it does not employ capabilities detection to determine if the > hardware can support the number of required uniforms, which can become > substantial for the larger gradient configurations. > > Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 > Change-Id: Ia1f735a5019766ae4796cc22964b2913db34b95b > Reviewed-on: https://skia-review.googlesource.com/155080 > Commit-Queue: Michael Ludwig <michaelludwig@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com Change-Id: I351a387f0528e4c2db2d47ab2e5d6b336991fb98 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 Reviewed-on: https://skia-review.googlesource.com/156541 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com> [delete] https://crrev.com/79039572478acdadfc15ad81b13bc76f54bf2cd1/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.fp [modify] https://crrev.com/9461dcf1306a9a9517e1545cf6d16bde05261280/src/gpu/GrProcessor.h [modify] https://crrev.com/9461dcf1306a9a9517e1545cf6d16bde05261280/gn/sksl.gni [modify] https://crrev.com/9461dcf1306a9a9517e1545cf6d16bde05261280/gn/gpu.gni [delete] https://crrev.com/79039572478acdadfc15ad81b13bc76f54bf2cd1/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.cpp [modify] https://crrev.com/9461dcf1306a9a9517e1545cf6d16bde05261280/gn/gm.gni [delete] https://crrev.com/79039572478acdadfc15ad81b13bc76f54bf2cd1/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.h [delete] https://crrev.com/79039572478acdadfc15ad81b13bc76f54bf2cd1/gm/analytic_gradients.cpp [modify] https://crrev.com/9461dcf1306a9a9517e1545cf6d16bde05261280/src/gpu/gradients/GrGradientShader.cpp
,
Sep 24
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f477d2720e776e087f8b753419665a94a8ff65dd commit f477d2720e776e087f8b753419665a94a8ff65dd Author: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com> Date: Mon Sep 24 21:05:26 2018 Roll src/third_party/skia 4fb073ac7328..9461dcf1306a (7 commits) https://skia.googlesource.com/skia.git/+log/4fb073ac7328..9461dcf1306a git log 4fb073ac7328..9461dcf1306a --date=short --no-merges --format='%ad %ae %s' 2018-09-24 michaelludwig@google.com Revert "Implement an explicit binary search-based analytic gradient colorizer" 2018-09-24 fmalita@chromium.org [skottie] Initial property setters 2018-09-24 skia-autoroll@skia-public.iam.gserviceaccount.com Roll skia/third_party/skcms b9dc92669da2..82ea7fbce65f (1 commits) 2018-09-24 fmalita@chromium.org UBSAN: Divide-by-zero in SkRRect::setRectXY 2018-09-24 halcanary@google.com SkPDF: simplify SkPDFDevice::drawPaint. 2018-09-24 jvanverth@google.com Make sure ReflexHash grid count is reasonable 2018-09-24 michaelludwig@google.com Implement an explicit binary search-based analytic gradient colorizer Created with: gclient setdep -r src/third_party/skia@9461dcf1306a The AutoRoll server is located here: https://autoroll.skia.org/r/skia-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary. CQ_INCLUDE_TRYBOTS=luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux-chromeos-compile-dbg;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel BUG= chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 , chromium:888233 , chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 TBR=bsalomon@chromium.org Change-Id: I5c06466571c0dbc74c36d61f4a9c7a6552f75eee Reviewed-on: https://chromium-review.googlesource.com/1240836 Reviewed-by: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com> Commit-Queue: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#593675} [modify] https://crrev.com/f477d2720e776e087f8b753419665a94a8ff65dd/DEPS
,
Sep 27
The following revision refers to this bug: https://skia.googlesource.com/skia/+/f065907ccc0ae5e9258443b5a1bbabeef181e965 commit f065907ccc0ae5e9258443b5a1bbabeef181e965 Author: Michael Ludwig <michaelludwig@google.com> Date: Thu Sep 27 16:02:30 2018 Reland "Implement an explicit binary search-based analytic gradient colorizer" This reverts commit 9461dcf1306a9a9517e1545cf6d16bde05261280. Reason for revert: Fixes for ANGLE's incorrect shader behavior Original change's description: > Revert "Implement an explicit binary search-based analytic gradient colorizer" > > This reverts commit dcc85fc61008f61daef4313846bdd62877fd596d. > > Reason for revert: ANGLE is frequently corrupted, particularly radial_gradient4 and mixershader > > Original change's description: > > Implement an explicit binary search-based analytic gradient colorizer > > > > Provides a reasonably flexible fragment processor that defines another > > colorizer implementation for gradients. It can support up to 8 > > interpolation intervals (which is 16 colors if every stop is a hard stop > > or 9 colors if every stop is a smooth transition). It > > supports mixtures of hard and smooth stops. It is conditionally compiled > > into versions specific to the interval count (so it can produce up to > > 8 shader variants). > > > > The GrGradientShader controller does not remove the single and dual > > interval colorizers, which are useful specializations of this explicit > > binary search colorizer. Similarly, since it can only handle up to 8 > > intervals, the texture colorizer is still used as a fallback. > > > > Currently it does not employ capabilities detection to determine if the > > hardware can support the number of required uniforms, which can become > > substantial for the larger gradient configurations. > > > > Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 > > Change-Id: Ia1f735a5019766ae4796cc22964b2913db34b95b > > Reviewed-on: https://skia-review.googlesource.com/155080 > > Commit-Queue: Michael Ludwig <michaelludwig@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com > > Change-Id: I351a387f0528e4c2db2d47ab2e5d6b336991fb98 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 > Reviewed-on: https://skia-review.googlesource.com/156541 > Reviewed-by: Michael Ludwig <michaelludwig@google.com> > Commit-Queue: Michael Ludwig <michaelludwig@google.com> TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com Change-Id: I2aca36307d88c26905d860ec29417ec68c6037cc Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 Reviewed-on: https://skia-review.googlesource.com/156542 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com> [add] https://crrev.com/f065907ccc0ae5e9258443b5a1bbabeef181e965/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.fp [modify] https://crrev.com/f065907ccc0ae5e9258443b5a1bbabeef181e965/src/gpu/GrProcessor.h [modify] https://crrev.com/f065907ccc0ae5e9258443b5a1bbabeef181e965/gn/sksl.gni [modify] https://crrev.com/f065907ccc0ae5e9258443b5a1bbabeef181e965/gn/gpu.gni [add] https://crrev.com/f065907ccc0ae5e9258443b5a1bbabeef181e965/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.cpp [modify] https://crrev.com/f065907ccc0ae5e9258443b5a1bbabeef181e965/gn/gm.gni [add] https://crrev.com/f065907ccc0ae5e9258443b5a1bbabeef181e965/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.h [add] https://crrev.com/f065907ccc0ae5e9258443b5a1bbabeef181e965/gm/analytic_gradients.cpp [modify] https://crrev.com/f065907ccc0ae5e9258443b5a1bbabeef181e965/src/gpu/gradients/GrGradientShader.cpp
,
Sep 27
The following revision refers to this bug: https://skia.googlesource.com/skia/+/e2a801ddaafbd7514238b2e94fde71abba32400f commit e2a801ddaafbd7514238b2e94fde71abba32400f Author: Brian Osman <brianosman@google.com> Date: Thu Sep 27 16:50:52 2018 Revert "Reland "Implement an explicit binary search-based analytic gradient colorizer"" This reverts commit f065907ccc0ae5e9258443b5a1bbabeef181e965. Reason for revert: Processor test failing (inconsistently) on several bots. Original change's description: > Reland "Implement an explicit binary search-based analytic gradient colorizer" > > This reverts commit 9461dcf1306a9a9517e1545cf6d16bde05261280. > > Reason for revert: Fixes for ANGLE's incorrect shader behavior > > Original change's description: > > Revert "Implement an explicit binary search-based analytic gradient colorizer" > > > > This reverts commit dcc85fc61008f61daef4313846bdd62877fd596d. > > > > Reason for revert: ANGLE is frequently corrupted, particularly radial_gradient4 and mixershader > > > > Original change's description: > > > Implement an explicit binary search-based analytic gradient colorizer > > > > > > Provides a reasonably flexible fragment processor that defines another > > > colorizer implementation for gradients. It can support up to 8 > > > interpolation intervals (which is 16 colors if every stop is a hard stop > > > or 9 colors if every stop is a smooth transition). It > > > supports mixtures of hard and smooth stops. It is conditionally compiled > > > into versions specific to the interval count (so it can produce up to > > > 8 shader variants). > > > > > > The GrGradientShader controller does not remove the single and dual > > > interval colorizers, which are useful specializations of this explicit > > > binary search colorizer. Similarly, since it can only handle up to 8 > > > intervals, the texture colorizer is still used as a fallback. > > > > > > Currently it does not employ capabilities detection to determine if the > > > hardware can support the number of required uniforms, which can become > > > substantial for the larger gradient configurations. > > > > > > Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 > > > Change-Id: Ia1f735a5019766ae4796cc22964b2913db34b95b > > > Reviewed-on: https://skia-review.googlesource.com/155080 > > > Commit-Queue: Michael Ludwig <michaelludwig@google.com> > > > Reviewed-by: Brian Osman <brianosman@google.com> > > > > TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com > > > > Change-Id: I351a387f0528e4c2db2d47ab2e5d6b336991fb98 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 > > Reviewed-on: https://skia-review.googlesource.com/156541 > > Reviewed-by: Michael Ludwig <michaelludwig@google.com> > > Commit-Queue: Michael Ludwig <michaelludwig@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com > > Change-Id: I2aca36307d88c26905d860ec29417ec68c6037cc > Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 > Reviewed-on: https://skia-review.googlesource.com/156542 > Reviewed-by: Michael Ludwig <michaelludwig@google.com> > Commit-Queue: Michael Ludwig <michaelludwig@google.com> TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com Change-Id: Icd925d568d8cdffdc3020c07a9c50a4aa9cf0bb9 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 Reviewed-on: https://skia-review.googlesource.com/157429 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> [delete] https://crrev.com/ab3144c3abb94a7f7b3e3903485510e66ec1227c/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.fp [modify] https://crrev.com/e2a801ddaafbd7514238b2e94fde71abba32400f/src/gpu/GrProcessor.h [modify] https://crrev.com/e2a801ddaafbd7514238b2e94fde71abba32400f/gn/sksl.gni [modify] https://crrev.com/e2a801ddaafbd7514238b2e94fde71abba32400f/gn/gpu.gni [delete] https://crrev.com/ab3144c3abb94a7f7b3e3903485510e66ec1227c/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.cpp [modify] https://crrev.com/e2a801ddaafbd7514238b2e94fde71abba32400f/gn/gm.gni [delete] https://crrev.com/ab3144c3abb94a7f7b3e3903485510e66ec1227c/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.h [delete] https://crrev.com/ab3144c3abb94a7f7b3e3903485510e66ec1227c/gm/analytic_gradients.cpp [modify] https://crrev.com/e2a801ddaafbd7514238b2e94fde71abba32400f/src/gpu/gradients/GrGradientShader.cpp
,
Sep 27
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f23e191c5d68e045537d20553dc481773156b377 commit f23e191c5d68e045537d20553dc481773156b377 Author: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com> Date: Thu Sep 27 19:49:13 2018 Roll src/third_party/skia 227d4e10276c..dbdd151b1cb9 (15 commits) https://skia.googlesource.com/skia.git/+log/227d4e10276c..dbdd151b1cb9 git log 227d4e10276c..dbdd151b1cb9 --date=short --no-merges --format='%ad %ae %s' 2018-09-27 benjaminwagner@google.com Revert "bump NDK packages to r18" 2018-09-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/externals/swiftshader 4241ad731a8a..40a6005e7a14 (3 commits) 2018-09-27 brianosman@google.com Remove redundant SkImage virtuals 2018-09-27 brianosman@google.com Revert "Reland "Implement an explicit binary search-based analytic gradient colorizer"" 2018-09-27 bsalomon@google.com Revert "Change how GrTextureOp computes outset vertices." 2018-09-27 mtklein@google.com only build stats bar chart when it'll be printed 2018-09-27 fmalita@chromium.org [skottie] External font loader tweaks 2018-09-27 michaelludwig@google.com Reland "Implement an explicit binary search-based analytic gradient colorizer" 2018-09-27 mtklein@google.com bump NDK packages to r18 2018-09-27 mtklein@google.com add test that setLastPt() invalidates path bounds 2018-09-27 skia-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/externals/angle2 115e8a2625f5..122919bddd98 (1 commits) 2018-09-27 mtklein@google.com invalidate pathref bounds when we attach an editor 2018-09-27 mtklein@google.com update SkPathRef bounds validation 2018-09-27 ethannicholas@google.com fixed SPIR-V interface variable declarations 2018-09-27 bsalomon@google.com Change how GrTextureOp computes outset vertices. Created with: gclient setdep -r src/third_party/skia@dbdd151b1cb9 The AutoRoll server is located here: https://autoroll.skia.org/r/skia-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary. CQ_INCLUDE_TRYBOTS=luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux-chromeos-compile-dbg;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel BUG= chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 , chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 TBR=bsalomon@chromium.org Change-Id: I01c18efde9921a36f3185d80d3950f46ff3e73ce Reviewed-on: https://chromium-review.googlesource.com/1249507 Reviewed-by: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com> Commit-Queue: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#594821} [modify] https://crrev.com/f23e191c5d68e045537d20553dc481773156b377/DEPS
,
Oct 4
The following revision refers to this bug: https://skia.googlesource.com/skia/+/72535fb55a3c7b439530efb48a2b1f55d671530e commit 72535fb55a3c7b439530efb48a2b1f55d671530e Author: Michael Ludwig <michaelludwig@google.com> Date: Thu Oct 04 13:10:29 2018 Reland "Reland "Implement an explicit binary search-based analytic gradient colorizer"" This is a reland of f065907ccc0ae5e9258443b5a1bbabeef181e965 3rd time's the charm: The new analytic gradient shader was sporadically triggering violations of the coverage as alpha compatibility optimization. Unfortunately, even when using the same device and random seed for the test, the bots did not always reproduce the error. However, we identified the likely cause of the violation. The test requires that all output channels are less than the input alpha, which it uses to validate whether or not the shader is modulating its values by the input alpha. This test does not pass if the RGB values are greater than 1. The original version of the analytic gradient shader used half4s for its scale and bias values. Given the threshold limit for hardstops of 0.00024 (SkNearlyZero), a very small interval that is not treated as a hardstop can create a scale or bias of over 4000. This moves into the very imprecise region of 16-bit floats, making it plausible that the gradient outputs colors greater than 1, due to rounding. The kicker is that the random test generation for stop locations does not use a uniform distribution, but is instead biased towards the remaining interval, which increases the likelihood of generating a small interval that is not treated as a hard stop. We are keeping this behavior since ill-conditioned gradients are useful in testing. Original change's description: > Reland "Implement an explicit binary search-based analytic gradient colorizer" > > This reverts commit 9461dcf1306a9a9517e1545cf6d16bde05261280. > > Reason for revert: Fixes for ANGLE's incorrect shader behavior > > Original change's description: > > Revert "Implement an explicit binary search-based analytic gradient colorizer" > > > > This reverts commit dcc85fc61008f61daef4313846bdd62877fd596d. > > > > Reason for revert: ANGLE is frequently corrupted, particularly radial_gradient4 and mixershader > > > > Original change's description: > > > Implement an explicit binary search-based analytic gradient colorizer > > > > > > Provides a reasonably flexible fragment processor that defines another > > > colorizer implementation for gradients. It can support up to 8 > > > interpolation intervals (which is 16 colors if every stop is a hard stop > > > or 9 colors if every stop is a smooth transition). It > > > supports mixtures of hard and smooth stops. It is conditionally compiled > > > into versions specific to the interval count (so it can produce up to > > > 8 shader variants). > > > > > > The GrGradientShader controller does not remove the single and dual > > > interval colorizers, which are useful specializations of this explicit > > > binary search colorizer. Similarly, since it can only handle up to 8 > > > intervals, the texture colorizer is still used as a fallback. > > > > > > Currently it does not employ capabilities detection to determine if the > > > hardware can support the number of required uniforms, which can become > > > substantial for the larger gradient configurations. > > > > > > Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 > > > Change-Id: Ia1f735a5019766ae4796cc22964b2913db34b95b > > > Reviewed-on: https://skia-review.googlesource.com/155080 > > > Commit-Queue: Michael Ludwig <michaelludwig@google.com> > > > Reviewed-by: Brian Osman <brianosman@google.com> > > > > TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com > > > > Change-Id: I351a387f0528e4c2db2d47ab2e5d6b336991fb98 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 > > Reviewed-on: https://skia-review.googlesource.com/156541 > > Reviewed-by: Michael Ludwig <michaelludwig@google.com> > > Commit-Queue: Michael Ludwig <michaelludwig@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com > > Change-Id: I2aca36307d88c26905d860ec29417ec68c6037cc > Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 > Reviewed-on: https://skia-review.googlesource.com/156542 > Reviewed-by: Michael Ludwig <michaelludwig@google.com> > Commit-Queue: Michael Ludwig <michaelludwig@google.com> Bug: chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 Change-Id: I2d050624781c77cdd160291cadbadac602b48bde Reviewed-on: https://skia-review.googlesource.com/c/157569 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Osman <brianosman@google.com> [add] https://crrev.com/72535fb55a3c7b439530efb48a2b1f55d671530e/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.fp [modify] https://crrev.com/72535fb55a3c7b439530efb48a2b1f55d671530e/src/gpu/GrProcessor.h [modify] https://crrev.com/72535fb55a3c7b439530efb48a2b1f55d671530e/gn/sksl.gni [modify] https://crrev.com/72535fb55a3c7b439530efb48a2b1f55d671530e/gn/gpu.gni [add] https://crrev.com/72535fb55a3c7b439530efb48a2b1f55d671530e/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.cpp [modify] https://crrev.com/72535fb55a3c7b439530efb48a2b1f55d671530e/src/gpu/gradients/GrDualIntervalGradientColorizer.fp [modify] https://crrev.com/72535fb55a3c7b439530efb48a2b1f55d671530e/gn/gm.gni [modify] https://crrev.com/72535fb55a3c7b439530efb48a2b1f55d671530e/src/gpu/gradients/GrDualIntervalGradientColorizer.cpp [add] https://crrev.com/72535fb55a3c7b439530efb48a2b1f55d671530e/src/gpu/gradients/GrUnrolledBinaryGradientColorizer.h [add] https://crrev.com/72535fb55a3c7b439530efb48a2b1f55d671530e/gm/analytic_gradients.cpp [modify] https://crrev.com/72535fb55a3c7b439530efb48a2b1f55d671530e/src/gpu/gradients/GrGradientShader.cpp
,
Oct 4
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/19008d6a5ad834b003979cdedb7bbe22eabc6ae3 commit 19008d6a5ad834b003979cdedb7bbe22eabc6ae3 Author: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com> Date: Thu Oct 04 19:43:04 2018 Roll src/third_party/skia 4dd17156c6e4..58887bc3c186 (13 commits) https://skia.googlesource.com/skia.git/+log/4dd17156c6e4..58887bc3c186 git log 4dd17156c6e4..58887bc3c186 --date=short --no-merges --format='%ad %ae %s' 2018-10-04 mtklein@google.com hash tf, and whole colorspace 2018-10-04 mtklein@google.com remove deprecated SkBitmap::eraseRGB() 2018-10-04 robertphillips@google.com Update YUV GM 2018-10-04 mtklein@google.com remove deprecated SkWriter32::size() 2018-10-04 mtklein@google.com remove deprecated SkMatrix44::map() 2x 2018-10-04 brianosman@google.com Add SkPMColor4f support to SkSL 2018-10-04 csmartdalton@google.com ccpr: Unblacklist Sandy Bridge/Bay Trail on Mesa 2018-10-04 robertphillips@google.com Make SkYUVAIndex publicly accessible 2018-10-04 mtklein@google.com re-precate SkMatrix44::SkMatrix44() 2018-10-04 mtklein@google.com remove internal uses of SkColorSpace::toXYZD50() 2018-10-04 michaelludwig@google.com Reland "Reland "Implement an explicit binary search-based analytic gradient colorizer"" 2018-10-04 skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com Update go_deps asset 2018-10-04 skia-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/externals/angle2 1395134c3438..5541a6c86a64 (1 commits) Created with: gclient setdep -r src/third_party/skia@58887bc3c186 The AutoRoll server is located here: https://autoroll.skia.org/r/skia-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary. CQ_INCLUDE_TRYBOTS=luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux-chromeos-compile-dbg;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel BUG= chromium:796479 , chromium:729727 , chromium:696603 , chromium:543625 , chromium:414254 TBR=mtklein@chromium.org Change-Id: I77e2cfd446c6d9aca68e8feb942ef8a4815f0564 Reviewed-on: https://chromium-review.googlesource.com/c/1261925 Reviewed-by: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Cr-Commit-Position: refs/heads/master@{#596810} [modify] https://crrev.com/19008d6a5ad834b003979cdedb7bbe22eabc6ae3/DEPS
,
Oct 5
The examples provided will now render correctly; closing this issue in favor of an umbrella that describes the limitations of the new gradient rendering: issue 892711. |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by bugsnash@chromium.org
, Jun 6 2017Status: Untriaged (was: Unconfirmed)
150 KB
150 KB View Download
167 KB
167 KB View Download