Title: [109746] trunk/Source/WebCore
Revision
109746
Author
a...@0x90.dk
Date
2012-03-05 07:36:19 -0800 (Mon, 05 Mar 2012)

Log Message

Remove pointer to timer and use the timers directly in the tiled backing store https://bugs.webkit.org/show_bug.cgi?id=80283

Patch by Kenneth Rohde Christiansen and Alexander Færøy.

Reviewed by Simon Hausmann.

* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::TiledBackingStore):
(WebCore::TiledBackingStore::~TiledBackingStore):
(WebCore::TiledBackingStore::createTiles):
(WebCore::TiledBackingStore::startTileBufferUpdateTimer):
(WebCore::TiledBackingStore::startTileCreationTimer):
* platform/graphics/TiledBackingStore.h:
(TiledBackingStore):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (109745 => 109746)


--- trunk/Source/WebCore/ChangeLog	2012-03-05 15:35:13 UTC (rev 109745)
+++ trunk/Source/WebCore/ChangeLog	2012-03-05 15:36:19 UTC (rev 109746)
@@ -1,3 +1,21 @@
+2012-03-05  Alexander Færøy  <alexander.fae...@nokia.com>
+
+        Remove pointer to timer and use the timers directly in the tiled backing store
+        https://bugs.webkit.org/show_bug.cgi?id=80283
+
+        Patch by Kenneth Rohde Christiansen and Alexander Færøy.
+
+        Reviewed by Simon Hausmann.
+
+        * platform/graphics/TiledBackingStore.cpp:
+        (WebCore::TiledBackingStore::TiledBackingStore):
+        (WebCore::TiledBackingStore::~TiledBackingStore):
+        (WebCore::TiledBackingStore::createTiles):
+        (WebCore::TiledBackingStore::startTileBufferUpdateTimer):
+        (WebCore::TiledBackingStore::startTileCreationTimer):
+        * platform/graphics/TiledBackingStore.h:
+        (TiledBackingStore):
+
 2012-03-05  Alexander Pavlov  <apav...@chromium.org>
 
         Web Inspector: [Styles] Tabbing an empty new property in the middle of style moves the editor to the next section

Modified: trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp (109745 => 109746)


--- trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp	2012-03-05 15:35:13 UTC (rev 109745)
+++ trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp	2012-03-05 15:36:19 UTC (rev 109746)
@@ -38,8 +38,8 @@
 TiledBackingStore::TiledBackingStore(TiledBackingStoreClient* client, PassOwnPtr<TiledBackingStoreBackend> backend)
     : m_client(client)
     , m_backend(backend)
-    , m_tileBufferUpdateTimer(new TileTimer(this, &TiledBackingStore::tileBufferUpdateTimerFired))
-    , m_tileCreationTimer(new TileTimer(this, &TiledBackingStore::tileCreationTimerFired))
+    , m_tileBufferUpdateTimer(this, &TiledBackingStore::tileBufferUpdateTimerFired)
+    , m_tileCreationTimer(this, &TiledBackingStore::tileCreationTimerFired)
     , m_tileSize(defaultTileDimension, defaultTileDimension)
     , m_tileCreationDelay(0.01)
     , m_coverAreaMultiplier(2.0f)
@@ -52,8 +52,6 @@
 
 TiledBackingStore::~TiledBackingStore()
 {
-    delete m_tileBufferUpdateTimer;
-    delete m_tileCreationTimer;
 }
 
 void TiledBackingStore::setTileSize(const IntSize& size)
@@ -296,7 +294,7 @@
 
     // Re-call createTiles on a timer to cover the visible area with the newest shortest distance.
     if (requiredTileCount)
-        m_tileCreationTimer->startOneShot(m_tileCreationDelay);
+        m_tileCreationTimer.startOneShot(m_tileCreationDelay);
 }
 
 void TiledBackingStore::adjustForContentsRect(IntRect& rect) const
@@ -472,9 +470,9 @@
 
 void TiledBackingStore::startTileBufferUpdateTimer()
 {
-    if (m_tileBufferUpdateTimer->isActive() || !m_client->tiledBackingStoreUpdatesAllowed() || m_contentsFrozen)
+    if (m_tileBufferUpdateTimer.isActive() || !m_client->tiledBackingStoreUpdatesAllowed() || m_contentsFrozen)
         return;
-    m_tileBufferUpdateTimer->startOneShot(0);
+    m_tileBufferUpdateTimer.startOneShot(0);
 }
 
 void TiledBackingStore::tileBufferUpdateTimerFired(TileTimer*)
@@ -484,9 +482,9 @@
 
 void TiledBackingStore::startTileCreationTimer()
 {
-    if (m_tileCreationTimer->isActive() || m_contentsFrozen)
+    if (m_tileCreationTimer.isActive() || m_contentsFrozen)
         return;
-    m_tileCreationTimer->startOneShot(0);
+    m_tileCreationTimer.startOneShot(0);
 }
 
 void TiledBackingStore::tileCreationTimerFired(TileTimer*)

Modified: trunk/Source/WebCore/platform/graphics/TiledBackingStore.h (109745 => 109746)


--- trunk/Source/WebCore/platform/graphics/TiledBackingStore.h	2012-03-05 15:35:13 UTC (rev 109745)
+++ trunk/Source/WebCore/platform/graphics/TiledBackingStore.h	2012-03-05 15:36:19 UTC (rev 109746)
@@ -113,8 +113,8 @@
     typedef HashMap<Tile::Coordinate, RefPtr<Tile> > TileMap;
     TileMap m_tiles;
 
-    TileTimer* m_tileBufferUpdateTimer;
-    TileTimer* m_tileCreationTimer;
+    TileTimer m_tileBufferUpdateTimer;
+    TileTimer m_tileCreationTimer;
 
     IntSize m_tileSize;
     double m_tileCreationDelay;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to