diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /gfx/webrender_bindings/RenderThread.h | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/webrender_bindings/RenderThread.h')
-rw-r--r-- | gfx/webrender_bindings/RenderThread.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gfx/webrender_bindings/RenderThread.h b/gfx/webrender_bindings/RenderThread.h index aa508e5581..f9ab1e742e 100644 --- a/gfx/webrender_bindings/RenderThread.h +++ b/gfx/webrender_bindings/RenderThread.h @@ -14,6 +14,7 @@ #include "GLTypes.h" // for GLenum #include "nsISupportsImpl.h" #include "mozilla/gfx/Point.h" +#include "mozilla/Hal.h" #include "mozilla/MozPromise.h" #include "mozilla/DataMutex.h" #include "mozilla/Maybe.h" @@ -292,7 +293,8 @@ class RenderThread final { bool SyncObjectNeeded(); size_t RendererCount() const; - size_t ActiveRendererCount() const; + size_t ActiveRendererCount() const { return sActiveRendererCount; }; + void UpdateActiveRendererCount(); void BeginRecordingForWindow(wr::WindowId aWindowId, const TimeStamp& aRecordingStart, @@ -302,7 +304,13 @@ class RenderThread final { static void MaybeEnableGLDebugMessage(gl::GLContext* aGLContext); + void SetBatteryInfo(const hal::BatteryInformation& aBatteryInfo); + bool GetPowerIsCharging(); + private: + static size_t sRendererCount; + static size_t sActiveRendererCount; + enum class RenderTextureOp { PrepareForUse, NotifyForUse, @@ -434,6 +442,8 @@ class RenderThread final { std::map<wr::WindowId, UniquePtr<RendererOGL>> mRenderers; + DataMutex<Maybe<hal::BatteryInformation>> mBatteryInfo; + struct PendingFrameInfo { TimeStamp mStartTime; VsyncId mStartId; |