Bug 247033 - Fix divide by zero warning in TextureMapperLayer
Summary: Fix divide by zero warning in TextureMapperLayer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Don Olmstead
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-25 16:14 PDT by Don Olmstead
Modified: 2022-10-25 18:59 PDT (History)
7 users (show)

See Also:


Attachments
[fast-cq] Patch (1.38 KB, patch)
2022-10-25 17:34 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
[fast-cq] Patch (1.37 KB, patch)
2022-10-25 18:55 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Olmstead 2022-10-25 16:14:59 PDT
....
Comment 1 Don Olmstead 2022-10-25 16:20:50 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5787
Comment 2 Fujii Hironori 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 .
Comment 3 Fujii Hironori 2022-10-25 17:34:14 PDT
Created attachment 463244 [details]
[fast-cq] Patch
Comment 4 Fujii Hironori 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
Comment 5 Fujii Hironori 2022-10-25 18:55:27 PDT
Created attachment 463246 [details]
[fast-cq] Patch
Comment 6 EWS 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].
Comment 7 Radar WebKit Bug Importer 2022-10-25 18:59:16 PDT
<rdar://problem/101571279>