code cleanup

This commit is contained in:
vaxerski 2022-08-27 23:41:55 +02:00
parent 01f42f1d86
commit e059ce4051

View file

@ -410,8 +410,6 @@ void CHyprRenderer::calculateUVForWindowSurface(CWindow* pWindow, wlr_surface* p
Vector2D uvTL; Vector2D uvTL;
Vector2D uvBR = Vector2D(1, 1); Vector2D uvBR = Vector2D(1, 1);
Vector2D adjustedSurfaceScale = Vector2D(1, 1);
wlr_box geom; wlr_box geom;
wlr_xdg_surface_get_geometry(pWindow->m_uSurface.xdg, &geom); wlr_xdg_surface_get_geometry(pWindow->m_uSurface.xdg, &geom);
@ -425,8 +423,6 @@ void CHyprRenderer::calculateUVForWindowSurface(CWindow* pWindow, wlr_surface* p
uvTL = Vector2D(bufferSource.x / surfaceSize.x, bufferSource.y / surfaceSize.y); uvTL = Vector2D(bufferSource.x / surfaceSize.x, bufferSource.y / surfaceSize.y);
uvBR = Vector2D((bufferSource.x + bufferSource.width) / surfaceSize.x, (bufferSource.y + bufferSource.height) / surfaceSize.y); uvBR = Vector2D((bufferSource.x + bufferSource.width) / surfaceSize.x, (bufferSource.y + bufferSource.height) / surfaceSize.y);
adjustedSurfaceScale = Vector2D(bufferSource.width / surfaceSize.x, bufferSource.height / surfaceSize.y);
// TODO: (example: chromium) this still has a tiny "bump" at the end. // TODO: (example: chromium) this still has a tiny "bump" at the end.
if (main) { if (main) {
uvTL = uvTL + (Vector2D((double)geom.x / ((double)pSurface->current.width), (double)geom.y / ((double)pSurface->current.height)) * (((uvBR.x - uvTL.x) * surfaceSize.x) / surfaceSize.x)); uvTL = uvTL + (Vector2D((double)geom.x / ((double)pSurface->current.width), (double)geom.y / ((double)pSurface->current.height)) * (((uvBR.x - uvTL.x) * surfaceSize.x) / surfaceSize.x));