diff options
Diffstat (limited to 'Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp')
-rw-r--r-- | Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp index 552fe6555..85bf84c1b 100644 --- a/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp @@ -31,7 +31,7 @@ using namespace WebCore; -TextureMapperLayerClientQt::TextureMapperLayerClientQt(QWebFrameAdapter* frame) +TextureMapperLayerClientQt::TextureMapperLayerClientQt(QWebFrameAdapter& frame) : m_frame(frame) , m_syncTimer(*this, &TextureMapperLayerClientQt::syncLayers) , m_rootTextureMapperLayer(0) @@ -71,7 +71,7 @@ void TextureMapperLayerClientQt::setRootGraphicsLayer(GraphicsLayer* layer) m_rootGraphicsLayer->setMasksToBounds(false); m_rootGraphicsLayer->setSize(IntSize(1, 1)); TextureMapper::AccelerationMode mode = TextureMapper::SoftwareMode; - if (m_frame->pageAdapter->client->makeOpenGLContextCurrentIfAvailable()) + if (pageClient() && pageClient()->makeOpenGLContextCurrentIfAvailable()) mode = TextureMapper::OpenGLMode; m_textureMapper = TextureMapper::create(mode); m_rootTextureMapperLayer->setTextureMapper(m_textureMapper.get()); @@ -87,7 +87,7 @@ void TextureMapperLayerClientQt::syncLayers() if (m_rootGraphicsLayer) syncRootLayer(); - bool didSync = m_frame->frame->view()->flushCompositingStateIncludingSubframes(); + bool didSync = m_frame.frame->view()->flushCompositingStateIncludingSubframes(); if (!m_rootGraphicsLayer) return; @@ -98,7 +98,8 @@ void TextureMapperLayerClientQt::syncLayers() if (rootLayer()->descendantsOrSelfHaveRunningAnimations() && !m_syncTimer.isActive()) m_syncTimer.startOneShot(1.0 / 60.0); - m_frame->pageAdapter->client->repaintViewport(); + if (pageClient()) + pageClient()->repaintViewport(); } void TextureMapperLayerClientQt::renderCompositedLayers(GraphicsContext& context, const IntRect& clip) @@ -145,3 +146,8 @@ void TextureMapperLayerClientQt::renderCompositedLayers(GraphicsContext& context m_textureMapper->endClip(); m_textureMapper->endPainting(); } + +QWebPageClient* TextureMapperLayerClientQt::pageClient() const +{ + return m_frame.pageAdapter->client.data(); +} |