RESOLVED FIXED Bug 179924
Some FELighting cleanup
https://bugs.webkit.org/show_bug.cgi?id=179924
Summary Some FELighting cleanup
Simon Fraser (smfr)
Reported 2017-11-21 09:47:42 PST
Some FELighting cleanup
Attachments
Patch (22.20 KB, patch)
2017-11-21 09:49 PST, Simon Fraser (smfr)
sam: review+
Simon Fraser (smfr)
Comment 1 2017-11-21 09:49:44 PST
Sam Weinig
Comment 2 2017-11-21 15:22:22 PST
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.
Simon Fraser (smfr)
Comment 3 2017-11-21 17:03:02 PST
Radar WebKit Bug Importer
Comment 4 2017-11-21 17:10:34 PST
Darin Adler
Comment 5 2017-11-22 10:09:41 PST
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.
Note You need to log in before you can comment on or make changes to this bug.