Changeset 89803 in webkit


Ignore:
Timestamp:
Jun 27, 2011 1:10:54 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-27 Huang Dongsung <luxtella@company100.net>

Reviewed by Kenneth Rohde Christiansen.

TiledBackingStore endlessly creates and destroys tiles due to an off-by-one
error.
https://bugs.webkit.org/show_bug.cgi?id=62422

REGRESSION(r77286): Remove bottomRight().
REGRESSION(r77312): Change the logic to get the bottom right point.
REGRESSION(r77928): Cause off-by-one error in TiledBackingStore.
REGRESSION(r78783): Cause off-by-one error in TiledDrawingAreaProxy.
REGRESSION(r78785): Cause off-by-one error in TiledDrawingAreaProxy.

If the viewport width equals the contents width, especially in the mobile
device, TiledBackingStore endlessly creates and deletes the rightmost
column and bottom row of tiles.
In the detail, dropTilesOutsideRect() in TiledBackingStore::createTiles()
deletes tiles and setTile(coordinate, Tile::create(this, coordinate)) creates
tiles infinitely.
Modified TiledDrawingAreaProxy also.

  • platform/graphics/TiledBackingStore.cpp: (WebCore::innerBottomRight): (WebCore::TiledBackingStore::invalidate): (WebCore::TiledBackingStore::paint): (WebCore::TiledBackingStore::createTiles):

2011-06-27 Huang Dongsung <luxtella@company100.net>

Reviewed by Kenneth Rohde Christiansen.

TiledBackingStore endlessly creates and destroys tiles due to an off-by-one
error.
https://bugs.webkit.org/show_bug.cgi?id=62422

REGRESSION(r77286): Remove bottomRight().
REGRESSION(r77312): Change the logic to get the bottom right point.
REGRESSION(r77928): Cause off-by-one error in TiledBackingStore.
REGRESSION(r78783): Cause off-by-one error in TiledDrawingAreaProxy.
REGRESSION(r78785): Cause off-by-one error in TiledDrawingAreaProxy.

