summaryrefslogtreecommitdiffstats
path: root/gfx/webrender_bindings/RenderThread.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/webrender_bindings/RenderThread.h')
-rw-r--r--gfx/webrender_bindings/RenderThread.h12
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;