am 4d2dbebf: fix for [1885684] E/SurfaceFlinger( 60): not enough memory for layer bitmap size=4294938624

Merge commit '4d2dbebf3d08209f751585d8cc367369e2f6e32f'

* commit '4d2dbebf3d08209f751585d8cc367369e2f6e32f':
  fix for [1885684] E/SurfaceFlinger( 60): not enough memory for layer bitmap size=4294938624
This commit is contained in:
Mathias Agopian
2009-07-09 20:05:11 -07:00
committed by The Android Open Source Project

View File

@@ -1212,6 +1212,13 @@ sp<ISurface> SurfaceFlinger::createSurface(ClientID clientId, int pid,
{
sp<LayerBaseClient> layer;
sp<LayerBaseClient::Surface> surfaceHandle;
if (int32_t(w|h) < 0) {
LOGE("createSurface() failed, w or h is negative (w=%d, h=%d)",
int(w), int(h));
return surfaceHandle;
}
Mutex::Autolock _l(mStateLock);
sp<Client> client = mClientsMap.valueFor(clientId);
if (UNLIKELY(client == 0)) {