[graphite] Add conical gradient shader

This is largely a re-implementation of the logic in
src/gpu/ganesh/gradients/GrGradientShader.cpp and
src/shaders/gradients/SkTwoPointConicalGradient.cpp. For simplicity,
most everything is in the shader now, but with an eye towards moving
computations that don't use sk_FragCoord into SkKeyHelpers.cpp.

Bug: skia:13302
Change-Id: I73d2e1f6c6ac0580aa897ffff3cfa87f4ed62b11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539569
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/src/core/SkKeyHelpers.cpp b/src/core/SkKeyHelpers.cpp
index 03a60a5..6fd128df 100644
--- a/src/core/SkKeyHelpers.cpp
+++ b/src/core/SkKeyHelpers.cpp
@@ -136,9 +136,6 @@
     gatherer->write(gradData.fOffsets, GradientData::kMaxStops);
     gatherer->write(gradData.fPoints[0]);
     gatherer->write(gradData.fPoints[1]);
-    gatherer->write(gradData.fRadii[0]);        // unused
-    gatherer->write(gradData.fRadii[1]);        // unused
-    gatherer->write(SkPoint::Make(0.0f, 0.0f)); // padding
 
     gatherer->addFlags(
             dict->getSnippetRequirementFlags(SkBuiltInCodeSnippetID::kLinearGradientShader));
diff --git a/src/core/SkShaderCodeDictionary.cpp b/src/core/SkShaderCodeDictionary.cpp
index 0f6c002..ad4d1ce 100644
--- a/src/core/SkShaderCodeDictionary.cpp
+++ b/src/core/SkShaderCodeDictionary.cpp
@@ -337,21 +337,13 @@
 //--------------------------------------------------------------------------------------------------
 static constexpr int kFourStopGradient = 4;
 
-// TODO: For the sprint we unify all the gradient uniforms into a standard set of 6:
-//   kMaxStops colors
-//   kMaxStops offsets
-//   2 points
-//   2 radii
-static constexpr int kNumGradientUniforms = 8;
-static constexpr SkUniform kGradientUniforms[kNumGradientUniforms] = {
+static constexpr int kNumLinearGradientUniforms = 5;
+static constexpr SkUniform kLinearGradientUniforms[kNumLinearGradientUniforms] = {
         { "localMatrix", SkSLType::kFloat4x4 },
         { "colors",      SkSLType::kFloat4, kFourStopGradient },
         { "offsets",     SkSLType::kFloat,  kFourStopGradient },
         { "point0",      SkSLType::kFloat2 },
         { "point1",      SkSLType::kFloat2 },
-        { "radius0",     SkSLType::kFloat },
-        { "radius1",     SkSLType::kFloat },
-        { "padding",     SkSLType::kFloat2 } // TODO: add automatic uniform padding
 };
 
 static constexpr int kNumRadialGradientUniforms = 6;
@@ -374,9 +366,22 @@
         { "scale",       SkSLType::kFloat }
 };
 
+static constexpr int kNumConicalGradientUniforms = 8;
+static constexpr SkUniform kConicalGradientUniforms[kNumConicalGradientUniforms] = {
+        { "localMatrix", SkSLType::kFloat4x4 },
+        { "colors",      SkSLType::kFloat4, kFourStopGradient },
+        { "offsets",     SkSLType::kFloat,  kFourStopGradient },
+        { "point0",      SkSLType::kFloat2 },
+        { "point1",      SkSLType::kFloat2 },
+        { "radius0",     SkSLType::kFloat },
+        { "radius1",     SkSLType::kFloat },
+        { "padding",     SkSLType::kFloat2 } // TODO: add automatic uniform padding
+};
+
 static constexpr char kLinearGradient4Name[] = "sk_linear_grad_4_shader";
 static constexpr char kRadialGradient4Name[] = "sk_radial_grad_4_shader";
 static constexpr char kSweepGradient4Name[] = "sk_sweep_grad_4_shader";
+static constexpr char kConicalGradient4Name[] = "sk_conical_grad_4_shader";
 
 //--------------------------------------------------------------------------------------------------
 static constexpr int kNumSolidShaderUniforms = 1;
