- Revision
- 87806
- Author
- [email protected]
- Date
- 2011-06-01 08:28:13 -0700 (Wed, 01 Jun 2011)
Log Message
Route plugin window geometry updates through the DrawingArea
This will allow the geometry updates to be handled by the LayerTreeHost in compositing mode
in the future.
More rep work for <http://webkit.org/b/58054> <rdar://problem/9249839> REGRESSION (WebKit2):
Accelerated CSS animations have a lower framerate than in WebKit1
Reviewed by Anders Carlsson.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::scheduleWindowedPluginGeometryUpdate): Tell the DrawingArea, not the
WebPage, about the geometry update.
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/win/DrawingAreaImplWin.cpp: Added.
(WebKit::DrawingAreaImpl::scheduleChildWindowGeometryUpdate):
Moved code here...
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/win/WebPageWin.cpp:
...from here.
* win/WebKit2.vcproj: Added DrawingAreaImplWin.cpp.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (87805 => 87806)
--- trunk/Source/WebKit2/ChangeLog 2011-06-01 15:12:16 UTC (rev 87805)
+++ trunk/Source/WebKit2/ChangeLog 2011-06-01 15:28:13 UTC (rev 87806)
@@ -1,5 +1,33 @@
2011-06-01 Adam Roben <[email protected]>
+ Route plugin window geometry updates through the DrawingArea
+
+ This will allow the geometry updates to be handled by the LayerTreeHost in compositing mode
+ in the future.
+
+ More rep work for <http://webkit.org/b/58054> <rdar://problem/9249839> REGRESSION (WebKit2):
+ Accelerated CSS animations have a lower framerate than in WebKit1
+
+ Reviewed by Anders Carlsson.
+
+ * WebProcess/Plugins/PluginView.cpp:
+ (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate): Tell the DrawingArea, not the
+ WebPage, about the geometry update.
+
+ * WebProcess/WebPage/DrawingArea.h:
+ * WebProcess/WebPage/DrawingAreaImpl.h:
+ * WebProcess/WebPage/win/DrawingAreaImplWin.cpp: Added.
+ (WebKit::DrawingAreaImpl::scheduleChildWindowGeometryUpdate):
+ Moved code here...
+
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/win/WebPageWin.cpp:
+ ...from here.
+
+ * win/WebKit2.vcproj: Added DrawingAreaImplWin.cpp.
+
+2011-06-01 Adam Roben <[email protected]>
+
Move WebView's window geometry updating code to a new class
This will allow us to share this code with LayerTreeHostCAWin.
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (87805 => 87806)
--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2011-06-01 15:12:16 UTC (rev 87805)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2011-06-01 15:28:13 UTC (rev 87806)
@@ -1058,7 +1058,7 @@
void PluginView::scheduleWindowedPluginGeometryUpdate(const WindowGeometry& geometry)
{
- m_webPage->scheduleChildWindowGeometryUpdate(geometry);
+ m_webPage->drawingArea()->scheduleChildWindowGeometryUpdate(geometry);
}
#endif
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (87805 => 87806)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h 2011-06-01 15:12:16 UTC (rev 87805)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h 2011-06-01 15:28:13 UTC (rev 87806)
@@ -46,6 +46,10 @@
class WebPage;
struct WebPageCreationParameters;
+#if PLATFORM(WIN)
+struct WindowGeometry;
+#endif
+
class DrawingArea {
WTF_MAKE_NONCOPYABLE(DrawingArea);
@@ -75,6 +79,10 @@
virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*) = 0;
+#if PLATFORM(WIN)
+ virtual void scheduleChildWindowGeometryUpdate(const WindowGeometry&) = 0;
+#endif
+
protected:
DrawingArea(DrawingAreaType, WebPage*);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h (87805 => 87806)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h 2011-06-01 15:12:16 UTC (rev 87805)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h 2011-06-01 15:28:13 UTC (rev 87806)
@@ -61,6 +61,10 @@
virtual void syncCompositingLayers();
virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+#if PLATFORM(WIN)
+ virtual void scheduleChildWindowGeometryUpdate(const WindowGeometry&);
+#endif
+
// CoreIPC message handlers.
virtual void updateBackingStoreState(uint64_t backingStoreStateID, bool respondImmediately, const WebCore::IntSize&, const WebCore::IntSize& scrollOffset);
virtual void didUpdate();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (87805 => 87806)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2011-06-01 15:12:16 UTC (rev 87805)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2011-06-01 15:28:13 UTC (rev 87806)
@@ -112,10 +112,6 @@
struct WebPageCreationParameters;
struct WebPreferencesStore;
-#if PLATFORM(WIN)
-struct WindowGeometry;
-#endif
-
#if ENABLE(GESTURE_EVENTS)
class WebGestureEvent;
#endif
@@ -264,7 +260,6 @@
const WebCore::IntRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; }
#elif PLATFORM(WIN)
HWND nativeWindow() const { return m_nativeWindow; }
- void scheduleChildWindowGeometryUpdate(const WindowGeometry&);
#endif
bool windowIsFocused() const;
Added: trunk/Source/WebKit2/WebProcess/WebPage/win/DrawingAreaImplWin.cpp (0 => 87806)
--- trunk/Source/WebKit2/WebProcess/WebPage/win/DrawingAreaImplWin.cpp (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/win/DrawingAreaImplWin.cpp 2011-06-01 15:28:13 UTC (rev 87806)
@@ -0,0 +1,42 @@
+/*
+ * 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 "config.h"
+#include "DrawingAreaImpl.h"
+
+#include "WebPage.h"
+#include "WebPageProxyMessages.h"
+#include "WindowGeometry.h"
+
+namespace WebKit {
+
+void DrawingAreaImpl::scheduleChildWindowGeometryUpdate(const WindowGeometry& geometry)
+{
+ // FIXME: This should be a Messages::DrawingAreaProxy, and DrawingAreaProxy should pass the
+ // data off to the WebPageProxy.
+ m_webPage->send(Messages::WebPageProxy::ScheduleChildWindowGeometryUpdate(geometry));
+}
+
+} // namespace WebKit
\ No newline at end of file
Property changes on: trunk/Source/WebKit2/WebProcess/WebPage/win/DrawingAreaImplWin.cpp
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp (87805 => 87806)
--- trunk/Source/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp 2011-06-01 15:12:16 UTC (rev 87805)
+++ trunk/Source/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp 2011-06-01 15:28:13 UTC (rev 87806)
@@ -32,7 +32,6 @@
#include "WebPageProxyMessages.h"
#include "WebPreferencesStore.h"
#include "WebProcess.h"
-#include "WindowGeometry.h"
#include <WebCore/FocusController.h>
#include <WebCore/FontRenderingMode.h>
#include <WebCore/Frame.h>
@@ -466,9 +465,4 @@
m_gestureTargetNode = nullptr;
}
-void WebPage::scheduleChildWindowGeometryUpdate(const WindowGeometry& geometry)
-{
- WebProcess::shared().connection()->send(Messages::WebPageProxy::ScheduleChildWindowGeometryUpdate(geometry), m_pageID);
-}
-
} // namespace WebKit
Modified: trunk/Source/WebKit2/win/WebKit2.vcproj (87805 => 87806)
--- trunk/Source/WebKit2/win/WebKit2.vcproj 2011-06-01 15:12:16 UTC (rev 87805)
+++ trunk/Source/WebKit2/win/WebKit2.vcproj 2011-06-01 15:28:13 UTC (rev 87806)
@@ -1977,6 +1977,10 @@
Name="win"
>
<File
+ RelativePath="..\WebProcess\WebPage\win\DrawingAreaImplWin.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebProcess\WebPage\win\LayerTreeHostWin.cpp"
>
</File>