Commit b905501c authored by Philippe Normand's avatar Philippe Normand 🦀

wpe: Get rid of un-necessary frameComplete dispatchs

frameComplete() should be called only if there's a new commited frame.
parent 0f03e33b
Pipeline #73129 skipped
......@@ -270,6 +270,7 @@ bool WPEThreadedView::initialize(GstWpeSrc* src, GstGLContext* context, GstGLDis
GstEGLImage* WPEThreadedView::image()
{
GstEGLImage* ret = nullptr;
bool dispatchFrameComplete = false;
{
GMutexHolder lock(images.mutex);
......@@ -286,13 +287,14 @@ GstEGLImage* WPEThreadedView::image()
if (previousImage)
gst_egl_image_unref(previousImage);
dispatchFrameComplete = true;
}
if (images.committed)
ret = images.committed;
}
if (ret)
if (dispatchFrameComplete)
frameComplete();
return ret;
......
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