Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove image on buffer destroy callback only #178

Merged
merged 1 commit into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/view-backend-exportable-fdo-egl-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ struct wpe_fdo_egl_exported_image {
EGLImageKHR eglImage { nullptr };
uint32_t width { 0 };
uint32_t height { 0 };
bool exported { false };
struct wl_resource* bufferResource { nullptr };
struct wl_listener bufferDestroyListener;
};
5 changes: 2 additions & 3 deletions src/view-backend-exportable-fdo-egl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,6 @@ class ClientBundleEGL final : public ClientBundle {
{
if (image->bufferResource)
viewBackend->releaseBuffer(image->bufferResource);
else
deleteImage(image);
}

void releaseShmBuffer(struct wpe_fdo_shm_exported_buffer* buffer)
Expand All @@ -277,7 +275,6 @@ class ClientBundleEGL final : public ClientBundle {

void exportImage(struct wpe_fdo_egl_exported_image* image)
{
image->exported = true;
client->export_fdo_egl_image(data, image);
}

Expand All @@ -295,6 +292,8 @@ class ClientBundleEGL final : public ClientBundle {
image = wl_container_of(listener, image, bufferDestroyListener);

image->bufferResource = nullptr;

deleteImage(image);
}
};

Expand Down