Title: [128529] trunk/Source/WebCore
- Revision
- 128529
- Author
- [email protected]
- Date
- 2012-09-13 17:02:51 -0700 (Thu, 13 Sep 2012)
Log Message
Lots of repaints in the top left tile on this site
https://bugs.webkit.org/show_bug.cgi?id=96698
Reviewed by Anders Carlsson.
When given a rect outside of the current tile coverage rect,
TileCache::setNeedsDisplayInRect() would try to invalidate the
top left tile. This would normally be a no-op, except when repaint
counters are visible, in which case it would invalidate the counter
area.
Fix by doing an early return if the intersection between the repaint
rect and the tile coverage rect is empty.
* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::setNeedsDisplayInRect):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (128528 => 128529)
--- trunk/Source/WebCore/ChangeLog 2012-09-13 23:53:20 UTC (rev 128528)
+++ trunk/Source/WebCore/ChangeLog 2012-09-14 00:02:51 UTC (rev 128529)
@@ -1,3 +1,22 @@
+2012-09-13 Simon Fraser <[email protected]>
+
+ Lots of repaints in the top left tile on this site
+ https://bugs.webkit.org/show_bug.cgi?id=96698
+
+ Reviewed by Anders Carlsson.
+
+ When given a rect outside of the current tile coverage rect,
+ TileCache::setNeedsDisplayInRect() would try to invalidate the
+ top left tile. This would normally be a no-op, except when repaint
+ counters are visible, in which case it would invalidate the counter
+ area.
+
+ Fix by doing an early return if the intersection between the repaint
+ rect and the tile coverage rect is empty.
+
+ * platform/graphics/ca/mac/TileCache.mm:
+ (WebCore::TileCache::setNeedsDisplayInRect):
+
2012-09-13 Mark Rowe <[email protected]>
<rdar://problem/12283706> WebKit looks for some files on the system even when building against an SDK.
Modified: trunk/Source/WebCore/platform/graphics/ca/mac/TileCache.mm (128528 => 128529)
--- trunk/Source/WebCore/platform/graphics/ca/mac/TileCache.mm 2012-09-13 23:53:20 UTC (rev 128528)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/TileCache.mm 2012-09-14 00:02:51 UTC (rev 128529)
@@ -108,9 +108,13 @@
scaledRect.scale(m_scale);
// Find the tiles that need to be invalidated.
+ IntRect coveredRect = intersection(enclosingIntRect(scaledRect), m_tileCoverageRect);
+ if (coveredRect.isEmpty())
+ return;
+
TileIndex topLeft;
TileIndex bottomRight;
- getTileIndexRangeForRect(intersection(enclosingIntRect(scaledRect), m_tileCoverageRect), topLeft, bottomRight);
+ getTileIndexRangeForRect(coveredRect, topLeft, bottomRight);
for (int y = topLeft.y(); y <= bottomRight.y(); ++y) {
for (int x = topLeft.x(); x <= bottomRight.x(); ++x) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes