[CoordinatedGraphics] The compositing loop is still running even after exiting AC...
[WebKit-https.git] / Source / WebKit / WebProcess / WebPage / CoordinatedGraphics / LayerTreeHost.cpp
index aa2a033..ad16b6c 100644 (file)
@@ -106,11 +106,13 @@ void LayerTreeHost::setLayerFlushSchedulingEnabled(bool layerFlushingEnabled)
     m_layerFlushSchedulingEnabled = layerFlushingEnabled;
 
     if (m_layerFlushSchedulingEnabled) {
+        m_compositor->resume();
         scheduleLayerFlush();
         return;
     }
 
     cancelPendingLayerFlush();
+    m_compositor->suspend();
 }
 
 void LayerTreeHost::setShouldNotifyAfterNextScheduledLayerFlush(bool notifyAfterScheduledLayerFlush)
@@ -248,11 +250,13 @@ void LayerTreeHost::sizeDidChange(const IntSize& size)
 void LayerTreeHost::pauseRendering()
 {
     m_isSuspended = true;
+    m_compositor->suspend();
 }
 
 void LayerTreeHost::resumeRendering()
 {
     m_isSuspended = false;
+    m_compositor->resume();
     scheduleLayerFlush();
 }