summaryrefslogtreecommitdiffstats
path: root/gfx/ipc/GPUProcessManager.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /gfx/ipc/GPUProcessManager.h
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/ipc/GPUProcessManager.h')
-rw-r--r--gfx/ipc/GPUProcessManager.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gfx/ipc/GPUProcessManager.h b/gfx/ipc/GPUProcessManager.h
index bf5b7e6587..8b58d15b54 100644
--- a/gfx/ipc/GPUProcessManager.h
+++ b/gfx/ipc/GPUProcessManager.h
@@ -14,6 +14,7 @@
#include "mozilla/gfx/GPUProcessHost.h"
#include "mozilla/gfx/PGPUChild.h"
#include "mozilla/gfx/Point.h"
+#include "mozilla/Hal.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/TaskFactory.h"
#include "mozilla/layers/LayersTypes.h"
@@ -214,6 +215,7 @@ class GPUProcessManager final : public GPUProcessHost::Listener {
// Called from our xpcom-shutdown observer.
void OnXPCOMShutdown();
void OnPreferenceChange(const char16_t* aData);
+ void ScreenInformationChanged();
bool CreateContentCompositorManager(
base::ProcessId aOtherProcess, dom::ContentParentId aChildId,
@@ -309,6 +311,8 @@ class GPUProcessManager final : public GPUProcessHost::Listener {
DISALLOW_COPY_AND_ASSIGN(GPUProcessManager);
+ void NotifyBatteryInfo(const hal::BatteryInformation& aBatteryInfo);
+
class Observer final : public nsIObserver {
public:
NS_DECL_ISUPPORTS
@@ -322,10 +326,25 @@ class GPUProcessManager final : public GPUProcessHost::Listener {
};
friend class Observer;
+ class BatteryObserver final : public hal::BatteryObserver {
+ public:
+ NS_INLINE_DECL_REFCOUNTING(BatteryObserver)
+ explicit BatteryObserver(GPUProcessManager* aManager);
+
+ void Notify(const hal::BatteryInformation& aBatteryInfo) override;
+ void ShutDown();
+
+ protected:
+ virtual ~BatteryObserver();
+
+ GPUProcessManager* mManager;
+ };
+
private:
bool mDecodeVideoOnGpuProcess = true;
RefPtr<Observer> mObserver;
+ RefPtr<BatteryObserver> mBatteryObserver;
mozilla::ipc::TaskFactory<GPUProcessManager> mTaskFactory;
RefPtr<VsyncIOThreadHolder> mVsyncIOThread;
uint32_t mNextNamespace;