mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +00:00
wpe: Get rid of un-necessary frameComplete dispatchs
frameComplete() should be called only if there's a new commited frame.
This commit is contained in:
parent
0f03e33b03
commit
b905501c55
1 changed files with 3 additions and 1 deletions
|
@ -270,6 +270,7 @@ bool WPEThreadedView::initialize(GstWpeSrc* src, GstGLContext* context, GstGLDis
|
||||||
GstEGLImage* WPEThreadedView::image()
|
GstEGLImage* WPEThreadedView::image()
|
||||||
{
|
{
|
||||||
GstEGLImage* ret = nullptr;
|
GstEGLImage* ret = nullptr;
|
||||||
|
bool dispatchFrameComplete = false;
|
||||||
|
|
||||||
{
|
{
|
||||||
GMutexHolder lock(images.mutex);
|
GMutexHolder lock(images.mutex);
|
||||||
|
@ -286,13 +287,14 @@ GstEGLImage* WPEThreadedView::image()
|
||||||
|
|
||||||
if (previousImage)
|
if (previousImage)
|
||||||
gst_egl_image_unref(previousImage);
|
gst_egl_image_unref(previousImage);
|
||||||
|
dispatchFrameComplete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (images.committed)
|
if (images.committed)
|
||||||
ret = images.committed;
|
ret = images.committed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret)
|
if (dispatchFrameComplete)
|
||||||
frameComplete();
|
frameComplete();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue