[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 15:53:22 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit fabe811562b52baffe02c78bec19e4f229a38a03
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 16 05:12:42 2010 +0000

    2010-11-15  Nat Duca  <nduca at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [chromium] Make WebWidget actively notify client when compositing enables.
            https://bugs.webkit.org/show_bug.cgi?id=49396
    
            * public/WebWidgetClient.h:
            (WebKit::WebWidgetClient::didAcceleratedCompositingEnable):
            * src/WebViewImpl.cpp:
            (WebKit::WebViewImpl::resize):
            (WebKit::WebViewImpl::paint):
            (WebKit::WebViewImpl::setRootLayerNeedsDisplay):
            (WebKit::WebViewImpl::scrollRootLayerRect):
            (WebKit::WebViewImpl::invalidateRootLayerRect):
            (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72058 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 2199aff..a1ec5c6 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,20 @@
+2010-11-15  Nat Duca  <nduca at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [chromium] Make WebWidget actively notify client when compositing enables.
+        https://bugs.webkit.org/show_bug.cgi?id=49396
+
+        * public/WebWidgetClient.h:
+        (WebKit::WebWidgetClient::didAcceleratedCompositingEnable):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::resize):
+        (WebKit::WebViewImpl::paint):
+        (WebKit::WebViewImpl::setRootLayerNeedsDisplay):
+        (WebKit::WebViewImpl::scrollRootLayerRect):
+        (WebKit::WebViewImpl::invalidateRootLayerRect):
+        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+
 2010-11-15  Kenneth Russell  <kbr at google.com>
 
         Reviewed by James Robinson.
diff --git a/WebKit/chromium/public/WebWidgetClient.h b/WebKit/chromium/public/WebWidgetClient.h
index 9bd553f..373426d 100644
--- a/WebKit/chromium/public/WebWidgetClient.h
+++ b/WebKit/chromium/public/WebWidgetClient.h
@@ -50,6 +50,9 @@ public:
     // scrolled by the specified dx and dy amounts.
     virtual void didScrollRect(int dx, int dy, const WebRect& clipRect) { }
 
+    // Called when the compositor enables or disables.
+    virtual void didActivateAcceleratedCompositing(bool active) { }
+
     // Called when a call to WebWidget::composite is required
     virtual void scheduleComposite() { }
 
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 51576b3..7bd96d4 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -938,8 +938,8 @@ void WebViewImpl::resize(const WebSize& newSize)
 
 #if USE(ACCELERATED_COMPOSITING) && OS(DARWIN)
     if (m_layerRenderer) {
-        m_layerRenderer->resizeOnscreenContent(WebCore::IntSize(std::max(1, m_size.width),
-                                                                std::max(1, m_size.height)));
+        m_layerRenderer->resizeOnscreenContent(IntSize(std::max(1, m_size.width),
+                                                       std::max(1, m_size.height)));
     }
 #endif
 }
@@ -1016,10 +1016,6 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)
             resizeRect.intersect(IntRect(IntPoint(), m_layerRenderer->rootLayerTextureSize()));
             doPixelReadbackToCanvas(canvas, resizeRect);
         }
-
-        // Temporarily present so the downstream Chromium renderwidget still renders.
-        // FIXME: remove this call once the changes to Chromium's renderwidget have landed.
-        m_layerRenderer->present();
 #endif
     } else {
         WebFrameImpl* webframe = mainFrameImpl();
@@ -2271,22 +2267,11 @@ void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer)
 void WebViewImpl::setRootLayerNeedsDisplay()
 {
     m_client->scheduleComposite();
-    // FIXME: To avoid breaking the downstream Chrome render_widget while downstream
-    // changes land, we also have to pass a 1x1 invalidate up to the client
-    {
-        WebRect damageRect(0, 0, 1, 1);
-        m_client->didInvalidateRect(damageRect);
-    }
 }
 
 
 void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect& clipRect)
 {
-    // FIXME: To avoid breaking the Chrome render_widget when the new compositor render
-    // path is not checked in, we must still pass scroll damage up to the client. This
-    // code will be backed out in a followup CL once the Chromium changes have landed.
-    m_client->didScrollRect(scrollDelta.width(), scrollDelta.height(), clipRect);
-
     ASSERT(m_layerRenderer);
     // Compute the damage rect in viewport space.
     WebFrameImpl* webframe = mainFrameImpl();
@@ -2353,11 +2338,6 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect&
 
 void WebViewImpl::invalidateRootLayerRect(const IntRect& rect)
 {
-    // FIXME: To avoid breaking the Chrome render_widget when the new compositor render
-    // path is not checked in, we must still pass damage up to the client. This
-    // code will be backed out in a followup CL once the Chromium changes have landed.
-    m_client->didInvalidateRect(rect);
-
     ASSERT(m_layerRenderer);
 
     if (!page())
@@ -2377,16 +2357,23 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
 
     if (!active) {
         m_isAcceleratedCompositingActive = false;
+        m_layerRenderer->finish(); // finish all GL rendering before we hide the window?
+        m_client->didActivateAcceleratedCompositing(false);
         return;
     }
 
     if (m_layerRenderer) {
         m_isAcceleratedCompositingActive = true;
+        m_layerRenderer->resizeOnscreenContent(WebCore::IntSize(std::max(1, m_size.width),
+                                                                std::max(1, m_size.height)));
+
+        m_client->didActivateAcceleratedCompositing(true);
         return;
     }
 
     RefPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release();
     if (!context) {
+        m_client->didActivateAcceleratedCompositing(true);
         context = GraphicsContext3D::create(GraphicsContext3D::Attributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
         if (context)
             context->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
@@ -2397,6 +2384,7 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
         m_compositorCreationFailed = false;
     } else {
         m_isAcceleratedCompositingActive = false;
+        m_client->didActivateAcceleratedCompositing(false);
         m_compositorCreationFailed = true;
     }
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list