Merge "make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)"

automerge: 9a55cbc

* commit '9a55cbc0523bb05f15a1ea252c6736ce5060c53e':
  make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)
This commit is contained in:
Miao Wang
2015-02-05 00:07:17 +00:00
committed by android-build-merger

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();
}
}