[BlackBerry] Only reallocate buffers that were allocated before suspending
authorjpetsovits <jpetsovits@rim.com>
Mon, 15 Oct 2012 21:42:28 +0000 (21:42 +0000)
committerjpetsovits <jpetsovits@rim.com>
Mon, 15 Oct 2012 21:42:28 +0000 (21:42 +0000)
commit80cd7f0f1766d9b4419b17487416aaa201e20a3a
treefce86a8ab5d44a0b43641c82addaf2eb044c754c
parent02b9853edd32ea9947d1b4e2f03d433ba5d1a0e2
[BlackBerry] Only reallocate buffers that were allocated before suspending
https://bugs.webkit.org/show_bug.cgi?id=99205
RIM PR 99395

Reviewed by Antonio Gomes.

When we call releaseBuffers(), not all of the backingstore
tile buffers might have been allocated yet. Still we try
to release all of them, which causes us to lazy-initialize
the tile buffers so we can release them again.

This is stupid and we should just ignore buffers that
haven't been initialized yet. This patch makes that change.

* WebKitSupport/BackingStoreTile.cpp:
(BlackBerry::WebKit::TileBuffer::wasNativeBufferCreated):
(WebKit):
* WebKitSupport/BackingStoreTile.h:
(TileBuffer):
* WebKitSupport/SurfacePool.cpp:
(BlackBerry::WebKit::SurfacePool::createBuffers):
(BlackBerry::WebKit::SurfacePool::releaseBuffers):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebKitSupport/BackingStoreTile.cpp
Source/WebKit/blackberry/WebKitSupport/BackingStoreTile.h
Source/WebKit/blackberry/WebKitSupport/SurfacePool.cpp