Fix hang in levels.
A call to connect was missing from the binding of a
surfaceTexture to an allocation.
bug 10752757
Change-Id: I2fee9bbfebe8ddc932421f907da3f68749098921
diff --git a/driver/rsdAllocation.cpp b/driver/rsdAllocation.cpp
index d2f5f30..817c9d8 100644
--- a/driver/rsdAllocation.cpp
+++ b/driver/rsdAllocation.cpp
@@ -673,6 +673,8 @@
mapper.unlock(drv->wndBuffer->handle);
old->cancelBuffer(old, drv->wndBuffer, -1);
drv->wndSurface = NULL;
+
+ native_window_api_disconnect(old, NATIVE_WINDOW_API_CPU);
old->decStrong(NULL);
}
@@ -687,6 +689,12 @@
flags |= GRALLOC_USAGE_HW_RENDER;
}
+ r = native_window_api_connect(nw, NATIVE_WINDOW_API_CPU);
+ if (r) {
+ rsc->setError(RS_ERROR_DRIVER, "Error setting IO output buffer usage.");
+ goto error;
+ }
+
r = native_window_set_usage(nw, flags);
if (r) {
rsc->setError(RS_ERROR_DRIVER, "Error setting IO output buffer usage.");