2011-03-10 Adrienne Walker <enne@google.com>
Reviewed by Kenneth Russell.
[chromium] Make tiled compositor data structure more efficient.
https://bugs.webkit.org/show_bug.cgi?id=54133
Previously, the compositor had a sparse 2D array of tiles for the
whole page, most of which were null. The tiles were implicitly
located based on their position in the array. This was inefficient
when the page grew (e.g. infinite scrolling) and caused some bugs
(e.g. width * height > MAX_INT). This change modifies tiles to have
explicit positions so they can be stored in a hash map.
Tests: LayoutTests/compositing/
* platform/graphics/chromium/LayerTilerChromium.cpp:
(WebCore::LayerTilerChromium::reset):
(WebCore::LayerTilerChromium::createTile):
(WebCore::LayerTilerChromium::invalidateTiles):
(WebCore::LayerTilerChromium::contentRectToTileIndices):
(WebCore::LayerTilerChromium::tileAt):
(WebCore::LayerTilerChromium::tileContentRect):
(WebCore::LayerTilerChromium::tileLayerRect):
(WebCore::LayerTilerChromium::invalidateRect):
(WebCore::LayerTilerChromium::invalidateEntireLayer):
(WebCore::LayerTilerChromium::update):
(WebCore::LayerTilerChromium::updateFromPixels):
(WebCore::LayerTilerChromium::draw):
(WebCore::LayerTilerChromium::growLayerToContain):
* platform/graphics/chromium/LayerTilerChromium.h:
(WebCore::LayerTilerChromium::Tile::Tile):
(WebCore::LayerTilerChromium::Tile::i):
(WebCore::LayerTilerChromium::Tile::j):
(WebCore::LayerTilerChromium::Tile::moveTo):
(WebCore::LayerTilerChromium::TileMapKeyTraits::emptyValue):
(WebCore::LayerTilerChromium::TileMapKeyTraits::constructDeletedValue):
(WebCore::LayerTilerChromium::TileMapKeyTraits::isDeletedValue):
git-svn-id: svn://svn.chromium.org/blink/trunk@80767 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
This diff is collapsed.
Please register or sign in to comment