RESOLVED FIXED 68722
Implicit conversion double to float in ShadowBlur::adjustBlurRadius
https://bugs.webkit.org/show_bug.cgi?id=68722
Summary Implicit conversion double to float in ShadowBlur::adjustBlurRadius
Julien Chaffraix
Reported 2011-09-23 13:17:04 PDT
This is making the Intel Mac Debug bot bad. Let's make add an explicit conversion to calm the bots.
Attachments
Proposed build fix: add 2 variables with the proper cast. (1.52 KB, patch)
2011-09-23 13:20 PDT, Julien Chaffraix
no flags
fix 2.... (1.43 KB, patch)
2011-09-23 13:42 PDT, Julien Chaffraix
no flags
Julien Chaffraix
Comment 1 2011-09-23 13:20:45 PDT
Created attachment 108524 [details] Proposed build fix: add 2 variables with the proper cast.
Simon Fraser (smfr)
Comment 2 2011-09-23 13:29:59 PDT
Comment on attachment 108524 [details] Proposed build fix: add 2 variables with the proper cast. I think m_blurRadius.scale(1 / static_cast<float>(transform.xScale()), 1 / static_cast<float>(transform.yScale())); would be better.
Julien Chaffraix
Comment 3 2011-09-23 13:42:29 PDT
Created attachment 108528 [details] fix 2....
Darin Adler
Comment 4 2011-09-23 15:43:41 PDT
Rather than a cast we could use narrowPrecisionToFloat next time.
Simon Fraser (smfr)
Comment 5 2011-09-23 15:48:33 PDT
We're not consistent about using narrowPrecisionToFloat(). It seems to have little value. narrowPrecisionToCGFloat, on the other hand, has obvious value.
WebKit Review Bot
Comment 6 2011-09-23 16:11:00 PDT
Comment on attachment 108528 [details] fix 2.... Clearing flags on attachment: 108528 Committed r95879: <http://trac.webkit.org/changeset/95879>
WebKit Review Bot
Comment 7 2011-09-23 16:11:05 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 8 2011-09-23 20:33:01 PDT
(In reply to comment #5) > We're not consistent about using narrowPrecisionToFloat(). It seems to have little value. It has value in that you can easily see at the call site that it's not some other kind of static_cast, say from int to float. > narrowPrecisionToCGFloat, on the other hand, has obvious value. What value over calling static_cast<CGFloat>? The two situations seem entirely analogous to me.
Simon Fraser (smfr)
Comment 9 2011-09-23 20:38:39 PDT
(In reply to comment #8) > (In reply to comment #5) > > We're not consistent about using narrowPrecisionToFloat(). It seems to have little value. > > It has value in that you can easily see at the call site that it's not some other kind of static_cast, say from int to float. Then we should use it more consistently! > > narrowPrecisionToCGFloat, on the other hand, has obvious value. > > What value over calling static_cast<CGFloat>? The two situations seem entirely analogous to me. Now that I think about it, you're right. I was thinking that it eliminated some float/double confusion.
David Harrison
Comment 10 2011-09-27 13:33:51 PDT
Note You need to log in before you can comment on or make changes to this bug.