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

andersca at apple.com andersca at apple.com
Sun Feb 20 23:51:32 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit d984e9c6ec3cb5560958ae2f82da3ee466706077
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 25 23:40:57 2011 +0000

    2011-01-25  Anders Carlsson  <andersca at apple.com>
    
            Reviewed by Simon Fraser.
    
            Add LayerTreeHost class
            https://bugs.webkit.org/show_bug.cgi?id=53132
    
            * WebKit2.xcodeproj/project.pbxproj:
            Add LayerTreeHost files.
    
            * WebProcess/WebPage/DrawingAreaImpl.cpp:
            (WebKit::DrawingAreaImpl::DrawingAreaImpl):
            Initialize m_layerTreeHost.
    
            (WebKit::DrawingAreaImpl::setRootCompositingLayer):
            Call the m_layerTreeHost.
    
            * WebProcess/WebPage/LayerTreeHost.cpp: Added.
            (WebKit::LayerTreeHost::attachRootCompositingLayer):
            (WebKit::LayerTreeHost::detachRootCompositingLayer):
            Add stubbed out functions.
    
            (WebKit::LayerTreeHost::syncCompositingLayers):
            Sync the compositing layers in the main frame.
    
            * WebProcess/WebPage/LayerTreeHost.h: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76649 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index afa718e..e22f01a 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,30 @@
+2011-01-25  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        Add LayerTreeHost class
+        https://bugs.webkit.org/show_bug.cgi?id=53132
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        Add LayerTreeHost files.
+
+        * WebProcess/WebPage/DrawingAreaImpl.cpp:
+        (WebKit::DrawingAreaImpl::DrawingAreaImpl):
+        Initialize m_layerTreeHost.
+
+        (WebKit::DrawingAreaImpl::setRootCompositingLayer):
+        Call the m_layerTreeHost.
+
+        * WebProcess/WebPage/LayerTreeHost.cpp: Added.
+        (WebKit::LayerTreeHost::attachRootCompositingLayer):
+        (WebKit::LayerTreeHost::detachRootCompositingLayer):
+        Add stubbed out functions.
+
+        (WebKit::LayerTreeHost::syncCompositingLayers):
+        Sync the compositing layers in the main frame.
+
+        * WebProcess/WebPage/LayerTreeHost.h: Added.
+
 2011-01-25  Steve Falkenburg  <sfalken at apple.com>
 
         Rubber-stamped by Adam Roben.
diff --git a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj b/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
index a2b9d9a..375d23e 100644
--- a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -67,6 +67,8 @@
 		1A0F29E3120B44420053D1B9 /* VisitedLinkProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A0F29E1120B44420053D1B9 /* VisitedLinkProvider.cpp */; };
 		1A0F29E4120B44420053D1B9 /* VisitedLinkProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0F29E2120B44420053D1B9 /* VisitedLinkProvider.h */; };
 		1A119A95127B796200A9ECB1 /* MessageSender.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A119A94127B796200A9ECB1 /* MessageSender.h */; };
+		1A186EEA12EF7618008E5F37 /* LayerTreeHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A186EE812EF7618008E5F37 /* LayerTreeHost.h */; };
+		1A186EEB12EF7618008E5F37 /* LayerTreeHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A186EE912EF7618008E5F37 /* LayerTreeHost.cpp */; };
 		1A1C4EC810D06099005E67E7 /* WebCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1C79A100E7FC50078DEBC /* WebCore.framework */; };
 		1A1C649B11F4174200553C19 /* WebContextMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A1C648611F415B700553C19 /* WebContextMac.mm */; };
 		1A1FA285127A13BC0050E709 /* NPObjectProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1FA284127A13BC0050E709 /* NPObjectProxy.cpp */; };
@@ -795,6 +797,8 @@
 		1A0F29E1120B44420053D1B9 /* VisitedLinkProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisitedLinkProvider.cpp; sourceTree = "<group>"; };
 		1A0F29E2120B44420053D1B9 /* VisitedLinkProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisitedLinkProvider.h; sourceTree = "<group>"; };
 		1A119A94127B796200A9ECB1 /* MessageSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageSender.h; sourceTree = "<group>"; };
+		1A186EE812EF7618008E5F37 /* LayerTreeHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayerTreeHost.h; sourceTree = "<group>"; };
+		1A186EE912EF7618008E5F37 /* LayerTreeHost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayerTreeHost.cpp; sourceTree = "<group>"; };
 		1A1C648611F415B700553C19 /* WebContextMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContextMac.mm; sourceTree = "<group>"; };
 		1A1FA251127A0E4F0050E709 /* NPRemoteObjectMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NPRemoteObjectMap.h; sourceTree = "<group>"; };
 		1A1FA252127A0E4F0050E709 /* NPRemoteObjectMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPRemoteObjectMap.cpp; sourceTree = "<group>"; };
@@ -2058,6 +2062,8 @@
 				1A90C1F21264FD71003E44D4 /* FindController.h */,
 				0F5265B111DD37680006D33C /* LayerBackedDrawingArea.cpp */,
 				0F5265B211DD37680006D33C /* LayerBackedDrawingArea.h */,
+				1A186EE912EF7618008E5F37 /* LayerTreeHost.cpp */,
+				1A186EE812EF7618008E5F37 /* LayerTreeHost.h */,
 				1A90C23612650717003E44D4 /* PageOverlay.cpp */,
 				1A90C23512650717003E44D4 /* PageOverlay.h */,
 				BC72B9F811E6476B001EB4EA /* WebBackForwardListProxy.cpp */,
