skia2/tests/sksl/blend/golden/BlendHardLight.glsl

83 lines
3.2 KiB
Plaintext
Raw Normal View History

#version 400
out vec4 sk_FragColor;
in vec4 src;
in vec4 dst;
float _blend_overlay_component(vec2 s, vec2 d) {
return 2.0 * d.x <= d.y ? (2.0 * s.x) * d.x : s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x);
}
vec4 blend_overlay(vec4 src, vec4 dst) {
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
float _0_blend_overlay_component;
{
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
_0_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
}
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
float _4_blend_overlay_component;
{
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
_4_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
}
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
float _8_blend_overlay_component;
{
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
_8_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
}
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
vec4 result = vec4(_0_blend_overlay_component, _4_blend_overlay_component, _8_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
return result;
}
vec4 blend_hard_light(vec4 src, vec4 dst) {
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
vec4 _1_blend_overlay;
{
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
float _5_blend_overlay_component;
{
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
_5_blend_overlay_component = 2.0 * src.x <= src.w ? (2.0 * dst.x) * src.x : dst.w * src.w - (2.0 * (src.w - src.x)) * (dst.w - dst.x);
}
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
float _9_blend_overlay_component;
{
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
_9_blend_overlay_component = 2.0 * src.y <= src.w ? (2.0 * dst.y) * src.y : dst.w * src.w - (2.0 * (src.w - src.y)) * (dst.w - dst.y);
}
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
float _11_blend_overlay_component;
{
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
_11_blend_overlay_component = 2.0 * src.z <= src.w ? (2.0 * dst.z) * src.z : dst.w * src.w - (2.0 * (src.w - src.z)) * (dst.w - dst.z);
}
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
vec4 _2_result = vec4(_5_blend_overlay_component, _9_blend_overlay_component, _11_blend_overlay_component, dst.w + (1.0 - dst.w) * src.w);
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
_2_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
_1_blend_overlay = _2_result;
}
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
return _1_blend_overlay;
}
void main() {
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
vec4 _3_blend_hard_light;
{
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
vec4 _6_blend_overlay;
{
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
float _10_blend_overlay_component;
{
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
_10_blend_overlay_component = 2.0 * src.x <= src.w ? (2.0 * dst.x) * src.x : dst.w * src.w - (2.0 * (src.w - src.x)) * (dst.w - dst.x);
}
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
float _12_blend_overlay_component;
{
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
_12_blend_overlay_component = 2.0 * src.y <= src.w ? (2.0 * dst.y) * src.y : dst.w * src.w - (2.0 * (src.w - src.y)) * (dst.w - dst.y);
}
float _13_blend_overlay_component;
{
_13_blend_overlay_component = 2.0 * src.z <= src.w ? (2.0 * dst.z) * src.z : dst.w * src.w - (2.0 * (src.w - src.z)) * (dst.w - dst.z);
}
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
vec4 _7_result = vec4(_10_blend_overlay_component, _12_blend_overlay_component, _13_blend_overlay_component, dst.w + (1.0 - dst.w) * src.w);
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
_7_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
_6_blend_overlay = _7_result;
}
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
_3_blend_hard_light = _6_blend_overlay;
}
Reland "Remove inliner from IR generation stage." This reverts commit 941fc7174fc20e8a8b707f1b636c85bbf2e1294f. Reason for revert: performance now seems to be roughly equal or better (~1%) over several trials. Nanobench: http://screen/A8e8sojaXBgbMgF Original change's description: > Revert "Remove inliner from IR generation stage." > > This reverts commit 21d7778cb5c13e729b513eaa22dbf53f58a877c8. > > Reason for revert: Pinpoint absolutely hates this change > > Original change's description: > > Remove inliner from IR generation stage. > > > > There is no need to inline code during IR generation, as the optimizer > > can now handle this. > > > > Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971 > > Commit-Queue: John Stiles <johnstiles@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Auto-Submit: John Stiles <johnstiles@google.com> > > TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com > > Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976 > Reviewed-by: John Stiles <johnstiles@google.com> > Commit-Queue: John Stiles <johnstiles@google.com> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Change-Id: I6189806c678283188f4b67ee61e5886f88c2d6fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324891 Reviewed-by: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-12 16:03:59 +00:00
sk_FragColor = _3_blend_hard_light;
}