@@ -614,7 +619,7 @@
     };
     fBuiltInCodeSnippets[(int) SkBuiltInCodeSnippetID::kLinearGradientShader] = {
             "LinearGradient4",
-            SkMakeSpan(kGradientUniforms, kNumGradientUniforms),
+            SkMakeSpan(kLinearGradientUniforms, kNumLinearGradientUniforms),
             SnippetRequirementFlags::kLocalCoords,
             { },     // no samplers
             kLinearGradient4Name,
@@ -644,10 +649,10 @@
     };
     fBuiltInCodeSnippets[(int) SkBuiltInCodeSnippetID::kConicalGradientShader] = {
             "ConicalGradient4",
-            SkMakeSpan(kGradientUniforms, kNumGradientUniforms),
+            SkMakeSpan(kConicalGradientUniforms, kNumConicalGradientUniforms),
             SnippetRequirementFlags::kLocalCoords,
             { },     // no samplers
-            kLinearGradient4Name,
+            kConicalGradient4Name,
             GenerateDefaultGlueCode,
             kNoChildren,
             { }
diff --git a/src/sksl/generated/sksl_graphite_frag.dehydrated.sksl b/src/sksl/generated/sksl_graphite_frag.dehydrated.sksl
index f051363..88451b6 100644
--- a/src/sksl/generated/sksl_graphite_frag.dehydrated.sksl
+++ b/src/sksl/generated/sksl_graphite_frag.dehydrated.sksl
@@ -1,4 +1,4 @@
-static uint8_t SKSL_INCLUDE_sksl_graphite_frag[] = {10,0,119,4,
+static uint8_t SKSL_INCLUDE_sksl_graphite_frag[] = {10,0,140,5,
 8,115,107,95,101,114,114,111,114,
 5,104,97,108,102,52,
 10,99,111,108,111,114,80,97,114,97,109,
@@ -30,16 +30,21 @@
 15,115,107,95,99,108,97,109,112,95,103,114,97,100,95,52,
 11,112,111,105,110,116,48,80,97,114,97,109,
 11,112,111,105,110,116,49,80,97,114,97,109,
-12,114,97,100,105,117,115,48,80,97,114,97,109,
-12,114,97,100,105,117,115,49,80,97,114,97,109,
-7,112,97,100,100,105,110,103,
 23,115,107,95,108,105,110,101,97,114,95,103,114,97,100,95,52,95,115,104,97,100,101,114,
 11,99,101,110,116,101,114,80,97,114,97,109,
 11,114,97,100,105,117,115,80,97,114,97,109,
+7,112,97,100,100,105,110,103,
 23,115,107,95,114,97,100,105,97,108,95,103,114,97,100,95,52,95,115,104,97,100,101,114,
 9,98,105,97,115,80,97,114,97,109,
 10,115,99,97,108,101,80,97,114,97,109,
 22,115,107,95,115,119,101,101,112,95,103,114,97,100,95,52,95,115,104,97,100,101,114,
+2,112,48,
+2,112,49,
+14,36,109,97,112,95,116,111,95,117,110,105,116,95,120,
+8,102,108,111,97,116,51,120,51,
+12,114,97,100,105,117,115,48,80,97,114,97,109,
+12,114,97,100,105,117,115,49,80,97,114,97,109,
+24,115,107,95,99,111,110,105,99,97,108,95,103,114,97,100,95,52,95,115,104,97,100,101,114,
 9,98,108,101,110,100,77,111,100,101,
 3,115,114,99,
 3,100,115,116,
@@ -73,6 +78,36 @@
 3,100,111,116,
 5,97,110,103,108,101,
 4,97,116,97,110,
+7,105,110,118,101,114,115,101,
+19,83,75,95,83,99,97,108,97,114,78,101,97,114,108,121,90,101,114,111,
+7,100,67,101,110,116,101,114,
+7,100,82,97,100,105,117,115,
+6,114,97,100,105,97,108,
+4,98,111,111,108,
+5,115,116,114,105,112,
+8,100,105,115,116,97,110,99,101,
+3,97,98,115,
+5,115,99,97,108,101,
+9,115,99,97,108,101,83,105,103,110,
+4,98,105,97,115,
+4,115,105,103,110,
+9,116,114,97,110,115,102,111,114,109,
+1,114,
+3,114,95,50,
+6,102,108,111,97,116,51,
+4,115,113,114,116,
+9,105,115,83,119,97,112,112,101,100,
+2,67,102,
+6,115,99,97,108,101,88,
+6,115,99,97,108,101,89,
+2,114,49,
+15,105,115,70,111,99,97,108,79,110,67,105,114,99,108,101,
+5,105,110,118,82,49,
+11,100,82,97,100,105,117,115,83,105,103,110,
+13,105,115,87,101,108,108,66,101,104,97,118,101,100,
+3,120,95,116,
+5,116,109,112,80,116,
+4,116,101,109,112,
 6,107,67,108,101,97,114,
 4,107,83,114,99,
 4,107,68,115,116,
@@ -118,7 +153,7 @@
 14,98,108,101,110,100,95,109,117,108,116,105,112,108,121,
 10,98,108,101,110,100,95,104,115,108,99,
 5,104,97,108,102,50,
-52,1,65,0,
+52,1,76,0,
 28,1,0,
 17,2,0,0,
 51,255,255,11,0,
@@ -211,112 +246,145 @@
 55,32,0,
 17,15,1,
 51,255,255,209,0,3,
-55,33,0,
-17,27,1,
-51,255,255,116,0,3,
-55,34,0,
-17,40,1,
-51,255,255,116,0,3,
-55,35,0,
-17,53,1,
-51,255,255,209,0,3,
-28,36,0,
-17,61,1,8,28,0,29,0,30,0,31,0,32,0,33,0,34,0,35,0,
+28,33,0,
+17,27,1,5,28,0,29,0,30,0,31,0,32,0,
 51,255,255,11,0,
-0,37,0,
+0,34,0,
 51,255,255,28,0,4,
-0,38,0,
+0,35,0,
 51,255,255,116,0,4,
+55,36,0,
+17,147,0,
+51,255,255,63,0,3,
+55,37,0,
+17,216,0,
+51,34,0,3,
+55,38,0,
+17,228,0,
+51,35,0,3,
 55,39,0,
-17,147,0,
-51,255,255,63,0,3,
+17,51,1,
+51,255,255,209,0,3,
 55,40,0,
-17,216,0,
-51,37,0,3,
+17,63,1,
+51,255,255,116,0,3,
 55,41,0,
-17,228,0,
-51,38,0,3,
-55,42,0,
-17,85,1,
-51,255,255,209,0,3,
-55,43,0,
-17,97,1,
+17,75,1,
 51,255,255,116,0,3,
-55,44,0,
-17,53,1,
-51,255,255,116,0,3,
-28,45,0,
-17,109,1,6,39,0,40,0,41,0,42,0,43,0,44,0,
+28,42,0,
+17,83,1,6,36,0,37,0,38,0,39,0,40,0,41,0,
 51,255,255,11,0,
-0,46,0,
+0,43,0,
 51,255,255,28,0,4,
-0,47,0,
+0,44,0,
 51,255,255,116,0,4,
-55,48,0,
+55,45,0,
 17,147,0,
 51,255,255,63,0,3,
-55,49,0,
+55,46,0,
 17,216,0,
-51,46,0,3,
-55,50,0,
+51,43,0,3,
+55,47,0,
 17,228,0,
-51,47,0,3,
-55,51,0,
-17,85,1,
+51,44,0,3,
+55,48,0,
+17,51,1,
 51,255,255,209,0,3,
+55,49,0,
+17,107,1,
+51,255,255,116,0,3,
+55,50,0,
+17,117,1,
+51,255,255,116,0,3,
+28,51,0,
+17,128,1,6,45,0,46,0,47,0,48,0,49,0,50,0,
+51,255,255,11,0,
 55,52,0,
-17,133,1,
-51,255,255,116,0,3,
+17,151,1,
+51,255,255,209,0,3,
 55,53,0,
-17,143,1,
-51,255,255,116,0,3,
+17,154,1,
+51,255,255,209,0,3,
 28,54,0,
-17,154,1,6,48,0,49,0,50,0,51,0,52,0,53,0,
-51,255,255,11,0,
-55,55,0,
-17,177,1,
-51,255,255,110,0,3,
-55,56,0,
-17,187,1,
-51,255,255,11,0,3,
+17,157,1,2,52,0,53,0,
+51,255,255,172,1,
+0,55,0,
+51,255,255,28,0,4,
+0,56,0,
+51,255,255,116,0,4,
 55,57,0,
-17,191,1,
-51,255,255,11,0,3,
-28,58,0,
-17,195,1,3,55,0,56,0,57,0,
-51,255,255,11,0,
+17,147,0,
+51,255,255,63,0,3,
+55,58,0,
+17,216,0,
+51,55,0,3,
 55,59,0,
-17,177,1,
-51,255,255,110,0,3,
+17,228,0,
+51,56,0,3,
 55,60,0,
-17,204,1,
-51,255,255,110,0,3,
+17,3,1,
+51,255,255,209,0,3,
 55,61,0,
-17,209,1,
-51,255,255,110,0,3,
+17,15,1,
+51,255,255,209,0,3,
 55,62,0,
-17,214,1,
-51,255,255,110,0,3,
+17,181,1,
+51,255,255,116,0,3,
 55,63,0,
-17,219,1,
-51,255,255,11,0,3,
+17,194,1,
+51,255,255,116,0,3,
 55,64,0,
-17,226,1,
-51,255,255,11,0,3,
+17,75,1,
+51,255,255,209,0,3,
 28,65,0,
-17,233,1,6,59,0,60,0,61,0,62,0,63,0,64,0,
-51,255,255,11,0,11,0,
+17,207,1,8,57,0,58,0,59,0,60,0,61,0,62,0,63,0,64,0,
+51,255,255,11,0,
+55,66,0,
+17,232,1,
+51,255,255,110,0,3,
+55,67,0,
+17,242,1,
+51,255,255,11,0,3,
+55,68,0,
+17,246,1,
+51,255,255,11,0,3,
+28,69,0,
+17,250,1,3,66,0,67,0,68,0,
+51,255,255,11,0,
+55,70,0,
+17,232,1,
+51,255,255,110,0,3,
+55,71,0,
+17,3,2,
+51,255,255,110,0,3,
+55,72,0,
+17,8,2,
+51,255,255,110,0,3,
+55,73,0,
+17,13,2,
+51,255,255,110,0,3,
+55,74,0,
+17,18,2,
+51,255,255,11,0,3,
+55,75,0,
+17,25,2,
+51,255,255,11,0,3,
+28,76,0,
+17,32,2,6,70,0,71,0,72,0,73,0,74,0,75,0,
+51,255,255,11,0,13,0,
+53,0,
 11,0,
-57,0,
-64,0,
+68,0,
+75,0,
 24,0,
 18,0,
+64,0,
 0,0,
-35,0,
+32,0,
 5,0,
-44,0,
+41,0,
 2,0,
-53,0,
+50,0,
 20,
 29,1,0,
 2,
@@ -325,13 +393,13 @@
 8,
 51,255,255,11,0,4,
 25,
-51,255,255,249,1,0,0,128,63,
+51,255,255,48,2,0,0,128,63,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,128,63,
+51,255,255,48,2,0,0,128,63,
 25,
-51,255,255,249,1,0,0,128,63,1,
+51,255,255,48,2,0,0,128,63,1,
 29,3,0,
 2,
 52,1,0,0,0,0,1,
@@ -347,52 +415,52 @@
 29,12,0,
 2,
 52,1,4,0,
-55,66,0,
+55,77,0,
 38,
-16,4,254,1,
+16,4,53,2,
 51,255,255,110,0,2,
-55,67,0,
+55,78,0,
 38,
-16,4,5,2,
+16,4,60,2,
 51,255,255,110,0,2,
-55,68,0,
+55,79,0,
 38,
-16,4,13,2,
+16,4,68,2,
 51,255,255,110,0,2,
-55,69,0,
+55,80,0,
 38,
-16,4,27,2,
+16,4,82,2,
 51,255,255,110,0,2,4,0,
 0,0,
 3,0,
 2,0,
 1,0,5,
-56,66,0,
+56,77,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,0,0,0,0,
-56,67,0,
+56,78,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,1,0,0,0,
-56,68,0,
+56,79,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,2,0,0,0,
-56,69,0,
+56,80,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,3,0,0,0,
 32,0,
 1,
 57,7,0,0,16,
-57,66,0,0,
+57,77,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 1,
 27,
-51,255,255,116,0,255,255,42,2,3,
+51,255,255,116,0,255,255,97,2,3,
 57,8,0,0,
 57,9,0,0,
 57,10,0,0,3,
@@ -400,14 +468,14 @@
 32,0,
 1,
 57,7,0,0,16,
-57,67,0,0,
+57,78,0,0,
 2,
 52,1,1,0,
-55,70,0,
-17,48,2,
+55,81,0,
+17,103,2,
 51,255,255,116,0,2,1,0,
 0,0,2,
-56,70,0,
+56,81,0,
 51,255,255,116,0,0,
 1,
 57,10,0,0,1,
@@ -416,63 +484,63 @@
 1,
 1,
 27,
-51,255,255,116,0,255,255,55,2,2,
+51,255,255,116,0,255,255,110,2,2,
 1,
 57,8,0,0,1,
 57,9,0,0,
-57,70,0,0,0,
+57,81,0,0,0,
 57,9,0,0,3,
 57,11,0,0,1,
 32,0,
 1,
 57,7,0,0,16,
-57,68,0,0,
+57,79,0,0,
 2,
 52,1,3,0,
-55,71,0,
-17,48,2,
+55,82,0,
+17,103,2,
 51,255,255,116,0,2,
-55,72,0,
-17,59,2,
+55,83,0,
+17,114,2,
 51,255,255,116,0,2,
-55,73,0,
-17,67,2,
+55,84,0,
+17,122,2,
 51,255,255,116,0,2,3,0,
 0,0,
 1,0,
 2,0,4,
-56,71,0,
+56,82,0,
 51,255,255,116,0,0,
 1,
 57,10,0,0,1,
 57,9,0,0,
-56,72,0,
+56,83,0,
 51,255,255,116,0,0,
 1,
 25,
 51,255,255,116,0,0,0,0,64,2,
-57,71,0,0,
-56,73,0,
+57,82,0,0,
+56,84,0,
 51,255,255,116,0,0,
 27,
-51,255,255,116,0,255,255,55,2,2,
+51,255,255,116,0,255,255,110,2,2,
 1,
 57,8,0,0,1,
 57,9,0,0,
-57,72,0,0,
+57,83,0,0,
 44,
 1,
 1,
 27,
-51,255,255,116,0,255,255,71,2,3,
-57,73,0,0,
+51,255,255,116,0,255,255,126,2,3,
+57,84,0,0,
 1,
-57,72,0,0,1,
-57,73,0,0,
+57,83,0,0,1,
+57,84,0,0,
 27,
-51,255,255,116,0,255,255,75,2,2,
-57,71,0,0,
-57,73,0,0,0,
+51,255,255,116,0,255,255,130,2,2,
+57,82,0,0,
+57,84,0,0,0,
 57,9,0,0,3,
 57,11,0,0,1,
 2,
@@ -480,7 +548,7 @@
 44,
 1,
 27,
-51,255,255,116,0,255,255,42,2,3,
+51,255,255,116,0,255,255,97,2,3,
 57,8,0,0,
 57,9,0,0,
 57,10,0,0,3,
@@ -488,20 +556,20 @@
 29,19,0,
 2,
 52,1,2,0,
-55,74,0,
-17,80,2,
+55,85,0,
+17,135,2,
 51,255,255,28,0,2,
-55,75,0,
-17,92,2,
+55,86,0,
+17,147,2,
 51,255,255,209,0,2,2,0,
 1,0,
 0,0,3,
-56,74,0,
+56,85,0,
 51,255,255,28,0,0,
 1,
 57,13,0,0,2,
-57,255,255,99,2,0,
-56,75,0,
+57,255,255,154,2,0,
+56,86,0,
 51,255,255,209,0,0,
 8,
 51,255,255,209,0,2,
@@ -509,7 +577,7 @@
 51,255,255,116,0,12,0,5,
 57,15,0,0,
 50,
-57,74,0,0,1,0,
+57,85,0,0,1,0,
 50,
 57,14,0,0,1,0,
 50,
@@ -521,7 +589,7 @@
 51,255,255,116,0,12,0,5,
 57,16,0,0,
 50,
-57,74,0,0,1,1,
+57,85,0,0,1,1,
 50,
 57,14,0,0,1,1,
 50,
@@ -530,112 +598,112 @@
 51,255,255,116,0,1,
 57,18,0,0,
 44,
-57,75,0,0,1,
+57,86,0,0,1,
 29,25,0,
 2,
 52,1,1,0,
-55,76,0,
-17,112,2,
+55,87,0,
+17,167,2,
 51,255,255,28,0,2,1,0,
 0,0,5,
-56,76,0,
+56,87,0,
 51,255,255,28,0,0,
 33,
 57,22,0,0,
 36,
-51,255,255,119,2,0,0,0,0,
+51,255,255,174,2,0,0,0,0,
 22,
 1,
-57,76,0,1,15,
+57,87,0,1,15,
 27,
-51,255,255,28,0,255,255,71,2,3,
-57,76,0,0,
+51,255,255,28,0,255,255,126,2,3,
+57,87,0,0,
 33,
 57,22,0,0,
 36,
-51,255,255,119,2,1,0,0,0,
+51,255,255,174,2,1,0,0,0,
 27,
-51,255,255,116,0,255,255,42,2,3,
+51,255,255,116,0,255,255,97,2,3,
 1,
 1,
 57,24,0,0,1,
 33,
 57,23,0,0,
 36,
-51,255,255,119,2,0,0,0,0,3,
+51,255,255,174,2,0,0,0,0,3,
 1,
 33,
 57,23,0,0,
 36,
-51,255,255,119,2,1,0,0,0,1,
+51,255,255,174,2,1,0,0,0,1,
 33,
 57,23,0,0,
 36,
-51,255,255,119,2,0,0,0,0,
+51,255,255,174,2,0,0,0,0,
 25,
 51,255,255,116,0,0,0,0,0,
 25,
 51,255,255,116,0,0,0,128,63,
 22,
 1,
-57,76,0,1,15,
+57,87,0,1,15,
 27,
-51,255,255,28,0,255,255,71,2,3,
-57,76,0,0,
+51,255,255,28,0,255,255,126,2,3,
+57,87,0,0,
 33,
 57,22,0,0,
 36,
-51,255,255,119,2,2,0,0,0,
+51,255,255,174,2,2,0,0,0,
 27,
-51,255,255,116,0,255,255,42,2,3,
+51,255,255,116,0,255,255,97,2,3,
 1,
 1,
 57,24,0,0,1,
 33,
 57,23,0,0,
 36,
-51,255,255,119,2,1,0,0,0,3,
+51,255,255,174,2,1,0,0,0,3,
 1,
 33,
 57,23,0,0,
 36,
-51,255,255,119,2,2,0,0,0,1,
+51,255,255,174,2,2,0,0,0,1,
 33,
 57,23,0,0,
 36,
-51,255,255,119,2,1,0,0,0,
+51,255,255,174,2,1,0,0,0,
 25,
 51,255,255,116,0,0,0,0,0,
 25,
 51,255,255,116,0,0,0,128,63,
 22,
 1,
-57,76,0,1,15,
+57,87,0,1,15,
 27,
-51,255,255,28,0,255,255,71,2,3,
-57,76,0,0,
+51,255,255,28,0,255,255,126,2,3,
+57,87,0,0,
 33,
 57,22,0,0,
 36,
-51,255,255,119,2,3,0,0,0,
+51,255,255,174,2,3,0,0,0,
 27,
-51,255,255,116,0,255,255,42,2,3,
+51,255,255,116,0,255,255,97,2,3,
 1,
 1,
 57,24,0,0,1,
 33,
 57,23,0,0,
 36,
-51,255,255,119,2,2,0,0,0,3,
+51,255,255,174,2,2,0,0,0,3,
 1,
 33,
 57,23,0,0,
 36,
-51,255,255,119,2,3,0,0,0,1,
+51,255,255,174,2,3,0,0,0,1,
 33,
 57,23,0,0,
 36,
-51,255,255,119,2,2,0,0,0,
+51,255,255,174,2,2,0,0,0,
 25,
 51,255,255,116,0,0,0,0,0,
 25,
@@ -643,275 +711,919 @@
 44,
 9,
 51,255,255,11,0,1,
-57,76,0,0,1,
-29,36,0,
+57,87,0,0,1,
+29,33,0,
 2,
 52,1,4,0,
-55,77,0,
-17,131,2,
+55,88,0,
+17,186,2,
 51,255,255,209,0,2,
-55,78,0,
-17,135,2,
+55,89,0,
+17,190,2,
 51,255,255,209,0,2,
-55,79,0,
-17,141,2,
+55,90,0,
+17,196,2,
 51,255,255,209,0,2,
-55,80,0,
+55,91,0,
 17,241,0,
 51,255,255,116,0,2,4,0,
 1,0,
 0,0,
 2,0,
 3,0,5,
-56,77,0,
+56,88,0,
 51,255,255,209,0,0,
 50,
 1,
 57,28,0,0,2,
-57,255,255,99,2,0,2,0,1,
-56,78,0,
+57,255,255,154,2,0,2,0,1,
+56,89,0,
 51,255,255,209,0,0,
 1,
 57,32,0,0,1,
 57,31,0,0,
-56,79,0,
+56,90,0,
 51,255,255,209,0,0,
 1,
-57,77,0,0,1,
+57,88,0,0,1,
 57,31,0,0,
-56,80,0,
+56,91,0,
 51,255,255,116,0,0,
 1,
 27,
-51,255,255,116,0,255,255,144,2,2,
-57,79,0,0,
-57,78,0,0,3,
+51,255,255,116,0,255,255,199,2,2,
+57,90,0,0,
+57,89,0,0,3,
 27,
-51,255,255,116,0,255,255,144,2,2,
-57,78,0,0,
-57,78,0,0,
+51,255,255,116,0,255,255,199,2,2,
+57,89,0,0,
+57,89,0,0,
 44,
 27,
 51,255,255,11,0,25,0,3,
 57,29,0,0,
 57,30,0,0,
-57,80,0,0,1,
-29,45,0,
+57,91,0,0,1,
+29,42,0,
 2,
 52,1,3,0,
-55,81,0,
-17,131,2,
+55,92,0,
+17,186,2,
 51,255,255,209,0,2,
-55,82,0,
-17,141,2,
+55,93,0,
+17,196,2,
 51,255,255,209,0,2,
-55,83,0,
+55,94,0,
 17,241,0,
 51,255,255,116,0,2,3,0,
 0,0,
 1,0,
 2,0,4,
-56,81,0,
+56,92,0,
 51,255,255,209,0,0,
 50,
 1,
-57,39,0,0,2,
-57,255,255,99,2,0,2,0,1,
-56,82,0,
+57,36,0,0,2,
+57,255,255,154,2,0,2,0,1,
+56,93,0,
 51,255,255,209,0,0,
 1,
-57,81,0,0,1,
-57,42,0,0,
-56,83,0,
+57,92,0,0,1,
+57,39,0,0,
+56,94,0,
 51,255,255,116,0,0,
 1,
 27,
-51,255,255,116,0,255,255,48,2,1,
-57,82,0,0,3,
-57,43,0,0,
+51,255,255,116,0,255,255,103,2,1,
+57,93,0,0,3,
+57,40,0,0,
 44,
 27,
 51,255,255,11,0,25,0,3,
-57,40,0,0,
-57,41,0,0,
-57,83,0,0,1,
-29,54,0,
+57,37,0,0,
+57,38,0,0,
+57,94,0,0,1,
+29,51,0,
 2,
 52,1,4,0,
-55,84,0,
-17,131,2,
+55,95,0,
+17,186,2,
 51,255,255,209,0,2,
-55,85,0,
-17,141,2,
+55,96,0,
+17,196,2,
 51,255,255,209,0,2,
-55,86,0,
-17,148,2,
+55,97,0,
+17,203,2,
 51,255,255,116,0,2,
-55,87,0,
+55,98,0,
 17,241,0,
 51,255,255,116,0,2,4,0,
 2,0,
 0,0,
 1,0,
 3,0,5,
-56,84,0,
+56,95,0,
 51,255,255,209,0,0,
 50,
 1,
-57,48,0,0,2,
-57,255,255,99,2,0,2,0,1,
-56,85,0,
+57,45,0,0,2,
+57,255,255,154,2,0,2,0,1,
+56,96,0,
 51,255,255,209,0,0,
 1,
-57,84,0,0,1,
-57,51,0,0,
-56,86,0,
+57,95,0,0,1,
+57,48,0,0,
+56,97,0,
 51,255,255,116,0,0,
 27,
-51,255,255,116,0,255,255,154,2,2,
+51,255,255,116,0,255,255,209,2,2,
 42,1,
 50,
-57,85,0,0,1,1,
+57,96,0,0,1,1,
 42,1,
 50,
-57,85,0,0,1,0,
-56,87,0,
+57,96,0,0,1,0,
+56,98,0,
 51,255,255,116,0,0,
 1,
 1,
 1,
 1,
-57,86,0,0,2,
+57,97,0,0,2,
 25,
 51,255,255,116,0,131,249,34,62,0,
 25,
 51,255,255,116,0,0,0,0,63,0,
-57,52,0,0,2,
-57,53,0,0,
+57,49,0,0,2,
+57,50,0,0,
 44,
 27,
 51,255,255,11,0,25,0,3,
-57,49,0,0,
-57,50,0,0,
-57,87,0,0,1,
-29,58,0,
+57,46,0,0,
+57,47,0,0,
+57,98,0,0,1,
+29,54,0,
 2,
-52,1,29,0,
-55,88,0,
-38,
-16,4,159,2,
-51,255,255,110,0,2,
-55,89,0,
-38,
-16,4,166,2,
-51,255,255,110,0,2,
-55,90,0,
-38,
-16,4,171,2,
-51,255,255,110,0,2,
-55,91,0,
-38,
-16,4,176,2,
-51,255,255,110,0,2,
-55,92,0,
-38,
-16,4,185,2,
-51,255,255,110,0,2,
-55,93,0,
-38,
-16,4,194,2,
-51,255,255,110,0,2,
-55,94,0,
-38,
-16,4,201,2,
-51,255,255,110,0,2,
-55,95,0,
-38,
-16,4,208,2,
-51,255,255,110,0,2,
-55,96,0,
-38,
-16,4,216,2,
-51,255,255,110,0,2,
-55,97,0,
-38,
-16,4,224,2,
-51,255,255,110,0,2,
-55,98,0,
-38,
-16,4,233,2,
-51,255,255,110,0,2,
+52,1,0,0,0,0,1,
+44,
+1,
+8,
+51,255,255,172,1,9,
+25,
+51,255,255,116,0,0,0,0,0,
+25,
+51,255,255,116,0,0,0,128,191,
+25,
+51,255,255,116,0,0,0,0,0,
+25,
+51,255,255,116,0,0,0,128,63,
+25,
+51,255,255,116,0,0,0,0,0,
+25,
+51,255,255,116,0,0,0,0,0,
+25,
+51,255,255,116,0,0,0,0,0,
+25,
+51,255,255,116,0,0,0,0,0,
+25,
+51,255,255,116,0,0,0,128,63,2,
+27,
+51,255,255,172,1,255,255,214,2,1,
+8,
+51,255,255,172,1,9,
+1,
+50,
+57,53,0,0,1,1,1,
+50,
+57,52,0,0,1,1,
+1,
+50,
+57,52,0,0,1,0,1,
+50,
+57,53,0,0,1,0,
+25,
+51,255,255,116,0,0,0,0,0,
+1,
+50,
+57,53,0,0,1,0,1,
+50,
+57,52,0,0,1,0,
+1,
+50,
+57,53,0,0,1,1,1,
+50,
+57,52,0,0,1,1,
+25,
+51,255,255,116,0,0,0,0,0,
+50,
+57,52,0,0,1,0,
+50,
+57,52,0,0,1,1,
+25,
+51,255,255,116,0,0,0,128,63,1,
+29,65,0,
+2,
+52,1,7,0,
 55,99,0,
-38,
-16,4,242,2,
-51,255,255,110,0,2,
+17,186,2,
+51,255,255,209,0,2,
 55,100,0,
-38,
-16,4,247,2,
-51,255,255,110,0,2,
+17,241,0,
+51,255,255,116,0,2,
 55,101,0,
 38,
-16,4,253,2,
-51,255,255,110,0,2,
+16,4,222,2,
+51,255,255,116,0,2,
 55,102,0,
-38,
-16,4,7,3,
-51,255,255,110,0,2,
+17,242,2,
+51,255,255,116,0,2,
 55,103,0,
-38,
-16,4,15,3,
-51,255,255,110,0,2,
+17,250,2,
+51,255,255,116,0,2,
 55,104,0,
-38,
-16,4,24,3,
-51,255,255,110,0,2,
+17,2,3,
+51,255,255,9,3,2,
 55,105,0,
-38,
-16,4,32,3,
-51,255,255,110,0,2,
+17,14,3,
+51,255,255,9,3,2,7,0,
+2,0,
+3,0,
+4,0,
+0,0,
+5,0,
+6,0,
+1,0,9,
+56,99,0,
+51,255,255,209,0,0,
+50,
+1,
+57,57,0,0,2,
+57,255,255,154,2,0,2,0,1,
+56,100,0,
+51,255,255,116,0,0,
+58,
+56,101,0,
+51,255,255,116,0,0,
+25,
+51,255,255,116,0,0,0,128,57,
+56,102,0,
+51,255,255,116,0,0,
+27,
+51,255,255,116,0,255,255,20,3,2,
+57,60,0,0,
+57,61,0,0,
+56,103,0,
+51,255,255,116,0,0,
+1,
+57,63,0,0,1,
+57,62,0,0,
+56,104,0,
+51,255,255,9,3,0,
+1,
+57,102,0,0,18,
+57,101,0,0,
+56,105,0,
+51,255,255,9,3,0,
+1,
+27,
+51,255,255,116,0,255,255,29,3,1,
+57,103,0,0,18,
+57,101,0,0,
+32,0,
+57,104,0,0,
+2,
+52,1,4,0,
 55,106,0,
-38,
-16,4,41,3,
-51,255,255,110,0,2,
+17,33,3,
+51,255,255,116,0,2,
 55,107,0,
-38,
-16,4,53,3,
-51,255,255,110,0,2,
+17,39,3,
+51,255,255,116,0,2,
 55,108,0,
-38,
-16,4,64,3,
-51,255,255,110,0,2,
+17,49,3,
+51,255,255,116,0,2,
 55,109,0,
-38,
-16,4,75,3,
-51,255,255,110,0,2,
+17,196,2,
+51,255,255,209,0,2,4,0,
+2,0,
+3,0,
+0,0,
+1,0,6,
+32,0,
+57,105,0,0,
+2,
+52,1,0,0,0,0,1,
+44,
+13,
+51,255,255,11,0,1,
+25,
+51,255,255,48,2,0,0,0,0,1,
+58,
+56,106,0,
+51,255,255,116,0,0,
+1,
+25,
+51,255,255,116,0,0,0,128,63,3,
+57,103,0,0,
+56,107,0,
+51,255,255,116,0,0,
+27,
+51,255,255,116,0,255,255,54,3,1,
+57,103,0,0,
+56,108,0,
+51,255,255,116,0,0,
+1,
+57,62,0,0,3,
+57,103,0,0,
+56,109,0,
+51,255,255,209,0,0,
+1,
+1,
+57,99,0,0,1,
+57,60,0,0,2,
+57,106,0,0,
+22,
+1,
+57,100,0,1,15,
+1,
+1,
+27,
+51,255,255,116,0,255,255,103,2,1,
+57,109,0,0,2,
+57,107,0,0,1,
+57,108,0,0,1,
+32,0,
+57,105,0,0,
+2,
+52,1,4,0,
 55,110,0,
-38,
-16,4,86,3,
-51,255,255,110,0,2,
+17,59,3,
+51,255,255,172,1,2,
 55,111,0,
-38,
-16,4,98,3,
-51,255,255,110,0,2,
+17,69,3,
+51,255,255,116,0,2,
 55,112,0,
-38,
-16,4,109,3,
-51,255,255,110,0,2,
+17,71,3,
+51,255,255,116,0,2,
 55,113,0,
-38,
-16,4,119,3,
-51,255,255,110,0,2,
+17,196,2,
+51,255,255,209,0,2,4,0,
+3,0,
+1,0,
+2,0,
+0,0,7,
+56,110,0,
+51,255,255,172,1,0,
+27,
+51,255,255,172,1,54,0,2,
+57,60,0,0,
+57,61,0,0,
+56,111,0,
+51,255,255,116,0,0,
+1,
+57,62,0,0,3,
+57,102,0,0,
+56,112,0,
+51,255,255,116,0,0,
+1,
+57,111,0,0,2,
+57,111,0,0,
+56,113,0,
+51,255,255,209,0,0,
+50,
+1,
+57,110,0,0,2,
+8,
+51,255,255,75,3,2,
+57,99,0,0,
+25,
+51,255,255,116,0,0,0,128,63,2,0,1,
+22,
+1,
+57,100,0,1,15,
+1,
+57,112,0,0,1,
+1,
+50,
+57,113,0,0,1,1,2,
+50,
+57,113,0,0,1,1,
+32,0,
+1,
+57,100,0,0,18,
+25,
+51,255,255,116,0,0,0,0,0,
+2,
+52,1,0,0,0,0,1,
+44,
+13,
+51,255,255,11,0,1,
+25,
+51,255,255,48,2,0,0,0,0,1,
+58,
+22,
+1,
+57,100,0,1,15,
+1,
+50,
+57,113,0,0,1,0,0,
+27,
+51,255,255,116,0,255,255,82,3,1,
+57,100,0,0,1,
+2,
+52,1,13,0,
 55,114,0,
-38,
-16,4,124,3,
-51,255,255,110,0,2,
+17,114,0,
+51,255,255,116,0,2,
 55,115,0,
-38,
-16,4,136,3,
-51,255,255,110,0,2,
+17,87,3,
+51,255,255,9,3,2,
 55,116,0,
+17,97,3,
+51,255,255,209,0,2,
+55,117,0,
+17,59,3,
+51,255,255,172,1,2,
+55,118,0,
+17,100,3,
+51,255,255,116,0,2,
+55,119,0,
+17,107,3,
+51,255,255,116,0,2,
+55,120,0,
+17,114,3,
+51,255,255,116,0,2,
+55,121,0,
+17,117,3,
+51,255,255,9,3,2,
+55,122,0,
+17,196,2,
+51,255,255,209,0,2,
+55,123,0,
+17,133,3,
+51,255,255,116,0,2,
+55,124,0,
+17,139,3,
+51,255,255,116,0,2,
+55,125,0,
+17,151,3,
+51,255,255,9,3,2,
+55,126,0,
+17,165,3,
+51,255,255,116,0,2,13,0,
+2,0,
+10,0,
+0,0,
+9,0,
+7,0,
+1,0,
+11,0,
+8,0,
+6,0,
+4,0,
+5,0,
+3,0,
+12,0,20,
+56,114,0,
+51,255,255,116,0,0,
+1,
+57,62,0,0,3,
+1,
+57,62,0,0,1,
+57,63,0,0,
+56,115,0,
+51,255,255,9,3,0,
+1,
+27,
+51,255,255,116,0,255,255,29,3,1,
+1,
+57,114,0,0,1,
+25,
+51,255,255,116,0,0,0,128,63,18,
+57,101,0,0,
+32,0,
+57,115,0,0,
+2,
+52,1,1,0,
+55,127,0,
+17,169,3,
+51,255,255,209,0,2,1,0,
+0,0,4,
+56,127,0,
+51,255,255,209,0,0,
+57,60,0,0,
+22,
+1,
+57,60,0,1,15,
+57,61,0,0,
+22,
+1,
+57,61,0,1,15,
+57,127,0,0,
+22,
+1,
+57,114,0,1,15,
+25,
+51,255,255,116,0,0,0,0,0,1,
+58,
+56,116,0,
+51,255,255,209,0,0,
+1,
+1,
+57,60,0,0,2,
+1,
+25,
+51,255,255,116,0,0,0,128,63,1,
+57,114,0,0,0,
+1,
+57,61,0,0,2,
+57,114,0,0,
+56,117,0,
+51,255,255,172,1,0,
+27,
+51,255,255,172,1,54,0,2,
+57,116,0,0,
+57,61,0,0,
+56,118,0,
+51,255,255,116,0,0,
+27,
+51,255,255,116,0,255,255,29,3,1,
+1,
+25,
+51,255,255,116,0,0,0,128,63,1,
+57,114,0,0,
+56,119,0,
+51,255,255,116,0,0,
+57,118,0,0,
+56,120,0,
+51,255,255,116,0,0,
+1,
+27,
+51,255,255,116,0,255,255,29,3,1,
+1,
+57,63,0,0,1,
+57,62,0,0,3,
+57,102,0,0,
+56,121,0,
+51,255,255,9,3,0,
+1,
+27,
+51,255,255,116,0,255,255,29,3,1,
+1,
+57,120,0,0,1,
+25,
+51,255,255,116,0,0,0,128,63,18,
+57,101,0,0,
+32,0,
+57,121,0,0,
+2,
+52,1,0,0,0,0,2,
+22,
+1,
+57,118,0,2,24,
+25,
+51,255,255,116,0,0,0,0,63,
+22,
+1,
+57,119,0,2,24,
+25,
+51,255,255,116,0,0,0,0,63,1,
+2,
+52,1,0,0,0,0,2,
+22,
+1,
+57,118,0,2,24,
+1,
+57,120,0,0,3,
+1,
+1,
+57,120,0,0,2,
+57,120,0,0,1,
+25,
+51,255,255,116,0,0,0,128,63,
+22,
+1,
+57,119,0,2,25,
+27,
+51,255,255,116,0,255,255,82,3,1,
+27,
+51,255,255,116,0,255,255,29,3,1,
+1,
+1,
+57,120,0,0,2,
+57,120,0,0,1,
+25,
+51,255,255,116,0,0,0,128,63,1,
+22,
+1,
+57,117,0,1,15,
+1,
+8,
+51,255,255,172,1,9,
+57,118,0,0,
+25,
+51,255,255,116,0,0,0,0,0,
+25,
+51,255,255,116,0,0,0,0,0,
+25,
+51,255,255,116,0,0,0,0,0,
+57,119,0,0,
+25,
+51,255,255,116,0,0,0,0,0,
+25,
+51,255,255,116,0,0,0,0,0,
+25,
+51,255,255,116,0,0,0,0,0,
+25,
+51,255,255,116,0,0,0,128,63,2,
+57,117,0,0,
+56,122,0,
+51,255,255,209,0,0,
+50,
+1,
+57,117,0,0,2,
+8,
+51,255,255,75,3,2,
+57,99,0,0,
+25,
+51,255,255,116,0,0,0,128,63,2,0,1,
+56,123,0,
+51,255,255,116,0,0,
+1,
+25,
+51,255,255,116,0,0,0,128,63,3,
+57,120,0,0,
+56,124,0,
+51,255,255,116,0,0,
+27,
+51,255,255,116,0,255,255,54,3,1,
+1,
+25,
+51,255,255,116,0,0,0,128,63,1,
+57,114,0,0,
+56,125,0,
+51,255,255,9,3,0,
+1,
+42,7,
+57,121,0,0,8,
+1,
+57,120,0,0,19,
+25,
+51,255,255,116,0,0,0,128,63,
+56,126,0,
+51,255,255,116,0,0,
+25,
+51,255,255,116,0,0,0,128,191,
+32,0,
+57,121,0,0,
+2,
+52,1,0,0,0,0,1,
+22,
+1,
+57,126,0,1,15,
+1,
+27,
+51,255,255,116,0,255,255,199,2,2,
+57,122,0,0,
+57,122,0,0,3,
+50,
+57,122,0,0,1,0,1,
+32,0,
+57,125,0,0,
+2,
+52,1,0,0,0,0,1,
+22,
+1,
+57,126,0,1,15,
+1,
+27,
+51,255,255,116,0,255,255,103,2,1,
+57,122,0,0,1,
+1,
+50,
+57,122,0,0,1,0,2,
+57,123,0,0,1,
+2,
+52,1,1,0,
+55,128,0,
+17,175,3,
+51,255,255,116,0,2,1,0,
+0,0,2,
+56,128,0,
+51,255,255,116,0,0,
+1,
+1,
+50,
+57,122,0,0,1,0,2,
+50,
+57,122,0,0,1,0,1,
+1,
+50,
+57,122,0,0,1,1,2,
+50,
+57,122,0,0,1,1,
+32,0,
+1,
+57,128,0,0,21,
+25,
+51,255,255,116,0,0,0,0,0,
+2,
+52,1,0,0,0,0,1,
+32,0,
+1,
+57,115,0,0,9,
+1,
+57,124,0,0,18,
+25,
+51,255,255,116,0,0,0,0,0,
+2,
+52,1,0,0,0,0,1,
+22,
+1,
+57,126,0,1,15,
+1,
+42,1,
+27,
+51,255,255,116,0,255,255,82,3,1,
+57,128,0,0,1,
+1,
+50,
+57,122,0,0,1,0,2,
+57,123,0,0,1,
+2,
+52,1,0,0,0,0,1,
+22,
+1,
+57,126,0,1,15,
+1,
+27,
+51,255,255,116,0,255,255,82,3,1,
+57,128,0,0,1,
+1,
+50,
+57,122,0,0,1,0,2,
+57,123,0,0,1,1,
+58,1,
+32,0,
+1,
+42,7,
+57,125,0,0,8,
+1,
+57,126,0,0,18,
+25,
+51,255,255,116,0,0,0,0,0,
+2,
+52,1,0,0,0,0,1,
+44,
+13,
+51,255,255,11,0,1,
+25,
+51,255,255,48,2,0,0,0,0,1,
+58,
+22,
+1,
+57,100,0,1,15,
+1,
+57,114,0,0,0,
+1,
+57,124,0,0,2,
+57,126,0,0,
+32,0,
+57,115,0,0,
+2,
+52,1,0,0,0,0,1,
+22,
+1,
+57,100,0,1,15,
+1,
+25,
+51,255,255,116,0,0,0,128,63,1,
+57,100,0,0,1,
+58,1,
+44,
+27,
+51,255,255,11,0,25,0,3,
+57,58,0,0,
+57,59,0,0,
+57,100,0,0,1,
+29,69,0,
+2,
+52,1,29,0,
+55,129,0,
 38,
-16,4,143,3,
+16,4,180,3,
+51,255,255,110,0,2,
+55,130,0,
+38,
+16,4,187,3,
+51,255,255,110,0,2,
+55,131,0,
+38,
+16,4,192,3,
+51,255,255,110,0,2,
+55,132,0,
+38,
+16,4,197,3,
+51,255,255,110,0,2,
+55,133,0,
+38,
+16,4,206,3,
+51,255,255,110,0,2,
+55,134,0,
+38,
+16,4,215,3,
+51,255,255,110,0,2,
+55,135,0,
+38,
+16,4,222,3,
+51,255,255,110,0,2,
+55,136,0,
+38,
+16,4,229,3,
+51,255,255,110,0,2,
+55,137,0,
+38,
+16,4,237,3,
+51,255,255,110,0,2,
+55,138,0,
+38,
+16,4,245,3,
+51,255,255,110,0,2,
+55,139,0,
+38,
+16,4,254,3,
+51,255,255,110,0,2,
+55,140,0,
+38,
+16,4,7,4,
+51,255,255,110,0,2,
+55,141,0,
+38,
+16,4,12,4,
+51,255,255,110,0,2,
+55,142,0,
+38,
+16,4,18,4,
+51,255,255,110,0,2,
+55,143,0,
+38,
+16,4,28,4,
+51,255,255,110,0,2,
+55,144,0,
+38,
+16,4,36,4,
+51,255,255,110,0,2,
+55,145,0,
+38,
+16,4,45,4,
+51,255,255,110,0,2,
+55,146,0,
+38,
+16,4,53,4,
+51,255,255,110,0,2,
+55,147,0,
+38,
+16,4,62,4,
+51,255,255,110,0,2,
+55,148,0,
+38,
+16,4,74,4,
+51,255,255,110,0,2,
+55,149,0,
+38,
+16,4,85,4,
+51,255,255,110,0,2,
+55,150,0,
+38,
+16,4,96,4,
+51,255,255,110,0,2,
+55,151,0,
+38,
+16,4,107,4,
+51,255,255,110,0,2,
+55,152,0,
+38,
+16,4,119,4,
+51,255,255,110,0,2,
+55,153,0,
+38,
+16,4,130,4,
+51,255,255,110,0,2,
+55,154,0,
+38,
+16,4,140,4,
+51,255,255,110,0,2,
+55,155,0,
+38,
+16,4,145,4,
+51,255,255,110,0,2,
+55,156,0,
+38,
+16,4,157,4,
+51,255,255,110,0,2,
+55,157,0,
+38,
+16,4,164,4,
 51,255,255,110,0,2,29,0,
 0,0,
 27,0,
@@ -942,153 +1654,153 @@
 7,0,
 3,0,
 11,0,30,
-56,88,0,
+56,129,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,0,0,0,0,
-56,89,0,
+56,130,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,1,0,0,0,
-56,90,0,
+56,131,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,2,0,0,0,
-56,91,0,
+56,132,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,3,0,0,0,
-56,92,0,
+56,133,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,4,0,0,0,
-56,93,0,
+56,134,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,5,0,0,0,
-56,94,0,
+56,135,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,6,0,0,0,
-56,95,0,
+56,136,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,7,0,0,0,
-56,96,0,
+56,137,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,8,0,0,0,
-56,97,0,
+56,138,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,9,0,0,0,
-56,98,0,
+56,139,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,10,0,0,0,
-56,99,0,
+56,140,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,11,0,0,0,
-56,100,0,
+56,141,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,12,0,0,0,
-56,101,0,
+56,142,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,13,0,0,0,
-56,102,0,
+56,143,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,14,0,0,0,
-56,103,0,
+56,144,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,15,0,0,0,
-56,104,0,
+56,145,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,16,0,0,0,
-56,105,0,
+56,146,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,17,0,0,0,
-56,106,0,
+56,147,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,18,0,0,0,
-56,107,0,
+56,148,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,19,0,0,0,
-56,108,0,
+56,149,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,20,0,0,0,
-56,109,0,
+56,150,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,21,0,0,0,
-56,110,0,
+56,151,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,22,0,0,0,
-56,111,0,
+56,152,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,23,0,0,0,
-56,112,0,
+56,153,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,24,0,0,0,
-56,113,0,
+56,154,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,25,0,0,0,
-56,114,0,
+56,155,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,26,0,0,0,
-56,115,0,
+56,156,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,27,0,0,0,
-56,116,0,
+56,157,0,
 51,255,255,110,0,0,
 36,
 51,255,255,110,0,28,0,0,0,
 49,0,
 52,1,29,0,
-51,88,0,
-51,89,0,
-51,90,0,
-51,91,0,
-51,92,0,
-51,93,0,
-51,94,0,
-51,95,0,
-51,96,0,
-51,97,0,
-51,98,0,
-51,99,0,
-51,100,0,
-51,101,0,
-51,102,0,
-51,103,0,
-51,104,0,
-51,105,0,
-51,106,0,
-51,107,0,
-51,108,0,
-51,109,0,
-51,110,0,
-51,111,0,
-51,112,0,
-51,113,0,
-51,114,0,
-51,115,0,
-51,116,0,29,0,
+51,129,0,
+51,130,0,
+51,131,0,
+51,132,0,
+51,133,0,
+51,134,0,
+51,135,0,
+51,136,0,
+51,137,0,
+51,138,0,
+51,139,0,
+51,140,0,
+51,141,0,
+51,142,0,
+51,143,0,
+51,144,0,
+51,145,0,
+51,146,0,
+51,147,0,
+51,148,0,
+51,149,0,
+51,150,0,
+51,151,0,
+51,152,0,
+51,153,0,
+51,154,0,
+51,155,0,
+51,156,0,
+51,157,0,29,0,
 0,0,
 27,0,
 19,0,
@@ -1118,351 +1830,351 @@
 7,0,
 3,0,
 11,0,
-57,55,0,0,30,0,0,0,0,0,
+57,66,0,0,30,0,0,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,155,3,2,
-57,56,0,0,
-57,57,0,0,1,0,1,0,0,0,
+51,255,255,11,0,255,255,176,4,2,
+57,67,0,0,
+57,68,0,0,1,0,1,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,167,3,2,
-57,56,0,0,
-57,57,0,0,1,0,2,0,0,0,
+51,255,255,11,0,255,255,188,4,2,
+57,67,0,0,
+57,68,0,0,1,0,2,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,177,3,2,
-57,56,0,0,
-57,57,0,0,1,0,3,0,0,0,
+51,255,255,11,0,255,255,198,4,2,
+57,67,0,0,
+57,68,0,0,1,0,3,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,187,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,208,4,3,
+57,67,0,0,
+57,68,0,0,
 8,
 51,255,255,11,0,4,
 25,
-51,255,255,249,1,0,0,128,63,
+51,255,255,48,2,0,0,128,63,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,128,191,1,0,4,0,0,0,
+51,255,255,48,2,0,0,128,191,1,0,4,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,187,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,208,4,3,
+57,67,0,0,
+57,68,0,0,
 8,
 51,255,255,11,0,4,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,128,63,
+51,255,255,48,2,0,0,128,63,
 25,
-51,255,255,249,1,0,0,128,191,
+51,255,255,48,2,0,0,128,191,
 25,
-51,255,255,249,1,0,0,0,0,1,0,5,0,0,0,
+51,255,255,48,2,0,0,0,0,1,0,5,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,187,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,208,4,3,
+57,67,0,0,
+57,68,0,0,
 8,
 51,255,255,11,0,4,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,128,63,
+51,255,255,48,2,0,0,128,63,
 25,
-51,255,255,249,1,0,0,0,0,1,0,6,0,0,0,
+51,255,255,48,2,0,0,0,0,1,0,6,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,187,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,208,4,3,
+57,67,0,0,
+57,68,0,0,
 8,
 51,255,255,11,0,4,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,128,63,1,0,7,0,0,0,
+51,255,255,48,2,0,0,128,63,1,0,7,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,187,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,208,4,3,
+57,67,0,0,
+57,68,0,0,
 8,
 51,255,255,11,0,4,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,128,191,
+51,255,255,48,2,0,0,128,191,
 25,
-51,255,255,249,1,0,0,0,0,1,0,8,0,0,0,
+51,255,255,48,2,0,0,0,0,1,0,8,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,187,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,208,4,3,
+57,67,0,0,
+57,68,0,0,
 8,
 51,255,255,11,0,4,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,128,191,1,0,9,0,0,0,
+51,255,255,48,2,0,0,128,191,1,0,9,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,187,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,208,4,3,
+57,67,0,0,
+57,68,0,0,
 8,
 51,255,255,11,0,4,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,128,63,
+51,255,255,48,2,0,0,128,63,
 25,
-51,255,255,249,1,0,0,128,191,1,0,10,0,0,0,
+51,255,255,48,2,0,0,128,191,1,0,10,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,187,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,208,4,3,
+57,67,0,0,
+57,68,0,0,
 8,
 51,255,255,11,0,4,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,128,191,
+51,255,255,48,2,0,0,128,191,
 25,
-51,255,255,249,1,0,0,128,63,1,0,11,0,0,0,
+51,255,255,48,2,0,0,128,63,1,0,11,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,187,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,208,4,3,
+57,67,0,0,
+57,68,0,0,
 8,
 51,255,255,11,0,4,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,128,191,
+51,255,255,48,2,0,0,128,191,
 25,
-51,255,255,249,1,0,0,128,191,1,0,12,0,0,0,
+51,255,255,48,2,0,0,128,191,1,0,12,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,187,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,208,4,3,
+57,67,0,0,
+57,68,0,0,
 8,
 51,255,255,11,0,4,
 25,
-51,255,255,249,1,0,0,128,63,
+51,255,255,48,2,0,0,128,63,
 25,
-51,255,255,249,1,0,0,128,63,
+51,255,255,48,2,0,0,128,63,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,0,0,1,0,13,0,0,0,
+51,255,255,48,2,0,0,0,0,1,0,13,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,205,3,2,
-57,56,0,0,
-57,57,0,0,1,0,14,0,0,0,
+51,255,255,11,0,255,255,226,4,2,
+57,67,0,0,
+57,68,0,0,1,0,14,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,220,3,2,
-57,56,0,0,
-57,57,0,0,1,0,15,0,0,0,
+51,255,255,11,0,255,255,241,4,2,
+57,67,0,0,
+57,68,0,0,1,0,15,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,233,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,254,4,3,
+57,67,0,0,
+57,68,0,0,
 25,
-51,255,255,249,1,0,0,0,0,1,0,16,0,0,0,
+51,255,255,48,2,0,0,0,0,1,0,16,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,247,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,12,5,3,
+57,67,0,0,
+57,68,0,0,
 25,
-51,255,255,249,1,0,0,128,63,1,0,17,0,0,0,
+51,255,255,48,2,0,0,128,63,1,0,17,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,247,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,12,5,3,
+57,67,0,0,
+57,68,0,0,
 25,
-51,255,255,249,1,0,0,128,191,1,0,18,0,0,0,
+51,255,255,48,2,0,0,128,191,1,0,18,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,4,4,2,
-57,56,0,0,
-57,57,0,0,1,0,19,0,0,0,
+51,255,255,11,0,255,255,25,5,2,
+57,67,0,0,
+57,68,0,0,1,0,19,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,22,4,2,
-57,56,0,0,
-57,57,0,0,1,0,20,0,0,0,
+51,255,255,11,0,255,255,43,5,2,
+57,67,0,0,
+57,68,0,0,1,0,20,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,233,3,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,254,4,3,
+57,67,0,0,
+57,68,0,0,
 25,
-51,255,255,249,1,0,0,128,63,1,0,21,0,0,0,
+51,255,255,48,2,0,0,128,63,1,0,21,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,39,4,2,
-57,56,0,0,
-57,57,0,0,1,0,22,0,0,0,
+51,255,255,11,0,255,255,60,5,2,
+57,67,0,0,
+57,68,0,0,1,0,22,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,56,4,2,
-57,56,0,0,
-57,57,0,0,1,0,23,0,0,0,
+51,255,255,11,0,255,255,77,5,2,
+57,67,0,0,
+57,68,0,0,1,0,23,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,73,4,2,
-57,56,0,0,
-57,57,0,0,1,0,24,0,0,0,
+51,255,255,11,0,255,255,94,5,2,
+57,67,0,0,
+57,68,0,0,1,0,24,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,89,4,2,
-57,56,0,0,
-57,57,0,0,1,0,25,0,0,0,
+51,255,255,11,0,255,255,110,5,2,
+57,67,0,0,
+57,68,0,0,1,0,25,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,104,4,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,125,5,3,
+57,67,0,0,
+57,68,0,0,
 8,
-51,255,255,115,4,2,
+51,255,255,136,5,2,
 25,
-51,255,255,249,1,0,0,0,0,
+51,255,255,48,2,0,0,0,0,
 25,
-51,255,255,249,1,0,0,128,63,1,0,26,0,0,0,
+51,255,255,48,2,0,0,128,63,1,0,26,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,104,4,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,125,5,3,
+57,67,0,0,
+57,68,0,0,
 13,
-51,255,255,115,4,1,
+51,255,255,136,5,1,
 25,
-51,255,255,249,1,0,0,128,63,1,0,27,0,0,0,
+51,255,255,48,2,0,0,128,63,1,0,27,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,104,4,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,125,5,3,
+57,67,0,0,
+57,68,0,0,
 13,
-51,255,255,115,4,1,
+51,255,255,136,5,1,
 25,
-51,255,255,249,1,0,0,0,0,1,0,28,0,0,0,
+51,255,255,48,2,0,0,0,0,1,0,28,0,0,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,255,255,104,4,3,
-57,56,0,0,
-57,57,0,0,
+51,255,255,11,0,255,255,125,5,3,
+57,67,0,0,
+57,68,0,0,
 8,
-51,255,255,115,4,2,
+51,255,255,136,5,2,
 25,
-51,255,255,249,1,0,0,128,63,
+51,255,255,48,2,0,0,128,63,
 25,
-51,255,255,249,1,0,0,0,0,1,1,
+51,255,255,48,2,0,0,0,0,1,1,
 44,
 13,
 51,255,255,11,0,1,
 25,
-51,255,255,249,1,0,0,0,0,1,
-29,65,0,
+51,255,255,48,2,0,0,0,0,1,
+29,76,0,
 2,
 52,1,0,0,0,0,1,
 44,
 27,
-51,255,255,11,0,58,0,3,
-57,59,0,0,
-57,64,0,0,
-57,63,0,0,1,
+51,255,255,11,0,69,0,3,
+57,70,0,0,
+57,75,0,0,
+57,74,0,0,1,
 21,};
 static constexpr size_t SKSL_INCLUDE_sksl_graphite_frag_LENGTH = sizeof(SKSL_INCLUDE_sksl_graphite_frag);
diff --git a/src/sksl/sksl_graphite_frag.sksl b/src/sksl/sksl_graphite_frag.sksl
index e5c1622..4442d14 100644
--- a/src/sksl/sksl_graphite_frag.sksl
+++ b/src/sksl/sksl_graphite_frag.sksl
@@ -66,10 +66,7 @@
                               float4 colorsParam[4],
                               float offsetsParam[4],
                               float2 point0Param,
-                              float2 point1Param,
-                              float radius0Param,
-                              float radius1Param,
-                              float2 padding) {
+                              float2 point1Param) {
     float2 pos = (dev2Local * sk_FragCoord).xy;
     float2 delta = point1Param - point0Param;
     float2 pt = pos - point0Param;
@@ -111,6 +108,138 @@
     return sk_clamp_grad_4(colorsParam, offsetsParam, t);
 }
 
+float3x3 $map_to_unit_x(float2 p0, float2 p1) {
+    // Returns a matrix that maps [p0, p1] to [(0, 0), (1, 0)]. Results are undefined if p0 = p1.
+    // From skia/src/core/SkMatrix.cpp, SkMatrix::setPolyToPoly.
+    return float3x3(
+        0, -1,  0,
+        1,  0,  0,
+        0,  0,  1
+    ) * inverse(float3x3(
+        p1.y - p0.y, p0.x - p1.x, 0,
+        p1.x - p0.x, p1.y - p0.y, 0,
+               p0.x,        p0.y, 1
+    ));
+}
+
+half4 sk_conical_grad_4_shader(float4x4 dev2Local,
+                               float4 colorsParam[4],
+                               float offsetsParam[4],
+                               float2 point0Param,
+                               float2 point1Param,
+                               float radius0Param,
+                               float radius1Param,
+                               float2 padding) {
+    float2 pos = (dev2Local * sk_FragCoord).xy;
+    float t;
+
+    const float SK_ScalarNearlyZero = 1.0 / (1 << 12);
+    float dCenter = distance(point0Param, point1Param);
+    float dRadius = radius1Param - radius0Param;
+
+    // Degenerate case: a radial gradient (p0 = p1).
+    bool radial = dCenter < SK_ScalarNearlyZero;
+
+    // Degenerate case: a strip with bandwidth 2r (r0 = r1).
+    bool strip = abs(dRadius) < SK_ScalarNearlyZero;
+
+    if (radial) {
+        if (strip) {
+            // The start and end inputs are the same in both position and radius.
+            // We don't expect to see this input, but just in case we avoid dividing by zero.
+            return half4(0);
+        }
+
+        float scale = 1 / dRadius;
+        float scaleSign = sign(dRadius);
+        float bias = radius0Param / dRadius;
+
+        float2 pt = (pos - point0Param) * scale;
+        t = length(pt) * scaleSign - bias;
+
+    } else if (strip) {
+        float3x3 transform = $map_to_unit_x(point0Param, point1Param);
+        float r = radius0Param / dCenter;
+        float r_2 = r * r;
+
+        float2 pt = (transform * pos.xy1).xy;
+        t = r_2 - pt.y * pt.y;
+        if (t < 0) {
+            return half4(0);
+        }
+        t = pt.x + sqrt(t);
+
+    } else {
+        // See https://skia.org/docs/dev/design/conical/ for details on how this algorithm works.
+        // Calculate f and swap inputs if necessary (steps 1 and 2).
+        float f = radius0Param / (radius0Param - radius1Param);
+
+        bool isSwapped = abs(f - 1) < SK_ScalarNearlyZero;
+        if (isSwapped) {
+            float2 tmpPt = point0Param;
+            point0Param = point1Param;
+            point1Param = tmpPt;
+            f = 0;
+        }
+
+        // Apply mapping from [Cf, C1] to unit x, and apply the precalculations from steps 3 and 4,
+        // all in the same transformation.
+        float2 Cf = point0Param * (1 - f) + point1Param * f;
+        float3x3 transform = $map_to_unit_x(Cf, point1Param);
+
+        float scaleX = abs(1 - f);
+        float scaleY = scaleX;
+        float r1 = abs(radius1Param - radius0Param) / dCenter;
+        bool isFocalOnCircle = abs(r1 - 1) < SK_ScalarNearlyZero;
+        if (isFocalOnCircle) {
+            scaleX *= 0.5;
+            scaleY *= 0.5;
+        } else {
+            scaleX *= r1 / (r1 * r1 - 1);
+            scaleY /= sqrt(abs(r1 * r1 - 1));
+        }
+        transform = float3x3(
+            scaleX, 0, 0,
+            0, scaleY, 0,
+            0, 0, 1
+        ) * transform;
+
+        float2 pt = (transform * pos.xy1).xy;
+
+        // Continue with step 5 onward.
+        float invR1 = 1 / r1;
+        float dRadiusSign = sign(1 - f);
+        bool isWellBehaved = !isFocalOnCircle && r1 > 1;
+
+        float x_t = -1;
+        if (isFocalOnCircle) {
+            x_t = dot(pt, pt) / pt.x;
+        } else if (isWellBehaved) {
+            x_t = length(pt) - pt.x * invR1;
+        } else {
+            float temp = pt.x * pt.x - pt.y * pt.y;
+            if (temp >= 0) {
+                if (isSwapped || dRadiusSign < 0) {
+                    x_t = -sqrt(temp) - pt.x * invR1;
+                } else {
+                    x_t = sqrt(temp) - pt.x * invR1;
+                }
+            }
+        }
+
+        if (!isWellBehaved && x_t < 0) {
+            return half4(0);
+        }
+
+        t = f + dRadiusSign * x_t;
+        if (isSwapped) {
+            t = 1 - t;
+        }
+    }
+
+    return sk_clamp_grad_4(colorsParam, offsetsParam, t);
+}
+
 half4 sk_blend(int blendMode, half4 src, half4 dst) {
     const int kClear      = 0;
     const int kSrc        = 1;