aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/shadowutils.cpp
Commit message (Collapse)AuthorAge
* Fix alpha contribution to tonal color.Gravatar Jim Van Verth2017-12-19
| | | | | | | | | | | Also adds a tonal color GM, a grayscale mode to shadowutils GM, and animated alpha to SampleAndroidShadows. Bug: skia: Change-Id: I1dcb5cab7e53ffa7a3bf1a07b6ebfed38df1a9ed Reviewed-on: https://skia-review.googlesource.com/85002 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Disable tonal color for shadowutils GMsGravatar Jim Van Verth2017-11-21
| | | | | | | Change-Id: Id64ad0cdf1378d38940cfe0d8335ce4d5776abd2 Reviewed-on: https://skia-review.googlesource.com/74361 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Fix TSAN error for shadow cacheGravatar Jim Van Verth2017-05-23
| | | | | | | Change-Id: I84b94a19c724e2152d1eac269f425f7f0f2286f5 Reviewed-on: https://skia-review.googlesource.com/17706 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Fix TSAN botGravatar Jim Van Verth2017-05-23
| | | | | | | | Bug: skia: Change-Id: I5626e4e4277255b1c0c10f912829ac2cd2ed1a8c Reviewed-on: https://skia-review.googlesource.com/17600 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Cache ambient and spot shadows at a canonical positionGravatar Jim Van Verth2017-05-22
| | | | | | | Change-Id: I1f80931513f7d2268b358fb38c86dd331f32f064 Reviewed-on: https://skia-review.googlesource.com/17394 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Disable resource cache in shadow_utils GM for now""Gravatar Jim Van Verth2017-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0b58ef7b525e5325ecd194c4b470e4c924cbb56a. Reason for revert: Wasn't actually fixed. Original change's description: > Revert "Disable resource cache in shadow_utils GM for now" > > This reverts commit c34a946d5a975ba8b8cd51f79b55174a5ec0f99f. > > Reason for revert: This is probably fixed with https://skia-review.googlesource.com/c/17279/. > > Original change's description: > > Disable resource cache in shadow_utils GM for now > > > > This should make the GMs more stable in tiled mode. > > > > Change-Id: I72996b1305fc99e60626af35267952d0a5c38624 > > Reviewed-on: https://skia-review.googlesource.com/17275 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Jim Van Verth <jvanverth@google.com> > > > > TBR=jvanverth@google.com,reed@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I0d21652a301b3f81e7ec04638bedbaabc723e583 > Reviewed-on: https://skia-review.googlesource.com/17304 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> > TBR=mtklein@google.com,jvanverth@google.com,reviews@skia.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: If606795bfeb4e6ed78f199fcb86ee2767bde5216 Reviewed-on: https://skia-review.googlesource.com/17371 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Disable resource cache in shadow_utils GM for now"Gravatar Jim Van Verth2017-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c34a946d5a975ba8b8cd51f79b55174a5ec0f99f. Reason for revert: This is probably fixed with https://skia-review.googlesource.com/c/17279/. Original change's description: > Disable resource cache in shadow_utils GM for now > > This should make the GMs more stable in tiled mode. > > Change-Id: I72996b1305fc99e60626af35267952d0a5c38624 > Reviewed-on: https://skia-review.googlesource.com/17275 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> > TBR=jvanverth@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I0d21652a301b3f81e7ec04638bedbaabc723e583 Reviewed-on: https://skia-review.googlesource.com/17304 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Disable resource cache in shadow_utils GM for nowGravatar Jim Van Verth2017-05-17
| | | | | | | | | This should make the GMs more stable in tiled mode. Change-Id: I72996b1305fc99e60626af35267952d0a5c38624 Reviewed-on: https://skia-review.googlesource.com/17275 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Fix shadow_utils light position for SampleApp tilingGravatar Jim Van Verth2017-05-17
| | | | | | | Change-Id: Icddc82a095aa698bdba9004641acdc411392632f Reviewed-on: https://skia-review.googlesource.com/17044 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add filled occluders to shadow_utils GM, take 2Gravatar Jim Van Verth2017-05-15
| | | | | | | | | | Classifies fully visible opaque shadows differently than transparent to avoid cache collisions. Change-Id: Iba5aab2b2cbe08f70205c343e86fe92b0cab7497 Reviewed-on: https://skia-review.googlesource.com/16858 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Add filled occluders to shadow_utils GM"Gravatar Jim Van Verth2017-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 737169965fa97e4c71f2a625315b732969d00264. Reason for revert: <INSERT REASONING HERE> Original change's description: > Add filled occluders to shadow_utils GM > > Change-Id: I70a927261b6530d2352d8d5a713b309aa518e6b0 > Reviewed-on: https://skia-review.googlesource.com/16545 > Commit-Queue: Jim Van Verth <jvanverth@google.com> > Reviewed-by: Mike Reed <reed@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=jvanverth@google.com,bsalomon@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: If1d71118c781cdc4065187ed4953f42a1acad0f3 Reviewed-on: https://skia-review.googlesource.com/16706 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Add filled occluders to shadow_utils GMGravatar Jim Van Verth2017-05-12
| | | | | | | | Change-Id: I70a927261b6530d2352d8d5a713b309aa518e6b0 Reviewed-on: https://skia-review.googlesource.com/16545 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Unify ShadowUtils interfaceGravatar Jim Van Verth2017-05-10
| | | | | | | | Bug: skia: Change-Id: I116bec82783d297e91ef061217b5e61f7ff16a76 Reviewed-on: https://skia-review.googlesource.com/16371 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Revert "Create new inset algorithm for spot shadows""Gravatar Brian Salomon2017-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Create new inset algorithm for spot shadows" > > This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad. > > Reason for revert: Breaking a bunch of bots. e.g: > > https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout > > Original change's description: > > Create new inset algorithm for spot shadows > > > > BUG=skia: > > > > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e > > Reviewed-on: https://skia-review.googlesource.com/9875 > > Commit-Queue: Ravi Mistry <rmistry@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > > > TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e > Reviewed-on: https://skia-review.googlesource.com/10112 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501 Reviewed-on: https://skia-review.googlesource.com/10113 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Create new inset algorithm for spot shadows"Gravatar Brian Salomon2017-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad. Reason for revert: Breaking a bunch of bots. e.g: https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout Original change's description: > Create new inset algorithm for spot shadows > > BUG=skia: > > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e > Reviewed-on: https://skia-review.googlesource.com/9875 > Commit-Queue: Ravi Mistry <rmistry@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e Reviewed-on: https://skia-review.googlesource.com/10112 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Create new inset algorithm for spot shadowsGravatar Jim Van Verth2017-03-24
| | | | | | | | | | BUG=skia: Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e Reviewed-on: https://skia-review.googlesource.com/9875 Commit-Queue: Ravi Mistry <rmistry@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Make shadow_utils GM use its own SkResourceCacheGravatar Brian Salomon2017-02-23
| | | | | | | | | This should stabilize the replay testing on the bots. Change-Id: I89e3e308000743da6e1a765751103cffabc7e4ba Reviewed-on: https://skia-review.googlesource.com/8902 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Attempt to stabilize shadow_utils GM for replay configsGravatar Brian Salomon2017-02-22
| | | | | | | Change-Id: I0ed15ab102fa1e0a364d5f3a953bedd8afbda3c3 Reviewed-on: https://skia-review.googlesource.com/8853 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* fix up shadow_utils gm dimensionsGravatar Brian Salomon2017-02-03
| | | | | | | Change-Id: I5204296871404065b4d55d53922b7cf05ca5a50f Reviewed-on: https://skia-review.googlesource.com/7990 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add a GM for SkShadowUtils and fix a few issues.Gravatar Brian Salomon2017-02-01
1) Transform the path center to device space before computing the shadow offset. 2) Modulate the shadow color by the color filter's output color. 3) Make the scale of path points in the spot tessellator be relative to the path centroid. 4) Clamp the shadow alphas at 1. Change-Id: I480476df79b959f11c1eca0ba2a49a134d355cbb Reviewed-on: https://skia-review.googlesource.com/7860 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>