pass: overload TexPass constructor
overload it with a rvalue to allow us to move the data directly avoiding an extra copy. because SRenderData is not trivially copyable.
This commit is contained in:
parent
c75f85098c
commit
bb958a9e13
10 changed files with 17 additions and 12 deletions
|
|
@ -4,7 +4,11 @@
|
|||
#include <hyprutils/utils/ScopeGuard.hpp>
|
||||
using namespace Hyprutils::Utils;
|
||||
|
||||
CTexPassElement::CTexPassElement(const CTexPassElement::SRenderData& data_) : m_data(data_) {
|
||||
CTexPassElement::CTexPassElement(const SRenderData& data) : m_data(data) {
|
||||
;
|
||||
}
|
||||
|
||||
CTexPassElement::CTexPassElement(CTexPassElement::SRenderData&& data) : m_data(std::move(data)) {
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class CTexPassElement : public IPassElement {
|
|||
};
|
||||
|
||||
CTexPassElement(const SRenderData& data);
|
||||
CTexPassElement(SRenderData&& data);
|
||||
virtual ~CTexPassElement() = default;
|
||||
|
||||
virtual void draw(const CRegion& damage);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue