Manually set fFilterValues in SkConvolutionFilter1D.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 6 Mar 2014 14:57:46 +0000 (14:57 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 6 Mar 2014 14:57:46 +0000 (14:57 +0000)
commit5b70e7e2df94410e7e3ceeb6e54f4ebe72b87b7d
treee5de3339e0331046156c6ccdb8824e4c0a45b6d1
parent759cf4846804be137229393e04925752423de2d0
Manually set fFilterValues in SkConvolutionFilter1D.

Using fFilterValues.reset() or a loop of fFilterValues.push_back() is about 5x slower than calling fFilterValues.resize_back() and then looping using primitive [] and =.

This is only going to show up if you apply https://codereview.chromium.org/183763047/, where it yields about 2.5% speedup in the bitmap resize microbenchmarks on a Linux desktop. Ceteris paribus, it should actually improve rasterization time of drawBitmapRectToRect() with a resize by about 5% in Chromium.

BUG=skia:2258
R=humper@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/184323003

git-svn-id: http://skia.googlecode.com/svn/trunk@13681 2bbb7eff-a529-9590-31e7-b0007b416f81
src/core/SkConvolver.cpp