diff options
author | Mike Reed <reed@google.com> | 2010-02-12 14:56:12 +0000 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2010-02-12 14:56:12 +0000 |
commit | be24d84c76bb32c72d597fce1c9de599ced95565 (patch) | |
tree | 0696ad40c578a9484e47f3a88cb851c388f0226e /WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | |
parent | 410564b38963bd28cc3ef1fa1a0df89200963003 (diff) | |
download | external_webkit-be24d84c76bb32c72d597fce1c9de599ced95565.zip external_webkit-be24d84c76bb32c72d597fce1c9de599ced95565.tar.gz external_webkit-be24d84c76bb32c72d597fce1c9de599ced95565.tar.bz2 |
move children into SkLayer
make SkLayer inherit from SkRefCnt.h
Diffstat (limited to 'WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp')
-rw-r--r-- | WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp index b1662f4..9470bb9 100644 --- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp @@ -121,7 +121,7 @@ GraphicsLayerAndroid::GraphicsLayerAndroid(GraphicsLayerClient* client) : m_currentTranslateY(0), m_currentPosition(0, 0) { - m_contentLayer = adoptRef(new LayerAndroid(true)); + m_contentLayer = new LayerAndroid(true); if (client) { RenderLayerBacking* backing = static_cast<RenderLayerBacking*>(client); RenderLayer* renderLayer = backing->owningLayer(); @@ -141,6 +141,7 @@ GraphicsLayerAndroid::GraphicsLayerAndroid(GraphicsLayerClient* client) : GraphicsLayerAndroid::~GraphicsLayerAndroid() { + m_contentLayer->unref(); gDebugGraphicsLayerAndroidInstances--; } @@ -406,7 +407,7 @@ void GraphicsLayerAndroid::sendImmediateRepaint() if (rootGraphicsLayer->m_frame && rootGraphicsLayer->m_frame->view()) { - LayerAndroid* copyLayer = new LayerAndroid(m_contentLayer.get()); + LayerAndroid* copyLayer = new LayerAndroid(*m_contentLayer); TLOG("(%x) sendImmediateRepaint, copy the layer, (%.2f,%.2f => %.2f,%.2f)", this, m_contentLayer->size().width(), m_contentLayer->size().height(), copyLayer->size().width(), copyLayer->size().height()); @@ -801,7 +802,7 @@ void GraphicsLayerAndroid::setContentsToImage(Image* image) PlatformLayer* GraphicsLayerAndroid::platformLayer() const { LOG("platformLayer"); - return (PlatformLayer*) m_contentLayer.get(); + return (PlatformLayer*) m_contentLayer; } #ifndef NDEBUG @@ -830,9 +831,9 @@ void GraphicsLayerAndroid::askForSync() void GraphicsLayerAndroid::syncChildren() { if (m_needsSyncChildren) { - m_contentLayer->removeAllChildren(); + m_contentLayer->removeChildren(); for (unsigned int i = 0; i < m_children.size(); i++) { - m_contentLayer->addChildren( + m_contentLayer->addChild( (static_cast<GraphicsLayerAndroid*>(m_children[i]))->contentLayer()); } m_needsSyncChildren = false; |