Closed
Bug 996108
Opened 11 years ago
Closed 10 years ago
Skia does not seem to have translation invariant rasterization
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: jrmuizel, Assigned: jrmuizel)
References
Details
(Whiteboard: [skia-upstream])
Attachments
(4 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
This shows up in a bunch of reftests. I have no idea why yet.
Assignee | ||
Comment 1•11 years ago
|
||
Comment 3•11 years ago
|
||
(In reply to Benoit Jacob [:bjacob] from comment #2)
> What does the spec say about float-to-int casting?
Section 4.9, "Floating-integral conversions", paragraph 1: "... The conversion truncates; that is, the fractional part is discarded. The behavior is undefined if the truncated value cannot be represented in the destination type,"
Is this what you were looking for?
Flags: needinfo?(botond)
Comment 4•11 years ago
|
||
We probably want to use Skia's built in macros for converting. SkScalar{Round,Ceil,Floor}ToInt(), depending on what behaviour we explicitly want.
Comment 5•11 years ago
|
||
Thanks Botond, so IIUC this is rounding towards zero.
Assignee | ||
Comment 6•11 years ago
|
||
The right thing to do here is likely to something like cairo's _cairo_fixed_from_double:
http://cgit.freedesktop.org/cairo/tree/src/cairo-fixed-private.h#n111
That way we can be more correct and have more speed.
Assignee | ||
Updated•11 years ago
|
Blocks: skia-reftest
Assignee | ||
Comment 7•11 years ago
|
||
I haven't tested this but it should be faster and more correct than previous patch and upstream skia code.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jmuizelaar
Assignee | ||
Comment 9•11 years ago
|
||
This patch seems to cause assertion failures on some tests...
Assignee | ||
Comment 10•11 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #9)
> This patch seems to cause assertion failures on some tests...
Turns out these seemed to be caused by a conflict with the SkScalarToFDot6 macro in the same file.
Comment 11•11 years ago
|
||
I already fixed that issue locally and also on the graphics branch which I'm using to track progress: https://tbpl.mozilla.org/?tree=Graphics
Comment 12•11 years ago
|
||
Mike and I agreed on "SkScalarRoundToFDot6()"
Updated•11 years ago
|
Whiteboard: [skia-upstream]
Comment 13•11 years ago
|
||
Comment 14•10 years ago
|
||
Rubber stamp for importing this from upstream?
Attachment #8482803 -
Flags: review?(jmuizelaar)
Comment 15•10 years ago
|
||
Attachment #8482804 -
Flags: review?(jmuizelaar)
Assignee | ||
Updated•10 years ago
|
Attachment #8482803 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Updated•10 years ago
|
Attachment #8482804 -
Flags: review?(jmuizelaar) → review+
Comment 16•10 years ago
|
||
Comment 17•10 years ago
|
||
Oops, a bunch of my other patches got caught up in that.
Comment 18•10 years ago
|
||
OK, I think this is correct now: https://tbpl.mozilla.org/?tree=Try&rev=247713774a59
Comment 19•10 years ago
|
||
Comment 20•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ce39df5dccdb
https://hg.mozilla.org/mozilla-central/rev/c8d299030e1d
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in
before you can comment on or make changes to this bug.
Description
•