Diff
Modified: trunk/Source/WebCore/ChangeLog (159612 => 159613)
--- trunk/Source/WebCore/ChangeLog 2013-11-21 07:46:13 UTC (rev 159612)
+++ trunk/Source/WebCore/ChangeLog 2013-11-21 07:52:15 UTC (rev 159613)
@@ -1,3 +1,20 @@
+2013-11-20 Jae Hyun Park <[email protected]>
+
+ [CoordinatedGraphics] Use std::unique_ptrs rather than OwnPtrs
+ https://bugs.webkit.org/show_bug.cgi?id=124692
+
+ Reviewed by Noam Rosenthal.
+
+ No new tests, covered by existing ones.
+
+ * platform/graphics/TiledBackingStore.cpp:
+ (WebCore::TiledBackingStore::TiledBackingStore):
+ * platform/graphics/TiledBackingStore.h:
+ * platform/graphics/TiledBackingStoreBackend.h:
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+ (WebCore::CoordinatedGraphicsLayer::createBackingStore):
+ * platform/graphics/texmap/coordinated/CoordinatedTile.h:
+
2013-11-20 Brady Eidson <[email protected]>
Add more infrastructure for ServerConnection communication between Web and Database processes
Modified: trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp (159612 => 159613)
--- trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp 2013-11-21 07:46:13 UTC (rev 159612)
+++ trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp 2013-11-21 07:52:15 UTC (rev 159613)
@@ -35,9 +35,9 @@
return IntPoint(rect.maxX() - 1, rect.maxY() - 1);
}
-TiledBackingStore::TiledBackingStore(TiledBackingStoreClient* client, PassOwnPtr<TiledBackingStoreBackend> backend)
+TiledBackingStore::TiledBackingStore(TiledBackingStoreClient* client, std::unique_ptr<TiledBackingStoreBackend> backend)
: m_client(client)
- , m_backend(backend)
+ , m_backend(std::move(backend))
, m_tileBufferUpdateTimer(this, &TiledBackingStore::tileBufferUpdateTimerFired)
, m_backingStoreUpdateTimer(this, &TiledBackingStore::backingStoreUpdateTimerFired)
, m_tileSize(defaultTileDimension, defaultTileDimension)
Modified: trunk/Source/WebCore/platform/graphics/TiledBackingStore.h (159612 => 159613)
--- trunk/Source/WebCore/platform/graphics/TiledBackingStore.h 2013-11-21 07:46:13 UTC (rev 159612)
+++ trunk/Source/WebCore/platform/graphics/TiledBackingStore.h 2013-11-21 07:52:15 UTC (rev 159613)
@@ -41,7 +41,7 @@
class TiledBackingStore {
WTF_MAKE_NONCOPYABLE(TiledBackingStore); WTF_MAKE_FAST_ALLOCATED;
public:
- TiledBackingStore(TiledBackingStoreClient*, PassOwnPtr<TiledBackingStoreBackend> = TiledBackingStoreBackend::create());
+ TiledBackingStore(TiledBackingStoreClient*, std::unique_ptr<TiledBackingStoreBackend> = std::make_unique<TiledBackingStoreBackend>());
~TiledBackingStore();
TiledBackingStoreClient* client() { return m_client; }
@@ -112,7 +112,7 @@
private:
TiledBackingStoreClient* m_client;
- OwnPtr<TiledBackingStoreBackend> m_backend;
+ std::unique_ptr<TiledBackingStoreBackend> m_backend;
typedef HashMap<Tile::Coordinate, RefPtr<Tile> > TileMap;
TileMap m_tiles;
Modified: trunk/Source/WebCore/platform/graphics/TiledBackingStoreBackend.h (159612 => 159613)
--- trunk/Source/WebCore/platform/graphics/TiledBackingStoreBackend.h 2013-11-21 07:46:13 UTC (rev 159612)
+++ trunk/Source/WebCore/platform/graphics/TiledBackingStoreBackend.h 2013-11-21 07:52:15 UTC (rev 159613)
@@ -28,18 +28,13 @@
namespace WebCore {
class TiledBackingStore;
-class TiledBackingStoreBackend;
class TiledBackingStoreBackend {
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<TiledBackingStoreBackend> create() { return adoptPtr(new TiledBackingStoreBackend); }
virtual ~TiledBackingStoreBackend() { }
virtual PassRefPtr<Tile> createTile(TiledBackingStore*, const Tile::Coordinate&);
virtual void paintCheckerPattern(GraphicsContext*, const FloatRect&);
-
-protected:
- TiledBackingStoreBackend() { }
};
}
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (159612 => 159613)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2013-11-21 07:46:13 UTC (rev 159612)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2013-11-21 07:52:15 UTC (rev 159613)
@@ -893,7 +893,7 @@
void CoordinatedGraphicsLayer::createBackingStore()
{
- m_mainBackingStore = std::make_unique<TiledBackingStore>(this, CoordinatedTileBackend::create(this));
+ m_mainBackingStore = std::make_unique<TiledBackingStore>(this, std::make_unique<CoordinatedTileBackend>(this));
m_mainBackingStore->setSupportsAlpha(!contentsOpaque());
m_mainBackingStore->setContentsScale(effectiveContentsScale());
}
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedTile.h (159612 => 159613)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedTile.h 2013-11-21 07:46:13 UTC (rev 159612)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedTile.h 2013-11-21 07:52:15 UTC (rev 159613)
@@ -81,12 +81,11 @@
class CoordinatedTileBackend : public TiledBackingStoreBackend {
public:
- static PassOwnPtr<TiledBackingStoreBackend> create(CoordinatedTileClient* client) { return adoptPtr(new CoordinatedTileBackend(client)); }
+ explicit CoordinatedTileBackend(CoordinatedTileClient*);
PassRefPtr<Tile> createTile(TiledBackingStore*, const Tile::Coordinate&);
void paintCheckerPattern(GraphicsContext*, const FloatRect&);
private:
- explicit CoordinatedTileBackend(CoordinatedTileClient*);
CoordinatedTileClient* m_client;
};