As noticed in the TODO in #130779, it was possible to make the parameters in applyHorizontalScale()/VerticalScale() const refs if small changes were made on the derived classes (e.g. SVGFilter).
Created attachment 227960 [details] Patch
Comment on attachment 227960 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227960&action=review Not sure why you are doing that. passing a reference to a float is not more or less expecive than passing the value itself. All the float references should be turned back to normal float arguments. > Source/WebCore/platform/graphics/filters/Filter.h:50 > + virtual float applyHorizontalScale(const float& value) const { return value * m_filterResolution.width(); } > + virtual float applyVerticalScale(const float& value) const { return value * m_filterResolution.height(); } there is no need to make the float a reference, it doesn't save anything. > Source/WebCore/svg/graphics/filters/SVGFilter.cpp:39 > +float SVGFilter::applyHorizontalScale(const float& value) const Ditto.
Dirk Thanks for the review. I have one question: const float would be ok?
Comment on attachment 227960 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227960&action=review >> Source/WebCore/platform/graphics/filters/Filter.h:50 >> + virtual float applyVerticalScale(const float& value) const { return value * m_filterResolution.height(); } > > there is no need to make the float a reference, it doesn't save anything. Nor a const float. The const doesn't add anything.
Created attachment 227964 [details] Patch
Gentlemen Thanks for the review. I agree that it won't fly, so I'm just renaming the bug title and simply removing the TODO comment.
Comment on attachment 227964 [details] Patch Clearing flags on attachment: 227964 Committed r166368: <http://trac.webkit.org/changeset/166368>
All reviewed patches have been landed. Closing bug.