summaryrefslogtreecommitdiff
path: root/Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.cpp')
-rw-r--r--Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.cpp
index 80a0435fd..47d0a708c 100644
--- a/Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.cpp
+++ b/Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.cpp
@@ -47,7 +47,7 @@ class ManagedTexture;
class DrawableTile : public CCLayerTilingData::Tile {
WTF_MAKE_NONCOPYABLE(DrawableTile);
public:
- DrawableTile() : m_textureId(0) { }
+ static PassOwnPtr<DrawableTile> create() { return adoptPtr(new DrawableTile()); }
Platform3DObject textureId() const { return m_textureId; }
void setTextureId(Platform3DObject textureId) { m_textureId = textureId; }
@@ -56,6 +56,8 @@ public:
void setOpaqueRect(const IntRect& opaqueRect) { m_opaqueRect = opaqueRect; }
private:
+ DrawableTile() : m_textureId(0) { }
+
Platform3DObject m_textureId;
IntRect m_opaqueRect;
};
@@ -103,9 +105,10 @@ DrawableTile* CCTiledLayerImpl::tileAt(int i, int j) const
DrawableTile* CCTiledLayerImpl::createTile(int i, int j)
{
- RefPtr<DrawableTile> tile = adoptRef(new DrawableTile());
- m_tiler->addTile(tile, i, j);
- return tile.get();
+ OwnPtr<DrawableTile> tile(DrawableTile::create());
+ DrawableTile* addedTile = tile.get();
+ m_tiler->addTile(tile.release(), i, j);
+ return addedTile;
}
TransformationMatrix CCTiledLayerImpl::quadTransform() const