rmistry@google.com 2014-03-06 15:37:53 +00:00
parent fd5c9a6e04
commit d7a9fcc61f

View File

@ -294,10 +294,8 @@ void SkConvolutionFilter1D::AddFilter(int filterOffset,
filterLength = lastNonZero + 1 - firstNonZero;
SkASSERT(filterLength > 0);
// Calling fFilterValues.reset(), or push_back() in a loop, are expensive.
fFilterValues.resize_back(filterLength);
for (int i = firstNonZero; i <= lastNonZero; i++) {
fFilterValues[i - firstNonZero] = filterValues[i];
fFilterValues.push_back(filterValues[i]);
}
} else {
// Here all the factors were zeroes.