Closed
Bug 1211324
Opened 9 years ago
Closed 9 years ago
Remove GraphicsFilter
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
6.47 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
893 bytes,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
10.56 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
44.57 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
82.66 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
It should be possible to remove GraphicsFilter and replace all its uses with gfx::Filter. Though there's some weirdness that needs to be resolved first...
Assignee | ||
Comment 1•9 years ago
|
||
These aren't used meaningfully.
Attachment #8669500 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 2•9 years ago
|
||
The conversions from GraphicsFilter to gfx::Filter and back (in ToFilter() and ThebesFilter()) are screwy: - FILTER_NEAREST <--> POINT - FILTER_GOOD --> GOOD --> FILTER_BEST (not FILTER_GOOD!) - FILTER_{FAST,BEST} --> LINEAR --> FILTER_BEST - FILTER_FAST --> LINEAR --> FILTER_BEST Without knowing anything of the broader context, one way to fix it up might be the following: - Make FILTER_GOOD <--> GOOD. - Remove FILTER_FAST and replace it throughout with FILTER_BEST; even though that is conceptually weird it's what the current code effectively does. Then there would be a 1-to-1 correspondence between GraphicsFilter and gfx::Filter and removing the former would be easy. mattwoodrow: please tell me what I have gotten wrong about this :)
Flags: needinfo?(matt.woodrow)
Updated•9 years ago
|
Attachment #8669500 -
Flags: review?(matt.woodrow) → review+
Comment 3•9 years ago
|
||
I agree, that sounds like the right plan of action.
Flags: needinfo?(matt.woodrow)
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8670035 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 5•9 years ago
|
||
This may sound like an odd change but it's what the current code effectively already does due to the way ToFilter() and ThebesFilter() are defined.
Attachment #8670039 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 6•9 years ago
|
||
The conversion is as follows: - GraphicsFilter::FILTER_NEAREST == gfx::Filter::POINT - GraphicsFilter::FILTER_GOOD == gfx::Filter::GOOD - GraphicsFilter::FILTER_BEST == gfx::Filter::LINEAR Also typedef GraphicsFilter to gfx::Filter; this will be removed in the next patch. These changes mean ToFilter() and ThebesFilter() are no longer needed.
Attachment #8670045 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 7•9 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #6) > Created attachment 8670045 [details] [diff] [review] > (part 4) - Replace GraphicsFilter constants with gfx::Filter equivalents > After this patch, in nsLayoutUtils::GetGraphicsFilterForFrame() we end up using Filter::LINEAR for both NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED and NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY. Maybe Filter::POINT would be better for the OPTIMIZESPEED case?
Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8670047 -
Flags: review?(matt.woodrow)
Updated•9 years ago
|
Attachment #8670035 -
Flags: review?(matt.woodrow) → review+
Comment 9•9 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #7) > (In reply to Nicholas Nethercote [:njn] from comment #6) > > Created attachment 8670045 [details] [diff] [review] > > (part 4) - Replace GraphicsFilter constants with gfx::Filter equivalents > > > > After this patch, in nsLayoutUtils::GetGraphicsFilterForFrame() we end up > using Filter::LINEAR for both NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED and > NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY. > > Maybe Filter::POINT would be better for the OPTIMIZESPEED case? That sounds like the right thing to do. It's possible that it'll change rendering and make reftests fail, will need a try run.
Updated•9 years ago
|
Attachment #8670039 -
Flags: review?(matt.woodrow) → review+
Updated•9 years ago
|
Attachment #8670045 -
Flags: review?(matt.woodrow) → review+
Updated•9 years ago
|
Attachment #8670047 -
Flags: review?(matt.woodrow) → review+
Assignee | ||
Comment 10•9 years ago
|
||
Thank you for the fast reviews.
Comment 11•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7379c6bce682 https://hg.mozilla.org/integration/mozilla-inbound/rev/6b027441cbee https://hg.mozilla.org/integration/mozilla-inbound/rev/3897da20e42d https://hg.mozilla.org/integration/mozilla-inbound/rev/a7cd4d58ea9e https://hg.mozilla.org/integration/mozilla-inbound/rev/e1fe3d531b96
https://hg.mozilla.org/mozilla-central/rev/7379c6bce682 https://hg.mozilla.org/mozilla-central/rev/6b027441cbee https://hg.mozilla.org/mozilla-central/rev/3897da20e42d https://hg.mozilla.org/mozilla-central/rev/a7cd4d58ea9e https://hg.mozilla.org/mozilla-central/rev/e1fe3d531b96
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•