2010-08-30 Nat Duca <nduca@chromium.org>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Aug 2010 04:24:05 +0000 (04:24 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Aug 2010 04:24:05 +0000 (04:24 +0000)
        Reviewed by Adam Barth.

        [chromium] Accelerated Compositing: Artifacts/blink when enabling compositor.
        https://bugs.webkit.org/show_bug.cgi?id=44196

        If accelerated compositing enables after a page loads, the dirtied
        portion of the screen will be only a subset of the full screen,
        leading to artefacts. Avoid these artefacts by invalidating the
        visible content rect on compositor initialization.

        * src/WebViewImpl.cpp:
        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):

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

WebKit/chromium/ChangeLog
WebKit/chromium/src/WebViewImpl.cpp

index 01a2bbf..21454e8 100644 (file)
@@ -1,3 +1,18 @@
+2010-08-30  Nat Duca  <nduca@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        [chromium] Accelerated Compositing: Artifacts/blink when enabling compositor.
+        https://bugs.webkit.org/show_bug.cgi?id=44196
+
+        If accelerated compositing enables after a page loads, the dirtied
+        portion of the screen will be only a subset of the full screen,
+        leading to artefacts. Avoid these artefacts by invalidating the
+        visible content rect on compositor initialization.
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+
 2010-08-30  Kinuko Yasuda  <kinuko@chromium.osrc>
 
         Reviewed by Darin Fisher.
index 5065f5e..4b129d6 100644 (file)
@@ -2117,9 +2117,13 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
 
     if (active) {
         m_layerRenderer = LayerRendererChromium::create(getOnscreenGLES2Context());
-        if (m_layerRenderer->hardwareCompositing())
+        if (m_layerRenderer->hardwareCompositing()) {
             m_isAcceleratedCompositingActive = true;
-        else {
+            
+            // Force a redraw the entire view so that the compositor gets the entire view,
+            // rather than just the currently-dirty subset.
+            m_client->didInvalidateRect(IntRect(0, 0, m_size.width, m_size.height));
+        } else {
             m_layerRenderer.clear();
             m_isAcceleratedCompositingActive = false;
         }