Changeset 89803 in webkit
- Timestamp:
- Jun 27, 2011 1:10:54 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r89789 r89803 1 2011-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 1 29 2011-06-26 Adam Barth <abarth@webkit.org> 2 30 -
trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp
r81347 r89803 31 31 static const int defaultTileHeight = 512; 32 32 33 static 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 33 40 TiledBackingStore::TiledBackingStore(TiledBackingStoreClient* client) 34 41 : m_client(client) … … 75 82 76 83 Tile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location()); 77 Tile::Coordinate bottomRight = tileCoordinateForPoint( IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));84 Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect)); 78 85 79 86 for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) { … … 134 141 135 142 Tile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location()); 136 Tile::Coordinate bottomRight = tileCoordinateForPoint( IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));143 Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect)); 137 144 138 145 for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) { … … 231 238 unsigned requiredTileCount = 0; 232 239 Tile::Coordinate topLeft = tileCoordinateForPoint(coverRect.location()); 233 Tile::Coordinate bottomRight = tileCoordinateForPoint( IntPoint(coverRect.maxX(), coverRect.maxY()));240 Tile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(coverRect)); 234 241 for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) { 235 242 for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) { -
trunk/Source/WebKit2/ChangeLog
r89790 r89803 1 2011-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 1 29 2011-06-26 Mark Rowe <mrowe@apple.com> 2 30 -
trunk/Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
r88463 r89803 43 43 static const int defaultTileHeight = 1024; 44 44 45 static 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 45 51 PassOwnPtr<TiledDrawingAreaProxy> TiledDrawingAreaProxy::create(PlatformWebView* webView, WebPageProxy* webPageProxy) 46 52 { … … 180 186 181 187 TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location()); 182 TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint( IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));188 TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect)); 183 189 184 190 IntRect coverRect = calculateCoverRect(m_previousVisibleRect); … … 278 284 279 285 TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location()); 280 TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint( IntPoint(dirtyRect.maxX(), dirtyRect.maxY()));286 TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect)); 281 287 282 288 for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) { … … 375 381 bool hasVisibleCheckers = false; 376 382 TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(visibleRect.location()); 377 TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint( IntPoint(visibleRect.maxX(), visibleRect.maxY()));383 TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(visibleRect)); 378 384 for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) { 379 385 for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
Note: See TracChangeset
for help on using the changeset viewer.