Title: [116938] trunk/Source/WebCore
- Revision
- 116938
- Author
- [email protected]
- Date
- 2012-05-14 06:07:03 -0700 (Mon, 14 May 2012)
Log Message
TiledBackingStore: Prevent partial tile updates when they intersect the keep rect.
https://bugs.webkit.org/show_bug.cgi?id=85488
Reviewed by Kenneth Rohde Christiansen.
Right now an invalidate can cause problems for tiles on the boundary of the keep
rect. Intersecting the dirty rect causes only part of the tile to be updated,
and the glitch becomes visible if the user scrolls this tile back into the viewport.
* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::invalidate):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (116937 => 116938)
--- trunk/Source/WebCore/ChangeLog 2012-05-14 12:45:51 UTC (rev 116937)
+++ trunk/Source/WebCore/ChangeLog 2012-05-14 13:07:03 UTC (rev 116938)
@@ -1,3 +1,17 @@
+2012-05-14 Jocelyn Turcotte <[email protected]>
+
+ TiledBackingStore: Prevent partial tile updates when they intersect the keep rect.
+ https://bugs.webkit.org/show_bug.cgi?id=85488
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Right now an invalidate can cause problems for tiles on the boundary of the keep
+ rect. Intersecting the dirty rect causes only part of the tile to be updated,
+ and the glitch becomes visible if the user scrolls this tile back into the viewport.
+
+ * platform/graphics/TiledBackingStore.cpp:
+ (WebCore::TiledBackingStore::invalidate):
+
2012-05-14 Alexander Pavlov <[email protected]>
Web Inspector: Esc should revert the colorpicker-modifed color to the original
Modified: trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp (116937 => 116938)
--- trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp 2012-05-14 12:45:51 UTC (rev 116937)
+++ trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp 2012-05-14 13:07:03 UTC (rev 116938)
@@ -84,16 +84,20 @@
void TiledBackingStore::invalidate(const IntRect& contentsDirtyRect)
{
- IntRect dirtyRect(intersection(mapFromContents(contentsDirtyRect), m_keepRect));
+ IntRect dirtyRect(mapFromContents(contentsDirtyRect));
- Tile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
- Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect));
+ // Only iterate on the part of the rect that we know we might have tiles.
+ IntRect coveredDirtyRect = intersection(dirtyRect, m_keepRect);
+ Tile::Coordinate topLeft = tileCoordinateForPoint(coveredDirtyRect.location());
+ Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(coveredDirtyRect));
for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
RefPtr<Tile> currentTile = tileAt(Tile::Coordinate(xCoordinate, yCoordinate));
if (!currentTile)
continue;
+ // Pass the full rect to each tile as coveredDirtyRect might not
+ // contain them completely and we don't want partial tile redraws.
currentTile->invalidate(dirtyRect);
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes