diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-06-08 10:07:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-08 10:07:59 +0200 |
| commit | 6967a31450441fc5605c05db6f65505dace4b263 (patch) | |
| tree | 255a3cff7f3e2eb8a50c952eab9b270a7937561d /src/render/Texture.hpp | |
| parent | c31d9ef4172452f6f219f91d9b87a24d91f0cf3a (diff) | |
wayland/core: move to new impl (#6268)
* wayland/core/dmabuf: move to new impl
it's the final countdown
Diffstat (limited to 'src/render/Texture.hpp')
| -rw-r--r-- | src/render/Texture.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/render/Texture.hpp b/src/render/Texture.hpp index 93a6aa5f..fa1ca4fe 100644 --- a/src/render/Texture.hpp +++ b/src/render/Texture.hpp @@ -2,6 +2,10 @@ #include "../defines.hpp" +class IWLBuffer; +struct SDMABUFAttrs; +class CRegion; + enum TEXTURETYPE { TEXTURE_INVALID, // Invalid TEXTURE_RGBA, // 4 channels @@ -12,13 +16,27 @@ enum TEXTURETYPE { class CTexture { public: CTexture(); + + CTexture(CTexture&) = delete; + CTexture(CTexture&&) = delete; + CTexture(const CTexture&&) = delete; + CTexture(const CTexture&) = delete; + + CTexture(uint32_t drmFormat, uint8_t* pixels, uint32_t stride, const Vector2D& size); CTexture(wlr_texture*); + // this ctor takes ownership of the eglImage. + CTexture(const SDMABUFAttrs&, void* image); + ~CTexture(); + void destroyTexture(); void allocate(); + void update(uint32_t drmFormat, uint8_t* pixels, uint32_t stride, const CRegion& damage); TEXTURETYPE m_iType = TEXTURE_RGBA; GLenum m_iTarget = GL_TEXTURE_2D; GLuint m_iTexID = 0; Vector2D m_vSize; + void* m_pEglImage = nullptr; + bool m_bNonOwning = false; // wlr };
\ No newline at end of file |
