diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-11-22 17:20:58 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-11-22 17:20:58 +0000 |
| commit | 5327565b33f96d8d7aa2762f0d09a6ac47f00333 (patch) | |
| tree | 769ac42a0d7c9e0a7d6634f3d0a3b3d91170fc1d /src/render | |
| parent | 95047fb08327c5a9c38e5daa46cc3241a1b69cbe (diff) | |
remove resize transitions
Diffstat (limited to 'src/render')
| -rw-r--r-- | src/render/OpenGL.cpp | 18 | ||||
| -rw-r--r-- | src/render/OpenGL.hpp | 1 | ||||
| -rw-r--r-- | src/render/Renderer.cpp | 20 |
3 files changed, 0 insertions, 39 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 3345db60..8010f9ca 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -1072,29 +1072,11 @@ void CHyprOpenGLImpl::makeLayerSnapshot(SLayerSurface* pLayer) { } void CHyprOpenGLImpl::onWindowResizeStart(CWindow* pWindow) { - static auto *const PTRANSITIONS = &g_pConfigManager->getConfigValuePtr("animations:use_resize_transitions")->intValue; - static auto *const PENABLED = &g_pConfigManager->getConfigValuePtr("animations:enabled")->intValue; - if (!*PTRANSITIONS || !*PENABLED) - return; - - if (pWindow->m_vRealSize.vec().x < 5 || pWindow->m_vRealSize.vec().y < 5) - return; - - // make a fb and render a snapshot - const auto PFRAMEBUFFER = &m_mWindowResizeFramebuffers[pWindow]; - makeRawWindowSnapshot(pWindow, PFRAMEBUFFER); } void CHyprOpenGLImpl::onWindowResizeEnd(CWindow* pWindow) { - static auto *const PTRANSITIONS = &g_pConfigManager->getConfigValuePtr("animations:use_resize_transitions")->intValue; - static auto *const PENABLED = &g_pConfigManager->getConfigValuePtr("animations:enabled")->intValue; - - if (!*PTRANSITIONS || !*PENABLED) - return; - // remove the fb - m_mWindowResizeFramebuffers.erase(pWindow); } void CHyprOpenGLImpl::renderSnapshot(CWindow** pWindow) { diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index 7e8fccde..70e6b258 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -119,7 +119,6 @@ public: pixman_region32_t m_rOriginalDamageRegion; // used for storing the pre-expanded region std::unordered_map<CWindow*, CFramebuffer> m_mWindowFramebuffers; - std::unordered_map<CWindow*, CFramebuffer> m_mWindowResizeFramebuffers; std::unordered_map<SLayerSurface*, CFramebuffer> m_mLayerFramebuffers; std::unordered_map<CMonitor*, SMonitorRenderData> m_mMonitorRenderResources; std::unordered_map<CMonitor*, CTexture> m_mMonitorBGTextures; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index d40e8b11..4ede58b4 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -228,7 +228,6 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec* const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pWindow->m_iWorkspaceID); const auto REALPOS = pWindow->m_vRealPosition.vec() + (pWindow->m_bPinned ? Vector2D{} : PWORKSPACE->m_vRenderOffset.vec()); static auto *const PNOFLOATINGBORDERS = &g_pConfigManager->getConfigValuePtr("general:no_border_on_floating")->intValue; - static auto *const PTRANSITIONS = &g_pConfigManager->getConfigValuePtr("animations:use_resize_transitions")->intValue; SRenderData renderdata = {pMonitor->output, time, REALPOS.x, REALPOS.y}; if (ignorePosition) { @@ -295,25 +294,6 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec* wlr_surface_for_each_surface(g_pXWaylandManager->getWindowSurface(pWindow), renderSurface, &renderdata); - if (*PTRANSITIONS && !ignorePosition /* ignorePosition probably means we are rendering the snapshot rn */) { - const auto PFB = g_pHyprOpenGL->m_mWindowResizeFramebuffers.find(pWindow); - - if (PFB != g_pHyprOpenGL->m_mWindowResizeFramebuffers.end() && PFB->second.isAllocated()) { - wlr_box box = {renderdata.x - pMonitor->vecPosition.x, renderdata.y - pMonitor->vecPosition.y, renderdata.w, renderdata.h}; - - // adjust UV (remove when I figure out how to change the size of the fb) - g_pHyprOpenGL->m_RenderData.primarySurfaceUVTopLeft = {0, 0}; - g_pHyprOpenGL->m_RenderData.primarySurfaceUVBottomRight = { pWindow->m_vRealSize.m_vBegun.x / pMonitor->vecPixelSize.x, pWindow->m_vRealSize.m_vBegun.y / pMonitor->vecPixelSize.y}; - - g_pHyprOpenGL->m_bEndFrame = true; - g_pHyprOpenGL->renderTexture(PFB->second.m_cTex, &box, (1.f - pWindow->m_vRealSize.getPercent()) * 84.f, 0, false, true); - g_pHyprOpenGL->m_bEndFrame = false; - - g_pHyprOpenGL->m_RenderData.primarySurfaceUVTopLeft = Vector2D(-1, -1); - g_pHyprOpenGL->m_RenderData.primarySurfaceUVBottomRight = Vector2D(-1, -1); - } - } - if (renderdata.decorate && pWindow->m_sSpecialRenderData.border) { static auto *const PROUNDING = &g_pConfigManager->getConfigValuePtr("decoration:rounding")->intValue; |
