summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.cpp')
-rw-r--r--Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.cpp29
1 files changed, 10 insertions, 19 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.cpp b/Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.cpp
index 2460607..42a2dc9 100644
--- a/Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.cpp
@@ -31,39 +31,41 @@
#include "WebProcess.h"
#include <WebCore/Frame.h>
#include <WebCore/FrameView.h>
+#include <WebCore/GraphicsLayerCA.h>
#include <WebCore/Page.h>
+#include <WebCore/PlatformCALayer.h>
#include <WebCore/Settings.h>
using namespace WebCore;
namespace WebKit {
-PassRefPtr<LayerTreeHostCA> LayerTreeHostCA::create(WebPage* webPage)
-{
- return adoptRef(new LayerTreeHostCA(webPage));
-}
-
LayerTreeHostCA::LayerTreeHostCA(WebPage* webPage)
: LayerTreeHost(webPage)
, m_isValid(true)
, m_notifyAfterScheduledLayerFlush(false)
{
+}
+void LayerTreeHostCA::initialize()
+{
// Create a root layer.
m_rootLayer = GraphicsLayer::create(this);
#ifndef NDEBUG
m_rootLayer->setName("LayerTreeHost root layer");
#endif
m_rootLayer->setDrawsContent(false);
- m_rootLayer->setSize(webPage->size());
+ m_rootLayer->setSize(m_webPage->size());
+ static_cast<GraphicsLayerCA*>(m_rootLayer.get())->platformCALayer()->setGeometryFlipped(true);
m_nonCompositedContentLayer = GraphicsLayer::create(this);
+ static_cast<GraphicsLayerCA*>(m_nonCompositedContentLayer.get())->setAllowTiledLayer(false);
#ifndef NDEBUG
m_nonCompositedContentLayer->setName("LayerTreeHost non-composited content");
#endif
m_nonCompositedContentLayer->setDrawsContent(true);
m_nonCompositedContentLayer->setContentsOpaque(m_webPage->drawsBackground() && !m_webPage->drawsTransparentBackground());
- m_nonCompositedContentLayer->setSize(webPage->size());
+ m_nonCompositedContentLayer->setSize(m_webPage->size());
if (m_webPage->corePage()->settings()->acceleratedDrawingEnabled())
m_nonCompositedContentLayer->setAcceleratesDrawing(true);
@@ -72,7 +74,7 @@ LayerTreeHostCA::LayerTreeHostCA(WebPage* webPage)
if (m_webPage->hasPageOverlay())
createPageOverlayLayer();
- platformInitialize();
+ platformInitialize(m_layerTreeContext);
scheduleLayerFlush();
}
@@ -81,10 +83,6 @@ LayerTreeHostCA::~LayerTreeHostCA()
{
ASSERT(!m_isValid);
ASSERT(!m_rootLayer);
-#if PLATFORM(MAC)
- ASSERT(!m_flushPendingLayerChangesRunLoopObserver);
- ASSERT(!m_remoteLayerClient);
-#endif
}
const LayerTreeContext& LayerTreeHostCA::layerTreeContext()
@@ -109,7 +107,6 @@ void LayerTreeHostCA::setRootCompositingLayer(GraphicsLayer* graphicsLayer)
void LayerTreeHostCA::invalidate()
{
ASSERT(m_isValid);
- platformInvalidate();
m_rootLayer = nullptr;
m_isValid = false;
}
@@ -138,16 +135,12 @@ void LayerTreeHostCA::sizeDidChange(const IntSize& newSize)
scheduleLayerFlush();
flushPendingLayerChanges();
-
- platformSizeDidChange();
}
void LayerTreeHostCA::forceRepaint()
{
scheduleLayerFlush();
flushPendingLayerChanges();
-
- platformForceRepaint();
}
void LayerTreeHostCA::didInstallPageOverlay()
@@ -218,8 +211,6 @@ void LayerTreeHostCA::performScheduledLayerFlush()
void LayerTreeHostCA::didPerformScheduledLayerFlush()
{
- platformDidPerformScheduledLayerFlush();
-
if (m_notifyAfterScheduledLayerFlush) {
// Let the drawing area know that we've done a flush of the layer changes.
static_cast<DrawingAreaImpl*>(m_webPage->drawingArea())->layerHostDidFlushLayers();