WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:287:21: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value] return std::max(fabsf(decomposeData.scaleX), fabsf(decomposeData.scaleY)); ^ WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:287:21: note: use function 'fabs' instead return std::max(fabsf(decomposeData.scaleX), fabsf(decomposeData.scaleY)); ^~~~~ fabs WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:287:50: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value] return std::max(fabsf(decomposeData.scaleX), fabsf(decomposeData.scaleY)); ^ WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:287:50: note: use function 'fabs' instead return std::max(fabsf(decomposeData.scaleX), fabsf(decomposeData.scaleY)); ^~~~~ fabs 2 errors generated.
Created attachment 226832 [details] Patch v1
Comment on attachment 226832 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=226832&action=review > Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:287 > + return std::max(fabsf(static_cast<float>(decomposeData.scaleX)), fabsf(static_cast<float>(decomposeData.scaleY))); I’d really prefer we use syntax cast for casting double to float that would not also work to convert, say, int to float.
Comment on attachment 226832 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=226832&action=review >> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:287 >> + return std::max(fabsf(static_cast<float>(decomposeData.scaleX)), fabsf(static_cast<float>(decomposeData.scaleY))); > > I’d really prefer we use syntax cast for casting double to float that would not also work to convert, say, int to float. Seems like we have it! It’s called narrowPrecisionToFloat.
Comment on attachment 226832 [details] Patch v1 Clearing flags on attachment: 226832 Committed r165693: <http://trac.webkit.org/changeset/165693>
All reviewed patches have been landed. Closing bug.
Reopening for follow-up patch to switch to using narrowPrecisionToFloat() instead.
Created attachment 226850 [details] Patch for follow-up issue
Comment on attachment 226850 [details] Patch for follow-up issue Clearing flags on attachment: 226850 Committed r165711: <http://trac.webkit.org/changeset/165711>