[CoordinatedGraphics] invisible webview should not paint the content
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebPage / CoordinatedGraphics / CoordinatedDrawingArea.cpp
index f74e800..e551728 100644 (file)
@@ -69,12 +69,15 @@ CoordinatedDrawingArea::CoordinatedDrawingArea(WebPage& webPage, const WebPageCr
     , m_compositingAccordingToProxyMessages(false)
     , m_layerTreeStateIsFrozen(false)
     , m_wantsToExitAcceleratedCompositingMode(false)
-    , m_isPaintingSuspended(!(parameters.viewState & ViewState::IsVisible))
+    , m_isPaintingSuspended(false)
     , m_displayTimer(RunLoop::main(), this, &CoordinatedDrawingArea::displayTimerFired)
     , m_exitCompositingTimer(RunLoop::main(), this, &CoordinatedDrawingArea::exitAcceleratedCompositingMode)
 {
     // Always use compositing in CoordinatedGraphics
     enterAcceleratedCompositingMode(0);
+
+    if (!(parameters.viewState & ViewState::IsVisible))
+        suspendPainting();
 }
 
 void CoordinatedDrawingArea::setNeedsDisplay()