aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/Texture.hpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-07-21 13:09:54 +0200
committerGitHub <[email protected]>2024-07-21 13:09:54 +0200
commit016da234d0e852de3ef20eb2e89ac58d2a85f6e7 (patch)
tree496085987176551b0794fffc069877d44943e2f1 /src/render/Texture.hpp
parentf642fb97df5c69267a03452533de383ff8023570 (diff)
downloadHyprland-016da234d0e852de3ef20eb2e89ac58d2a85f6e7.tar.gz
Hyprland-016da234d0e852de3ef20eb2e89ac58d2a85f6e7.zip
Core: Move to aquamarine (#6608)
Moves Hyprland from wlroots to aquamarine for the backend. --------- Signed-off-by: Vaxry <[email protected]> Co-authored-by: Mihai Fufezan <[email protected]> Co-authored-by: Jan Beich <[email protected]> Co-authored-by: vaxerski <[email protected]> Co-authored-by: UjinT34 <[email protected]> Co-authored-by: Tom Englund <[email protected]> Co-authored-by: Ikalco <[email protected]> Co-authored-by: diniamo <[email protected]>
Diffstat (limited to 'src/render/Texture.hpp')
-rw-r--r--src/render/Texture.hpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/render/Texture.hpp b/src/render/Texture.hpp
index c80e943d..0da95300 100644
--- a/src/render/Texture.hpp
+++ b/src/render/Texture.hpp
@@ -1,9 +1,9 @@
#pragma once
#include "../defines.hpp"
+#include <aquamarine/buffer/Buffer.hpp>
-class IWLBuffer;
-struct SDMABUFAttrs;
+class IHLBuffer;
HYPRUTILS_FORWARD(Math, CRegion);
enum TEXTURETYPE {
@@ -23,10 +23,10 @@ class CTexture {
CTexture(const CTexture&) = delete;
CTexture(uint32_t drmFormat, uint8_t* pixels, uint32_t stride, const Vector2D& size);
- CTexture(wlr_texture*);
+ CTexture(const SP<Aquamarine::IBuffer> buffer);
// this ctor takes ownership of the eglImage.
- CTexture(const SDMABUFAttrs&, void* image);
+ CTexture(const Aquamarine::SDMABUFAttrs&, void* image);
~CTexture();
void destroyTexture();
@@ -37,6 +37,9 @@ class CTexture {
GLenum m_iTarget = GL_TEXTURE_2D;
GLuint m_iTexID = 0;
Vector2D m_vSize;
- void* m_pEglImage = nullptr;
- bool m_bNonOwning = false; // wlr
+ void* m_pEglImage = nullptr;
+
+ private:
+ void createFromShm(uint32_t drmFormat, uint8_t* pixels, uint32_t stride, const Vector2D& size);
+ void createFromDma(const Aquamarine::SDMABUFAttrs&, void* image);
}; \ No newline at end of file