https://bugs.webkit.org/show_bug.cgi?id=89837
Patch by YoungTaeck Song <youngtaeck.song@samsung.com> on 2012-06-25
Reviewed by Noam Rosenthal.
Extract common code from LayerTreeHostQt to be used by both Qt and Efl.
I renamed LayerTreeHost to LayerTreeCoordinator, and these are moved under WebProcess/WebPage/LayerTreeCoordinator.
I Modified LayerTreeHostProxy to LayerTreeCoordinatorProxy too, Because LayerTreeHostProxy and LayerTreeHost were pair.
Also WebGraphicsLayer moved under that directory.
* CMakeLists.txt:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Platform/CoreIPC/MessageID.h:
* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paint):
(QQuickWebPage::updatePaintNode):
(QQuickWebPagePrivate::updateSize):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::didReceiveLayerTreeCoordinatorProxyMessage):
* UIProcess/DrawingAreaProxy.h:
(WebKit):
(WebKit::DrawingAreaProxy::layerTreeCoordinatorProxy):
(DrawingAreaProxy):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::didReceiveLayerTreeCoordinatorProxyMessage):
(WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
* UIProcess/DrawingAreaProxyImpl.h:
(WebKit):
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeCoordinatorProxy.cpp: Renamed from Source/WebKit2/UIProcess/LayerTreeHostProxy.cpp.
(WebKit):
(WebKit::LayerTreeCoordinatorProxy::LayerTreeCoordinatorProxy):
(WebKit::LayerTreeCoordinatorProxy::~LayerTreeCoordinatorProxy):
(WebKit::LayerTreeCoordinatorProxy::updateViewport):
(WebKit::LayerTreeCoordinatorProxy::dispatchUpdate):
(WebKit::LayerTreeCoordinatorProxy::createTileForLayer):
(WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
(WebKit::LayerTreeCoordinatorProxy::removeTileForLayer):
(WebKit::LayerTreeCoordinatorProxy::deleteCompositingLayer):
(WebKit::LayerTreeCoordinatorProxy::setRootCompositingLayer):
(WebKit::LayerTreeCoordinatorProxy::setCompositingLayerState):
(WebKit::LayerTreeCoordinatorProxy::setCompositingLayerChildren):
(WebKit::LayerTreeCoordinatorProxy::setCompositingLayerFilters):
(WebKit::LayerTreeCoordinatorProxy::didRenderFrame):
(WebKit::LayerTreeCoordinatorProxy::createDirectlyCompositedImage):
(WebKit::LayerTreeCoordinatorProxy::destroyDirectlyCompositedImage):
(WebKit::LayerTreeCoordinatorProxy::setContentsSize):
(WebKit::LayerTreeCoordinatorProxy::setVisibleContentsRect):
(WebKit::LayerTreeCoordinatorProxy::renderNextFrame):
(WebKit::LayerTreeCoordinatorProxy::didChangeScrollPosition):
(WebKit::LayerTreeCoordinatorProxy::syncCanvas):
(WebKit::LayerTreeCoordinatorProxy::purgeBackingStores):
* UIProcess/LayerTreeCoordinatorProxy.h: Renamed from Source/WebKit2/UIProcess/LayerTreeHostProxy.h.
(WebKit):
(LayerTreeCoordinatorProxy):
(WebKit::LayerTreeCoordinatorProxy::layerTreeRenderer):
* UIProcess/LayerTreeCoordinatorProxy.messages.in: Renamed from Source/WebKit2/UIProcess/LayerTreeHostProxy.messages.in.
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::WebLayerTreeRenderer):
(WebKit::WebLayerTreeRenderer::updateViewport):
(WebKit::WebLayerTreeRenderer::renderNextFrame):
(WebKit::WebLayerTreeRenderer::purgeBackingStores):
(WebKit::WebLayerTreeRenderer::detach):
* UIProcess/WebLayerTreeRenderer.h:
(WebKit):
(WebLayerTreeRenderer):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
* WebKit2.pri:
* WebProcess/WebPage/DrawingArea.h:
(DrawingArea):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::didReceiveLayerTreeCoordinatorMessage):
* WebProcess/WebPage/DrawingAreaImpl.h:
(DrawingAreaImpl):
* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp.
(WebKit):
(WebKit::LayerTreeCoordinator::create):
(WebKit::LayerTreeCoordinator::~LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::setLayerFlushSchedulingEnabled):
(WebKit::LayerTreeCoordinator::scheduleLayerFlush):
(WebKit::LayerTreeCoordinator::cancelPendingLayerFlush):
(WebKit::LayerTreeCoordinator::setShouldNotifyAfterNextScheduledLayerFlush):
(WebKit::LayerTreeCoordinator::setRootCompositingLayer):
(WebKit::LayerTreeCoordinator::invalidate):
(WebKit::LayerTreeCoordinator::setNonCompositedContentsNeedDisplay):
(WebKit::LayerTreeCoordinator::scrollNonCompositedContents):
(WebKit::LayerTreeCoordinator::forceRepaint):
(WebKit::LayerTreeCoordinator::sizeDidChange):
(WebKit::LayerTreeCoordinator::didInstallPageOverlay):
(WebKit::LayerTreeCoordinator::didUninstallPageOverlay):
(WebKit::LayerTreeCoordinator::setPageOverlayNeedsDisplay):
(WebKit::LayerTreeCoordinator::setPageOverlayOpacity):
(WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
(WebKit::LayerTreeCoordinator::syncLayerState):
(WebKit::LayerTreeCoordinator::syncLayerChildren):
(WebKit::LayerTreeCoordinator::syncCanvas):
(WebKit::LayerTreeCoordinator::syncLayerFilters):
(WebKit::LayerTreeCoordinator::attachLayer):
(WebKit::LayerTreeCoordinator::detachLayer):
(WebKit::updateOffsetFromViewportForSelf):
(WebKit::updateOffsetFromViewportForLayer):
(WebKit::LayerTreeCoordinator::syncFixedLayers):
(WebKit::LayerTreeCoordinator::performScheduledLayerFlush):
(WebKit::LayerTreeCoordinator::layerFlushTimerFired):
(WebKit::LayerTreeCoordinator::createPageOverlayLayer):
(WebKit::LayerTreeCoordinator::destroyPageOverlayLayer):
(WebKit::LayerTreeCoordinator::adoptImageBackingStore):
(WebKit::LayerTreeCoordinator::releaseImageBackingStore):
(WebKit::LayerTreeCoordinator::notifyAnimationStarted):
(WebKit::LayerTreeCoordinator::notifySyncRequired):
(WebKit::LayerTreeCoordinator::paintContents):
(WebKit::LayerTreeCoordinator::showDebugBorders):
(WebKit::LayerTreeCoordinator::showRepaintCounter):
(WebKit::LayerTreeHost::supportsAcceleratedCompositing):
(WebKit::LayerTreeCoordinator::createTile):
(WebKit::LayerTreeCoordinator::updateTile):
(WebKit::LayerTreeCoordinator::removeTile):
(WebKit::LayerTreeCoordinator::visibleContentsRect):
(WebKit::LayerTreeCoordinator::setVisibleContentsRect):
(WebKit::LayerTreeCoordinator::renderNextFrame):
(WebKit::LayerTreeCoordinator::layerTreeTileUpdatesAllowed):
(WebKit::LayerTreeCoordinator::purgeBackingStores):
(WebKit::LayerTreeCoordinator::beginContentUpdate):
* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h: Renamed from Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.h.
(WebKit):
(LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::layerTreeContext):
(WebKit::LayerTreeCoordinator::pageOverlayShouldApplyFadeWhenPainting):
(WebKit::LayerTreeCoordinator::pauseRendering):
(WebKit::LayerTreeCoordinator::resumeRendering):
(WebKit::LayerTreeCoordinator::deviceScaleFactorDidChange):
* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.messages.in: Renamed from Source/WebKit2/WebProcess/WebPage/LayerTreeHost.messages.in.
* WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp.
(WebCore):
(WebCore::layerByIDMap):
(WebCore::WebGraphicsLayer::layerByID):
(WebCore::toWebLayerID):
(WebCore::WebGraphicsLayer::didChangeLayerState):
(WebCore::WebGraphicsLayer::didChangeChildren):
(WebCore::WebGraphicsLayer::didChangeFilters):
(WebCore::WebGraphicsLayer::setShouldUpdateVisibleRect):
(WebCore::WebGraphicsLayer::didChangeGeometry):
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
(WebCore::WebGraphicsLayer::~WebGraphicsLayer):
(WebCore::WebGraphicsLayer::willBeDestroyed):
(WebCore::WebGraphicsLayer::setChildren):
(WebCore::WebGraphicsLayer::addChild):
(WebCore::WebGraphicsLayer::addChildAtIndex):
(WebCore::WebGraphicsLayer::addChildAbove):
(WebCore::WebGraphicsLayer::addChildBelow):
(WebCore::WebGraphicsLayer::replaceChild):
(WebCore::WebGraphicsLayer::removeFromParent):
(WebCore::WebGraphicsLayer::setPosition):
(WebCore::WebGraphicsLayer::setAnchorPoint):
(WebCore::WebGraphicsLayer::setSize):
(WebCore::WebGraphicsLayer::setTransform):
(WebCore::WebGraphicsLayer::setChildrenTransform):
(WebCore::WebGraphicsLayer::setPreserves3D):
(WebCore::WebGraphicsLayer::setMasksToBounds):
(WebCore::WebGraphicsLayer::setDrawsContent):
(WebCore::WebGraphicsLayer::setContentsOpaque):
(WebCore::WebGraphicsLayer::setBackfaceVisibility):
(WebCore::WebGraphicsLayer::setOpacity):
(WebCore::WebGraphicsLayer::setContentsRect):
(WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
(WebCore::WebGraphicsLayer::setContentsToCanvas):
(WebCore::WebGraphicsLayer::setFilters):
(WebCore::WebGraphicsLayer::setContentsToImage):
(WebCore::WebGraphicsLayer::setMaskLayer):
(WebCore::WebGraphicsLayer::setReplicatedByLayer):
(WebCore::WebGraphicsLayer::setNeedsDisplay):
(WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
(WebCore::WebGraphicsLayer::id):
(WebCore::WebGraphicsLayer::syncCompositingState):
(WebCore::toWebGraphicsLayer):
(WebCore::WebGraphicsLayer::syncChildren):
(WebCore::WebGraphicsLayer::syncFilters):
(WebCore::WebGraphicsLayer::syncLayerState):
(WebCore::WebGraphicsLayer::syncCanvas):
(WebCore::WebGraphicsLayer::ensureImageBackingStore):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::tiledBackingStorePaintBegin):
(WebCore::WebGraphicsLayer::setRootLayer):
(WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
(WebCore::WebGraphicsLayer::setContentsScale):
(WebCore::WebGraphicsLayer::effectiveContentsScale):
(WebCore::WebGraphicsLayer::adjustContentsScale):
(WebCore::WebGraphicsLayer::createBackingStore):
(WebCore::WebGraphicsLayer::tiledBackingStorePaint):
(WebCore::WebGraphicsLayer::tiledBackingStorePaintEnd):
(WebCore::WebGraphicsLayer::tiledBackingStoreUpdatesAllowed):
(WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
(WebCore::WebGraphicsLayer::shouldUseTiledBackingStore):
(WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
(WebCore::WebGraphicsLayer::tiledBackingStoreBackgroundColor):
(WebCore::WebGraphicsLayer::beginContentUpdate):
(WebCore::WebGraphicsLayer::createTile):
(WebCore::WebGraphicsLayer::updateTile):
(WebCore::WebGraphicsLayer::removeTile):
(WebCore::WebGraphicsLayer::updateContentBuffers):
(WebCore::WebGraphicsLayer::purgeBackingStores):
(WebCore::WebGraphicsLayer::setWebGraphicsLayerClient):
(WebCore::WebGraphicsLayer::adjustVisibleRect):
(WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
(WebCore::createWebGraphicsLayer):
(WebCore::WebGraphicsLayer::initFactory):
(WebCore::WebGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
* WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.h.
(WebCore):
(WebKit):
(WebGraphicsLayerClient):
(WebGraphicsLayer):
(WebCore::WebGraphicsLayer::image):
(WebCore::WebGraphicsLayer::fixedToViewport):
(WebCore::WebGraphicsLayer::setFixedToViewport):
(WebCore::WebGraphicsLayer::maskTarget):
(WebCore::WebGraphicsLayer::setMaskTarget):
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/LayerTreeHost.h:
(LayerTreeHost):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121221
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
UIProcess/FindIndicator.cpp
UIProcess/GeolocationPermissionRequestManagerProxy.cpp
UIProcess/GeolocationPermissionRequestProxy.cpp
- UIProcess/LayerTreeHostProxy.cpp
+ UIProcess/LayerTreeCoordinatorProxy.cpp
UIProcess/ResponsivenessTimer.cpp
UIProcess/VisitedLinkProvider.cpp
UIProcess/WebApplicationCacheManagerProxy.cpp
WebProcess/WebCoreSupport/WebEditorClient.cpp
WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
WebProcess/WebCoreSupport/WebGeolocationClient.cpp
- WebProcess/WebCoreSupport/WebGraphicsLayer.cpp
WebProcess/WebCoreSupport/WebInspectorClient.cpp
WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp
WebProcess/WebCoreSupport/WebNotificationClient.cpp
WebProcess/WebPage/EncoderAdapter.cpp
WebProcess/WebPage/EventDispatcher.cpp
WebProcess/WebPage/FindController.cpp
+ WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.cpp
WebProcess/WebPage/LayerTreeHost.cpp
WebProcess/WebPage/PageOverlay.cpp
WebProcess/WebPage/TapHighlightController.cpp
Shared/Plugins/NPObjectMessageReceiver.messages.in
UIProcess/DrawingAreaProxy.messages.in
- UIProcess/LayerTreeHostProxy.messages.in
+ UIProcess/LayerTreeCoordinatorProxy.messages.in
UIProcess/WebApplicationCacheManagerProxy.messages.in
UIProcess/WebContext.messages.in
UIProcess/WebCookieManagerProxy.messages.in
WebProcess/WebPage/DrawingArea.messages.in
WebProcess/WebPage/EventDispatcher.messages.in
- WebProcess/WebPage/LayerTreeHost.messages.in
+ WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.messages.in
WebProcess/WebPage/WebInspector.messages.in
WebProcess/WebPage/WebPage.messages.in
)
+2012-06-25 YoungTaeck Song <youngtaeck.song@samsung.com>
+
+ [WK2][Qt][EFL] Extract common code from LayerTreeHostQt
+ https://bugs.webkit.org/show_bug.cgi?id=89837
+
+ Reviewed by Noam Rosenthal.
+
+ Extract common code from LayerTreeHostQt to be used by both Qt and Efl.
+ I renamed LayerTreeHost to LayerTreeCoordinator, and these are moved under WebProcess/WebPage/LayerTreeCoordinator.
+ I Modified LayerTreeHostProxy to LayerTreeCoordinatorProxy too, Because LayerTreeHostProxy and LayerTreeHost were pair.
+ Also WebGraphicsLayer moved under that directory.
+
+ * CMakeLists.txt:
+ * DerivedSources.pri:
+ * GNUmakefile.list.am:
+ * Platform/CoreIPC/MessageID.h:
+ * Target.pri:
+ * UIProcess/API/qt/qquickwebpage.cpp:
+ (QQuickWebPagePrivate::paint):
+ (QQuickWebPage::updatePaintNode):
+ (QQuickWebPagePrivate::updateSize):
+ * UIProcess/DrawingAreaProxy.cpp:
+ (WebKit::DrawingAreaProxy::didReceiveLayerTreeCoordinatorProxyMessage):
+ * UIProcess/DrawingAreaProxy.h:
+ (WebKit):
+ (WebKit::DrawingAreaProxy::layerTreeCoordinatorProxy):
+ (DrawingAreaProxy):
+ * UIProcess/DrawingAreaProxyImpl.cpp:
+ (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
+ (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
+ (WebKit::DrawingAreaProxyImpl::didReceiveLayerTreeCoordinatorProxyMessage):
+ (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
+ * UIProcess/DrawingAreaProxyImpl.h:
+ (WebKit):
+ (DrawingAreaProxyImpl):
+ * UIProcess/LayerTreeCoordinatorProxy.cpp: Renamed from Source/WebKit2/UIProcess/LayerTreeHostProxy.cpp.
+ (WebKit):
+ (WebKit::LayerTreeCoordinatorProxy::LayerTreeCoordinatorProxy):
+ (WebKit::LayerTreeCoordinatorProxy::~LayerTreeCoordinatorProxy):
+ (WebKit::LayerTreeCoordinatorProxy::updateViewport):
+ (WebKit::LayerTreeCoordinatorProxy::dispatchUpdate):
+ (WebKit::LayerTreeCoordinatorProxy::createTileForLayer):
+ (WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
+ (WebKit::LayerTreeCoordinatorProxy::removeTileForLayer):
+ (WebKit::LayerTreeCoordinatorProxy::deleteCompositingLayer):
+ (WebKit::LayerTreeCoordinatorProxy::setRootCompositingLayer):
+ (WebKit::LayerTreeCoordinatorProxy::setCompositingLayerState):
+ (WebKit::LayerTreeCoordinatorProxy::setCompositingLayerChildren):
+ (WebKit::LayerTreeCoordinatorProxy::setCompositingLayerFilters):
+ (WebKit::LayerTreeCoordinatorProxy::didRenderFrame):
+ (WebKit::LayerTreeCoordinatorProxy::createDirectlyCompositedImage):
+ (WebKit::LayerTreeCoordinatorProxy::destroyDirectlyCompositedImage):
+ (WebKit::LayerTreeCoordinatorProxy::setContentsSize):
+ (WebKit::LayerTreeCoordinatorProxy::setVisibleContentsRect):
+ (WebKit::LayerTreeCoordinatorProxy::renderNextFrame):
+ (WebKit::LayerTreeCoordinatorProxy::didChangeScrollPosition):
+ (WebKit::LayerTreeCoordinatorProxy::syncCanvas):
+ (WebKit::LayerTreeCoordinatorProxy::purgeBackingStores):
+ * UIProcess/LayerTreeCoordinatorProxy.h: Renamed from Source/WebKit2/UIProcess/LayerTreeHostProxy.h.
+ (WebKit):
+ (LayerTreeCoordinatorProxy):
+ (WebKit::LayerTreeCoordinatorProxy::layerTreeRenderer):
+ * UIProcess/LayerTreeCoordinatorProxy.messages.in: Renamed from Source/WebKit2/UIProcess/LayerTreeHostProxy.messages.in.
+ * UIProcess/WebLayerTreeRenderer.cpp:
+ (WebKit::WebLayerTreeRenderer::WebLayerTreeRenderer):
+ (WebKit::WebLayerTreeRenderer::updateViewport):
+ (WebKit::WebLayerTreeRenderer::renderNextFrame):
+ (WebKit::WebLayerTreeRenderer::purgeBackingStores):
+ (WebKit::WebLayerTreeRenderer::detach):
+ * UIProcess/WebLayerTreeRenderer.h:
+ (WebKit):
+ (WebLayerTreeRenderer):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::didReceiveMessage):
+ * WebKit2.pri:
+ * WebProcess/WebPage/DrawingArea.h:
+ (DrawingArea):
+ * WebProcess/WebPage/DrawingAreaImpl.cpp:
+ (WebKit::DrawingAreaImpl::didReceiveLayerTreeCoordinatorMessage):
+ * WebProcess/WebPage/DrawingAreaImpl.h:
+ (DrawingAreaImpl):
+ * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.cpp.
+ (WebKit):
+ (WebKit::LayerTreeCoordinator::create):
+ (WebKit::LayerTreeCoordinator::~LayerTreeCoordinator):
+ (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
+ (WebKit::LayerTreeCoordinator::setLayerFlushSchedulingEnabled):
+ (WebKit::LayerTreeCoordinator::scheduleLayerFlush):
+ (WebKit::LayerTreeCoordinator::cancelPendingLayerFlush):
+ (WebKit::LayerTreeCoordinator::setShouldNotifyAfterNextScheduledLayerFlush):
+ (WebKit::LayerTreeCoordinator::setRootCompositingLayer):
+ (WebKit::LayerTreeCoordinator::invalidate):
+ (WebKit::LayerTreeCoordinator::setNonCompositedContentsNeedDisplay):
+ (WebKit::LayerTreeCoordinator::scrollNonCompositedContents):
+ (WebKit::LayerTreeCoordinator::forceRepaint):
+ (WebKit::LayerTreeCoordinator::sizeDidChange):
+ (WebKit::LayerTreeCoordinator::didInstallPageOverlay):
+ (WebKit::LayerTreeCoordinator::didUninstallPageOverlay):
+ (WebKit::LayerTreeCoordinator::setPageOverlayNeedsDisplay):
+ (WebKit::LayerTreeCoordinator::setPageOverlayOpacity):
+ (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
+ (WebKit::LayerTreeCoordinator::syncLayerState):
+ (WebKit::LayerTreeCoordinator::syncLayerChildren):
+ (WebKit::LayerTreeCoordinator::syncCanvas):
+ (WebKit::LayerTreeCoordinator::syncLayerFilters):
+ (WebKit::LayerTreeCoordinator::attachLayer):
+ (WebKit::LayerTreeCoordinator::detachLayer):
+ (WebKit::updateOffsetFromViewportForSelf):
+ (WebKit::updateOffsetFromViewportForLayer):
+ (WebKit::LayerTreeCoordinator::syncFixedLayers):
+ (WebKit::LayerTreeCoordinator::performScheduledLayerFlush):
+ (WebKit::LayerTreeCoordinator::layerFlushTimerFired):
+ (WebKit::LayerTreeCoordinator::createPageOverlayLayer):
+ (WebKit::LayerTreeCoordinator::destroyPageOverlayLayer):
+ (WebKit::LayerTreeCoordinator::adoptImageBackingStore):
+ (WebKit::LayerTreeCoordinator::releaseImageBackingStore):
+ (WebKit::LayerTreeCoordinator::notifyAnimationStarted):
+ (WebKit::LayerTreeCoordinator::notifySyncRequired):
+ (WebKit::LayerTreeCoordinator::paintContents):
+ (WebKit::LayerTreeCoordinator::showDebugBorders):
+ (WebKit::LayerTreeCoordinator::showRepaintCounter):
+ (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
+ (WebKit::LayerTreeCoordinator::createTile):
+ (WebKit::LayerTreeCoordinator::updateTile):
+ (WebKit::LayerTreeCoordinator::removeTile):
+ (WebKit::LayerTreeCoordinator::visibleContentsRect):
+ (WebKit::LayerTreeCoordinator::setVisibleContentsRect):
+ (WebKit::LayerTreeCoordinator::renderNextFrame):
+ (WebKit::LayerTreeCoordinator::layerTreeTileUpdatesAllowed):
+ (WebKit::LayerTreeCoordinator::purgeBackingStores):
+ (WebKit::LayerTreeCoordinator::beginContentUpdate):
+ * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h: Renamed from Source/WebKit2/WebProcess/WebPage/qt/LayerTreeHostQt.h.
+ (WebKit):
+ (LayerTreeCoordinator):
+ (WebKit::LayerTreeCoordinator::layerTreeContext):
+ (WebKit::LayerTreeCoordinator::pageOverlayShouldApplyFadeWhenPainting):
+ (WebKit::LayerTreeCoordinator::pauseRendering):
+ (WebKit::LayerTreeCoordinator::resumeRendering):
+ (WebKit::LayerTreeCoordinator::deviceScaleFactorDidChange):
+ * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.messages.in: Renamed from Source/WebKit2/WebProcess/WebPage/LayerTreeHost.messages.in.
+ * WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp.
+ (WebCore):
+ (WebCore::layerByIDMap):
+ (WebCore::WebGraphicsLayer::layerByID):
+ (WebCore::toWebLayerID):
+ (WebCore::WebGraphicsLayer::didChangeLayerState):
+ (WebCore::WebGraphicsLayer::didChangeChildren):
+ (WebCore::WebGraphicsLayer::didChangeFilters):
+ (WebCore::WebGraphicsLayer::setShouldUpdateVisibleRect):
+ (WebCore::WebGraphicsLayer::didChangeGeometry):
+ (WebCore::WebGraphicsLayer::WebGraphicsLayer):
+ (WebCore::WebGraphicsLayer::~WebGraphicsLayer):
+ (WebCore::WebGraphicsLayer::willBeDestroyed):
+ (WebCore::WebGraphicsLayer::setChildren):
+ (WebCore::WebGraphicsLayer::addChild):
+ (WebCore::WebGraphicsLayer::addChildAtIndex):
+ (WebCore::WebGraphicsLayer::addChildAbove):
+ (WebCore::WebGraphicsLayer::addChildBelow):
+ (WebCore::WebGraphicsLayer::replaceChild):
+ (WebCore::WebGraphicsLayer::removeFromParent):
+ (WebCore::WebGraphicsLayer::setPosition):
+ (WebCore::WebGraphicsLayer::setAnchorPoint):
+ (WebCore::WebGraphicsLayer::setSize):
+ (WebCore::WebGraphicsLayer::setTransform):
+ (WebCore::WebGraphicsLayer::setChildrenTransform):
+ (WebCore::WebGraphicsLayer::setPreserves3D):
+ (WebCore::WebGraphicsLayer::setMasksToBounds):
+ (WebCore::WebGraphicsLayer::setDrawsContent):
+ (WebCore::WebGraphicsLayer::setContentsOpaque):
+ (WebCore::WebGraphicsLayer::setBackfaceVisibility):
+ (WebCore::WebGraphicsLayer::setOpacity):
+ (WebCore::WebGraphicsLayer::setContentsRect):
+ (WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
+ (WebCore::WebGraphicsLayer::setContentsToCanvas):
+ (WebCore::WebGraphicsLayer::setFilters):
+ (WebCore::WebGraphicsLayer::setContentsToImage):
+ (WebCore::WebGraphicsLayer::setMaskLayer):
+ (WebCore::WebGraphicsLayer::setReplicatedByLayer):
+ (WebCore::WebGraphicsLayer::setNeedsDisplay):
+ (WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
+ (WebCore::WebGraphicsLayer::id):
+ (WebCore::WebGraphicsLayer::syncCompositingState):
+ (WebCore::toWebGraphicsLayer):
+ (WebCore::WebGraphicsLayer::syncChildren):
+ (WebCore::WebGraphicsLayer::syncFilters):
+ (WebCore::WebGraphicsLayer::syncLayerState):
+ (WebCore::WebGraphicsLayer::syncCanvas):
+ (WebCore::WebGraphicsLayer::ensureImageBackingStore):
+ (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
+ (WebCore::WebGraphicsLayer::tiledBackingStorePaintBegin):
+ (WebCore::WebGraphicsLayer::setRootLayer):
+ (WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
+ (WebCore::WebGraphicsLayer::setContentsScale):
+ (WebCore::WebGraphicsLayer::effectiveContentsScale):
+ (WebCore::WebGraphicsLayer::adjustContentsScale):
+ (WebCore::WebGraphicsLayer::createBackingStore):
+ (WebCore::WebGraphicsLayer::tiledBackingStorePaint):
+ (WebCore::WebGraphicsLayer::tiledBackingStorePaintEnd):
+ (WebCore::WebGraphicsLayer::tiledBackingStoreUpdatesAllowed):
+ (WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
+ (WebCore::WebGraphicsLayer::shouldUseTiledBackingStore):
+ (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
+ (WebCore::WebGraphicsLayer::tiledBackingStoreBackgroundColor):
+ (WebCore::WebGraphicsLayer::beginContentUpdate):
+ (WebCore::WebGraphicsLayer::createTile):
+ (WebCore::WebGraphicsLayer::updateTile):
+ (WebCore::WebGraphicsLayer::removeTile):
+ (WebCore::WebGraphicsLayer::updateContentBuffers):
+ (WebCore::WebGraphicsLayer::purgeBackingStores):
+ (WebCore::WebGraphicsLayer::setWebGraphicsLayerClient):
+ (WebCore::WebGraphicsLayer::adjustVisibleRect):
+ (WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
+ (WebCore::createWebGraphicsLayer):
+ (WebCore::WebGraphicsLayer::initFactory):
+ (WebCore::WebGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
+ * WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.h.
+ (WebCore):
+ (WebKit):
+ (WebGraphicsLayerClient):
+ (WebGraphicsLayer):
+ (WebCore::WebGraphicsLayer::image):
+ (WebCore::WebGraphicsLayer::fixedToViewport):
+ (WebCore::WebGraphicsLayer::setFixedToViewport):
+ (WebCore::WebGraphicsLayer::maskTarget):
+ (WebCore::WebGraphicsLayer::setMaskTarget):
+ * WebProcess/WebPage/LayerTreeHost.cpp:
+ (WebKit::LayerTreeHost::create):
+ * WebProcess/WebPage/LayerTreeHost.h:
+ (LayerTreeHost):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::didReceiveMessage):
+
2012-06-25 Anders Carlsson <andersca@apple.com>
[Lion WK2] fast/loader/reload-zero-byte-plugin.html hits assert
DownloadProxy.messages.in \
DrawingAreaProxy.messages.in \
EventDispatcher.messages.in \
- LayerTreeHostProxy.messages.in \
+ LayerTreeCoordinatorProxy.messages.in \
PluginControllerProxy.messages.in \
PluginProcess.messages.in \
PluginProcessConnection.messages.in \
WebFullScreenManager.messages.in \
WebFullScreenManagerProxy.messages.in \
WebPage/DrawingArea.messages.in \
- WebPage/LayerTreeHost.messages.in \
+ WebPage/LayerTreeCoordinator/LayerTreeCoordinator.messages.in \
WebPage/WebInspector.messages.in \
WebPage/WebPage.messages.in \
WebPageProxy.messages.in \
DerivedSources/WebKit2/DrawingAreaProxyMessages.h \
DerivedSources/WebKit2/EventDispatcherMessageReceiver.cpp \
DerivedSources/WebKit2/EventDispatcherMessages.h \
- DerivedSources/WebKit2/LayerTreeHostProxyMessageReceiver.cpp \
- DerivedSources/WebKit2/LayerTreeHostProxyMessages.h \
+ DerivedSources/WebKit2/LayerTreeCoordinatorProxyMessageReceiver.cpp \
+ DerivedSources/WebKit2/LayerTreeCoordinatorProxyMessages.h \
DerivedSources/WebKit2/NPObjectMessageReceiverMessageReceiver.cpp \
DerivedSources/WebKit2/NPObjectMessageReceiverMessages.h \
DerivedSources/WebKit2/PluginControllerProxyMessageReceiver.cpp \
MessageClassAuthenticationManager,
MessageClassDrawingArea,
MessageClassInjectedBundle,
- MessageClassLayerTreeHost,
+ MessageClassLayerTreeCoordinator,
MessageClassWebApplicationCacheManager,
MessageClassWebCookieManager,
MessageClassWebDatabaseManager,
// Messages sent by the web process to the UI process.
MessageClassDownloadProxy,
MessageClassDrawingAreaProxy,
- MessageClassLayerTreeHostProxy,
+ MessageClassLayerTreeCoordinatorProxy,
MessageClassWebApplicationCacheManagerProxy,
MessageClassWebContext,
MessageClassWebContextLegacy,
UIProcess/GeolocationPermissionRequestProxy.h \
UIProcess/Launcher/ProcessLauncher.h \
UIProcess/Launcher/ThreadLauncher.h \
- UIProcess/LayerTreeHostProxy.h \
+ UIProcess/LayerTreeCoordinatorProxy.h \
UIProcess/Notifications/NotificationPermissionRequest.h \
UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h \
UIProcess/Notifications/WebNotification.h \
WebProcess/WebCoreSupport/WebErrors.h \
WebProcess/WebCoreSupport/WebFrameLoaderClient.h \
WebProcess/WebCoreSupport/WebGeolocationClient.h \
- WebProcess/WebCoreSupport/WebGraphicsLayer.h \
WebProcess/WebCoreSupport/WebInspectorClient.h \
WebProcess/WebCoreSupport/WebInspectorFrontendClient.h \
WebProcess/WebCoreSupport/WebNotificationClient.h \
WebProcess/WebPage/DrawingAreaImpl.h \
WebProcess/WebPage/EventDispatcher.h \
WebProcess/WebPage/FindController.h \
+ WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h \
+ WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.h \
WebProcess/WebPage/TapHighlightController.h \
WebProcess/WebPage/PageOverlay.h \
WebProcess/WebPage/UpdateAtlas.h \
WebProcess/WebPage/WebPage.h \
WebProcess/WebPage/WebPageGroupProxy.h \
WebProcess/WebPage/WebUndoStep.h \
- WebProcess/WebPage/qt/LayerTreeHostQt.h \
WebProcess/WebConnectionToUIProcess.h \
WebProcess/WebProcess.h \
WebProcess/qt/QtBuiltinBundle.h \
UIProcess/Launcher/ThreadLauncher.cpp \
UIProcess/Launcher/qt/ProcessLauncherQt.cpp \
UIProcess/Launcher/qt/ThreadLauncherQt.cpp \
- UIProcess/LayerTreeHostProxy.cpp \
+ UIProcess/LayerTreeCoordinatorProxy.cpp \
UIProcess/Notifications/NotificationPermissionRequest.cpp \
UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp \
UIProcess/Notifications/WebNotification.cpp \
WebProcess/WebCoreSupport/WebEditorClient.cpp \
WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp \
WebProcess/WebCoreSupport/WebGeolocationClient.cpp \
- WebProcess/WebCoreSupport/WebGraphicsLayer.cpp \
WebProcess/WebCoreSupport/WebInspectorClient.cpp \
WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp \
WebProcess/WebCoreSupport/WebNotificationClient.cpp \
WebProcess/WebPage/EncoderAdapter.cpp \
WebProcess/WebPage/EventDispatcher.cpp \
WebProcess/WebPage/FindController.cpp \
+ WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp \
+ WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.cpp \
WebProcess/WebPage/TapHighlightController.cpp \
WebProcess/WebPage/LayerTreeHost.cpp \
WebProcess/WebPage/PageOverlay.cpp \
WebProcess/WebPage/WebPageGroupProxy.cpp \
WebProcess/WebPage/WebUndoStep.cpp \
WebProcess/WebPage/qt/WebInspectorQt.cpp \
- WebProcess/WebPage/qt/LayerTreeHostQt.cpp \
WebProcess/WebPage/qt/WebPageQt.cpp \
WebProcess/WebConnectionToUIProcess.cpp \
WebProcess/WebProcess.cpp \
#include "config.h"
#include "qquickwebpage_p.h"
-#include "LayerTreeHostProxy.h"
+#include "LayerTreeCoordinatorProxy.h"
#include "QtWebPageEventHandler.h"
#include "QtWebPageSGNode.h"
#include "TransformationMatrix.h"
if (!webPageProxy->drawingArea())
return;
- LayerTreeHostProxy* layerTreeHostProxy = webPageProxy->drawingArea()->layerTreeHostProxy();
- if (layerTreeHostProxy->layerTreeRenderer())
- layerTreeHostProxy->layerTreeRenderer()->paintToGraphicsContext(painter);
+ LayerTreeCoordinatorProxy* layerTreeCoordinatorProxy = webPageProxy->drawingArea()->layerTreeCoordinatorProxy();
+ if (layerTreeCoordinatorProxy->layerTreeRenderer())
+ layerTreeCoordinatorProxy->layerTreeRenderer()->paintToGraphicsContext(painter);
}
QSGNode* QQuickWebPage::updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData*)
if (!d->webPageProxy->drawingArea())
return oldNode;
- LayerTreeHostProxy* layerTreeHostProxy = d->webPageProxy->drawingArea()->layerTreeHostProxy();
- WebLayerTreeRenderer* renderer = layerTreeHostProxy->layerTreeRenderer();
+ LayerTreeCoordinatorProxy* layerTreeCoordinatorProxy = d->webPageProxy->drawingArea()->layerTreeCoordinatorProxy();
+ WebLayerTreeRenderer* renderer = layerTreeCoordinatorProxy->layerTreeRenderer();
QtWebPageSGNode* node = static_cast<QtWebPageSGNode*>(oldNode);
if (!node)
QSizeF scaledSize = contentsSize * contentsScale;
DrawingAreaProxy* drawingArea = webPageProxy->drawingArea();
- if (drawingArea && drawingArea->layerTreeHostProxy())
- drawingArea->layerTreeHostProxy()->setContentsSize(contentsSize);
+ if (drawingArea && drawingArea->layerTreeCoordinatorProxy())
+ drawingArea->layerTreeCoordinatorProxy()->setContentsSize(contentsSize);
q->setSize(scaledSize);
#include "WebPageProxy.h"
#if USE(UI_SIDE_COMPOSITING)
-#include "LayerTreeHostProxy.h"
+#include "LayerTreeCoordinatorProxy.h"
#include <CoreIPC/MessageID.h>
#endif
return IntRect(IntPoint::zero(), m_webPageProxy->viewSize());
}
-void DrawingAreaProxy::didReceiveLayerTreeHostProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
+void DrawingAreaProxy::didReceiveLayerTreeCoordinatorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
}
#endif
namespace WebKit {
class LayerTreeContext;
-class LayerTreeHostProxy;
+class LayerTreeCoordinatorProxy;
class UpdateInfo;
class WebLayerTreeInfo;
class WebLayerUpdateInfo;
virtual WebCore::IntRect viewportVisibleRect() const { return contentsRect(); }
virtual WebCore::IntRect contentsRect() const;
virtual bool isBackingStoreReady() const { return true; }
- LayerTreeHostProxy* layerTreeHostProxy() const { return m_layerTreeHostProxy.get(); }
+ LayerTreeCoordinatorProxy* layerTreeCoordinatorProxy() const { return m_layerTreeCoordinatorProxy.get(); }
virtual void setVisibleContentsRect(const WebCore::IntRect& visibleContentsRect, float scale, const WebCore::FloatPoint& trajectoryVector, const WebCore::FloatPoint& accurateVisibleContentsPosition = WebCore::FloatPoint()) { }
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) { }
- virtual void didReceiveLayerTreeHostProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+ virtual void didReceiveLayerTreeCoordinatorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
WebPageProxy* page() { return m_webPageProxy; }
#endif
WebCore::IntSize m_scrollOffset;
#if USE(UI_SIDE_COMPOSITING)
- OwnPtr<LayerTreeHostProxy> m_layerTreeHostProxy;
+ OwnPtr<LayerTreeCoordinatorProxy> m_layerTreeCoordinatorProxy;
#endif
private:
#include <WebCore/Region.h>
#if USE(UI_SIDE_COMPOSITING)
-#include "LayerTreeHostProxy.h"
+#include "LayerTreeCoordinatorProxy.h"
#endif
using namespace WebCore;
#if USE(UI_SIDE_COMPOSITING)
// 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_layerTreeHostProxy = adoptPtr(new LayerTreeHostProxy(this));
+ m_layerTreeCoordinatorProxy = adoptPtr(new LayerTreeCoordinatorProxy(this));
#endif
}
m_layerTreeContext = layerTreeContext;
m_webPageProxy->enterAcceleratedCompositingMode(layerTreeContext);
#if USE(UI_SIDE_COMPOSITING)
- if (!m_layerTreeHostProxy)
- m_layerTreeHostProxy = adoptPtr(new LayerTreeHostProxy(this));
+ if (!m_layerTreeCoordinatorProxy)
+ m_layerTreeCoordinatorProxy = adoptPtr(new LayerTreeCoordinatorProxy(this));
#endif
}
#if USE(UI_SIDE_COMPOSITING)
-void DrawingAreaProxyImpl::didReceiveLayerTreeHostProxyMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
+void DrawingAreaProxyImpl::didReceiveLayerTreeCoordinatorProxyMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
- if (m_layerTreeHostProxy)
- m_layerTreeHostProxy->didReceiveLayerTreeHostProxyMessage(connection, messageID, arguments);
+ if (m_layerTreeCoordinatorProxy)
+ m_layerTreeCoordinatorProxy->didReceiveLayerTreeCoordinatorProxyMessage(connection, messageID, arguments);
}
void DrawingAreaProxyImpl::setVisibleContentsRect(const WebCore::IntRect& visibleContentsRect, float scale, const WebCore::FloatPoint& trajectoryVector, const WebCore::FloatPoint& accurateVisibleContentsPosition)
{
- if (m_layerTreeHostProxy)
- m_layerTreeHostProxy->setVisibleContentsRect(visibleContentsRect, scale, trajectoryVector, accurateVisibleContentsPosition);
+ if (m_layerTreeCoordinatorProxy)
+ m_layerTreeCoordinatorProxy->setVisibleContentsRect(visibleContentsRect, scale, trajectoryVector, accurateVisibleContentsPosition);
}
#endif
namespace WebKit {
-class LayerTreeHostProxy;
+class LayerTreeCoordinatorProxy;
class DrawingAreaProxyImpl : public DrawingAreaProxy {
public:
#if USE(UI_SIDE_COMPOSITING)
virtual void setVisibleContentsRect(const WebCore::IntRect& visibleContentsRect, float scale, const WebCore::FloatPoint& trajectory, const WebCore::FloatPoint& accurateVisibleContentsPosition = WebCore::FloatPoint());
- void didReceiveLayerTreeHostProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+ void didReceiveLayerTreeCoordinatorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
#endif
#else
bool isInAcceleratedCompositingMode() const { return false; }
#include "config.h"
#if USE(UI_SIDE_COMPOSITING)
-#include "LayerTreeHostProxy.h"
+#include "LayerTreeCoordinatorProxy.h"
-#include "LayerTreeHostMessages.h"
+#include "LayerTreeCoordinatorMessages.h"
#include "UpdateInfo.h"
#include "WebCoreArgumentCoders.h"
#include "WebLayerTreeInfo.h"
using namespace WebCore;
-LayerTreeHostProxy::LayerTreeHostProxy(DrawingAreaProxy* drawingAreaProxy)
+LayerTreeCoordinatorProxy::LayerTreeCoordinatorProxy(DrawingAreaProxy* drawingAreaProxy)
: m_drawingAreaProxy(drawingAreaProxy)
, m_renderer(adoptRef(new WebLayerTreeRenderer(this)))
{
}
-LayerTreeHostProxy::~LayerTreeHostProxy()
+LayerTreeCoordinatorProxy::~LayerTreeCoordinatorProxy()
{
m_renderer->detach();
}
-void LayerTreeHostProxy::updateViewport()
+void LayerTreeCoordinatorProxy::updateViewport()
{
m_drawingAreaProxy->updateViewport();
}
-void LayerTreeHostProxy::dispatchUpdate(const Function<void()>& function)
+void LayerTreeCoordinatorProxy::dispatchUpdate(const Function<void()>& function)
{
m_renderer->appendUpdate(function);
}
-void LayerTreeHostProxy::createTileForLayer(int layerID, int tileID, const IntRect& targetRect, const WebKit::SurfaceUpdateInfo& updateInfo)
+void LayerTreeCoordinatorProxy::createTileForLayer(int layerID, int tileID, const IntRect& targetRect, const WebKit::SurfaceUpdateInfo& updateInfo)
{
dispatchUpdate(bind(&WebLayerTreeRenderer::createTile, m_renderer.get(), layerID, tileID, updateInfo.scaleFactor));
updateTileForLayer(layerID, tileID, targetRect, updateInfo);
}
-void LayerTreeHostProxy::updateTileForLayer(int layerID, int tileID, const IntRect& targetRect, const WebKit::SurfaceUpdateInfo& updateInfo)
+void LayerTreeCoordinatorProxy::updateTileForLayer(int layerID, int tileID, const IntRect& targetRect, const WebKit::SurfaceUpdateInfo& updateInfo)
{
RefPtr<ShareableSurface> surface;
#if USE(GRAPHICS_SURFACE)
dispatchUpdate(bind(&WebLayerTreeRenderer::updateTile, m_renderer.get(), layerID, tileID, WebLayerTreeRenderer::TileUpdate(updateInfo.updateRect, targetRect, surface, updateInfo.surfaceOffset)));
}
-void LayerTreeHostProxy::removeTileForLayer(int layerID, int tileID)
+void LayerTreeCoordinatorProxy::removeTileForLayer(int layerID, int tileID)
{
dispatchUpdate(bind(&WebLayerTreeRenderer::removeTile, m_renderer.get(), layerID, tileID));
}
-void LayerTreeHostProxy::deleteCompositingLayer(WebLayerID id)
+void LayerTreeCoordinatorProxy::deleteCompositingLayer(WebLayerID id)
{
dispatchUpdate(bind(&WebLayerTreeRenderer::deleteLayer, m_renderer.get(), id));
updateViewport();
}
-void LayerTreeHostProxy::setRootCompositingLayer(WebLayerID id)
+void LayerTreeCoordinatorProxy::setRootCompositingLayer(WebLayerID id)
{
dispatchUpdate(bind(&WebLayerTreeRenderer::setRootLayerID, m_renderer.get(), id));
updateViewport();
}
-void LayerTreeHostProxy::setCompositingLayerState(WebLayerID id, const WebLayerInfo& info)
+void LayerTreeCoordinatorProxy::setCompositingLayerState(WebLayerID id, const WebLayerInfo& info)
{
dispatchUpdate(bind(&WebLayerTreeRenderer::setLayerState, m_renderer.get(), id, info));
}
-void LayerTreeHostProxy::setCompositingLayerChildren(WebLayerID id, const Vector<WebLayerID>& children)
+void LayerTreeCoordinatorProxy::setCompositingLayerChildren(WebLayerID id, const Vector<WebLayerID>& children)
{
dispatchUpdate(bind(&WebLayerTreeRenderer::setLayerChildren, m_renderer.get(), id, children));
}
#if ENABLE(CSS_FILTERS)
-void LayerTreeHostProxy::setCompositingLayerFilters(WebLayerID id, const FilterOperations& filters)
+void LayerTreeCoordinatorProxy::setCompositingLayerFilters(WebLayerID id, const FilterOperations& filters)
{
dispatchUpdate(bind(&WebLayerTreeRenderer::setLayerFilters, m_renderer.get(), id, filters));
}
#endif
-void LayerTreeHostProxy::didRenderFrame()
+void LayerTreeCoordinatorProxy::didRenderFrame()
{
dispatchUpdate(bind(&WebLayerTreeRenderer::flushLayerChanges, m_renderer.get()));
updateViewport();
}
-void LayerTreeHostProxy::createDirectlyCompositedImage(int64_t key, const WebKit::ShareableBitmap::Handle& handle)
+void LayerTreeCoordinatorProxy::createDirectlyCompositedImage(int64_t key, const WebKit::ShareableBitmap::Handle& handle)
{
RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(handle);
dispatchUpdate(bind(&WebLayerTreeRenderer::createImage, m_renderer.get(), key, bitmap));
}
-void LayerTreeHostProxy::destroyDirectlyCompositedImage(int64_t key)
+void LayerTreeCoordinatorProxy::destroyDirectlyCompositedImage(int64_t key)
{
dispatchUpdate(bind(&WebLayerTreeRenderer::destroyImage, m_renderer.get(), key));
}
-void LayerTreeHostProxy::setContentsSize(const FloatSize& contentsSize)
+void LayerTreeCoordinatorProxy::setContentsSize(const FloatSize& contentsSize)
{
dispatchUpdate(bind(&WebLayerTreeRenderer::setContentsSize, m_renderer.get(), contentsSize));
}
-void LayerTreeHostProxy::setVisibleContentsRect(const IntRect& rect, float scale, const FloatPoint& trajectoryVector, const WebCore::FloatPoint& accurateVisibleContentsPosition)
+void LayerTreeCoordinatorProxy::setVisibleContentsRect(const IntRect& rect, float scale, const FloatPoint& trajectoryVector, const WebCore::FloatPoint& accurateVisibleContentsPosition)
{
dispatchUpdate(bind(&WebLayerTreeRenderer::setVisibleContentsRect, m_renderer.get(), rect, scale, accurateVisibleContentsPosition));
- m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeHost::SetVisibleContentsRect(rect, scale, trajectoryVector), m_drawingAreaProxy->page()->pageID());
+ m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeCoordinator::SetVisibleContentsRect(rect, scale, trajectoryVector), m_drawingAreaProxy->page()->pageID());
}
-void LayerTreeHostProxy::renderNextFrame()
+void LayerTreeCoordinatorProxy::renderNextFrame()
{
- m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeHost::RenderNextFrame(), m_drawingAreaProxy->page()->pageID());
+ m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeCoordinator::RenderNextFrame(), m_drawingAreaProxy->page()->pageID());
}
-void LayerTreeHostProxy::didChangeScrollPosition(const IntPoint& position)
+void LayerTreeCoordinatorProxy::didChangeScrollPosition(const IntPoint& position)
{
dispatchUpdate(bind(&WebLayerTreeRenderer::didChangeScrollPosition, m_renderer.get(), position));
}
-void LayerTreeHostProxy::syncCanvas(uint32_t id, const IntSize& canvasSize, uint32_t graphicsSurfaceToken)
+void LayerTreeCoordinatorProxy::syncCanvas(uint32_t id, const IntSize& canvasSize, uint32_t graphicsSurfaceToken)
{
dispatchUpdate(bind(&WebLayerTreeRenderer::syncCanvas, m_renderer.get(), id, canvasSize, graphicsSurfaceToken));
}
-void LayerTreeHostProxy::purgeBackingStores()
+void LayerTreeCoordinatorProxy::purgeBackingStores()
{
- m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeHost::PurgeBackingStores(), m_drawingAreaProxy->page()->pageID());
+ m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeCoordinator::PurgeBackingStores(), m_drawingAreaProxy->page()->pageID());
}
}
Boston, MA 02110-1301, USA.
*/
-#ifndef LayerTreeHostProxy_h
-#define LayerTreeHostProxy_h
+#ifndef LayerTreeCoordinatorProxy_h
+#define LayerTreeCoordinatorProxy_h
#if USE(UI_SIDE_COMPOSITING)
class WebLayerTreeRenderer;
class WebLayerUpdateInfo;
-class LayerTreeHostProxy {
+class LayerTreeCoordinatorProxy {
public:
- LayerTreeHostProxy(DrawingAreaProxy*);
- virtual ~LayerTreeHostProxy();
+ LayerTreeCoordinatorProxy(DrawingAreaProxy*);
+ virtual ~LayerTreeCoordinatorProxy();
void setCompositingLayerState(WebLayerID, const WebLayerInfo&);
void setCompositingLayerChildren(WebLayerID, const Vector<WebLayerID>&);
#if ENABLE(CSS_FILTERS)
void removeTileForLayer(int layerID, int tileID);
void createDirectlyCompositedImage(int64_t, const WebKit::ShareableBitmap::Handle&);
void destroyDirectlyCompositedImage(int64_t);
- void didReceiveLayerTreeHostProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+ void didReceiveLayerTreeCoordinatorProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
void updateViewport();
void renderNextFrame();
void didChangeScrollPosition(const WebCore::IntPoint& position);
#endif
-#endif // LayerTreeHostProxy_h
+#endif // LayerTreeCoordinatorProxy_h
#
#if USE(ACCELERATED_COMPOSITING) && USE(TILED_BACKING_STORE)
-messages -> LayerTreeHostProxy {
+messages -> LayerTreeCoordinatorProxy {
SetCompositingLayerState(uint32_t id, WebKit::WebLayerInfo layerInfo)
SetCompositingLayerChildren(uint32_t id, Vector<uint32_t> children)
#if ENABLE(CSS_FILTERS)
#include "GraphicsLayerTextureMapper.h"
#include "LayerBackingStore.h"
-#include "LayerTreeHostProxy.h"
+#include "LayerTreeCoordinatorProxy.h"
#include "MessageID.h"
#include "ShareableBitmap.h"
#include "TextureMapper.h"
return IntPoint(scrollPositionX, scrollPositionY);
}
-WebLayerTreeRenderer::WebLayerTreeRenderer(LayerTreeHostProxy* layerTreeHostProxy)
+WebLayerTreeRenderer::WebLayerTreeRenderer(LayerTreeCoordinatorProxy* layerTreeCoordinatorProxy)
: m_contentsScale(1)
- , m_layerTreeHostProxy(layerTreeHostProxy)
+ , m_layerTreeCoordinatorProxy(layerTreeCoordinatorProxy)
, m_rootLayerID(InvalidWebLayerID)
, m_isActive(false)
{
void WebLayerTreeRenderer::updateViewport()
{
- if (m_layerTreeHostProxy)
- m_layerTreeHostProxy->updateViewport();
+ if (m_layerTreeCoordinatorProxy)
+ m_layerTreeCoordinatorProxy->updateViewport();
}
void WebLayerTreeRenderer::adjustPositionForFixedLayers()
void WebLayerTreeRenderer::renderNextFrame()
{
- if (m_layerTreeHostProxy)
- m_layerTreeHostProxy->renderNextFrame();
+ if (m_layerTreeCoordinatorProxy)
+ m_layerTreeCoordinatorProxy->renderNextFrame();
}
void WebLayerTreeRenderer::ensureRootLayer()
void WebLayerTreeRenderer::purgeBackingStores()
{
- if (m_layerTreeHostProxy)
- m_layerTreeHostProxy->purgeBackingStores();
+ if (m_layerTreeCoordinatorProxy)
+ m_layerTreeCoordinatorProxy->purgeBackingStores();
}
void WebLayerTreeRenderer::detach()
{
- m_layerTreeHostProxy = 0;
+ m_layerTreeCoordinatorProxy = 0;
}
void WebLayerTreeRenderer::appendUpdate(const Function<void()>& function)
namespace WebKit {
class LayerBackingStore;
-class LayerTreeHostProxy;
+class LayerTreeCoordinatorProxy;
class WebLayerInfo;
class WebLayerUpdateInfo;
{
}
};
- WebLayerTreeRenderer(LayerTreeHostProxy*);
+ WebLayerTreeRenderer(LayerTreeCoordinatorProxy*);
virtual ~WebLayerTreeRenderer();
void purgeGLResources();
void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&, WebCore::TextureMapper::PaintFlags = 0);
void renderNextFrame();
void purgeBackingStores();
- LayerTreeHostProxy* m_layerTreeHostProxy;
+ LayerTreeCoordinatorProxy* m_layerTreeCoordinatorProxy;
OwnPtr<WebCore::GraphicsLayer> m_rootLayer;
Vector<WebLayerID> m_layersToDelete;
#endif
#if USE(UI_SIDE_COMPOSITING)
-#include "LayerTreeHostProxyMessages.h"
+#include "LayerTreeCoordinatorProxyMessages.h"
#endif
#if PLATFORM(QT)
}
#if USE(UI_SIDE_COMPOSITING)
- if (messageID.is<CoreIPC::MessageClassLayerTreeHostProxy>()) {
- m_drawingArea->didReceiveLayerTreeHostProxyMessage(connection, messageID, arguments);
+ if (messageID.is<CoreIPC::MessageClassLayerTreeCoordinatorProxy>()) {
+ m_drawingArea->didReceiveLayerTreeCoordinatorProxyMessage(connection, messageID, arguments);
return;
}
#endif
$$SOURCE_DIR/WebProcess/WebCoreSupport \
$$SOURCE_DIR/WebProcess/WebCoreSupport/qt \
$$SOURCE_DIR/WebProcess/WebPage \
+ $$SOURCE_DIR/WebProcess/WebPage/LayerTreeCoordinator \
$$SOURCE_DIR/WebProcess/qt \
$$SOURCE_DIR/PluginProcess
#endif
#if USE(UI_SIDE_COMPOSITING)
- virtual void didReceiveLayerTreeHostMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*) = 0;
+ virtual void didReceiveLayerTreeCoordinatorMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*) = 0;
#endif
#if PLATFORM(WIN)
}
#if USE(UI_SIDE_COMPOSITING)
-void DrawingAreaImpl::didReceiveLayerTreeHostMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
+void DrawingAreaImpl::didReceiveLayerTreeCoordinatorMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
if (m_layerTreeHost)
- m_layerTreeHost->didReceiveLayerTreeHostMessage(connection, messageID, arguments);
+ m_layerTreeHost->didReceiveLayerTreeCoordinatorMessage(connection, messageID, arguments);
}
#endif
#endif
#if USE(UI_SIDE_COMPOSITING)
- virtual void didReceiveLayerTreeHostMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+ virtual void didReceiveLayerTreeCoordinatorMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
#endif
// CoreIPC message handlers.
#include "config.h"
-#include "LayerTreeHostQt.h"
+#include "LayerTreeCoordinator.h"
#include "DrawingAreaImpl.h"
#include "GraphicsContext.h"
-#include "LayerTreeHostProxyMessages.h"
+#include "LayerTreeCoordinatorProxyMessages.h"
#include "MessageID.h"
#include "SurfaceUpdateInfo.h"
#include "WebCoreArgumentCoders.h"
namespace WebKit {
-PassRefPtr<LayerTreeHostQt> LayerTreeHostQt::create(WebPage* webPage)
+PassRefPtr<LayerTreeCoordinator> LayerTreeCoordinator::create(WebPage* webPage)
{
- return adoptRef(new LayerTreeHostQt(webPage));
+ return adoptRef(new LayerTreeCoordinator(webPage));
}
-LayerTreeHostQt::~LayerTreeHostQt()
+LayerTreeCoordinator::~LayerTreeCoordinator()
{
// Prevent setWebGraphicsLayerClient(0) -> detachLayer() from modifying the set while we iterate it.
HashSet<WebCore::WebGraphicsLayer*> registeredLayers;
(*it)->setWebGraphicsLayerClient(0);
}
-LayerTreeHostQt::LayerTreeHostQt(WebPage* webPage)
+LayerTreeCoordinator::LayerTreeCoordinator(WebPage* webPage)
: LayerTreeHost(webPage)
, m_notifyAfterScheduledLayerFlush(false)
, m_isValid(true)
, m_shouldSendScrollPositionUpdate(true)
, m_shouldSyncFrame(false)
, m_shouldSyncRootLayer(true)
- , m_layerFlushTimer(this, &LayerTreeHostQt::layerFlushTimerFired)
+ , m_layerFlushTimer(this, &LayerTreeCoordinator::layerFlushTimerFired)
, m_layerFlushSchedulingEnabled(true)
{
// Create a root layer.
WebGraphicsLayer* webRootLayer = toWebGraphicsLayer(m_rootLayer.get());
webRootLayer->setRootLayer(true);
#ifndef NDEBUG
- m_rootLayer->setName("LayerTreeHostQt root layer");
+ m_rootLayer->setName("LayerTreeCoordinator root layer");
#endif
m_rootLayer->setDrawsContent(false);
m_rootLayer->setSize(m_webPage->size());
m_nonCompositedContentLayer = GraphicsLayer::create(this);
toWebGraphicsLayer(m_rootLayer.get())->setWebGraphicsLayerClient(this);
#ifndef NDEBUG
- m_nonCompositedContentLayer->setName("LayerTreeHostQt non-composited content");
+ m_nonCompositedContentLayer->setName("LayerTreeCoordinator non-composited content");
#endif
m_nonCompositedContentLayer->setDrawsContent(true);
m_nonCompositedContentLayer->setSize(m_webPage->size());
scheduleLayerFlush();
}
-void LayerTreeHostQt::setLayerFlushSchedulingEnabled(bool layerFlushingEnabled)
+void LayerTreeCoordinator::setLayerFlushSchedulingEnabled(bool layerFlushingEnabled)
{
if (m_layerFlushSchedulingEnabled == layerFlushingEnabled)
return;
cancelPendingLayerFlush();
}
-void LayerTreeHostQt::scheduleLayerFlush()
+void LayerTreeCoordinator::scheduleLayerFlush()
{
if (!m_layerFlushSchedulingEnabled)
return;
m_layerFlushTimer.startOneShot(0);
}
-void LayerTreeHostQt::cancelPendingLayerFlush()
+void LayerTreeCoordinator::cancelPendingLayerFlush()
{
m_layerFlushTimer.stop();
}
-void LayerTreeHostQt::setShouldNotifyAfterNextScheduledLayerFlush(bool notifyAfterScheduledLayerFlush)
+void LayerTreeCoordinator::setShouldNotifyAfterNextScheduledLayerFlush(bool notifyAfterScheduledLayerFlush)
{
m_notifyAfterScheduledLayerFlush = notifyAfterScheduledLayerFlush;
}
-void LayerTreeHostQt::setRootCompositingLayer(WebCore::GraphicsLayer* graphicsLayer)
+void LayerTreeCoordinator::setRootCompositingLayer(WebCore::GraphicsLayer* graphicsLayer)
{
m_nonCompositedContentLayer->removeAllChildren();
m_nonCompositedContentLayer->setContentsOpaque(m_webPage->drawsBackground() && !m_webPage->drawsTransparentBackground());
m_nonCompositedContentLayer->addChild(graphicsLayer);
}
-void LayerTreeHostQt::invalidate()
+void LayerTreeCoordinator::invalidate()
{
cancelPendingLayerFlush();
m_isValid = false;
}
-void LayerTreeHostQt::setNonCompositedContentsNeedDisplay(const WebCore::IntRect& rect)
+void LayerTreeCoordinator::setNonCompositedContentsNeedDisplay(const WebCore::IntRect& rect)
{
m_nonCompositedContentLayer->setNeedsDisplayInRect(rect);
if (m_pageOverlayLayer)
scheduleLayerFlush();
}
-void LayerTreeHostQt::scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset)
+void LayerTreeCoordinator::scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset)
{
setNonCompositedContentsNeedDisplay(scrollRect);
}
-void LayerTreeHostQt::forceRepaint()
+void LayerTreeCoordinator::forceRepaint()
{
scheduleLayerFlush();
}
-void LayerTreeHostQt::sizeDidChange(const WebCore::IntSize& newSize)
+void LayerTreeCoordinator::sizeDidChange(const WebCore::IntSize& newSize)
{
if (m_rootLayer->size() == newSize)
return;
scheduleLayerFlush();
}
-void LayerTreeHostQt::didInstallPageOverlay()
+void LayerTreeCoordinator::didInstallPageOverlay()
{
createPageOverlayLayer();
scheduleLayerFlush();
}
-void LayerTreeHostQt::didUninstallPageOverlay()
+void LayerTreeCoordinator::didUninstallPageOverlay()
{
destroyPageOverlayLayer();
scheduleLayerFlush();
}
-void LayerTreeHostQt::setPageOverlayNeedsDisplay(const WebCore::IntRect& rect)
+void LayerTreeCoordinator::setPageOverlayNeedsDisplay(const WebCore::IntRect& rect)
{
ASSERT(m_pageOverlayLayer);
m_pageOverlayLayer->setNeedsDisplayInRect(rect);
scheduleLayerFlush();
}
-void LayerTreeHostQt::setPageOverlayOpacity(float value)
+void LayerTreeCoordinator::setPageOverlayOpacity(float value)
{
ASSERT(m_pageOverlayLayer);
m_pageOverlayLayer->setOpacity(value);
scheduleLayerFlush();
}
-bool LayerTreeHostQt::flushPendingLayerChanges()
+bool LayerTreeCoordinator::flushPendingLayerChanges()
{
bool didSync = m_webPage->corePage()->mainFrame()->view()->syncCompositingStateIncludingSubframes();
m_nonCompositedContentLayer->syncCompositingStateForThisLayerOnly();
return didSync;
}
-void LayerTreeHostQt::syncLayerState(WebLayerID id, const WebLayerInfo& info)
+void LayerTreeCoordinator::syncLayerState(WebLayerID id, const WebLayerInfo& info)
{
if (m_shouldSendScrollPositionUpdate) {
- m_webPage->send(Messages::LayerTreeHostProxy::DidChangeScrollPosition(m_visibleContentsRect.location()));
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::DidChangeScrollPosition(m_visibleContentsRect.location()));
m_shouldSendScrollPositionUpdate = false;
}
m_shouldSyncFrame = true;
- m_webPage->send(Messages::LayerTreeHostProxy::SetCompositingLayerState(id, info));
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetCompositingLayerState(id, info));
}
-void LayerTreeHostQt::syncLayerChildren(WebLayerID id, const Vector<WebLayerID>& children)
+void LayerTreeCoordinator::syncLayerChildren(WebLayerID id, const Vector<WebLayerID>& children)
{
m_shouldSyncFrame = true;
- m_webPage->send(Messages::LayerTreeHostProxy::SetCompositingLayerChildren(id, children));
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetCompositingLayerChildren(id, children));
}
-void LayerTreeHostQt::syncCanvas(WebLayerID id, const IntSize& canvasSize, uint32_t graphicsSurfaceToken)
+void LayerTreeCoordinator::syncCanvas(WebLayerID id, const IntSize& canvasSize, uint32_t graphicsSurfaceToken)
{
m_shouldSyncFrame = true;
- m_webPage->send(Messages::LayerTreeHostProxy::SyncCanvas(id, canvasSize, graphicsSurfaceToken));
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::SyncCanvas(id, canvasSize, graphicsSurfaceToken));
}
#if ENABLE(CSS_FILTERS)
-void LayerTreeHostQt::syncLayerFilters(WebLayerID id, const FilterOperations& filters)
+void LayerTreeCoordinator::syncLayerFilters(WebLayerID id, const FilterOperations& filters)
{
m_shouldSyncFrame = true;
- m_webPage->send(Messages::LayerTreeHostProxy::SetCompositingLayerFilters(id, filters));
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetCompositingLayerFilters(id, filters));
}
#endif
-void LayerTreeHostQt::attachLayer(WebGraphicsLayer* layer)
+void LayerTreeCoordinator::attachLayer(WebGraphicsLayer* layer)
{
ASSERT(!m_registeredLayers.contains(layer));
m_registeredLayers.add(layer);
layer->adjustVisibleRect();
}
-void LayerTreeHostQt::detachLayer(WebGraphicsLayer* layer)
+void LayerTreeCoordinator::detachLayer(WebGraphicsLayer* layer)
{
m_registeredLayers.remove(layer);
m_shouldSyncFrame = true;
- m_webPage->send(Messages::LayerTreeHostProxy::DeleteCompositingLayer(layer->id()));
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::DeleteCompositingLayer(layer->id()));
}
static void updateOffsetFromViewportForSelf(RenderLayer* renderLayer)
updateOffsetFromViewportForLayer(renderLayer->nextSibling());
}
-void LayerTreeHostQt::syncFixedLayers()
+void LayerTreeCoordinator::syncFixedLayers()
{
if (!m_webPage->corePage()->settings() || !m_webPage->corePage()->settings()->acceleratedCompositingForFixedPositionEnabled())
return;
updateOffsetFromViewportForLayer(rootRenderLayer->firstChild());
}
-void LayerTreeHostQt::performScheduledLayerFlush()
+void LayerTreeCoordinator::performScheduledLayerFlush()
{
if (m_isSuspended || m_waitingForUIProcess)
return;
return;
if (m_shouldSyncRootLayer) {
- m_webPage->send(Messages::LayerTreeHostProxy::SetRootCompositingLayer(toWebGraphicsLayer(m_rootLayer.get())->id()));
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetRootCompositingLayer(toWebGraphicsLayer(m_rootLayer.get())->id()));
m_shouldSyncRootLayer = false;
}
- m_webPage->send(Messages::LayerTreeHostProxy::DidRenderFrame());
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::DidRenderFrame());
m_waitingForUIProcess = true;
if (!m_notifyAfterScheduledLayerFlush)
m_notifyAfterScheduledLayerFlush = false;
}
-void LayerTreeHostQt::layerFlushTimerFired(Timer<LayerTreeHostQt>*)
+void LayerTreeCoordinator::layerFlushTimerFired(Timer<LayerTreeCoordinator>*)
{
performScheduledLayerFlush();
}
-void LayerTreeHostQt::createPageOverlayLayer()
+void LayerTreeCoordinator::createPageOverlayLayer()
{
ASSERT(!m_pageOverlayLayer);
m_pageOverlayLayer = GraphicsLayer::create(this);
#ifndef NDEBUG
- m_pageOverlayLayer->setName("LayerTreeHostQt page overlay content");
+ m_pageOverlayLayer->setName("LayerTreeCoordinator page overlay content");
#endif
m_pageOverlayLayer->setDrawsContent(true);
m_rootLayer->addChild(m_pageOverlayLayer.get());
}
-void LayerTreeHostQt::destroyPageOverlayLayer()
+void LayerTreeCoordinator::destroyPageOverlayLayer()
{
ASSERT(m_pageOverlayLayer);
m_pageOverlayLayer->removeFromParent();
m_pageOverlayLayer = nullptr;
}
-int64_t LayerTreeHostQt::adoptImageBackingStore(Image* image)
+int64_t LayerTreeCoordinator::adoptImageBackingStore(Image* image)
{
if (!image)
return InvalidWebLayerID;
+
+ int64_t key = 0;
+
+#if PLATFORM(QT)
QPixmap* pixmap = image->nativeImageForCurrentFrame();
if (!pixmap)
return InvalidWebLayerID;
- int64_t key = pixmap->cacheKey();
+ key = pixmap->cacheKey();
+#endif
+
HashMap<int64_t, int>::iterator it = m_directlyCompositedImageRefCounts.find(key);
if (it != m_directlyCompositedImageRefCounts.end()) {
ShareableBitmap::Handle handle;
bitmap->createHandle(handle);
- m_webPage->send(Messages::LayerTreeHostProxy::CreateDirectlyCompositedImage(key, handle));
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::CreateDirectlyCompositedImage(key, handle));
m_directlyCompositedImageRefCounts.add(key, 1);
return key;
}
-void LayerTreeHostQt::releaseImageBackingStore(int64_t key)
+void LayerTreeCoordinator::releaseImageBackingStore(int64_t key)
{
if (!key)
return;
return;
m_directlyCompositedImageRefCounts.remove(it);
- m_webPage->send(Messages::LayerTreeHostProxy::DestroyDirectlyCompositedImage(key));
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::DestroyDirectlyCompositedImage(key));
}
-void LayerTreeHostQt::notifyAnimationStarted(const WebCore::GraphicsLayer*, double time)
+void LayerTreeCoordinator::notifyAnimationStarted(const WebCore::GraphicsLayer*, double time)
{
}
-void LayerTreeHostQt::notifySyncRequired(const WebCore::GraphicsLayer*)
+void LayerTreeCoordinator::notifySyncRequired(const WebCore::GraphicsLayer*)
{
}
-void LayerTreeHostQt::paintContents(const WebCore::GraphicsLayer* graphicsLayer, WebCore::GraphicsContext& graphicsContext, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect)
+void LayerTreeCoordinator::paintContents(const WebCore::GraphicsLayer* graphicsLayer, WebCore::GraphicsContext& graphicsContext, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect)
{
if (graphicsLayer == m_nonCompositedContentLayer) {
m_webPage->drawRect(graphicsContext, clipRect);
}
}
-bool LayerTreeHostQt::showDebugBorders(const WebCore::GraphicsLayer*) const
+bool LayerTreeCoordinator::showDebugBorders(const WebCore::GraphicsLayer*) const
{
return m_webPage->corePage()->settings()->showDebugBorders();
}
-bool LayerTreeHostQt::showRepaintCounter(const WebCore::GraphicsLayer*) const
+bool LayerTreeCoordinator::showRepaintCounter(const WebCore::GraphicsLayer*) const
{
return m_webPage->corePage()->settings()->showRepaintCounter();
}
return true;
}
-void LayerTreeHostQt::createTile(WebLayerID layerID, int tileID, const SurfaceUpdateInfo& updateInfo, const WebCore::IntRect& targetRect)
+void LayerTreeCoordinator::createTile(WebLayerID layerID, int tileID, const SurfaceUpdateInfo& updateInfo, const WebCore::IntRect& targetRect)
{
m_shouldSyncFrame = true;
- m_webPage->send(Messages::LayerTreeHostProxy::CreateTileForLayer(layerID, tileID, targetRect, updateInfo));
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::CreateTileForLayer(layerID, tileID, targetRect, updateInfo));
}
-void LayerTreeHostQt::updateTile(WebLayerID layerID, int tileID, const SurfaceUpdateInfo& updateInfo, const WebCore::IntRect& targetRect)
+void LayerTreeCoordinator::updateTile(WebLayerID layerID, int tileID, const SurfaceUpdateInfo& updateInfo, const WebCore::IntRect& targetRect)
{
m_shouldSyncFrame = true;
- m_webPage->send(Messages::LayerTreeHostProxy::UpdateTileForLayer(layerID, tileID, targetRect, updateInfo));
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::UpdateTileForLayer(layerID, tileID, targetRect, updateInfo));
}
-void LayerTreeHostQt::removeTile(WebLayerID layerID, int tileID)
+void LayerTreeCoordinator::removeTile(WebLayerID layerID, int tileID)
{
m_shouldSyncFrame = true;
- m_webPage->send(Messages::LayerTreeHostProxy::RemoveTileForLayer(layerID, tileID));
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::RemoveTileForLayer(layerID, tileID));
}
-WebCore::IntRect LayerTreeHostQt::visibleContentsRect() const
+WebCore::IntRect LayerTreeCoordinator::visibleContentsRect() const
{
return m_visibleContentsRect;
}
-void LayerTreeHostQt::setVisibleContentsRect(const IntRect& rect, float scale, const FloatPoint& trajectoryVector)
+void LayerTreeCoordinator::setVisibleContentsRect(const IntRect& rect, float scale, const FloatPoint& trajectoryVector)
{
bool contentsRectDidChange = rect != m_visibleContentsRect;
bool contentsScaleDidChange = scale != m_contentsScale;
m_shouldSendScrollPositionUpdate = true;
}
-void LayerTreeHostQt::renderNextFrame()
+void LayerTreeCoordinator::renderNextFrame()
{
m_waitingForUIProcess = false;
scheduleLayerFlush();
m_updateAtlases[i].didSwapBuffers();
}
-bool LayerTreeHostQt::layerTreeTileUpdatesAllowed() const
+bool LayerTreeCoordinator::layerTreeTileUpdatesAllowed() const
{
return !m_isSuspended && !m_waitingForUIProcess;
}
-void LayerTreeHostQt::purgeBackingStores()
+void LayerTreeCoordinator::purgeBackingStores()
{
HashSet<WebCore::WebGraphicsLayer*>::iterator end = m_registeredLayers.end();
for (HashSet<WebCore::WebGraphicsLayer*>::iterator it = m_registeredLayers.begin(); it != end; ++it)
m_updateAtlases.clear();
}
-PassOwnPtr<WebCore::GraphicsContext> LayerTreeHostQt::beginContentUpdate(const WebCore::IntSize& size, ShareableBitmap::Flags flags, ShareableSurface::Handle& handle, WebCore::IntPoint& offset)
+PassOwnPtr<WebCore::GraphicsContext> LayerTreeCoordinator::beginContentUpdate(const WebCore::IntSize& size, ShareableBitmap::Flags flags, ShareableSurface::Handle& handle, WebCore::IntPoint& offset)
{
OwnPtr<WebCore::GraphicsContext> graphicsContext;
for (int i = 0; i < m_updateAtlases.size(); ++i) {
Boston, MA 02110-1301, USA.
*/
-#ifndef LayerTreeHostQt_h
-#define LayerTreeHostQt_h
+#ifndef LayerTreeCoordinator_h
+#define LayerTreeCoordinator_h
#include "LayerTreeContext.h"
#include "LayerTreeHost.h"
class UpdateInfo;
class WebPage;
-class LayerTreeHostQt : public LayerTreeHost, WebCore::GraphicsLayerClient
- , public WebGraphicsLayerClient
-{
+class LayerTreeCoordinator : public LayerTreeHost, WebCore::GraphicsLayerClient
+ , public WebGraphicsLayerClient {
public:
- static PassRefPtr<LayerTreeHostQt> create(WebPage*);
- virtual ~LayerTreeHostQt();
+ static PassRefPtr<LayerTreeCoordinator> create(WebPage*);
+ virtual ~LayerTreeCoordinator();
static bool supportsAcceleratedCompositing();
virtual void purgeBackingStores();
virtual bool layerTreeTileUpdatesAllowed() const;
virtual void setVisibleContentsRect(const WebCore::IntRect&, float scale, const WebCore::FloatPoint&);
+ virtual void didReceiveLayerTreeCoordinatorMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+
virtual void syncLayerState(WebLayerID, const WebLayerInfo&);
virtual void syncLayerChildren(WebLayerID, const Vector<WebLayerID>&);
#if ENABLE(CSS_FILTERS)
virtual PassOwnPtr<WebCore::GraphicsContext> beginContentUpdate(const WebCore::IntSize&, ShareableBitmap::Flags, ShareableSurface::Handle&, WebCore::IntPoint&);
protected:
- explicit LayerTreeHostQt(WebPage*);
+ explicit LayerTreeCoordinator(WebPage*);
private:
// GraphicsLayerClient
virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
- // LayerTreeHostQt
+ // LayerTreeCoordinator
void createPageOverlayLayer();
void destroyPageOverlayLayer();
bool flushPendingLayerChanges();
LayerTreeContext m_layerTreeContext;
bool m_shouldSyncFrame;
bool m_shouldSyncRootLayer;
- void layerFlushTimerFired(WebCore::Timer<LayerTreeHostQt>*);
- WebCore::Timer<LayerTreeHostQt> m_layerFlushTimer;
+ void layerFlushTimerFired(WebCore::Timer<LayerTreeCoordinator>*);
+ WebCore::Timer<LayerTreeCoordinator> m_layerFlushTimer;
bool m_layerFlushSchedulingEnabled;
};
}
-#endif // LayerTreeHostQt_h
+#endif // LayerTreeCoordinator_h
#
-#if USE(TILED_BACKING_STORE)
-messages -> LayerTreeHost {
+#if USE(UI_SIDE_COMPOSITING)
+messages -> LayerTreeCoordinator {
SetVisibleContentsRect(WebCore::IntRect visibleContentsRect, float scale, WebCore::FloatPoint trajectoryVectory)
RenderNextFrame()
PurgeBackingStores()
#include "FrameView.h"
#include "GraphicsContext.h"
#include "GraphicsLayer.h"
-#include "LayerTreeHostProxyMessages.h"
+#include "LayerTreeCoordinatorProxyMessages.h"
#include "Page.h"
#include "TextureMapperPlatformLayer.h"
#include "TiledBackingStoreRemoteTile.h"
#endif
void WebGraphicsLayer::syncLayerState()
- {
+{
if (!m_shouldSyncLayerState)
return;
m_shouldSyncLayerState = false;
class WebGraphicsLayer : public WebCore::GraphicsLayer
, public TiledBackingStoreClient
- , public WebKit::TiledBackingStoreRemoteTileClient
-{
+ , public WebKit::TiledBackingStoreRemoteTileClient {
public:
WebGraphicsLayer(GraphicsLayerClient*);
virtual ~WebGraphicsLayer();
#endif
#if PLATFORM(QT)
-#include "qt/LayerTreeHostQt.h"
+#include "LayerTreeCoordinator.h"
#endif
#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
#elif PLATFORM(WIN) && HAVE(WKQCA)
return LayerTreeHostCAWin::create(webPage);
#elif PLATFORM(QT)
- return LayerTreeHostQt::create(webPage);
+ return LayerTreeCoordinator::create(webPage);
#elif PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
return LayerTreeHostGtk::create(webPage);
#else
virtual void setVisibleContentsRectForLayer(int layerID, const WebCore::IntRect&) { }
virtual void renderNextFrame() { }
virtual void purgeBackingStores() { }
- virtual void didReceiveLayerTreeHostMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+ virtual void didReceiveLayerTreeCoordinatorMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*) = 0;
#endif
#if PLATFORM(WIN)
}
#if USE(TILED_BACKING_STORE) && USE(ACCELERATED_COMPOSITING)
- if (messageID.is<CoreIPC::MessageClassLayerTreeHost>()) {
+ if (messageID.is<CoreIPC::MessageClassLayerTreeCoordinator>()) {
if (m_drawingArea)
- m_drawingArea->didReceiveLayerTreeHostMessage(connection, messageID, arguments);
+ m_drawingArea->didReceiveLayerTreeCoordinatorMessage(connection, messageID, arguments);
return;
}
#endif