зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1144012 - Part 4: Remove the usage of mHwc from GonkDisplayICS. r=sotaro
This commit is contained in:
Родитель
a92b13f8f5
Коммит
cfe9c42db4
|
@ -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*
|
||||
|
|
Загрузка…
Ссылка в новой задаче