[webkit-reviews] review granted: [Bug 231958] [GTK] Rewrite LowPowerModeNotifier to use GPowerProfileMonitor : [Attachment 441734] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 19 09:41:25 PDT 2021
Michael Catanzaro <mcatanzaro at gnome.org> has granted Patrick Griffis
<pgriffis at igalia.com>'s request for review:
Bug 231958: [GTK] Rewrite LowPowerModeNotifier to use GPowerProfileMonitor
https://bugs.webkit.org/show_bug.cgi?id=231958
Attachment 441734: Patch
https://bugs.webkit.org/attachment.cgi?id=441734&action=review
--- Comment #6 from Michael Catanzaro <mcatanzaro at gnome.org> ---
Comment on attachment 441734
--> https://bugs.webkit.org/attachment.cgi?id=441734
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=441734&action=review
This is nice.
> Source/WebCore/platform/LowPowerModeNotifier.h:65
> #elif USE(GLIB)
> - void updateWarningLevel();
> - void warningLevelChanged();
> - static void gPropertiesChangedCallback(LowPowerModeNotifier*, GVariant*
changedProperties);
> + static void powerSaverEnabledNotifyCallback(LowPowerModeNotifier*,
GParamSpec*, GPowerProfileMonitor*);
>
> - GRefPtr<GDBusProxy> m_displayDeviceProxy;
> - GRefPtr<GCancellable> m_cancellable;
> +#if GLIB_CHECK_VERSION(2, 69, 1)
> + GRefPtr<GPowerProfileMonitor> m_powerProfileMonitor;
> +#endif
> LowPowerModeChangeCallback m_callback;
> bool m_lowPowerModeEnabled { false };
Can you simplify things by doing #elif USE(GLIB) && GLIB_CHECK_VERSION(2, 69,
1) all in one condition? I bet it will turn out a little nicer. Ditto for the
.cpp file.
More information about the webkit-reviews
mailing list