Commit 5c257e54 authored by simon.fraser@apple.com's avatar simon.fraser@apple.com
Browse files

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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6761ad72
2012-09-13 Simon Fraser <simon.fraser@apple.com>
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 <mrowe@apple.com>
 
<rdar://problem/12283706> WebKit looks for some files on the system even when building against an SDK.
......@@ -108,9 +108,13 @@ void TileCache::setNeedsDisplayInRect(const IntRect& rect)
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) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment