diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2019-11-06 17:28:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-06 17:28:56 +0200 |
commit | d6dc724f16672cbb3eed382815514f4c9a0246d4 (patch) | |
tree | 2dc92e3848cb6de85cf29646418b6deac3dbb250 /kms++/inc/kms++/framebuffer.h | |
parent | 9d142cb7ec175a8394f47aee61ca8a1951dd6170 (diff) | |
parent | 3009db77d599c6a397c24ba1a4e84c53299162c0 (diff) |
Merge pull request #40 from tomba/work
Misc improvements
Diffstat (limited to 'kms++/inc/kms++/framebuffer.h')
-rw-r--r-- | kms++/inc/kms++/framebuffer.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/kms++/inc/kms++/framebuffer.h b/kms++/inc/kms++/framebuffer.h index 3d43d08..bcfd1f0 100644 --- a/kms++/inc/kms++/framebuffer.h +++ b/kms++/inc/kms++/framebuffer.h @@ -5,6 +5,13 @@ namespace kms { +enum class CpuAccess +{ + Read, + Write, + ReadWrite, +}; + class IFramebuffer { public: virtual ~IFramebuffer() { } @@ -20,16 +27,19 @@ public: virtual uint32_t offset(unsigned plane) const { throw std::runtime_error("not implemented"); } virtual uint8_t* map(unsigned plane) { throw std::runtime_error("not implemented"); } virtual int prime_fd(unsigned plane) { throw std::runtime_error("not implemented"); } + + virtual void begin_cpu_access(CpuAccess access) { } + virtual void end_cpu_access() { } }; class Framebuffer : public DrmObject, public IFramebuffer { public: Framebuffer(Card& card, uint32_t id); - virtual ~Framebuffer(); + ~Framebuffer() override; - uint32_t width() const { return m_width; } - uint32_t height() const { return m_height; } + uint32_t width() const override { return m_width; } + uint32_t height() const override { return m_height; } void flush(); protected: |