If the viewport width equals the contents width, especially in the mobile
device, TiledBackingStore endlessly creates and deletes the rightmost
column and bottom row of tiles.
In the detail, dropTilesOutsideRect() in TiledBackingStore::createTiles()
deletes tiles and setTile(coordinate, Tile::create(this, coordinate)) creates
tiles infinitely.
Modified TiledDrawingAreaProxy also.

  • UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::innerBottomRight): (WebKit::TiledDrawingAreaProxy::invalidate): (WebKit::TiledDrawingAreaProxy::paint): (WebKit::TiledDrawingAreaProxy::createTiles):
Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r89789 r89803  
     12011-06-27  Huang Dongsung  <luxtella@company100.net>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        TiledBackingStore endlessly creates and destroys tiles due to an off-by-one
     6        error.
     7        https://bugs.webkit.org/show_bug.cgi?id=62422
     8
     9        REGRESSION(r77286): Remove bottomRight().
     10        REGRESSION(r77312): Change the logic to get the bottom right point.
     11        REGRESSION(r77928): Cause off-by-one error in TiledBackingStore.
     12        REGRESSION(r78783): Cause off-by-one error in TiledDrawingAreaProxy.
     13        REGRESSION(r78785): Cause off-by-one error in TiledDrawingAreaProxy.
     14
     15        If the viewport width equals the contents width, especially in the mobile
     16        device, TiledBackingStore endlessly creates and deletes the rightmost
     17        column and bottom row of tiles.
     18        In the detail, dropTilesOutsideRect() in TiledBackingStore::createTiles()
     19        deletes tiles and setTile(coordinate, Tile::create(this, coordinate)) creates
     20        tiles infinitely.
     21        Modified TiledDrawingAreaProxy also.
     22
     23        * platform/graphics/TiledBackingStore.cpp:
     24        (WebCore::innerBottomRight):
     25        (WebCore::TiledBackingStore::invalidate):
     26        (WebCore::TiledBackingStore::paint):
     27        (WebCore::TiledBackingStore::createTiles):
     28
    1292011-06-26  Adam Barth  <abarth@webkit.org>
    230
  • trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp

    r81347 r89803  
    3131static const int defaultTileHeight = 512;
    3232
     33static IntPoint innerBottomRight(const IntRect& rect)
     34{
     35    // Actually, the rect does not contain rect.maxX(). Refer to IntRect::contain.
     36    return IntPoint(rect.maxX() - 1, rect.maxY() - 1);
     37}
     38
     39
    3340TiledBackingStore::TiledBackingStore(TiledBackingStoreClient* client)
    3441    : m_client(client)
     
    7582   
    7683    Tile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
    77     Tile::Coordinate bottomRight = tileCoordinateForPoint(IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));
     84    Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect));
    7885   
    7986    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
     
    134141   
    135142    Tile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
    136     Tile::Coordinate bottomRight = tileCoordinateForPoint(IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));
     143    Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect));
    137144
    138145    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
     
    231238    unsigned requiredTileCount = 0;
    232239    Tile::Coordinate topLeft = tileCoordinateForPoint(coverRect.location());
    233     Tile::Coordinate bottomRight = tileCoordinateForPoint(IntPoint(coverRect.maxX(), coverRect.maxY()));
     240    Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(coverRect));
    234241    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
    235242        for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
  • trunk/Source/WebKit2/ChangeLog

    r89790 r89803  
     12011-06-27  Huang Dongsung  <luxtella@company100.net>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        TiledBackingStore endlessly creates and destroys tiles due to an off-by-one
     6        error.
     7        https://bugs.webkit.org/show_bug.cgi?id=62422
     8
     9        REGRESSION(r77286): Remove bottomRight().
     10        REGRESSION(r77312): Change the logic to get the bottom right point.
     11        REGRESSION(r77928): Cause off-by-one error in TiledBackingStore.
     12        REGRESSION(r78783): Cause off-by-one error in TiledDrawingAreaProxy.
     13        REGRESSION(r78785): Cause off-by-one error in TiledDrawingAreaProxy.
     14
     15        If the viewport width equals the contents width, especially in the mobile
     16        device, TiledBackingStore endlessly creates and deletes the rightmost
     17        column and bottom row of tiles.
     18        In the detail, dropTilesOutsideRect() in TiledBackingStore::createTiles()
     19        deletes tiles and setTile(coordinate, Tile::create(this, coordinate)) creates
     20        tiles infinitely.
     21        Modified TiledDrawingAreaProxy also.
     22
     23        * UIProcess/TiledDrawingAreaProxy.cpp:
     24        (WebKit::innerBottomRight):
     25        (WebKit::TiledDrawingAreaProxy::invalidate):
     26        (WebKit::TiledDrawingAreaProxy::paint):
     27        (WebKit::TiledDrawingAreaProxy::createTiles):
     28
    1292011-06-26  Mark Rowe  <mrowe@apple.com>
    230
  • trunk/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp

    r88463 r89803  
    4343static const int defaultTileHeight = 1024;
    4444
     45static IntPoint innerBottomRight(const IntRect& rect)
     46{
     47    // Actually, the rect does not contain rect.maxX(). Refer to IntRect::contain.
     48    return IntPoint(rect.maxX() - 1, rect.maxY() - 1);
     49}
     50
    4551PassOwnPtr<TiledDrawingAreaProxy> TiledDrawingAreaProxy::create(PlatformWebView* webView, WebPageProxy* webPageProxy)
    4652{
     
    180186
    181187    TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
    182     TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));
     188    TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect));
    183189
    184190    IntRect coverRect = calculateCoverRect(m_previousVisibleRect);
     
    278284
    279285    TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
    280     TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));
     286    TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect));
    281287
    282288    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
     
    375381    bool hasVisibleCheckers = false;
    376382    TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(visibleRect.location());
    377     TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(IntPoint(visibleRect.maxX(), visibleRect.maxY()));
     383    TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(visibleRect));
    378384    for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
    379385        for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
Note: See TracChangeset for help on using the changeset viewer.