summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-23 17:03:15 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-23 17:03:15 +0200
commita73d1c176f2f3e0458861de8590dc20321a501ae (patch)
treed897fc5974797c3cb300d7f5916f258df765401f /Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
parentc311cf639cc1d6570d67b0a80a8ba04dc992a658 (diff)
downloadqtwebkit-a73d1c176f2f3e0458861de8590dc20321a501ae.tar.gz
Imported WebKit commit a5ae8a56a48e44ebfb9b81aaa5488affaffdb175 (http://svn.webkit.org/repository/webkit/trunk@126420)
New snapshot with OS X 10.6 build fix
Diffstat (limited to 'Source/WebKit/chromium/src/WebPluginContainerImpl.cpp')
-rw-r--r--Source/WebKit/chromium/src/WebPluginContainerImpl.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
index a35a0407f..75a97e0f6 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -366,11 +366,11 @@ void WebPluginContainerImpl::setBackingTextureId(unsigned textureId)
if (m_textureId == textureId)
return;
- ASSERT(m_ioSurfaceLayer.isNull());
+ ASSERT(!m_ioSurfaceLayer);
- if (m_textureLayer.isNull())
- m_textureLayer = WebExternalTextureLayer::create();
- m_textureLayer.setTextureId(textureId);
+ if (!m_textureLayer)
+ m_textureLayer = adoptPtr(WebExternalTextureLayer::create());
+ m_textureLayer->setTextureId(textureId);
// If anyone of the IDs is zero we need to switch between hardware
// and software compositing. This is done by triggering a style recalc
@@ -390,11 +390,11 @@ void WebPluginContainerImpl::setBackingIOSurfaceId(int width,
if (ioSurfaceId == m_ioSurfaceId)
return;
- ASSERT(m_textureLayer.isNull());
+ ASSERT(!m_textureLayer);
- if (m_ioSurfaceLayer.isNull())
- m_ioSurfaceLayer = WebIOSurfaceLayer::create();
- m_ioSurfaceLayer.setIOSurfaceProperties(ioSurfaceId, WebSize(width, height));
+ if (!m_ioSurfaceLayer)
+ m_ioSurfaceLayer = adoptPtr(WebIOSurfaceLayer::create());
+ m_ioSurfaceLayer->setIOSurfaceProperties(ioSurfaceId, WebSize(width, height));
// If anyone of the IDs is zero we need to switch between hardware
// and software compositing. This is done by triggering a style recalc
@@ -409,11 +409,11 @@ void WebPluginContainerImpl::setBackingIOSurfaceId(int width,
void WebPluginContainerImpl::commitBackingTexture()
{
#if USE(ACCELERATED_COMPOSITING)
- if (!m_textureLayer.isNull())
- m_textureLayer.invalidate();
+ if (m_textureLayer)
+ m_textureLayer->layer()->invalidate();
- if (!m_ioSurfaceLayer.isNull())
- m_ioSurfaceLayer.invalidate();
+ if (m_ioSurfaceLayer)
+ m_ioSurfaceLayer->layer()->invalidate();
#endif
}
@@ -480,11 +480,11 @@ void WebPluginContainerImpl::zoomLevelChanged(double zoomLevel)
void WebPluginContainerImpl::setOpaque(bool opaque)
{
#if USE(ACCELERATED_COMPOSITING)
- if (!m_textureLayer.isNull())
- m_textureLayer.setOpaque(opaque);
+ if (m_textureLayer)
+ m_textureLayer->layer()->setOpaque(opaque);
- if (!m_ioSurfaceLayer.isNull())
- m_ioSurfaceLayer.setOpaque(opaque);
+ if (m_ioSurfaceLayer)
+ m_ioSurfaceLayer->layer()->setOpaque(opaque);
#endif
}
@@ -575,9 +575,9 @@ void WebPluginContainerImpl::willDestroyPluginLoadObserver(WebPluginLoadObserver
WebLayer* WebPluginContainerImpl::platformLayer() const
{
if (m_textureId)
- return const_cast<WebExternalTextureLayer*>(&m_textureLayer);
+ return m_textureLayer->layer();
if (m_ioSurfaceId)
- return const_cast<WebIOSurfaceLayer*>(&m_ioSurfaceLayer);
+ return m_ioSurfaceLayer->layer();
return 0;
}
#endif