Commit 833bce72 by Geoff Lang Committed by Commit Bot

Call ImageImpl::destroy before destroying the image source.

egl::Image destroys the source sibling before calling the backend destroy function. ImageVk needs the source image to do proper clean up. BUG=angleproject:3722 Change-Id: I110d77a9c4151166624bb953c579102ac7dab6ee Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709752Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 610f2388
......@@ -251,6 +251,9 @@ void Image::onDestroy(const Display *display)
// no siblings left.
ASSERT(mState.targets.empty());
// Make sure the implementation gets a chance to clean up before we delete the source.
mImplementation->onDestroy(display);
// Tell the source that it is no longer used by this image
if (mState.source != nullptr)
{
......@@ -266,8 +269,6 @@ void Image::onDestroy(const Display *display)
mState.source = nullptr;
}
mImplementation->onDestroy(display);
}
Image::~Image()
......
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