mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1144012 - Part 4: Remove the usage of mHwc from GonkDisplayICS. r=sotaro
This commit is contained in:
parent
1940eaaf97
commit
785d7bcf18
@ -715,6 +715,7 @@ HwcComposer2D::Render(nsIWidget* aWidget)
|
||||
if (!mHal->HasHwc() || !mList) {
|
||||
return GetGonkDisplay()->SwapBuffers(screen->GetDpy(), screen->GetSur());
|
||||
} else if (!mList && !ReallocLayerList()) {
|
||||
LOGE("Cannot realloc layer list");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -811,15 +812,21 @@ bool
|
||||
HwcComposer2D::TryHwComposition(nsScreenGonk* aScreen)
|
||||
{
|
||||
mHal->SetEGLInfo(aScreen->GetDpy(), aScreen->GetSur());
|
||||
return !mHal->Set(mList, GonkDisplay::DISPLAY_PRIMARY);
|
||||
return !mHal->Set(mList, aScreen->GetDisplayType());
|
||||
}
|
||||
|
||||
bool
|
||||
HwcComposer2D::Render(nsIWidget* aWidget)
|
||||
{
|
||||
nsScreenGonk* screen = static_cast<nsWindow*>(aWidget)->GetScreen();
|
||||
GetGonkDisplay()->SwapBuffers(screen->GetDpy(), screen->GetSur());
|
||||
|
||||
return GetGonkDisplay()->SwapBuffers(screen->GetDpy(), screen->GetSur());
|
||||
if (!mHal->HasHwc()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
mHal->Prepare(nullptr, screen->GetDisplayType(), nullptr, -1);
|
||||
return !mHal->Set(nullptr, screen->GetDisplayType());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -168,14 +168,7 @@ GonkDisplayICS::SwapBuffers(EGLDisplay dpy, EGLSurface sur)
|
||||
{
|
||||
// Should be called when composition rendering is complete for a frame.
|
||||
// Only HWC v1.0 needs this call. ICS gonk always needs the call.
|
||||
mFBSurface->compositionComplete();
|
||||
|
||||
if (!mHwc) {
|
||||
return true;
|
||||
}
|
||||
|
||||
mHwc->prepare(mHwc, nullptr);
|
||||
return !mHwc->set(mHwc, dpy, sur, 0);
|
||||
return !mFBSurface->compositionComplete();
|
||||
}
|
||||
|
||||
ANativeWindowBuffer*
|
||||
|
Loading…
Reference in New Issue
Block a user