[Qt] Disregard previous backing store as soon as possible https://bugs.webkit.org...
authorkenneth@webkit.org <kenneth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 15:15:10 +0000 (15:15 +0000)
committerkenneth@webkit.org <kenneth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 15:15:10 +0000 (15:15 +0000)
commit11a9a5ffb0267b242058cb8df0e042fcb11d85bb
treeaef2708c987fc5b9d9a3b64e7d07718d35974093
parenta564718a5e284c198a7ca2b4c3846098a3fd6d76
[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
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/TiledBackingStore.cpp
Source/WebCore/platform/graphics/TiledBackingStore.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp