Closed
Bug 796174
Opened 8 years ago
Closed 8 years ago
Don't use high-quality scaler for non-downscales
Categories
(Core :: ImageLib, defect)
Tracking
()
RESOLVED
FIXED
mozilla18
| Tracking | Status | |
|---|---|---|
| firefox18 | --- | fixed |
People
(Reporter: joe, Assigned: joe)
Details
Attachments
(1 file)
|
1.13 KB,
patch
|
justin.lebar+bug
:
review+
|
Details | Diff | Splinter Review |
Right now we do a high-quality scale on unity scales. This is obviously wrong.
Attachment #666747 -
Flags: review?(justin.lebar+bug)
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → joe
Comment 1•8 years ago
|
||
Comment on attachment 666747 [details] [diff] [review] ensure only downscales are scaled Heh. I'm not sure what the extra function is buying us, but either way is fine. If you keep the function, can you mark it static or put it in an anonymous namespace?
Attachment #666747 -
Flags: review?(justin.lebar+bug) → review+
| Assignee | ||
Comment 2•8 years ago
|
||
I couldn't think of a clearer way to express "Only downscales" than having three conditions, and IME having a separate function is helpful when you start adding tons of conditions.
Comment 3•8 years ago
|
||
(In reply to Joe Drew (:JOEDREW! \o/) from comment #2) > I couldn't think of a clearer way to express "Only downscales" than having > three conditions, and IME having a separate function is helpful when you > start adding tons of conditions. I mean we already have a function saying "are we going to downscale this?", so if you wrote it as bool RasterImage::CanScale(gfxPattern::GraphicsFilter aFilter, gfxSize aScale) { // The high-quality scaler requires Skia. #ifdef MOZ_ENABLE_SKIA if (!gHQDownscaling || mAnim || !mDecoded || aFilter != gfxPattern::FILTER_GOOD ) { return false; } if (scale.width > 1.0 || scale.height > 1.0) { return false; } if (scale.width == 1.0 && scale.height == 1.0) { return false; } gfxFloat factor = gHQDownscalingMinFactor / 1000.0; return (aScale.width < factor || aScale.height < factor); #endif That would be plenty clear to me.
| Assignee | ||
Comment 4•8 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/629c399c6f8c
status-firefox18:
--- → fixed
Target Milestone: --- → mozilla18
| Assignee | ||
Comment 5•8 years ago
|
||
Backed out: https://hg.mozilla.org/integration/mozilla-inbound/rev/90332928696a and relanded: https://hg.mozilla.org/integration/mozilla-inbound/rev/6925601f4299
Comment 6•8 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6925601f4299
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•