1703 {
1704
1706
1708 "Error",
1709 { },
1711 { },
1712 kErrorName,
1713 GenerateDefaultExpression,
1714 GenerateDefaultPreamble,
1716 };
1718 "PassthroughShader",
1719 { },
1721 { },
1722 kPassthroughShaderName,
1723 GenerateDefaultExpression,
1724 GenerateDefaultPreamble,
1726 };
1728 "SolidColor",
1729 SkSpan(kSolidShaderUniforms),
1731 { },
1732 kSolidShaderName,
1733 GenerateDefaultExpression,
1734 GenerateDefaultPreamble,
1736 };
1738 "RGBPaintColor",
1739 SkSpan(kPaintColorUniforms),
1741 { },
1742 kRGBPaintColorName,
1743 GenerateDefaultExpression,
1744 GenerateDefaultPreamble,
1746 };
1748 "AlphaOnlyPaintColor",
1749 SkSpan(kPaintColorUniforms),
1751 { },
1752 kAlphaOnlyPaintColorName,
1753 GenerateDefaultExpression,
1754 GenerateDefaultPreamble,
1756 };
1758 "LinearGradient4",
1759 SkSpan(kLinearGradientUniforms4),
1761 { },
1762 kLinearGradient4Name,
1763 GenerateDefaultExpression,
1764 GenerateDefaultPreamble,
1766 };
1768 "LinearGradient8",
1769 SkSpan(kLinearGradientUniforms8),
1771 { },
1772 kLinearGradient8Name,
1773 GenerateDefaultExpression,
1774 GenerateDefaultPreamble,
1776 };
1778 "LinearGradientTexture",
1779 SkSpan(kLinearGradientUniformsTexture),
1781 SkSpan(kTextureGradientTexturesAndSamplers),
1782 kLinearGradientTextureName,
1783 GenerateDefaultExpression,
1784 GenerateDefaultPreamble,
1786 };
1788 "LinearGradientBuffer",
1789 SkSpan(kLinearGradientUniformsBuffer),
1791 { },
1792 kLinearGradientBufferName,
1793 GenerateDefaultExpression,
1794 GenerateDefaultPreamble,
1796 };
1798 "RadialGradient4",
1799 SkSpan(kRadialGradientUniforms4),
1801 { },
1802 kRadialGradient4Name,
1803 GenerateDefaultExpression,
1804 GenerateDefaultPreamble,
1806 };
1808 "RadialGradient8",
1809 SkSpan(kRadialGradientUniforms8),
1811 { },
1812 kRadialGradient8Name,
1813 GenerateDefaultExpression,
1814 GenerateDefaultPreamble,
1816 };
1818 "RadialGradientTexture",
1819 SkSpan(kRadialGradientUniformsTexture),
1821 SkSpan(kTextureGradientTexturesAndSamplers),
1822 kRadialGradientTextureName,
1823 GenerateDefaultExpression,
1824 GenerateDefaultPreamble,
1826 };
1828 "RadialGradientBuffer",
1829 SkSpan(kRadialGradientUniformsBuffer),
1831 { },
1832 kRadialGradientBufferName,
1833 GenerateDefaultExpression,
1834 GenerateDefaultPreamble,
1836 };
1838 "SweepGradient4",
1839 SkSpan(kSweepGradientUniforms4),
1841 { },
1842 kSweepGradient4Name,
1843 GenerateDefaultExpression,
1844 GenerateDefaultPreamble,
1846 };
1848 "SweepGradient8",
1849 SkSpan(kSweepGradientUniforms8),
1851 { },
1852 kSweepGradient8Name,
1853 GenerateDefaultExpression,
1854 GenerateDefaultPreamble,
1856 };
1858 "SweepGradientTexture",
1859 SkSpan(kSweepGradientUniformsTexture),
1861 SkSpan(kTextureGradientTexturesAndSamplers),
1862 kSweepGradientTextureName,
1863 GenerateDefaultExpression,
1864 GenerateDefaultPreamble,
1866 };
1868 "SweepGradientBuffer",
1869 SkSpan(kSweepGradientUniformsBuffer),
1871 { },
1872 kSweepGradientBufferName,
1873 GenerateDefaultExpression,
1874 GenerateDefaultPreamble,
1876 };
1878 "ConicalGradient4",
1879 SkSpan(kConicalGradientUniforms4),
1881 { },
1882 kConicalGradient4Name,
1883 GenerateDefaultExpression,
1884 GenerateDefaultPreamble,
1886 };
1888 "ConicalGradient8",
1889 SkSpan(kConicalGradientUniforms8),
1891 { },
1892 kConicalGradient8Name,
1893 GenerateDefaultExpression,
1894 GenerateDefaultPreamble,
1896 };
1898 "ConicalGradientTexture",
1899 SkSpan(kConicalGradientUniformsTexture),
1901 SkSpan(kTextureGradientTexturesAndSamplers),
1902 kConicalGradientTextureName,
1903 GenerateDefaultExpression,
1904 GenerateDefaultPreamble,
1906 };
1908 "ConicalGradientBuffer",
1909 SkSpan(kConicalGradientUniformsBuffer),
1911 { },
1912 kConicalGradientBufferName,
1913 GenerateDefaultExpression,
1914 GenerateDefaultPreamble,
1916 };
1918 "LocalMatrixShader",
1919 SkSpan(kLocalMatrixShaderUniforms),
1921 { },
1922 kLocalMatrixShaderName,
1923 GenerateDefaultExpression,
1924 GenerateLocalMatrixPreamble,
1925 kNumLocalMatrixShaderChildren
1926 };
1928 "ImageShader",
1929 SkSpan(kImageShaderUniforms),
1931 SkSpan(kISTexturesAndSamplers),
1932 kImageShaderName,
1933 GenerateDefaultExpression,
1934 GenerateDefaultPreamble,
1936 };
1938 "CubicImageShader",
1939 SkSpan(kCubicImageShaderUniforms),
1941 SkSpan(kISTexturesAndSamplers),
1942 kCubicImageShaderName,
1943 GenerateDefaultExpression,
1944 GenerateDefaultPreamble,
1946 };
1948 "HardwareImageShader",
1949 SkSpan(kHWImageShaderUniforms),
1951 SkSpan(kISTexturesAndSamplers),
1952 kHWImageShaderName,
1953 GenerateDefaultExpression,
1954 GenerateDefaultPreamble,
1956 };
1958 "YUVImageShader",
1959 SkSpan(kYUVImageShaderUniforms),
1961 SkSpan(kYUVISTexturesAndSamplers),
1962 kYUVImageShaderName,
1963 GenerateDefaultExpression,
1964 GenerateDefaultPreamble,
1966 };
1968 "CubicYUVImageShader",
1969 SkSpan(kCubicYUVImageShaderUniforms),
1971 SkSpan(kYUVISTexturesAndSamplers),
1972 kCubicYUVImageShaderName,
1973 GenerateDefaultExpression,
1974 GenerateDefaultPreamble,
1976 };
1978 "HWYUVImageShader",
1979 SkSpan(kHWYUVImageShaderUniforms),
1981 SkSpan(kYUVISTexturesAndSamplers),
1982 kHWYUVImageShaderName,
1983 GenerateDefaultExpression,
1984 GenerateDefaultPreamble,
1986 };
1988 "CoordClampShader",
1989 SkSpan(kCoordClampShaderUniforms),
1991 { },
1992 kCoordClampShaderName,
1993 GenerateDefaultExpression,
1994 GenerateCoordClampPreamble,
1995 kNumCoordClampShaderChildren
1996 };
1998 "DitherShader",
1999 SkSpan(kDitherShaderUniforms),
2001 SkSpan(kDitherTexturesAndSamplers),
2002 kDitherShaderName,
2003 GenerateDefaultExpression,
2004 GenerateDefaultPreamble,
2006 };
2008 "PerlinNoiseShader",
2009 SkSpan(kPerlinNoiseShaderUniforms),
2011 SkSpan(kPerlinNoiseShaderTexturesAndSamplers),
2012 kPerlinNoiseShaderName,
2013 GenerateDefaultExpression,
2014 GenerateDefaultPreamble,
2016 };
2017
2019 "MatrixColorFilter",
2020 SkSpan(kMatrixColorFilterUniforms),
2022 { },
2023 kMatrixColorFilterName,
2024 GenerateDefaultExpression,
2025 GenerateDefaultPreamble,
2027 };
2029 "TableColorFilter",
2030 { },
2032 SkSpan(kTableColorFilterTexturesAndSamplers),
2033 kTableColorFilterName,
2034 GenerateDefaultExpression,
2035 GenerateDefaultPreamble,
2037 };
2039 "GaussianColorFilter",
2040 { },
2042 { },
2043 kGaussianColorFilterName,
2044 GenerateDefaultExpression,
2045 GenerateDefaultPreamble,
2047 };
2049 "ColorSpaceTransform",
2050 SkSpan(kColorSpaceTransformUniforms),
2052 { },
2053 kColorSpaceTransformName,
2054 GenerateDefaultExpression,
2055 GenerateDefaultPreamble,
2057 };
2058
2060 "BlendShader",
2061 { },
2063 { },
2064 "BlendShader",
2065 GenerateDefaultExpression,
2066 GenerateBlendShaderPreamble,
2067 kNumBlendShaderChildren
2068 };
2070 "CoeffBlender",
2071 SkSpan(CoeffBlendderUniforms),
2073 { },
2074 kCoeffBlenderName,
2075 GenerateDefaultExpression,
2076 GenerateDefaultPreamble,
2078 };
2080 "BlendModeBlender",
2081 SkSpan(kBlendModeBlenderUniforms),
2083 { },
2084 kBlendModeBlenderName,
2085 GenerateDefaultExpression,
2086 GenerateDefaultPreamble,
2088 };
2089
2091 "PrimitiveColor",
2092 { },
2094 { },
2095 "primitive color",
2096 GeneratePrimitiveColorExpression,
2097 GenerateDefaultPreamble,
2099 };
2100
2102 "DstReadSample",
2103 SkSpan(kDstReadSampleUniforms),
2105 SkSpan(kDstReadSampleTexturesAndSamplers),
2106 "InitSurfaceColor",
2107 GenerateDstReadSampleExpression,
2108 GenerateDstReadSamplePreamble,
2110 };
2112 "DstReadFetch",
2113 { },
2115 { },
2116 "InitSurfaceColor",
2117 GenerateDstReadFetchExpression,
2118 GenerateDstReadFetchPreamble,
2120 };
2121
2123 "ClipShader",
2124 { },
2126 { },
2127 "clip shader",
2128 GenerateClipShaderExpression,
2129 GenerateClipShaderPreamble,
2130 kNumClipShaderChildren
2131 };
2132
2134 "Compose",
2135 { },
2137 { },
2138 kComposeName,
2139 GenerateDefaultExpression,
2140 GenerateNestedChildrenPreamble,
2141 kNumComposeChildren
2142 };
2143
2144
2145
2148 fBuiltInCodeSnippets[ffBlendModeID] = {
2150 { },
2153 { },
2155 GenerateDefaultExpression,
2156 GenerateDefaultPreamble,
2158 };
2159 }
2160}
SK_API const char * SkBlendMode_Name(SkBlendMode blendMode)
@ kLastCoeffMode
last porter duff blend mode
SkSpan(Container &&) -> SkSpan< std::remove_pointer_t< decltype(std::data(std::declval< Container >()))> >
static constexpr PaintParamsKey Invalid()
static constexpr int kFixedFunctionBlendModeIDOffset
@ kConicalGradientShader8
@ kConicalGradientShaderBuffer
@ kSweepGradientShaderTexture
@ kSweepGradientShaderBuffer
@ kConicalGradientShader4
@ kLinearGradientShaderTexture
@ kRadialGradientShaderBuffer
@ kColorSpaceXformColorFilter
@ kConicalGradientShaderTexture
@ kLinearGradientShaderBuffer
@ kRadialGradientShaderTexture
static constexpr int kNoChildren
const char * BlendFuncName(SkBlendMode mode)