Diff
Modified: trunk/Source/WebKit2/ChangeLog (111000 => 111001)
--- trunk/Source/WebKit2/ChangeLog 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/ChangeLog 2012-03-16 13:42:18 UTC (rev 111001)
@@ -1,3 +1,40 @@
+2012-03-16 Kenneth Rohde Christiansen <[email protected]>
+
+ Merge setVisibleContentsForScaling with setVisibleContentsRectForPanning
+ https://bugs.webkit.org/show_bug.cgi?id=81346
+
+ Reviewed by Simon Hausmann.
+
+ This cleans up the code path and is one step on the way to avoid
+ calling both methods in succession, for instance after ending pinch
+ zoom.
+
+ * UIProcess/API/qt/qquickwebview.cpp:
+ (QQuickWebViewLegacyPrivate::updateViewportSize):
+ (QQuickWebViewFlickablePrivate::_q_commitScaleChange):
+ (QQuickWebViewPrivate::_q_commitPositionChange):
+ * UIProcess/DrawingAreaProxy.h:
+ (WebKit::DrawingAreaProxy::setVisibleContentsRect):
+ * UIProcess/DrawingAreaProxyImpl.cpp:
+ (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
+ * UIProcess/DrawingAreaProxyImpl.h:
+ (DrawingAreaProxyImpl):
+ * UIProcess/LayerTreeHostProxy.cpp:
+ (WebKit::LayerTreeHostProxy::setVisibleContentsRect):
+ * UIProcess/LayerTreeHostProxy.h:
+ (LayerTreeHostProxy):
+ * UIProcess/WebLayerTreeRenderer.cpp:
+ (WebKit::WebLayerTreeRenderer::setVisibleContentsRect):
+ * UIProcess/WebLayerTreeRenderer.h:
+ (WebLayerTreeRenderer):
+ * WebProcess/WebPage/LayerTreeHost.h:
+ (WebKit::LayerTreeHost::setVisibleContentsRect):
+ * WebProcess/WebPage/LayerTreeHost.messages.in:
+ * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
+ (WebKit::LayerTreeHostQt::setVisibleContentsRect):
+ * WebProcess/WebPage/qt/LayerTreeHostQt.h:
+ (LayerTreeHostQt):
+
2012-03-16 YoungTaeck Song <[email protected]>
[EFL][WK2] Add ProcessLauncherEfl.cpp
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp (111000 => 111001)
--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp 2012-03-16 13:42:18 UTC (rev 111001)
@@ -506,7 +506,7 @@
// The fixed layout is handled by the FrameView and the drawing area doesn't behave differently
// whether its fixed or not. We still need to tell the drawing area which part of it
// has to be rendered on tiles, and in desktop mode it's all of it.
- webPageProxy->drawingArea()->setVisibleContentsRectForScaling(IntRect(IntPoint(), viewportSize), 1);
+ webPageProxy->drawingArea()->setVisibleContentsRect(IntRect(IntPoint(), viewportSize), 1, FloatPoint());
}
QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate(QQuickWebView* viewport)
@@ -657,7 +657,7 @@
const QRect visibleRect(visibleContentsRect());
float scale = pageView->contentsScale();
- drawingArea->setVisibleContentsRectForScaling(visibleRect, scale);
+ drawingArea->setVisibleContentsRect(visibleRect, scale, FloatPoint());
webPageProxy->setFixedVisibleContentRect(visibleRect);
}
@@ -668,11 +668,9 @@
return;
const QRect visibleRect(visibleContentsRect());
- drawingArea->setVisibleContentsRectForPanning(visibleRect, trajectoryVector);
+ float scale = pageView->contentsScale();
- if (!trajectoryVector.isNull())
- return;
-
+ drawingArea->setVisibleContentsRect(visibleRect, scale, trajectoryVector);
webPageProxy->setFixedVisibleContentRect(visibleRect);
}
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (111000 => 111001)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h 2012-03-16 13:42:18 UTC (rev 111001)
@@ -93,8 +93,7 @@
virtual void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&) { }
virtual void paintLayerTree(BackingStore::PlatformGraphicsContext) { }
LayerTreeHostProxy* layerTreeHostProxy() const { return m_layerTreeHostProxy.get(); }
- virtual void setVisibleContentsRectForScaling(const WebCore::IntRect& visibleContentsRect, float scale) { }
- virtual void setVisibleContentsRectForPanning(const WebCore::IntRect& visibleContentsRect, const WebCore::FloatPoint& trajectoryVector) { }
+ virtual void setVisibleContentsRect(const WebCore::IntRect& visibleContentsRect, float scale, const WebCore::FloatPoint& trajectoryVector) { }
virtual void createTileForLayer(int layerID, int tileID, const WebKit::UpdateInfo&) { }
virtual void updateTileForLayer(int layerID, int tileID, const WebKit::UpdateInfo&) { }
virtual void removeTileForLayer(int layerID, int tileID) { }
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp (111000 => 111001)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp 2012-03-16 13:42:18 UTC (rev 111001)
@@ -348,18 +348,12 @@
m_layerTreeHostProxy->didReceiveLayerTreeHostProxyMessage(connection, messageID, arguments);
}
-void DrawingAreaProxyImpl::setVisibleContentsRectForScaling(const WebCore::IntRect& visibleContentsRect, float scale)
+void DrawingAreaProxyImpl::setVisibleContentsRect(const WebCore::IntRect& visibleContentsRect, float scale, const WebCore::FloatPoint& trajectoryVector)
{
if (m_layerTreeHostProxy)
- m_layerTreeHostProxy->setVisibleContentsRectForScaling(visibleContentsRect, scale);
+ m_layerTreeHostProxy->setVisibleContentsRect(visibleContentsRect, scale, trajectoryVector);
}
-void DrawingAreaProxyImpl::setVisibleContentsRectForPanning(const WebCore::IntRect& visibleContentsRect, const WebCore::FloatPoint& trajectoryVector)
-{
- if (m_layerTreeHostProxy)
- m_layerTreeHostProxy->setVisibleContentsRectForPanning(visibleContentsRect, trajectoryVector);
-}
-
void DrawingAreaProxyImpl::paintLayerTree(BackingStore::PlatformGraphicsContext context)
{
if (m_layerTreeHostProxy)
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h (111000 => 111001)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h 2012-03-16 13:42:18 UTC (rev 111001)
@@ -78,8 +78,7 @@
bool isInAcceleratedCompositingMode() const { return !m_layerTreeContext.isEmpty(); }
#if USE(UI_SIDE_COMPOSITING)
- virtual void setVisibleContentsRectForScaling(const WebCore::IntRect& visibleContentsRect, float scale);
- virtual void setVisibleContentsRectForPanning(const WebCore::IntRect& visibleContentsRect, const WebCore::FloatPoint&);
+ virtual void setVisibleContentsRect(const WebCore::IntRect& visibleContentsRect, float scale, const WebCore::FloatPoint& trajectory);
virtual void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float opacity, const WebCore::FloatRect&);
virtual void paintLayerTree(BackingStore::PlatformGraphicsContext);
void didReceiveLayerTreeHostProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
Modified: trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.cpp (111000 => 111001)
--- trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.cpp 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.cpp 2012-03-16 13:42:18 UTC (rev 111001)
@@ -118,17 +118,12 @@
dispatchUpdate(bind(&WebLayerTreeRenderer::destroyImage, m_renderer.get(), key));
}
-void LayerTreeHostProxy::setVisibleContentsRectForPanning(const IntRect& rect, const FloatPoint& trajectoryVector)
+void LayerTreeHostProxy::setVisibleContentsRect(const IntRect& rect, float scale, const FloatPoint& trajectoryVector)
{
- m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeHost::SetVisibleContentsRectForPanning(rect, trajectoryVector), m_drawingAreaProxy->page()->pageID());
+ m_renderer->setVisibleContentsRect(rect, scale);
+ m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeHost::SetVisibleContentsRect(rect, scale, trajectoryVector), m_drawingAreaProxy->page()->pageID());
}
-void LayerTreeHostProxy::setVisibleContentsRectForScaling(const IntRect& rect, float scale)
-{
- m_renderer->setVisibleContentsRectForScaling(rect, scale);
- m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeHost::SetVisibleContentsRectForScaling(rect, scale), m_drawingAreaProxy->page()->pageID());
-}
-
void LayerTreeHostProxy::renderNextFrame()
{
m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeHost::RenderNextFrame(), m_drawingAreaProxy->page()->pageID());
Modified: trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.h (111000 => 111001)
--- trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.h 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/UIProcess/LayerTreeHostProxy.h 2012-03-16 13:42:18 UTC (rev 111001)
@@ -54,8 +54,7 @@
void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float opacity, const WebCore::FloatRect& clip);
void paintToGraphicsContext(BackingStore::PlatformGraphicsContext);
void purgeGLResources();
- void setVisibleContentsRectForScaling(const WebCore::IntRect&, float);
- void setVisibleContentsRectForPanning(const WebCore::IntRect&, const WebCore::FloatPoint&);
+ void setVisibleContentsRect(const WebCore::IntRect&, float scale, const WebCore::FloatPoint& trajectory);
void didRenderFrame();
void createTileForLayer(int layerID, int tileID, const WebKit::UpdateInfo&);
void updateTileForLayer(int layerID, int tileID, const WebKit::UpdateInfo&);
Modified: trunk/Source/WebKit2/UIProcess/WebLayerTreeRenderer.cpp (111000 => 111001)
--- trunk/Source/WebKit2/UIProcess/WebLayerTreeRenderer.cpp 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/UIProcess/WebLayerTreeRenderer.cpp 2012-03-16 13:42:18 UTC (rev 111001)
@@ -155,7 +155,7 @@
m_textureMapper->setGraphicsContext(0);
}
-void WebLayerTreeRenderer::setVisibleContentsRectForScaling(const IntRect& rect, float scale)
+void WebLayerTreeRenderer::setVisibleContentsRect(const IntRect& rect, float scale)
{
m_visibleContentsRect = rect;
m_contentsScale = scale;
Modified: trunk/Source/WebKit2/UIProcess/WebLayerTreeRenderer.h (111000 => 111001)
--- trunk/Source/WebKit2/UIProcess/WebLayerTreeRenderer.h 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/UIProcess/WebLayerTreeRenderer.h 2012-03-16 13:42:18 UTC (rev 111001)
@@ -51,7 +51,7 @@
void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&);
void paintToGraphicsContext(BackingStore::PlatformGraphicsContext);
void syncRemoteContent();
- void setVisibleContentsRectForScaling(const WebCore::IntRect&, float);
+ void setVisibleContentsRect(const WebCore::IntRect&, float scale);
void detach();
void appendUpdate(const Function<void()>&);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h (111000 => 111001)
--- trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h 2012-03-16 13:42:18 UTC (rev 111001)
@@ -80,8 +80,7 @@
virtual void resumeRendering() { }
#if USE(TILED_BACKING_STORE)
- virtual void setVisibleContentsRectForScaling(const WebCore::IntRect&, float scale) { }
- virtual void setVisibleContentsRectForPanning(const WebCore::IntRect&, const WebCore::FloatPoint&) { }
+ virtual void setVisibleContentsRect(const WebCore::IntRect&, float scale, const WebCore::FloatPoint&) { }
virtual void setVisibleContentsRectForLayer(int layerID, const WebCore::IntRect&) { }
virtual void renderNextFrame() { }
virtual void purgeBackingStores() { }
Modified: trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.messages.in (111000 => 111001)
--- trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.messages.in 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.messages.in 2012-03-16 13:42:18 UTC (rev 111001)
@@ -20,8 +20,7 @@
#if USE(TILED_BACKING_STORE)
messages -> LayerTreeHost {
- SetVisibleContentsRectForPanning(WebCore::IntRect visibleContentsRect, WebCore::FloatPoint trajectoryVectory)
- SetVisibleContentsRectForScaling(WebCore::IntRect visibleContentsRect, float scale)
+ SetVisibleContentsRect(WebCore::IntRect visibleContentsRect, float scale, WebCore::FloatPoint trajectoryVectory)
RenderNextFrame()
PurgeBackingStores()
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp (111000 => 111001)
--- trunk/Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp 2012-03-16 13:42:18 UTC (rev 111001)
@@ -415,24 +415,26 @@
return m_visibleContentsRect;
}
-void LayerTreeHostQt::setVisibleContentsRectForScaling(const IntRect& rect, float scale)
+void LayerTreeHostQt::setVisibleContentsRect(const IntRect& rect, float scale, const FloatPoint& trajectoryVector)
{
- m_visibleContentsRect = rect;
- m_contentsScale = scale;
+ bool contentsRectDidChange = rect != m_visibleContentsRect;
+ bool contentsScaleDidChange = scale != m_contentsScale;
- HashSet<WebCore::WebGraphicsLayer*>::iterator end = m_registeredLayers.end();
- for (HashSet<WebCore::WebGraphicsLayer*>::iterator it = m_registeredLayers.begin(); it != end; ++it) {
- (*it)->setContentsScale(scale);
- (*it)->adjustVisibleRect();
- }
- scheduleLayerFlush();
-}
+ if (trajectoryVector != FloatPoint::zero())
+ toWebGraphicsLayer(m_nonCompositedContentLayer.get())->setVisibleContentRectTrajectoryVector(trajectoryVector);
-void LayerTreeHostQt::setVisibleContentsRectForPanning(const IntRect& rect, const FloatPoint& trajectoryVector)
-{
- m_visibleContentsRect = rect;
+ if (contentsRectDidChange || contentsScaleDidChange) {
+ m_visibleContentsRect = rect;
+ m_contentsScale = scale;
- toWebGraphicsLayer(m_nonCompositedContentLayer.get())->setVisibleContentRectTrajectoryVector(trajectoryVector);
+ HashSet<WebCore::WebGraphicsLayer*>::iterator end = m_registeredLayers.end();
+ for (HashSet<WebCore::WebGraphicsLayer*>::iterator it = m_registeredLayers.begin(); it != end; ++it) {
+ if (contentsScaleDidChange)
+ (*it)->setContentsScale(scale);
+ if (contentsRectDidChange)
+ (*it)->adjustVisibleRect();
+ }
+ }
scheduleLayerFlush();
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.h (111000 => 111001)
--- trunk/Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.h 2012-03-16 13:35:37 UTC (rev 111000)
+++ trunk/Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.h 2012-03-16 13:42:18 UTC (rev 111001)
@@ -70,8 +70,7 @@
virtual void renderNextFrame();
virtual void purgeBackingStores();
virtual bool layerTreeTileUpdatesAllowed() const;
- virtual void setVisibleContentsRectForScaling(const WebCore::IntRect&, float scale);
- virtual void setVisibleContentsRectForPanning(const WebCore::IntRect&, const WebCore::FloatPoint&);
+ virtual void setVisibleContentsRect(const WebCore::IntRect&, float scale, const WebCore::FloatPoint&);
virtual void didSyncCompositingStateForLayer(const WebLayerInfo&);
virtual void attachLayer(WebCore::WebGraphicsLayer*);
virtual void detachLayer(WebCore::WebGraphicsLayer*);