diff options
Diffstat (limited to 'src/render/Texture.hpp')
| -rw-r--r-- | src/render/Texture.hpp | 15 |
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 |
