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)
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Keywords: regression)
Attachments
(2 files)
1.12 KB,
patch
|
Details | Diff | Splinter Review | |
1.17 KB,
patch
|
drs
:
review+
|
Details | Diff | Splinter Review |
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
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #675500 -
Flags: review?(bugzilla)
Comment 2•12 years ago
|
||
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?
Assignee | ||
Comment 3•12 years ago
|
||
I don't know the resolution of them.
Comment 4•12 years ago
|
||
Doesn't
static_cast<gfx::Float>(mScrollOffset.x * LayersPixelsPerCSSPixel().width),
static_cast<gfx::Float>(mScrollOffset.y * LayersPixelsPerCSSPixel().height)
work?
Assignee | ||
Comment 5•12 years ago
|
||
still building ;-)
Assignee | ||
Comment 6•12 years ago
|
||
Attachment #675529 -
Flags: review?(bugzilla)
Assignee | ||
Comment 7•12 years ago
|
||
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 8•12 years ago
|
||
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+
Assignee | ||
Comment 9•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Target Milestone: --- → mozilla19
Comment 10•12 years ago
|
||
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.
Description
•