Make category colors an enum
Categories
(Core :: Gecko Profiler, defect, P2)
Tracking
()
People
(Reporter: mstange, Unassigned)
Details
The macros in ProfilingCategoryList.h currently use strings for the category color. However, only a fixed list of color names is available - that's because we want the front-end to pick the actual color value based on the devtools color palette.
It's easy to miss the fact that only certain values are allowed, and the color names look like CSS color names. It would be better to use an enum so that these mistakes can be avoided.
Reporter | ||
Comment 2•4 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #0)
we want the front-end to pick the actual color value based on the devtools color palette
I also think we've very much reached the limit of different colors that we want to show to the user.
Comment 3•4 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #2)
(In reply to Markus Stange [:mstange] from comment #0)
we want the front-end to pick the actual color value based on the devtools color palette
I also think we've very much reached the limit of different colors that we want to show to the user.
I think adding red (we already show that color for jank markers; we could also use it to indicate something in the category view) would be OK, and I would like to use it to highlight profiler overhead (see bug 1691092).
I could also see black being useful in the future (I was wondering if we might want to use it for time blocked on sync IPC).
And the idle category is "transparent", but actually shown as dark grey in the sidebar; I think we could also make that dark grey color available if needed in the future (the use case I had in mind is test harness code, to separate it from code that's actually part of the browser).
But otherwise, I agree that we've probably reached the maximum number of category colors for showing code that's running as part of the browser.
Description
•