mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1047149 - Add check to validate acquire fence of FB layer. r=sotaro
This commit is contained in:
parent
7e71862ad0
commit
26c50a63d4
@ -608,6 +608,7 @@ HwcComposer2D::TryHwComposition()
|
||||
Commit();
|
||||
|
||||
GetGonkDisplay()->SetFBReleaseFd(mList->hwLayers[idx].releaseFenceFd);
|
||||
mList->hwLayers[idx].releaseFenceFd = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -648,6 +649,7 @@ HwcComposer2D::Render(EGLDisplay dpy, EGLSurface sur)
|
||||
Commit();
|
||||
|
||||
GetGonkDisplay()->SetFBReleaseFd(mList->hwLayers[mList->numHwLayers - 1].releaseFenceFd);
|
||||
mList->hwLayers[mList->numHwLayers - 1].releaseFenceFd = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -692,6 +694,7 @@ HwcComposer2D::Commit()
|
||||
displays[HWC_DISPLAY_PRIMARY] = mList;
|
||||
|
||||
for (uint32_t j=0; j < (mList->numHwLayers - 1); j++) {
|
||||
mList->hwLayers[j].acquireFenceFd = -1;
|
||||
if (mHwcLayerMap.IsEmpty() ||
|
||||
(mList->hwLayers[j].compositionType == HWC_FRAMEBUFFER)) {
|
||||
continue;
|
||||
|
@ -168,7 +168,11 @@ status_t FramebufferSurface::setReleaseFenceFd(int fenceFd) {
|
||||
}
|
||||
|
||||
int FramebufferSurface::GetPrevFBAcquireFd() {
|
||||
return mPrevFBAcquireFence.get() ? mPrevFBAcquireFence->dup() : -1;
|
||||
if (mPrevFBAcquireFence.get() && mPrevFBAcquireFence->isValid()) {
|
||||
return mPrevFBAcquireFence->dup();
|
||||
}
|
||||
ALOGE("GetPrevFBAcquireFd: FB acquire fence is invalid!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
status_t FramebufferSurface::setUpdateRectangle(const Rect& r)
|
||||
|
Loading…
Reference in New Issue
Block a user