Closed Bug 805761 Opened 12 years ago Closed 12 years ago

FrameMetrics.h(89) : warning C4244: 'argument' : conversion from 'gfxFloat' to 'mozilla::gfx::Float', possible loss of data

Categories

(Core :: Graphics: Layers, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: regression)

Attachments

(2 files)

I can see a lot of this warning with VC. FrameMetrics.h(89) : warning C4244: 'argument' : conversion from 'gfxFloat' to 'mozilla::gfx::Float', possible loss of data
Attached patch PatchSplinter Review
Attachment #675500 - Flags: review?(bugzilla)
Comment on attachment 675500 [details] [diff] [review] Patch >+ mScrollOffset.x * >+ static_cast<gfx::Float>(LayersPixelsPerCSSPixel().width), >+ mScrollOffset.y * >+ static_cast<gfx::Float>(LayersPixelsPerCSSPixel().height)); Is it OK to lose precision before multiplying?
I don't know the resolution of them.
Doesn't static_cast<gfx::Float>(mScrollOffset.x * LayersPixelsPerCSSPixel().width), static_cast<gfx::Float>(mScrollOffset.y * LayersPixelsPerCSSPixel().height) work?
still building ;-)
Comment on attachment 675500 [details] [diff] [review] Patch Both patches work fine, so, the other patch should be used for supporting higher resolution.
Attachment #675500 - Flags: review?(bugzilla)
Comment on attachment 675529 [details] [diff] [review] Alternative Patch Review of attachment 675529 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/FrameMetrics.h @@ +86,5 @@ > gfx::Point GetScrollOffsetInLayerPixels() const > { > + return gfx::Point( > + static_cast<gfx::Float>(mScrollOffset.x * > + LayersPixelsPerCSSPixel().width), Put this on one line please, like this: static_cast<gfx::Float>( mScrollOffset.x * LayersPixelsPerCSSPixel().width),
Attachment #675529 - Flags: review?(bugzilla) → review+
Target Milestone: --- → mozilla19
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: