Commit d2cb3bc9 authored by Vikas Soni's avatar Vikas Soni Committed by Commit Bot

Delete an AImage before deleting AImageReader.

All the Aimages associated with AImageReader must be closed/deleted
before we close/delete the AImageReader.

Bug: 849218
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I9b013a7da53f0da716b869c48fe2ee024bee21a3
Reviewed-on: https://chromium-review.googlesource.com/1087827
Commit-Queue: vikas soni <vikassoni@chromium.org>
Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565021}
parent 7f997b25
......@@ -97,9 +97,11 @@ ImageReaderGLOwner::~ImageReaderGLOwner() {
// Now we can stop listening to new images.
loader_.AImageReader_setImageListener(image_reader_, NULL);
// Delete the image reader. This method will return all AImage objects
// acquired by this reader to the system. Hence there is no need to delete
// the image seperately.
// Delete the image before closing the associated image reader.
if (current_image_)
loader_.AImage_delete(current_image_);
// Delete the image reader.
loader_.AImageReader_delete(image_reader_);
// Delete texture
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment