[CoordinatedGraphics] invisible webview should not paint the content
authorryuan.choi@navercorp.com <ryuan.choi@navercorp.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2015 23:39:37 +0000 (23:39 +0000)
committerryuan.choi@navercorp.com <ryuan.choi@navercorp.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2015 23:39:37 +0000 (23:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150662

Reviewed by Darin Adler.

Suspend or resume the painting instead of just initializing m_isPaintingSuspended
for invisible webview not to paint the content until visibility is changed.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191987 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp

index c9463f1f59bc91184d0331eb800612f4af809bf3..927f8df79053f5578de6ccb4fdd1893e4af89ba2 100644 (file)
@@ -1,3 +1,16 @@
+2015-11-03  Ryuan Choi  <ryuan.choi@navercorp.com>
+
+        [CoordinatedGraphics] invisible webview should not paint the content
+        https://bugs.webkit.org/show_bug.cgi?id=150662
+
+        Reviewed by Darin Adler.
+
+        Suspend or resume the painting instead of just initializing m_isPaintingSuspended 
+        for invisible webview not to paint the content until visibility is changed.
+
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
+        (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
+
 2015-11-03  Anders Carlsson  <andersca@apple.com>
 
         Simplify -[_WKRemoteObjectRegistry _invokeMethod:]
 2015-11-03  Anders Carlsson  <andersca@apple.com>
 
         Simplify -[_WKRemoteObjectRegistry _invokeMethod:]
index f74e8001b17f0fb947727a1c7ef904c81121196b..e5517283f3a3cf5927de930b3fbcad9dea9b8f86 100644 (file)
@@ -69,12 +69,15 @@ CoordinatedDrawingArea::CoordinatedDrawingArea(WebPage& webPage, const WebPageCr
     , m_compositingAccordingToProxyMessages(false)
     , m_layerTreeStateIsFrozen(false)
     , m_wantsToExitAcceleratedCompositingMode(false)
     , 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);
     , 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()
 }
 
 void CoordinatedDrawingArea::setNeedsDisplay()