Changeset 81347 in webkit
- Timestamp:
- Mar 17, 2011 5:00:34 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r81343 r81347 1 2011-03-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> 2 3 Reviewed by Andreas Kling. 4 5 Tiled backing store should only request repaint for updated areas 6 https://bugs.webkit.org/show_bug.cgi?id=56464 7 8 Reuse updateBackBuffer's dirty rectangle calculations to only 9 invalidate the necessary parts of the window. 10 11 * platform/graphics/Tile.h: 12 * platform/graphics/TiledBackingStore.cpp: 13 (WebCore::TiledBackingStore::updateTileBuffers): 14 * platform/graphics/qt/TileQt.cpp: 15 (WebCore::Tile::updateBackBuffer): 16 1 17 2011-03-17 Mikhail Naganov <mnaganov@chromium.org> 2 18 -
trunk/Source/WebCore/platform/graphics/Tile.h
r57819 r81347 50 50 bool isDirty() const; 51 51 void invalidate(const IntRect&); 52 voidupdateBackBuffer();52 Vector<IntRect> updateBackBuffer(); 53 53 void swapBackBufferToFront(); 54 54 bool isReadyToPaint() const; -
trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp
r79054 r81347 103 103 continue; 104 104 dirtyTiles.append(it->second); 105 // FIXME: should not request system repaint for the full tile.106 paintedArea.append(mapToContents(it->second->rect()));107 105 } 108 106 … … 116 114 // blocking on tile updates. 117 115 unsigned size = dirtyTiles.size(); 118 for (unsigned n = 0; n < size; ++n) 119 dirtyTiles[n]->updateBackBuffer(); 120 121 for (unsigned n = 0; n < size; ++n) 116 for (unsigned n = 0; n < size; ++n) { 117 Vector<IntRect> paintedRects = dirtyTiles[n]->updateBackBuffer(); 118 paintedArea.append(paintedRects); 122 119 dirtyTiles[n]->swapBackBufferToFront(); 120 } 123 121 124 122 m_client->tiledBackingStorePaintEnd(paintedArea); -
trunk/Source/WebCore/platform/graphics/qt/TileQt.cpp
r70262 r81347 92 92 } 93 93 94 voidTile::updateBackBuffer()94 Vector<IntRect> Tile::updateBackBuffer() 95 95 { 96 96 if (m_buffer && !isDirty()) 97 return ;97 return Vector<IntRect>(); 98 98 99 99 if (!m_backBuffer) { … … 116 116 context.translate(-m_rect.x(), -m_rect.y()); 117 117 118 Vector<IntRect> updatedRects; 118 119 int size = dirtyRects.size(); 119 120 for (int n = 0; n < size; ++n) { 120 121 context.save(); 121 122 IntRect rect = dirtyRects[n]; 123 updatedRects.append(rect); 122 124 context.clip(FloatRect(rect)); 123 125 context.scale(FloatSize(m_backingStore->m_contentsScale, m_backingStore->m_contentsScale)); … … 125 127 context.restore(); 126 128 } 129 130 return updatedRects; 127 131 } 128 132
Note: See TracChangeset
for help on using the changeset viewer.