summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-13 12:51:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 20:50:05 +0200
commitd441d6f39bb846989d95bcf5caf387b42414718d (patch)
treee367e64a75991c554930278175d403c072de6bb8 /Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
parent0060b2994c07842f4c59de64b5e3e430525c4b90 (diff)
downloadqtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp')
-rw-r--r--Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp50
1 files changed, 22 insertions, 28 deletions
diff --git a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp b/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
index 138f4c887..790c8a939 100644
--- a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
+++ b/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
@@ -37,7 +37,7 @@
#include <WebCore/Region.h>
#if USE(COORDINATED_GRAPHICS)
-#include "LayerTreeCoordinatorProxy.h"
+#include "CoordinatedLayerTreeHostProxy.h"
#endif
using namespace WebCore;
@@ -61,7 +61,7 @@ DrawingAreaProxyImpl::DrawingAreaProxyImpl(WebPageProxy* webPageProxy)
#if USE(COORDINATED_GRAPHICS)
// Construct the proxy early to allow messages to be sent to the web process while AC is entered there.
if (webPageProxy->pageGroup()->preferences()->forceCompositingMode())
- m_layerTreeCoordinatorProxy = adoptPtr(new LayerTreeCoordinatorProxy(this));
+ m_coordinatedLayerTreeHostProxy = adoptPtr(new CoordinatedLayerTreeHostProxy(this));
#endif
}
@@ -193,11 +193,6 @@ void DrawingAreaProxyImpl::didUpdateBackingStoreState(uint64_t backingStoreState
// Stop the responsiveness timer that was started in sendUpdateBackingStoreState.
m_webPageProxy->process()->responsivenessTimer()->stop();
- if (m_nextBackingStoreStateID != m_currentBackingStoreStateID)
- sendUpdateBackingStoreState(RespondImmediately);
- else
- m_hasReceivedFirstUpdate = true;
-
#if USE(ACCELERATED_COMPOSITING)
if (layerTreeContext != m_layerTreeContext) {
if (!m_layerTreeContext.isEmpty()) {
@@ -210,7 +205,14 @@ void DrawingAreaProxyImpl::didUpdateBackingStoreState(uint64_t backingStoreState
ASSERT(layerTreeContext == m_layerTreeContext);
}
}
+#endif
+
+ if (m_nextBackingStoreStateID != m_currentBackingStoreStateID)
+ sendUpdateBackingStoreState(RespondImmediately);
+ else
+ m_hasReceivedFirstUpdate = true;
+#if USE(ACCELERATED_COMPOSITING)
if (isInAcceleratedCompositingMode()) {
ASSERT(!m_backingStore);
return;
@@ -280,10 +282,14 @@ void DrawingAreaProxyImpl::incorporateUpdate(const UpdateInfo& updateInfo)
if (shouldScroll)
m_webPageProxy->scrollView(updateInfo.scrollRect, updateInfo.scrollOffset);
-
- for (size_t i = 0; i < updateInfo.updateRects.size(); ++i)
- m_webPageProxy->setViewNeedsDisplay(updateInfo.updateRects[i]);
-
+
+ if (shouldScroll && !m_webPageProxy->canScrollView())
+ m_webPageProxy->setViewNeedsDisplay(IntRect(IntPoint(), m_webPageProxy->viewSize()));
+ else {
+ for (size_t i = 0; i < updateInfo.updateRects.size(); ++i)
+ m_webPageProxy->setViewNeedsDisplay(updateInfo.updateRects[i]);
+ }
+
if (WebPageProxy::debugPaintFlags() & kWKDebugFlashBackingStoreUpdates)
m_webPageProxy->flashBackingStoreUpdates(updateInfo.updateRects);
@@ -360,24 +366,17 @@ void DrawingAreaProxyImpl::enterAcceleratedCompositingMode(const LayerTreeContex
m_layerTreeContext = layerTreeContext;
m_webPageProxy->enterAcceleratedCompositingMode(layerTreeContext);
#if USE(COORDINATED_GRAPHICS)
- if (!m_layerTreeCoordinatorProxy)
- m_layerTreeCoordinatorProxy = adoptPtr(new LayerTreeCoordinatorProxy(this));
+ if (!m_coordinatedLayerTreeHostProxy)
+ m_coordinatedLayerTreeHostProxy = adoptPtr(new CoordinatedLayerTreeHostProxy(this));
#endif
}
#if USE(COORDINATED_GRAPHICS)
-void DrawingAreaProxyImpl::didReceiveLayerTreeCoordinatorProxyMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder)
+void DrawingAreaProxyImpl::setVisibleContentsRect(const WebCore::FloatRect& visibleContentsRect, const WebCore::FloatPoint& trajectoryVector)
{
- if (m_layerTreeCoordinatorProxy)
- m_layerTreeCoordinatorProxy->didReceiveLayerTreeCoordinatorProxyMessage(connection, messageID, decoder);
+ if (m_coordinatedLayerTreeHostProxy)
+ m_coordinatedLayerTreeHostProxy->setVisibleContentsRect(visibleContentsRect, trajectoryVector);
}
-
-void DrawingAreaProxyImpl::setVisibleContentsRect(const WebCore::FloatRect& visibleContentsRect, float scale, const WebCore::FloatPoint& trajectoryVector)
-{
- if (m_layerTreeCoordinatorProxy)
- m_layerTreeCoordinatorProxy->setVisibleContentsRect(visibleContentsRect, scale, trajectoryVector);
-}
-
#endif
void DrawingAreaProxyImpl::exitAcceleratedCompositingMode()
@@ -397,11 +396,6 @@ void DrawingAreaProxyImpl::updateAcceleratedCompositingMode(const LayerTreeConte
}
#endif
-void DrawingAreaProxyImpl::pageCustomRepresentationChanged()
-{
- m_webPageProxy->process()->send(Messages::DrawingArea::PageCustomRepresentationChanged(), m_webPageProxy->pageID());
-}
-
void DrawingAreaProxyImpl::discardBackingStoreSoon()
{
if (!m_isBackingStoreDiscardable || m_discardBackingStoreTimer.isActive())