Commit 2c5b4455 by Nicolas Caramelli Committed by Alexis Hétu

Minor change in detachImage() for Xcb, Xlib, Wayland WSIs

Bug: b/162351826 Change-Id: Idd8e6c869ffa99945e7a6bc7701a7ab854f18432 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/47188 Kokoro-Result: kokoro <noreply+kokoro@google.com> Presubmit-Ready: Alexis Hétu <sugoi@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 75690ce7
...@@ -92,7 +92,7 @@ void WaylandSurfaceKHR::detachImage(PresentImage *image) ...@@ -92,7 +92,7 @@ void WaylandSurfaceKHR::detachImage(PresentImage *image)
munmap(wlImage->data, extent.height * stride); munmap(wlImage->data, extent.height * stride);
wl_buffer_destroy(wlImage->buffer); wl_buffer_destroy(wlImage->buffer);
delete wlImage; delete wlImage;
imageMap.erase(image); imageMap.erase(it);
} }
} }
......
...@@ -151,7 +151,7 @@ void XcbSurfaceKHR::detachImage(PresentImage *image) ...@@ -151,7 +151,7 @@ void XcbSurfaceKHR::detachImage(PresentImage *image)
if(it != graphicsContexts.end()) if(it != graphicsContexts.end())
{ {
libXcb->xcb_free_gc(connection, it->second); libXcb->xcb_free_gc(connection, it->second);
graphicsContexts.erase(image); graphicsContexts.erase(it);
} }
} }
......
...@@ -77,7 +77,7 @@ void XlibSurfaceKHR::detachImage(PresentImage *image) ...@@ -77,7 +77,7 @@ void XlibSurfaceKHR::detachImage(PresentImage *image)
XImage *xImage = it->second; XImage *xImage = it->second;
xImage->data = nullptr; // the XImage does not actually own the buffer xImage->data = nullptr; // the XImage does not actually own the buffer
XDestroyImage(xImage); XDestroyImage(xImage);
imageMap.erase(image); imageMap.erase(it);
} }
} }
......
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