Changeset 109112 in webkit
- Timestamp:
- Feb 28, 2012 8:52:35 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r109109 r109112 1 2012-02-28 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 3 Improve the visual of the tiling 4 https://bugs.webkit.org/show_bug.cgi?id=79648 5 6 Reviewed by Noam Rosenthal. 7 8 When we cover the view with tiles[1], we do so from the center 9 and out, in bigger and bigger cicles by finding the current minimum 10 covered distance. 11 12 This looks like painting a rect, then a cross, then a rect, ... 13 and can be noticed when a page blocks during tiling. 14 15 We can do this better by only covering with tiles in rects at a time. 16 17 The original code was done so that it gave preference to tiles in 18 vertical direction due to that being the most common scrolling 19 direction. This is not needed anymore as we are now using the 20 trajectory vector when panning, which always gives preference for 21 creating tiles in the panned direction. 22 23 [1] It should be noted that we always cover the visibleRect in one go, 24 and that we here are talking about covering the coverRect beyond 25 the visibleRect 26 27 * platform/graphics/TiledBackingStore.cpp: 28 (WebCore::TiledBackingStore::tileDistance): 29 1 30 2012-02-28 Yury Semikhatsky <yurys@chromium.org> 2 31 -
trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp
r108501 r109112 194 194 if (viewport.intersects(tileRectForCoordinate(tileCoordinate))) 195 195 return 0; 196 196 197 197 IntPoint viewCenter = viewport.location() + IntSize(viewport.width() / 2, viewport.height() / 2); 198 198 Tile::Coordinate centerCoordinate = tileCoordinateForPoint(viewCenter); 199 200 // Manhattan distance, biased so that vertical distances are shorter. 201 const double horizontalBias = 1.3; 202 return abs(centerCoordinate.y() - tileCoordinate.y()) + horizontalBias * abs(centerCoordinate.x() - tileCoordinate.x()); 199 200 return std::max(abs(centerCoordinate.y() - tileCoordinate.y()), abs(centerCoordinate.x() - tileCoordinate.x())); 203 201 } 204 202
Note: See TracChangeset
for help on using the changeset viewer.