Some FELighting cleanup
Created attachment 327418 [details] Patch
Comment on attachment 327418 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=327418&action=review I continue to wish we had a vector type as IntSize is weird. I can't remember why we don't have one. Is it because we don't want another type representing a pair of ints? Or is it naming? Or something else. > Source/WebCore/platform/graphics/filters/FELighting.cpp:95 > +inline IntSize FELighting::LightingData::topLeftNormal(int offset) const I wish we had a better type for this type of vector.
https://trac.webkit.org/r225088
<rdar://problem/35661516>
Comment on attachment 327418 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=327418&action=review > Source/WebCore/platform/graphics/filters/FELighting.cpp:248 > + normalVector.setX(factorX * static_cast<float>(normal2DVector.width()) * data.surfaceScale); > + normalVector.setY(factorY * static_cast<float>(normal2DVector.height()) * data.surfaceScale); The typecast to float here seems unnecessary. I expect the compiler can handle float * int * float -> float without a typecast.