make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT

(Native RS)

Change-Id: I23041da03c2c928ceec76037804abb5dc7e6eb64
This commit is contained in:
Miao Wang
2015-02-03 17:16:43 -08:00
parent 53e8d6f934
commit f0f6e80bae

View File

@@ -1878,4 +1878,15 @@ public class Allocation extends BaseObj {
}
}
/**
* For USAGE_IO_OUTPUT, destroy() implies setSurface(null).
*
*/
@Override
public void destroy() {
if((mUsage & USAGE_IO_OUTPUT) != 0) {
setSurface(null);
}
super.destroy();
}
}