Closed
Bug 1357545
Opened 7 years ago
Closed 7 years ago
Handle text decoration
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: Gankra)
References
Details
(Whiteboard: [gfx-noted])
Attachments
(1 file, 1 obsolete file)
Currently we fail to use text layers when text decoration happens. This causes noticeable fallback when hover over links.
Updated•7 years ago
|
Whiteboard: [gfx-noted]
Reporter | ||
Comment 1•7 years ago
|
||
Our current thoughts for the way forward here is to change nsDisplayText::RenderToContext to take a new TextPainter class instead of a gfxContext. The TextPainter would wrap a DrawTarget like gfxContext currently does and either forward commands through to the DrawTarget or record the needed information for use by WebRender. A good first step would probably be to just replace the gfxContext with a TextPainter class that has a more DrawTarget like API. This way we avoid having to use the gfxContext wrapper in the first place.
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → a.beingessner
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•7 years ago
|
||
Hey [:jrmuizel], here's the changes mostly cleaned up and ready to go. The first patch is the real work, the second patch is just a temporary thing to be replaced by a proper WR update. There's a few TODO's left in the patch that I'd like to address, but I'd rather get feedback on the design first before progressing. I expect a few of these might be left in the final submission as follow-up work. Discussing with glennw, it looks like we're going to push forward with native text-decoration support as an immediate follow-up, so I'll be hacking away in this code some more after this patch. Also: not sure if these changes are at all visible to any of the testing bots?
Comment 5•7 years ago
|
||
(In reply to Alexis Beingessner [:Gankro] from comment #4) > Also: not sure if these changes are at all visible to any of the testing > bots? Not unless you push to try.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Updated•7 years ago
|
Priority: -- → P3
Updated•7 years ago
|
Blocks: stage-wr-nightly
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8885509 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8885508 -
Flags: review?(jfkthame)
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8885508 [details] Bug 1357545 - handle text-shadows/decorations with webrender (layers-free) https://reviewboard.mozilla.org/r/156382/#review174880 This seems like it should be OK, but webrender and layers and all that is pretty much foreign territory to me. So consider this "feedback+", but Jeff should do the real review. ::: layout/generic/TextDrawTarget.h:76 (Diff revision 3) > + // Prevent this from being copied > + TextDrawTarget(const TextDrawTarget& src) = delete; > + TextDrawTarget& operator=(const TextDrawTarget&) = delete; > + > + // Change the phase of text we're drawing. > + void StartDrawing(Phase aPhase) { mCurrentlyDrawing = aPhase; } As a sanity-check, might be worth asserting here that we're not attempting to draw a phase out of order? ::: layout/generic/TextDrawTarget.h:94 (Diff revision 3) > + > + // Make sure we're only given color patterns > + MOZ_RELEASE_ASSERT(aPattern.GetType() == PatternType::COLOR); > + const ColorPattern* colorPat = static_cast<const ColorPattern*>(&aPattern); > + > + // Grab the font, make sure it's the same one we've always seen The second part of this comment doesn't seem to be correct. ::: layout/generic/TextDrawTarget.h:231 (Diff revision 3) > + // We wrap a gfxContext now, but we aspire to only use DrawTarget. > + // gfxContext* mContext; We wrap a commented-out gfxContext? :) ::: layout/generic/nsTextFrame.cpp:5184 (Diff revision 3) > + mTextDrawer->GetBeforeDecorations().Length() > 0 || > + mTextDrawer->GetAfterDecorations().Length() > 0) { > - return mozilla::LAYER_NONE; > + return mozilla::LAYER_NONE; > -} > + } > > + // Most only have one font (multiple colors is fine) typo, s/Most/Must/
Attachment #8885508 -
Flags: review?(jfkthame)
Reporter | ||
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8885508 [details] Bug 1357545 - handle text-shadows/decorations with webrender (layers-free) https://reviewboard.mozilla.org/r/156382/#review175042
Attachment #8885508 -
Flags: review?(jmuizelaar) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 13•7 years ago
|
||
try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=25537c6402bcb9bdfd58d41c518539fb0ca4056d&selectedJob=123971813
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Comment 14•7 years ago
|
||
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/564959d26e8d handle text-shadows/decorations with webrender (layers-free) r=jrmuizel
Keywords: checkin-needed
Comment 15•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/564959d26e8d
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•