[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

aroben at apple.com aroben at apple.com
Sun Feb 20 23:57:47 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit e751eb2c5b5c294fd2f70f870c8f2b4e3c9354fc
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 27 06:41:35 2011 +0000

    Don't create the Direct3D device before it's first needed
    
    We only need the device once we decide to render. There's no point in creating it before
    then.
    
    Reviewed by Sam Weinig.
    
    * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
    (WebCore::CACFLayerTreeHost::setWindow): Removed the call to createRenderer() from here.
    We already have code to create it when we first try to draw.
    (WebCore::CACFLayerTreeHost::createRenderer): Flush the context after we set our layer's
    bounds so that the bounds will take effect the next time we render (which could be just
    after this function returns).
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76764 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 26b2217..ed4097a 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,5 +1,21 @@
 2011-01-26  Adam Roben  <aroben at apple.com>
 
+        Don't create the Direct3D device before it's first needed
+
+        We only need the device once we decide to render. There's no point in creating it before
+        then.
+
+        Reviewed by Sam Weinig.
+
+        * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
+        (WebCore::CACFLayerTreeHost::setWindow): Removed the call to createRenderer() from here.
+        We already have code to create it when we first try to draw.
+        (WebCore::CACFLayerTreeHost::createRenderer): Flush the context after we set our layer's
+        bounds so that the bounds will take effect the next time we render (which could be just
+        after this function returns).
+
+2011-01-26  Adam Roben  <aroben at apple.com>
+
         Add assertions that CACFLayerTreeHost gains and loses an HWND only once
 
         CACFLayerTreeHost doesn't support any other use pattern.
diff --git a/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp b/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp
index c27c1b6..166f93c 100644
--- a/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp
+++ b/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp
@@ -258,9 +258,6 @@ void CACFLayerTreeHost::setWindow(HWND window)
         destroyRenderer();
 
     m_window = window;
-
-    if (m_window)
-        createRenderer();
 }
 
 PlatformCALayer* CACFLayerTreeHost::rootLayer() const
@@ -362,8 +359,10 @@ bool CACFLayerTreeHost::createRenderer()
 
     wkCACFContextSetD3DDevice(m_context, m_d3dDevice.get());
 
-    if (IsWindow(m_window))
+    if (IsWindow(m_window)) {
         m_rootLayer->setBounds(bounds());
+        wkCACFContextFlush(m_context);
+    }
 
     return true;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list