renderer: Allow DS for surfaces with inert subsurfaces (#12133)
This commit is contained in:
parent
0b1d690676
commit
b2ea6b010c
3 changed files with 26 additions and 7 deletions
|
|
@ -1927,13 +1927,18 @@ SP<CWLSurfaceResource> CWindow::getSolitaryResource() {
|
|||
if (res->m_subsurfaces.size() == 0)
|
||||
return res;
|
||||
|
||||
if (res->m_subsurfaces.size() == 1) {
|
||||
if (res->m_subsurfaces[0].expired() || res->m_subsurfaces[0]->m_surface.expired())
|
||||
return nullptr;
|
||||
auto surf = res->m_subsurfaces[0]->m_surface.lock();
|
||||
if (!surf || surf->m_subsurfaces.size() != 0 || surf->extends() != res->extends() || !surf->m_current.texture || !surf->m_current.texture->m_opaque)
|
||||
return nullptr;
|
||||
return surf;
|
||||
if (res->m_subsurfaces.size() >= 1) {
|
||||
if (!res->hasVisibleSubsurface())
|
||||
return res;
|
||||
|
||||
if (res->m_subsurfaces.size() == 1) {
|
||||
if (res->m_subsurfaces[0].expired() || res->m_subsurfaces[0]->m_surface.expired())
|
||||
return nullptr;
|
||||
auto surf = res->m_subsurfaces[0]->m_surface.lock();
|
||||
if (!surf || surf->m_subsurfaces.size() != 0 || surf->extends() != res->extends() || !surf->m_current.texture || !surf->m_current.texture->m_opaque)
|
||||
return nullptr;
|
||||
return surf;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue