Bug 1550504 - Add pref to allow slow frames logging, disabled by default. r=jrmuizel

Differential Revision: https://phabricator.services.mozilla.com/D30508
This commit is contained in:
Andrew Osmond 2019-05-09 10:57:57 -04:00
Родитель 116a9d80ed
Коммит 672a591e29
3 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -3167,6 +3167,10 @@ class FrameStatsComparator {
};
void gfxPlatform::NotifyFrameStats(nsTArray<FrameStats>&& aFrameStats) {
if (!gfxPrefs::LoggingSlowFramesEnabled()) {
return;
}
FrameStatsComparator comp;
for (FrameStats& f : aFrameStats) {
mFrameStats.InsertElementSorted(f, comp);

Просмотреть файл

@ -507,6 +507,7 @@ class gfxPrefs final {
// The maximums here are quite conservative, we can tighten them if problems show up.
DECL_GFX_PREF(Once, "gfx.logging.texture-usage.enabled", GfxLoggingTextureUsageEnabled, bool, false);
DECL_GFX_PREF(Once, "gfx.logging.peak-texture-usage.enabled",GfxLoggingPeakTextureUsageEnabled, bool, false);
DECL_GFX_PREF(Once, "gfx.logging.slow-frames.enabled", LoggingSlowFramesEnabled, bool, false);
// Use gfxPlatform::MaxAllocSize instead of the pref directly
DECL_GFX_PREF(Once, "gfx.max-alloc-size", MaxAllocSizeDoNotUseDirectly, int32_t, (int32_t)500000000);
// Use gfxPlatform::MaxTextureSize instead of the pref directly

Просмотреть файл

@ -884,6 +884,7 @@ pref("gfx.draw-color-bars", false);
pref("gfx.logging.painted-pixel-count.enabled", false);
pref("gfx.logging.texture-usage.enabled", false);
pref("gfx.logging.peak-texture-usage.enabled", false);
pref("gfx.logging.slow-frames.enabled", false);
pref("gfx.ycbcr.accurate-conversion", false);