Closed
Bug 796174
Opened 13 years ago
Closed 13 years ago
Don't use high-quality scaler for non-downscales
Categories
(Core :: Graphics: 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•13 years ago
|
Assignee: nobody → joe
Comment 1•13 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•13 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•13 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•13 years ago
|
||
status-firefox18:
--- → fixed
Target Milestone: --- → mozilla18
![]() |
Assignee | |
Comment 5•13 years ago
|
||
Comment 6•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•