Closed
Bug 1422466
Opened 7 years ago
Closed 7 years ago
Drop a copy from TextDrawTarget::FillGlyphs
Categories
(Core :: Graphics: WebRender, enhancement, P1)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: jrmuizel, NeedInfo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [wr-mvp])
Attachments
(1 file, 1 obsolete file)
After bug 1422414 the loop basically just does a memcpy. We can just skip it if we pretend the types are the same.
Assignee | ||
Comment 1•7 years ago
|
||
We should try harder to ensure that the types are the same.
Assignee: nobody → jmuizelaar
Updated•7 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [wr-reserve]
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8933864 -
Attachment is obsolete: true
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8933919 [details]
Bug 1422466. Drop a copy from TextDrawTarget::FillGlyphs.
https://reviewboard.mozilla.org/r/204840/#review210398
::: layout/generic/TextDrawTarget.h:124
(Diff revision 2)
> -
> - for (size_t i = 0; i < aBuffer.mNumGlyphs; i++) {
> - wr::GlyphInstance& targetGlyph = glyphs[i];
> - const gfx::Glyph& sourceGlyph = aBuffer.mGlyphs[i];
> - targetGlyph.index = sourceGlyph.mIndex;
> - targetGlyph.point = mSc.ToRelativeLayoutPoint(
> +
> + // Compare gfx::Glyph and wr::GlyphInstance to make sure that they are
> + // structurally equivalent to ensure that our cast above was ok
> + static_assert(std::is_same<decltype(aBuffer.mGlyphs[0].mIndex), decltype(glyphs[0].index)>()
> + && std::is_same<decltype(aBuffer.mGlyphs[0].mPosition.x), decltype(glyphs[0].point.x)>()
> + && std::is_same<decltype(aBuffer.mGlyphs[0].mPosition.y), decltype(glyphs[0].point.y)>()
This is supposed to move the glyphs from global space to local space by applying the the stacking context's offset. Do you have a reason to believe this must always be 0?
Attachment #8933919 -
Flags: review?(a.beingessner) → review-
Comment 5•7 years ago
|
||
Yeah, see https://bugzilla.mozilla.org/show_bug.cgi?id=1422414. The stacking context offset is always zero now (and has been for a little while).
Comment 6•7 years ago
|
||
Ah, great!
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8933919 [details]
Bug 1422466. Drop a copy from TextDrawTarget::FillGlyphs.
https://reviewboard.mozilla.org/r/204840/#review210426
Attachment #8933919 -
Flags: review- → review+
Updated•7 years ago
|
Whiteboard: [wr-reserve] → [wr-mvp]
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/719224b9a2dd
Drop a copy from TextDrawTarget::FillGlyphs. r=Gankro
Comment 9•7 years ago
|
||
Backed out 1 changesets (bug 1422466) for build bustage on a CLOSED TREE
Push with bustage: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=719224b9a2dd25180b4fe58d039dc91d9c579259
Backout: https://hg.mozilla.org/integration/autoland/rev/5a71560d58db074a628624d99f12d84e0d2d07b7
Log: https://treeherder.mozilla.org/logviewer.html#?job_id=149443565&repo=autoland&lineNumber=17299
03:35:32 INFO - z:/build/build/src/gfx/layers/wr/WebRenderBridgeChild.cpp(297): error C2039: 'IsEmpty': is not a member of 'mozilla::Range<const mozilla::wr::GlyphInstance>'
03:35:32 INFO - z:\build\build\src\obj-firefox\dist\include\mozilla/webrender/WebRenderAPI.h(393): note: see declaration of 'mozilla::Range<const mozilla::wr::GlyphInstance>'
03:35:32 INFO - z:/build/build/src/gfx/layers/wr/WebRenderBridgeChild.cpp(297): error C2955: 'mozilla::detail::AssertionConditionType': use of class template requires template argument list
03:35:32 INFO - z:\build\build\src\obj-firefox\dist\include\mozilla/Assertions.h(396): note: see declaration of 'mozilla::detail::AssertionConditionType'
03:35:32 INFO - z:/build/build/src/gfx/layers/wr/WebRenderBridgeChild.cpp(297): error C2057: expected constant expression
03:35:32 INFO - z:/build/build/src/config/rules.mk:1028: recipe for target 'Unified_cpp_gfx_layers11.obj' failed
03:35:32 INFO - mozmake.EXE[4]: *** [Unified_cpp_gfx_layers11.obj] Error 2
03:35:32 INFO - mozmake.EXE[4]: Leaving directory 'z:/build/build/src/obj-firefox/gfx/layers'
03:35:32 INFO - mozmake.EXE[4]: *** Waiting for unfinished jobs....
03:35:32 INFO - mozmake.EXE[4]: Entering directory 'z:/build/build/src/obj-firefox/dom/base'
03:35:32 INFO - mozmake.EXE[4]: Leaving directory 'z:/build/build/src/obj-firefox/dom/base'
Flags: needinfo?(jmuizelaar)
Comment 10•7 years ago
|
||
wrong-bug |
Backed out 1 changesets (bug 1422466) for bustage on a CLOSED TREE
Failure push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=7a2629417a4707f15b8c35c8fccecee530904e73
Backout: https://hg.mozilla.org/integration/autoland/rev/8295eb601d27dbb4aaa15d879bc9795a200789ee
Log: https://hg.mozilla.org/integration/autoland/rev/8295eb601d27dbb4aaa15d879bc9795a200789ee
Flags: needinfo?(cpearce)
Updated•7 years ago
|
Blocks: stage-wr-nightly
Comment 11•7 years ago
|
||
Comment 10 is really for bug 1422662, not this bug.
Flags: needinfo?(cpearce)
Comment 12•7 years ago
|
||
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7edd58cc444f
Drop a copy from TextDrawTarget::FillGlyphs. r=Gankro
Comment 13•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Updated•2 years ago
|
Blocks: wr-displaylist-perf
You need to log in
before you can comment on or make changes to this bug.
Description
•