[Qt] Disregard previous backing store as soon as possible https://bugs.webkit.org/show_bug.cgi?id=79232
Reviewed by Simon Hausmann and No'am Rosenthal.
Source/WebCore:
Make it possible to drop non-visible tiles and to test
if the current visible rect is fully covered.
* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::visibleContentsRect):
(WebCore::TiledBackingStore::coverageRatio):
(WebCore::TiledBackingStore::visibleAreaIsCovered):
(WebCore):
(WebCore::TiledBackingStore::createTiles):
(WebCore::TiledBackingStore::removeAllNonVisibleTiles):
* platform/graphics/TiledBackingStore.h:
(TiledBackingStore):
Source/WebKit2:
Between creating the new backing store and painting the content,
we do not want to drop the previous one as that might result in
briefly seeing flickering as the old tiles may be dropped before
something replaces them.
But we do need to drop it at some point and we need to make sure
to not spike the memory usage before of this.
What we now do, is to store the previous backing store as before,
but drop all tiles which are not visible and then drop it as soon
as the visible rect (which might change due if followed by a quick
panning) has been fully covered by tiles.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::setContentsScale):
(WebCore::WebGraphicsLayer::updateContentBuffers):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108501
268f45cc-cd09-0410-ab3c-
d52691b4dbfc