1
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2025-07-26 09:41:57 -07:00
Files
.github
assets
docs
example
hyprctl
hyprpm
nix
protocols
scripts
src
config
debug
desktop
devices
events
helpers
hyprerror
init
layout
managers
pch
plugins
protocols
render
decorations
pass
BorderPassElement.cpp
BorderPassElement.hpp
ClearPassElement.cpp
ClearPassElement.hpp
FramebufferElement.cpp
FramebufferElement.hpp
Pass.cpp
Pass.hpp
PassElement.cpp
PassElement.hpp
PreBlurElement.cpp
PreBlurElement.hpp
RectPassElement.cpp
RectPassElement.hpp
RendererHintsPassElement.cpp
RendererHintsPassElement.hpp
ShadowPassElement.cpp
ShadowPassElement.hpp
SurfacePassElement.cpp
SurfacePassElement.hpp
TexPassElement.cpp
TexPassElement.hpp
TextureMatteElement.cpp
TextureMatteElement.hpp
shaders
Framebuffer.cpp
Framebuffer.hpp
OpenGL.cpp
OpenGL.hpp
Renderbuffer.cpp
Renderbuffer.hpp
Renderer.cpp
Renderer.hpp
Shader.cpp
Shader.hpp
Shaders.hpp
Texture.cpp
Texture.hpp
Transformer.cpp
Transformer.hpp
xwayland
Compositor.cpp
Compositor.hpp
SharedDefs.hpp
defines.hpp
includes.hpp
macros.hpp
main.cpp
meson.build
signal-safe.cpp
signal-safe.hpp
version.h.in
subprojects
systemd
.clang-format
.clang-format-ignore
.clang-tidy
.gitattributes
.gitignore
.gitmodules
CMakeLists.txt
CODE_OF_CONDUCT.md
LICENSE
Makefile
README.md
VERSION
flake.lock
flake.nix
hyprland.pc.in
meson.build
meson_options.txt
hyprland/src/render/pass/TexPassElement.cpp
Tom Englund 3fc3521a97 pass: remove unusued timeline in texpass ()
remove unused timeline and waitpoint in texpass and especially remove
the passing it to renderTextureInternalWithDamage that implicitly
converted it to bool. setting discardActive and allowCustomUV
2025-03-26 02:22:09 +01:00

49 lines
1.4 KiB
C++

#include "TexPassElement.hpp"
#include "../OpenGL.hpp"
#include <hyprutils/utils/ScopeGuard.hpp>
using namespace Hyprutils::Utils;
CTexPassElement::CTexPassElement(const CTexPassElement::SRenderData& data_) : data(data_) {
;
}
void CTexPassElement::draw(const CRegion& damage) {
g_pHyprOpenGL->m_bEndFrame = data.flipEndFrame;
CScopeGuard x = {[]() {
//
g_pHyprOpenGL->m_bEndFrame = false;
g_pHyprOpenGL->m_RenderData.clipBox = {};
}};
if (!data.clipBox.empty())
g_pHyprOpenGL->m_RenderData.clipBox = data.clipBox;
if (data.replaceProjection)
g_pHyprOpenGL->m_RenderData.monitorProjection = *data.replaceProjection;
g_pHyprOpenGL->renderTextureInternalWithDamage(data.tex, data.box, data.a, data.damage.empty() ? damage : data.damage, data.round, data.roundingPower);
if (data.replaceProjection)
g_pHyprOpenGL->m_RenderData.monitorProjection = g_pHyprOpenGL->m_RenderData.pMonitor->projMatrix;
}
bool CTexPassElement::needsLiveBlur() {
return false; // TODO?
}
bool CTexPassElement::needsPrecomputeBlur() {
return false; // TODO?
}
std::optional<CBox> CTexPassElement::boundingBox() {
return data.box.copy().scale(1.F / g_pHyprOpenGL->m_RenderData.pMonitor->scale).round();
}
CRegion CTexPassElement::opaqueRegion() {
return {}; // TODO:
}
void CTexPassElement::discard() {
;
}