Created
March 5, 2012 13:34
-
-
Save kenchris/1978324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 0daa70f5652036520e144a6d2616a7f86d1244ea | |
commit 0daa70f5652036520e144a6d2616a7f86d1244ea | |
Author: Kenneth Rohde Christiansen <kenneth@webkit.org> | |
Date: Mon Mar 5 14:22:44 2012 +0100 | |
Rename the timers to be consistent with the actual code. | |
diff --git a/Source/WebCore/platform/graphics/TiledBackingStore.cpp b/Source/WebCore/platform/graphics/TiledBackingStore.cpp | |
index ab3e2b9..47e8d37 100644 | |
--- a/Source/WebCore/platform/graphics/TiledBackingStore.cpp | |
+++ b/Source/WebCore/platform/graphics/TiledBackingStore.cpp | |
@@ -60,7 +60,7 @@ void TiledBackingStore::setTileSize(const IntSize& size) | |
{ | |
m_tileSize = size; | |
m_tiles.clear(); | |
- startTileCreationTimer(); | |
+ startBackingStoreUpdateTimer(); | |
} | |
void TiledBackingStore::setTileCreationDelay(double delay) | |
@@ -77,7 +77,7 @@ void TiledBackingStore::coverWithTilesIfNeeded(const FloatPoint& trajectoryVecto | |
m_trajectoryVector = trajectoryVector; | |
m_visibleRect = visibleRect; | |
- startTileCreationTimer(); | |
+ startBackingStoreUpdateTimer(); | |
} | |
void TiledBackingStore::invalidate(const IntRect& contentsDirtyRect) | |
@@ -131,7 +131,7 @@ void TiledBackingStore::updateTileBuffers() | |
return; | |
} | |
- // FIXME: In single threaded case, tile back buffers could be updated asynchronously | |
+ // FIXME: In single threaded case, tile back buffers could be updated asynchronously | |
// one by one and then swapped to front in one go. This would minimize the time spent | |
// blocking on tile updates. | |
unsigned size = dirtyTiles.size(); | |
@@ -309,7 +309,7 @@ void TiledBackingStore::updateBackingStore() | |
// Re-call createTiles on a timer to cover the visible area with the newest shortest distance. | |
if (requiredTileCount) | |
- m_tileCreationTimer->startOneShot(m_tileCreationDelay); | |
+ m_backingStoreUpdateTimer->startOneShot(m_tileCreationDelay); | |
} | |
void TiledBackingStore::adjustForContentsRect(IntRect& rect) const | |
@@ -490,19 +490,19 @@ void TiledBackingStore::startTileBufferUpdateTimer() | |
m_tileBufferUpdateTimer->startOneShot(0); | |
} | |
-void TiledBackingStore::tileBufferUpdateTimerFired(TileTimer*) | |
+void TiledBackingStore::tileBufferUpdateTimerFired(Timer<TiledBackingStore>*) | |
{ | |
updateTileBuffers(); | |
} | |
-void TiledBackingStore::startTileCreationTimer() | |
+void TiledBackingStore::startBackingStoreUpdateTimer() | |
{ | |
if (m_backingStoreUpdateTimer->isActive() || isBackingStoreUpdatesSuspended()) | |
return; | |
- m_tileCreationTimer->startOneShot(0); | |
+ m_backingStoreUpdateTimer->startOneShot(0); | |
} | |
-void TiledBackingStore::tileCreationTimerFired(TileTimer*) | |
+void TiledBackingStore::backingStoreUpdateTimerFired(Timer<TiledBackingStore>*) | |
{ | |
updateBackingStore(); | |
} | |
@@ -522,7 +522,7 @@ void TiledBackingStore::setContentsFrozen(bool freeze) | |
if (m_pendingScale) | |
commitScaleChange(); | |
else { | |
- startTileCreationTimer(); | |
+ startBackingStoreUpdateTimer(); | |
startTileBufferUpdateTimer(); | |
} | |
} | |
diff --git a/Source/WebCore/platform/graphics/TiledBackingStore.h b/Source/WebCore/platform/graphics/TiledBackingStore.h | |
index bea15fb..2399a3d 100644 | |
--- a/Source/WebCore/platform/graphics/TiledBackingStore.h | |
+++ b/Source/WebCore/platform/graphics/TiledBackingStore.h | |
@@ -80,9 +80,10 @@ public: | |
private: | |
void startTileBufferUpdateTimer(); | |
- void startTileCreationTimer(); | |
+ void startBackingStoreUpdateTimer(); | |
- typedef Timer<TiledBackingStore> TileTimer; | |
+ void tileBufferUpdateTimerFired(Timer<TiledBackingStore>*); | |
+ void backingStoreUpdateTimerFired(Timer<TiledBackingStore>*); | |
void tileBufferUpdateTimerFired(TileTimer*); | |
void tileCreationTimerFired(TileTimer*); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment