summaryrefslogtreecommitdiff
path: root/src/render/Texture.hpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-07-21 13:09:54 +0200
committerGitHub <noreply@github.com>2024-07-21 13:09:54 +0200
commit016da234d0e852de3ef20eb2e89ac58d2a85f6e7 (patch)
tree496085987176551b0794fffc069877d44943e2f1 /src/render/Texture.hpp
parentf642fb97df5c69267a03452533de383ff8023570 (diff)
Core: Move to aquamarine (#6608)
Moves Hyprland from wlroots to aquamarine for the backend. --------- Signed-off-by: Vaxry <vaxry@vaxry.net> Co-authored-by: Mihai Fufezan <mihai@fufexan.net> Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Co-authored-by: vaxerski <vaxerski@users.noreply.github.com> Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com> Co-authored-by: Tom Englund <tomenglund26@gmail.com> Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com> Co-authored-by: diniamo <diniamo53@gmail.com>
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