diff options
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h')
-rw-r--r-- | Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h b/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h index 774ccfdd3..00e850b83 100644 --- a/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h +++ b/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h @@ -44,6 +44,18 @@ public: void didSwapBuffers(); ShareableBitmap::Flags flags() const { return m_flags; } + void addTimeInactive(double seconds) + { + ASSERT(!isInUse()); + m_inactivityInSeconds += seconds; + } + bool isInactive() const + { + const double inactiveSecondsTolerance = 3; + return m_inactivityInSeconds > inactiveSecondsTolerance; + } + bool isInUse() const { return m_areaAllocator; } + private: void buildLayoutIfNeeded(); @@ -51,6 +63,7 @@ private: OwnPtr<GeneralAreaAllocator> m_areaAllocator; ShareableBitmap::Flags m_flags; RefPtr<ShareableSurface> m_surface; + double m_inactivityInSeconds; }; } |