diff options
| author | 2009-08-03 15:40:54 -0700 | |
|---|---|---|
| committer | 2009-08-03 15:40:54 -0700 | |
| commit | 8a173f7632c517965f2f482a5a01c514907a076e (patch) | |
| tree | 123bcd856aecac5ce807656b49cc4f1dab32c055 | |
| parent | 3c5ad8abae700b03511fc10d217adb9025dc0789 (diff) | |
| parent | cb21c37853cf67ab91ae324e7887a1561f879056 (diff) | |
Merge change 9544
* changes:
free surface buffers before trying to allocate new ones, so we have more chance of success
| -rw-r--r-- | libs/surfaceflinger/LayerBitmap.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/surfaceflinger/LayerBitmap.cpp b/libs/surfaceflinger/LayerBitmap.cpp index ff49c87db311..5221fed56f4d 100644 --- a/libs/surfaceflinger/LayerBitmap.cpp +++ b/libs/surfaceflinger/LayerBitmap.cpp @@ -178,6 +178,7 @@ sp<Buffer> LayerBitmap::allocate() { Mutex::Autolock _l(mLock); surface_info_t* info = mInfo; + mBuffer.clear(); // free buffer before allocating a new one sp<Buffer> buffer = new Buffer(mWidth, mHeight, mFormat, mFlags); status_t err = buffer->initCheck(); if (LIKELY(err == NO_ERROR)) { |