RESOLVED FIXED 247033
Fix divide by zero warning in TextureMapperLayer
https://bugs.webkit.org/show_bug.cgi?id=247033
Summary Fix divide by zero warning in TextureMapperLayer
Don Olmstead
Reported 2022-10-25 16:14:59 PDT
....
Attachments
[fast-cq] Patch (1.38 KB, patch)
2022-10-25 17:34 PDT, Fujii Hironori
no flags
[fast-cq] Patch (1.37 KB, patch)
2022-10-25 18:55 PDT, Fujii Hironori
no flags
Don Olmstead
Comment 1 2022-10-25 16:20:50 PDT
Fujii Hironori
Comment 2 2022-10-25 17:16:51 PDT
WinCairo Release build is reporting the following warnings. > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(471) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(443) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(470) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(478) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(443) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(475) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(443) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(475) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(471) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(443) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(470) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(478) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(471) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(443) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(470) : warning C4723: potential divide by 0 > WebCore\platform\graphics\texmap\TextureMapperLayer.cpp(478) : warning C4723: potential divide by 0 I'm using 0 division intentionally here to get positive/negative inifity to represent a pont at inifity. But, I should admit it's a bad practice. I have a plan to re-write the code to precisely calculate the bounding box of transformed layer by 4x4 matix. I think we should align MSVC compiler warning as much as GC and Clang .
Fujii Hironori
Comment 3 2022-10-25 17:34:14 PDT
Created attachment 463244 [details] [fast-cq] Patch
Fujii Hironori
Comment 4 2022-10-25 18:30:07 PDT
(In reply to Fujii Hironori from comment #2) > I have a plan to re-write the code to precisely calculate the bounding box of transformed layer by 4x4 matix. Filed: Bug 247042 – TextureMapper: Calculate the bounding box of a layer transformed by 4x4 matrix precisely by intersecting with the viewport
Fujii Hironori
Comment 5 2022-10-25 18:55:27 PDT
Created attachment 463246 [details] [fast-cq] Patch
EWS
Comment 6 2022-10-25 18:58:43 PDT
Committed 255997@main (214a966eafad): <https://commits.webkit.org/255997@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 463246 [details].
Radar WebKit Bug Importer
Comment 7 2022-10-25 18:59:16 PDT
Note You need to log in before you can comment on or make changes to this bug.