Clean up layers logging code
Categories
(Core :: Graphics: Layers, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: kats, Assigned: kats)
References
Details
Attachments
(5 files)
We have a bunch of stuff in LayersLogging.* that knows how to stringify various types and structs for debug-printing. It's a bit inconsistent though and having this code centralized in LayersLogging.* rather than embedded in the individual classes/structs seems odd.
I would like to make it so that each struct that we care about logging has a built-in function that can serialize itself to an ostream
. This seems like a quasi-standard way of doing things, in that the gtest framework will look for such a mechanism to print structures on failed assertions.
The gfx/2d code already has this in some places so I'm just proposing we use that consistently everywhere instead of having to pick one of the many places we have to generate logging.
Assignee | ||
Comment 1•4 years ago
|
||
As a bonus it would be nice to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1334042 so MOZ_LOG can then take these structs directly in a streaming style.
Comment 2•4 years ago
|
||
Note that we have a ToString()
function which uses operator<<
, similar to the way Stringify
uses the LayersLogging AppendToString
functions. As part of this cleanup, we may want to unify the two.
Assignee | ||
Comment 3•4 years ago
|
||
Indeed. We should dump Stringify after this unification.
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Comment 5•4 years ago
|
||
Assignee | ||
Comment 6•4 years ago
|
||
This also adds all the missing flags to the serializer.
Depends on D93142
Assignee | ||
Comment 7•4 years ago
|
||
This also adds some missing types to the serializer.
Depends on D93143
Assignee | ||
Comment 8•4 years ago
|
||
Depends on D93144
Assignee | ||
Comment 9•4 years ago
|
||
The remaining functions are moved to be with their brethren in xpcom.
Depends on D93145
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1a3828a49bce
https://hg.mozilla.org/mozilla-central/rev/8722892ad618
https://hg.mozilla.org/mozilla-central/rev/ba47f161259a
https://hg.mozilla.org/mozilla-central/rev/5f57cee9e5d3
https://hg.mozilla.org/mozilla-central/rev/aa3bbbc5a7d3
Description
•