diff options
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: |