74 {
75
76 float normalizedXOffset = kernelOffsetIn.
fX / 2.0f;
77 float normalizedYOffset = kernelOffsetIn.
fY / 2.0f;
78
80 switch (fKernelFixture) {
84
88 {3,3}, kernel.data(), 0.3f, 100.0f,
89 kernelOffset, tileMode, convolveAlpha, nullptr, tileBoundary);
90 }
94
96
100 {7,7}, kernel.data(), 0.3f, 100.0f,
101 kernelOffset, tileMode, convolveAlpha, nullptr, tileBoundary);
102 }
105
107 std::vector<float> kernel(128, 0.0f);
108 kernel[64] = 0.5f;
109 kernel[65] = -0.5f;
111 {128,1}, kernel.data(), 0.3f, 100.0f,
112 kernelOffset, tileMode, convolveAlpha, nullptr, tileBoundary);
113 }
116
118 std::vector<float> kernel(255, 0.0f);
119 kernel[126] = 0.5f;
120 kernel[128] = -0.5f;
122 {1,255}, kernel.data(), 0.3f, 100.0f,
123 kernelOffset, tileMode, convolveAlpha, nullptr, tileBoundary);
124 }
125 default:
126 return nullptr;
127 }
128 }
#define SkScalarRoundToInt(x)
static sk_sp< SkImageFilter > MatrixConvolution(const SkISize &kernelSize, const SkScalar kernel[], SkScalar gain, SkScalar bias, const SkIPoint &kernelOffset, SkTileMode tileMode, bool convolveAlpha, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static constexpr int kMaxBlurSamples