Closed
Bug 1152838
Opened 10 years ago
Closed 10 years ago
BaseRect::InflateToMultiple is wrong, and we're not using it and instead inflating everything by the tile size (not to snapping to tile boundaries, as intended)
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla40
| Tracking | Status | |
|---|---|---|
| firefox40 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
Details
Attachments
(2 files, 1 obsolete file)
Heh.
| Assignee | ||
Comment 1•10 years ago
|
||
Oh, we're not inflating by the tile size, we're just not clipping the one-pixel inflation to tiles. So it's less bad than I first thought.
| Assignee | ||
Comment 2•10 years ago
|
||
> x = static_cast<T>(floor(x / aMultiple.width)) * aMultiple.width;
> y = static_cast<T>(floor(y / aMultiple.height)) * aMultiple.height;
> xMost = static_cast<T>(ceil(x / aMultiple.width)) * aMultiple.width;
> yMost = static_cast<T>(ceil(y / aMultiple.height)) * aMultiple.height;
There are two problems with this code:
1. It's using integer division, if the rect is an nsIntRect. So floor / ceil do nothing.
2. The snapped xMost and yMost are computed from x / y instead of from xMost / yMost.
| Assignee | ||
Comment 3•10 years ago
|
||
/r/6801 - Bug 1152838 - Fix BaseRect::InflateToMultiple and move it to nsIntRect. r=mattwoodrow, r=jrmuizel
/r/6803 - Bug 1152838 - Correctly inflate valid regions to tile boundaries. r=mattwoodrow
Pull down these commits:
hg pull -r d8025ebb54d0852b19cf1bcbd0b9247283c0dd46 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8590470 -
Flags: review?(matt.woodrow)
Attachment #8590470 -
Flags: review?(jmuizelaar)
Comment 4•10 years ago
|
||
https://reviewboard.mozilla.org/r/6801/#review5703
Ship It!
::: gfx/2d/NumericTools.h
(Diff revision 1)
> + // to optimize.
And slower.
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
| Assignee | ||
Comment 7•10 years ago
|
||
Comment 8•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/304252ab0165
https://hg.mozilla.org/mozilla-central/rev/1e271824dcca
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Updated•10 years ago
|
Attachment #8590470 -
Flags: review?(jmuizelaar) → review+
| Assignee | ||
Updated•10 years ago
|
Attachment #8590470 -
Flags: review?(matt.woodrow)
| Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8590470 -
Attachment is obsolete: true
Attachment #8620007 -
Flags: review+
Attachment #8620008 -
Flags: review+
| Assignee | ||
Comment 10•10 years ago
|
||
| Assignee | ||
Comment 11•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•