@@ -2535,8 +2541,8 @@
 		BC963D6C113DD19500574BE2 /* mac */ = {
 			isa = PBXGroup;
 			children = (
-				29CD55A9128E294F00133C85 /* AccessibilityWebPageObject.mm */,
 				29CD55A8128E294F00133C85 /* AccessibilityWebPageObject.h */,
+				29CD55A9128E294F00133C85 /* AccessibilityWebPageObject.mm */,
 				BC5F7BB8118237990052C02C /* ChunkedUpdateDrawingAreaMac.cpp */,
 				0F5265B511DD37700006D33C /* LayerBackedDrawingAreaMac.mm */,
 				1C8E2DAD1278C5B200BC7BD0 /* WebInspectorMac.mm */,
@@ -3073,6 +3079,7 @@
 				1AA2E51D12E4C05E00BC4966 /* CGUtilities.h in Headers */,
 				C574A58112E66681002DFE98 /* PasteboardTypes.h in Headers */,
 				E134F01712EA5D33004EC58D /* WKPrintingView.h in Headers */,
+				1A186EEA12EF7618008E5F37 /* LayerTreeHost.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -3536,6 +3543,7 @@
 				C574A37712E6099D002DFE98 /* WebDragClientMac.mm in Sources */,
 				C574A58212E66681002DFE98 /* PasteboardTypes.mm in Sources */,
 				E134F01A12EA5D99004EC58D /* WKPrintingView.mm in Sources */,
+				1A186EEB12EF7618008E5F37 /* LayerTreeHost.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp b/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
index 09140bc..bbd8547 100644
--- a/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
@@ -55,6 +55,7 @@ DrawingAreaImpl::DrawingAreaImpl(WebPage* webPage, const WebPageCreationParamete
     , m_isWaitingForDidUpdate(false)
     , m_isPaintingSuspended(!parameters.isVisible)
     , m_displayTimer(WebProcess::shared().runLoop(), this, &DrawingAreaImpl::display)
+    , m_layerTreeHost(webPage)
 {
 }
 
@@ -123,8 +124,12 @@ void DrawingAreaImpl::detachCompositingContext()
 {
 }
 
-void DrawingAreaImpl::setRootCompositingLayer(WebCore::GraphicsLayer*)
+void DrawingAreaImpl::setRootCompositingLayer(GraphicsLayer* graphicsLayer)
 {
+    if (graphicsLayer)
+        m_layerTreeHost.attachRootCompositingLayer(graphicsLayer);
+    else
+        m_layerTreeHost.detachRootCompositingLayer();
 }
 
 void DrawingAreaImpl::scheduleCompositingLayerSync()
diff --git a/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h b/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
index dabb323..051fccc 100644
--- a/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
+++ b/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
@@ -27,6 +27,7 @@
 #define DrawingAreaImpl_h
 
 #include "DrawingArea.h"
+#include "LayerTreeHost.h"
 #include "Region.h"
 #include "RunLoop.h"
 
@@ -76,6 +77,9 @@ private:
     bool m_isPaintingSuspended;
 
     RunLoop::Timer<DrawingAreaImpl> m_displayTimer;
+
+    // The layer tree host which handles accelerated compositing.
+    LayerTreeHost m_layerTreeHost;
 };
 
 } // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp b/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp
new file mode 100644
index 0000000..5b2bddf
--- /dev/null
+++ b/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "LayerTreeHost.h"
+
+#include <WebCore/Frame.h>
+#include <WebCore/FrameView.h>
+#include <WebCore/Page.h>
+#include "WebPage.h"
+
+#if !PLATFORM(MAC)
+#error "This class is not ready for use by other ports yet."
+#endif
+
+using namespace WebCore;
+
+namespace WebKit {
+
+LayerTreeHost::LayerTreeHost(WebPage* webPage)
+    : m_webPage(webPage)
+{
+}
+
+LayerTreeHost::~LayerTreeHost()
+{
+}
+
+void LayerTreeHost::attachRootCompositingLayer(GraphicsLayer* graphicsLayer)
+{
+    // FIXME: Implement.
+}
+
+void LayerTreeHost::detachRootCompositingLayer()
+{
+    // FIXME: Implement.
+}
+
+bool LayerTreeHost::syncCompositingLayers()
+{
+    return m_webPage->corePage()->mainFrame()->view()->syncCompositingStateIncludingSubframes();
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h b/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h
new file mode 100644
index 0000000..3923ce3
--- /dev/null
+++ b/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef LayerTreeHost_h
+#define LayerTreeHost_h
+
+#include <wtf/Noncopyable.h>
+
+#if PLATFORM(MAC)
+#include <wtf/RetainPtr.h>
+#endif
+
+namespace WebCore {
+    class GraphicsLayer;
+}
+
+namespace WebKit {
+
+class WebPage;
+
+class LayerTreeHost {
+    WTF_MAKE_NONCOPYABLE(LayerTreeHost);
+
+public:
+    explicit LayerTreeHost(WebPage*);
+    ~LayerTreeHost();
+
+    void attachRootCompositingLayer(WebCore::GraphicsLayer*);
+    void detachRootCompositingLayer();
+
+private:
+    WebPage* m_webPage;
+
+    bool syncCompositingLayers();
+};
+
+} // namespace WebKit
+
+#endif // LayerTreeHost_h

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list