Created
March 5, 2012 13:32
-
-
Save kenchris/1978318 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 a28a381123e2f9bcbe06de1353b2d8a86d43db4c | |
Author: Kenneth Rohde Christiansen <kenneth@webkit.org> | |
Date: Mon Mar 5 14:12:48 2012 +0100 | |
Improve some of the comments in the tiled backing store. | |
diff --git a/Source/WebCore/platform/graphics/TiledBackingStore.cpp b/Source/WebCore/platform/graphics/TiledBackingStore.cpp | |
index 3ac5285..6922f91 100644 | |
--- a/Source/WebCore/platform/graphics/TiledBackingStore.cpp | |
+++ b/Source/WebCore/platform/graphics/TiledBackingStore.cpp | |
@@ -260,6 +260,9 @@ void TiledBackingStore::createTiles() | |
Vector<Tile::Coordinate> tilesToCreate; | |
unsigned requiredTileCount = 0; | |
+ // Cover areas (in tiles) with minimum distance from the visible rect. If the visible rect is | |
+ // not covered already it will be covered first in one go, due to the distance being 0 for tiles | |
+ // inside the visible rect. | |
Tile::Coordinate topLeft = tileCoordinateForPoint(coverRect.location()); | |
Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(coverRect)); | |
for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) { | |
@@ -268,7 +271,6 @@ void TiledBackingStore::createTiles() | |
if (tileAt(currentCoordinate)) | |
continue; | |
++requiredTileCount; | |
- // Distance is 0 for all tiles inside the visibleRect. | |
double distance = tileDistance(visibleRect, currentCoordinate); | |
if (distance > shortestDistance) | |
continue; | |
@@ -288,7 +290,7 @@ void TiledBackingStore::createTiles() | |
} | |
requiredTileCount -= tilesToCreateCount; | |
- // Paint the content of the newly created tiles. | |
+ // Paint the content of the newly created tiles or resized tiles. | |
if (tilesToCreateCount || didResizeTiles) | |
updateTileBuffers(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment