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

simon.fraser at apple.com simon.fraser at apple.com
Wed Dec 22 15:59:10 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 62d4f6c528d83ba70cf5c73680da67e3d2ff4a71
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 17 17:25:01 2010 +0000

    2010-11-17  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Adam Roben.
    
            https://bugs.webkit.org/show_bug.cgi?id=45567
            Add stubbed-out layer-backed drawing area for Windows.
    
            Add implementations of LayerBackedDrawingArea and
            LayerBackedDrawingAreaProxy for Windows, and add them
            to the vcproj.
    
            * UIProcess/LayerBackedDrawingAreaProxy.cpp:
            * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: Added.
            (WebKit::LayerBackedDrawingAreaProxy::page):
            (WebKit::LayerBackedDrawingAreaProxy::platformSetSize):
            (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
            (WebKit::LayerBackedDrawingAreaProxy::detachCompositingContext):
            (WebKit::LayerBackedDrawingAreaProxy::paint):
            * UIProcess/win/WebView.cpp:
            (WebKit::WebView::pageDidEnterAcceleratedCompositing):
            (WebKit::WebView::pageDidLeaveAcceleratedCompositing):
            (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
            * UIProcess/win/WebView.h:
            * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
            * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Added.
            (WebKit::LayerBackedDrawingArea::platformInit):
            (WebKit::LayerBackedDrawingArea::platformClear):
            (WebKit::LayerBackedDrawingArea::attachCompositingContext):
            (WebKit::LayerBackedDrawingArea::detachCompositingContext):
            (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
            (WebKit::LayerBackedDrawingArea::scheduleCompositingLayerSync):
            (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
            * win/WebKit2.vcproj:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72212 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 5675d7a..0bb7ded 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,37 @@
+2010-11-17  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Adam Roben.
+
+        https://bugs.webkit.org/show_bug.cgi?id=45567
+        Add stubbed-out layer-backed drawing area for Windows.
+
+        Add implementations of LayerBackedDrawingArea and
+        LayerBackedDrawingAreaProxy for Windows, and add them
+        to the vcproj.
+
+        * UIProcess/LayerBackedDrawingAreaProxy.cpp:
+        * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: Added.
+        (WebKit::LayerBackedDrawingAreaProxy::page):
+        (WebKit::LayerBackedDrawingAreaProxy::platformSetSize):
+        (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
+        (WebKit::LayerBackedDrawingAreaProxy::detachCompositingContext):
+        (WebKit::LayerBackedDrawingAreaProxy::paint):
+        * UIProcess/win/WebView.cpp:
+        (WebKit::WebView::pageDidEnterAcceleratedCompositing):
+        (WebKit::WebView::pageDidLeaveAcceleratedCompositing):
+        (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
+        * UIProcess/win/WebView.h:
+        * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
+        * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Added.
+        (WebKit::LayerBackedDrawingArea::platformInit):
+        (WebKit::LayerBackedDrawingArea::platformClear):
+        (WebKit::LayerBackedDrawingArea::attachCompositingContext):
+        (WebKit::LayerBackedDrawingArea::detachCompositingContext):
+        (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
+        (WebKit::LayerBackedDrawingArea::scheduleCompositingLayerSync):
+        (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
+        * win/WebKit2.vcproj:
+
 2010-11-17  Benjamin Poulain  <benjamin.poulain at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
index 5348882..411ef3f 100644
--- a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
@@ -55,9 +55,11 @@ LayerBackedDrawingAreaProxy::~LayerBackedDrawingAreaProxy()
 {
 }
 
+#if !PLATFORM(WIN)
 void LayerBackedDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context)
 {
 }
+#endif
 
 void LayerBackedDrawingAreaProxy::setSize(const IntSize& viewSize)
 {
@@ -82,7 +84,7 @@ void LayerBackedDrawingAreaProxy::setSize(const IntSize& viewSize)
     page->process()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(info().id, viewSize));
 }
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(MAC) && !PLATFORM(WIN)
 void LayerBackedDrawingAreaProxy::platformSetSize()
 {
 }
diff --git a/WebKit2/UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp b/WebKit2/UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp
new file mode 100644
index 0000000..3c4a8b8
--- /dev/null
+++ b/WebKit2/UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "LayerBackedDrawingAreaProxy.h"
+
+#include "DrawingAreaMessageKinds.h"
+#include "DrawingAreaProxyMessageKinds.h"
+#include "WebView.h"
+#include "WebPageProxy.h"
+#include "WebProcessProxy.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebPageProxy* LayerBackedDrawingAreaProxy::page()
+{
+    return m_webView->page();
+}
+
+void LayerBackedDrawingAreaProxy::platformSetSize()
+{
+}
+
+void LayerBackedDrawingAreaProxy::attachCompositingContext(uint32_t contextID)
+{
+
+}
+
+void LayerBackedDrawingAreaProxy::detachCompositingContext()
+{
+}
+
+void LayerBackedDrawingAreaProxy::paint(const IntRect&, PlatformDrawingContext)
+{
+}
+
+} // namespace WebKit
+
+#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/WebKit2/UIProcess/win/WebView.cpp b/WebKit2/UIProcess/win/WebView.cpp
index 3938e29..3b8eec5 100644
--- a/WebKit2/UIProcess/win/WebView.cpp
+++ b/WebKit2/UIProcess/win/WebView.cpp
@@ -27,6 +27,7 @@
 
 #include "ChunkedUpdateDrawingAreaProxy.h"
 #include "FindIndicator.h"
+#include "LayerBackedDrawingAreaProxy.h"
 #include "RunLoop.h"
 #include "NativeWebKeyboardEvent.h"
 #include "WebContextMenuProxyWin.h"
@@ -644,11 +645,41 @@ void WebView::setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut)
 #if USE(ACCELERATED_COMPOSITING)
 void WebView::pageDidEnterAcceleratedCompositing()
 {
+    switchToDrawingAreaTypeIfNecessary(DrawingAreaProxy::LayerBackedDrawingAreaType);
 }
 
 void WebView::pageDidLeaveAcceleratedCompositing()
 {
+    switchToDrawingAreaTypeIfNecessary(DrawingAreaProxy::ChunkedUpdateDrawingAreaType);
 }
+
+void WebView::switchToDrawingAreaTypeIfNecessary(DrawingAreaProxy::Type type)
+{
+    DrawingAreaBase::Type existingDrawingAreaType = m_page->drawingArea() ? m_page->drawingArea()->info().type : DrawingAreaBase::None;
+    if (existingDrawingAreaType == type)
+        return;
+
+    OwnPtr<DrawingAreaProxy> newDrawingArea;
+    switch (type) {
+        case DrawingAreaProxy::None:
+            break;
+        case DrawingAreaProxy::ChunkedUpdateDrawingAreaType: {
+            newDrawingArea = ChunkedUpdateDrawingAreaProxy::create(this);
+            break;
+        }
+        case DrawingAreaProxy::LayerBackedDrawingAreaType: {
+            newDrawingArea = LayerBackedDrawingAreaProxy::create(this);
+            break;
+        }
+    }
+
+    if (m_page->drawingArea())
+        newDrawingArea->setSize(m_page->drawingArea()->size());
+
+    m_page->drawingArea()->detachCompositingContext();
+    m_page->setDrawingArea(newDrawingArea.release());
+}
+
 #endif // USE(ACCELERATED_COMPOSITING)
 
 HWND WebView::nativeWindow()
diff --git a/WebKit2/UIProcess/win/WebView.h b/WebKit2/UIProcess/win/WebView.h
index 7c5e128..07cc001 100644
--- a/WebKit2/UIProcess/win/WebView.h
+++ b/WebKit2/UIProcess/win/WebView.h
@@ -112,6 +112,7 @@ private:
 #if USE(ACCELERATED_COMPOSITING)
     virtual void pageDidEnterAcceleratedCompositing();
     virtual void pageDidLeaveAcceleratedCompositing();
+    void switchToDrawingAreaTypeIfNecessary(DrawingAreaProxy::Type);
 #endif
 
     virtual HWND nativeWindow();
diff --git a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
index ec0e4f1..96d7c93 100644
--- a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
+++ b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
@@ -197,7 +197,7 @@ bool LayerBackedDrawingArea::showRepaintCounter() const
     return false;
 }
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(MAC) && !PLATFORM(WIN)
 void LayerBackedDrawingArea::attachCompositingContext(GraphicsLayer*)
 {
 }
diff --git a/WebKit2/WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp b/WebKit2/WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp
new file mode 100644
index 0000000..c07e1f5
--- /dev/null
+++ b/WebKit2/WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "LayerBackedDrawingArea.h"
+
+#include "DrawingAreaProxyMessageKinds.h"
+#include "WebPage.h"
+#include "WebProcess.h"
+#include <WebCore/Frame.h>
+#include <WebCore/FrameView.h>
+#include <WebCore/GraphicsLayer.h>
+#include <WebCore/Page.h>
+#include <WebCore/WKCACFLayerRenderer.h>
+#include <WebCore/WebCoreInstanceHandle.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void LayerBackedDrawingArea::platformInit()
+{
+}
+
+void LayerBackedDrawingArea::platformClear()
+{
+}
+
+void LayerBackedDrawingArea::attachCompositingContext()
+{
+}
+
+void LayerBackedDrawingArea::detachCompositingContext()
+{
+}
+
+void LayerBackedDrawingArea::setRootCompositingLayer(WebCore::GraphicsLayer* layer)
+{
+}
+
+void LayerBackedDrawingArea::scheduleCompositingLayerSync()
+{
+}
+
+void LayerBackedDrawingArea::syncCompositingLayers()
+{
+}
+
+} // namespace WebKit
+
+#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index 53130eb..18b7fc2 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -1281,6 +1281,14 @@
 					>
 				</File>
 				<File
+					RelativePath="..\WebProcess\WebPage\LayerBackedDrawingArea.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\WebProcess\WebPage\LayerBackedDrawingArea.h"
+					>
+				</File>
+				<File
 					RelativePath="..\WebProcess\WebPage\PageOverlay.cpp"
 					>
 				</File>
@@ -1352,6 +1360,10 @@
 						>
 					</File>
 					<File
+						RelativePath="..\WebProcess\WebPage\win\LayerBackedDrawingAreaWin.cpp"
+						>
+					</File>
+					<File
 						RelativePath="..\WebProcess\WebPage\win\WebInspectorWin.cpp"
 						>
 					</File>
@@ -1778,6 +1790,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\UIProcess\LayerBackedDrawingAreaProxy.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\UIProcess\LayerBackedDrawingAreaProxy.h"
+				>
+			</File>
+			<File
 				RelativePath="..\UIProcess\PageClient.h"
 				>
 			</File>
@@ -2257,6 +2277,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\UIProcess\win\LayerBackedDrawingAreaProxyWin.cpp"
+					>
+				</File>
+				<File
 					RelativePath="..\UIProcess\win\WebContextMenuProxyWin.cpp"
 					>
 				</File>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list