Changeset 116938 in webkit


Ignore:
Timestamp:
May 14, 2012 6:07:03 AM (12 years ago)
Author:
jocelyn.turcotte@nokia.com
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r116933 r116938  
     12012-05-14  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2
     3        TiledBackingStore: Prevent partial tile updates when they intersect the keep rect.
     4        https://bugs.webkit.org/show_bug.cgi?id=85488
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Right now an invalidate can cause problems for tiles on the boundary of the keep
     9        rect. Intersecting the dirty rect causes only part of the tile to be updated,
     10        and the glitch becomes visible if the user scrolls this tile back into the viewport.
     11
     12        * platform/graphics/TiledBackingStore.cpp:
     13        (WebCore::TiledBackingStore::invalidate):
     14
    1152012-05-14  Alexander Pavlov  <apavlov@chromium.org>
    216
  • trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp

    r113967 r116938  
    8585void TiledBackingStore::invalidate(const IntRect& contentsDirtyRect)
    8686{
    87     IntRect dirtyRect(intersection(mapFromContents(contentsDirtyRect), m_keepRect));
    88 
    89     Tile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
    90     Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect));
     87    IntRect dirtyRect(mapFromContents(contentsDirtyRect));
     88
     89    // Only iterate on the part of the rect that we know we might have tiles.
     90    IntRect coveredDirtyRect = intersection(dirtyRect, m_keepRect);
     91    Tile::Coordinate topLeft = tileCoordinateForPoint(coveredDirtyRect.location());
     92    Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(coveredDirtyRect));
    9193
    9294    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
     
    9597            if (!currentTile)
    9698                continue;
     99            // Pass the full rect to each tile as coveredDirtyRect might not
     100            // contain them completely and we don't want partial tile redraws.
    97101            currentTile->invalidate(dirtyRect);
    98102        }
Note: See TracChangeset for help on using the changeset viewer.