renderer: clean up surface UV size calcs, fix issues (#12070)
This commit is contained in:
parent
39d62e1487
commit
ba077d8ff0
2 changed files with 27 additions and 10 deletions
|
|
@ -117,11 +117,13 @@ CRegion CWLSurface::computeDamage() const {
|
|||
|
||||
// go from buffer coords in the damage to hl logical
|
||||
|
||||
const auto BOX = getSurfaceBoxGlobal();
|
||||
const Vector2D SCALE = BOX.has_value() ? BOX->size() / m_resource->m_current.bufferSize :
|
||||
Vector2D{1.0 / m_resource->m_current.scale, 1.0 / m_resource->m_current.scale /* Wrong... but we can't really do better */};
|
||||
const auto BOX = getSurfaceBoxGlobal();
|
||||
const auto SURFSIZE = m_resource->m_current.size;
|
||||
const Vector2D SCALE = SURFSIZE / m_resource->m_current.bufferSize;
|
||||
|
||||
damage.scale(SCALE);
|
||||
if (BOX.has_value())
|
||||
damage.intersect(CBox{{}, BOX->size()});
|
||||
|
||||
if (m_windowOwner)
|
||||
damage.scale(m_windowOwner->m_X11SurfaceScaledBy); // fix xwayland:force_zero_scaling stuff that will be fucked by the above a bit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue