1861 {
1863
1864
1865
1868
1869
1872 if (!algorithm) {
1873 return {};
1874 }
1875
1876
1878
1879
1881 LayerSpace<SkSize>({3.f*sigma.width(), 3.f*sigma.height()}).
ceil();
1882 auto maxOutput = fInputs[0].fImage.layerBounds();
1883 maxOutput.outset(radii);
1884
1885
1886
1887
1888
1889 const auto outputBounds = this->outputBounds(maxOutput);
1891 return {};
1892 }
1893
1894
1895
1896
1897 auto sampleBounds = outputBounds;
1898 sampleBounds.
outset(radii);
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909 FilterResult resolved = fInputs[0].fImage.resolve(fContext, sampleBounds);
1910 if (!resolved) {
1911 return {};
1912 }
1913
1914
1915
1916 auto srcRelativeOutput = outputBounds;
1917 srcRelativeOutput.
offset(-resolved.layerBounds().topLeft());
1919 resolved.fImage,
1924
1925
1926 return resolved;
1927}
virtual float maxSigma() const =0
virtual sk_sp< SkSpecialImage > blur(SkSize sigma, sk_sp< SkSpecialImage > src, const SkIRect &srcRect, SkTileMode tileMode, const SkIRect &dstRect) const =0
virtual const Algorithm * findAlgorithm(SkSize sigma, SkColorType colorType) const =0
virtual const SkBlurEngine * getBlurEngine() const =0
SkColorType colorType() const
const Backend * backend() const
LayerSpace< SkIPoint > topLeft() const
void outset(const LayerSpace< SkISize > &delta)
void offset(const LayerSpace< IVector > &v)
SIN Vec< N, float > ceil(const Vec< N, float > &x)
static constexpr SkIRect MakeSize(const SkISize &size)