am 8eb16af2: Merge "don\'t try to lock a buffer that wasn\'t allocated with SW usage bits" into gingerbread
Merge commit '8eb16af29303cda190133a1d220b9ecd9341e261' into gingerbread-plus-aosp * commit '8eb16af29303cda190133a1d220b9ecd9341e261': don't try to lock a buffer that wasn't allocated with SW usage bits
This commit is contained in:
commit
2091772e7c
@ -196,6 +196,7 @@ void Layer::reloadTexture(const Region& dirty)
|
|||||||
} else {
|
} else {
|
||||||
slowpath:
|
slowpath:
|
||||||
GGLSurface t;
|
GGLSurface t;
|
||||||
|
if (buffer->usage & GRALLOC_USAGE_SW_READ_MASK) {
|
||||||
status_t res = buffer->lock(&t, GRALLOC_USAGE_SW_READ_OFTEN);
|
status_t res = buffer->lock(&t, GRALLOC_USAGE_SW_READ_OFTEN);
|
||||||
LOGE_IF(res, "error %d (%s) locking buffer %p",
|
LOGE_IF(res, "error %d (%s) locking buffer %p",
|
||||||
res, strerror(res), buffer.get());
|
res, strerror(res), buffer.get());
|
||||||
@ -203,6 +204,9 @@ slowpath:
|
|||||||
mBufferManager.loadTexture(dirty, t);
|
mBufferManager.loadTexture(dirty, t);
|
||||||
buffer->unlock();
|
buffer->unlock();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// we can't do anything
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user