Changeset 80292 in webkit
- Timestamp:
- Mar 3, 2011 3:33:58 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r80281 r80292 1 2011-03-03 Adam Roben <aroben@apple.com> 2 3 Don't try to paint outside the page's bounds 4 5 When the page is resized smaller, we would allocate a ShareableBitmap at the old, larger 6 size, even though we only needed to paint at the new, smaller size. 7 8 The assertion added in this patch will fire during the WebKit2/ResizeViewWhileHidden API 9 test if this fix gets broken in the future. 10 11 Fixes <http://webkit.org/b/55715> DrawingAreaImpl allocates more memory than necessary when 12 the page is resized smaller 13 14 Reviewed by Anders Carlsson. 15 16 * WebProcess/WebPage/DrawingAreaImpl.cpp: 17 (WebKit::DrawingAreaImpl::updateBackingStoreState): Update our dirty region even if painting 18 is suspended (but still refrain from updating it when in accelerated compositing mode). 19 Rather than unite our existing dirty region with the page's new bounds, overwrite our dirty 20 region with the page's new bounds. This prevents us from accumulating a dirty region that is 21 larger than the page in the case where the page is being resized smaller. 22 (WebKit::DrawingAreaImpl::display): Added an assertion that we're not trying to paint 23 outside of the page's bounds. 24 1 25 2011-03-03 Maciej Stachowiak <mjs@apple.com> 2 26 -
trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
r79868 r80292 265 265 // will be sent back in the DidUpdateBackingStoreState message. 266 266 m_layerTreeHost->setShouldNotifyAfterNextScheduledLayerFlush(false); 267 } 267 } else 268 m_dirtyRegion = m_webPage->bounds(); 268 269 269 270 if (m_isPaintingSuspended || m_layerTreeHost) 270 271 updateInfo.viewSize = m_webPage->size(); 271 272 else { 272 m_dirtyRegion.unite(m_webPage->bounds());273 274 273 // The display here should not cause layout to happen, so we can't enter accelerated compositing mode here. 275 274 display(updateInfo); … … 450 449 451 450 IntRect bounds = m_dirtyRegion.bounds(); 451 ASSERT(m_webPage->bounds().contains(bounds)); 452 452 453 453 RefPtr<ShareableBitmap> bitmap = ShareableBitmap::createShareable(bounds.size());
Note: See TracChangeset
for help on using the changeset viewer.