index faf2e71757ae6942c0ea5ea00528b00c15f3977a..3d43d08a26bb52f4efc9ad5006e3bf79b7a5f33d 100644 (file)
namespace kms
{
-class Framebuffer : public DrmObject
+class IFramebuffer {
+public:
+ virtual ~IFramebuffer() { }
+
+ virtual uint32_t width() const = 0;
+ virtual uint32_t height() const = 0;
+
+ virtual PixelFormat format() const { throw std::runtime_error("not implemented"); }
+ virtual unsigned num_planes() const { throw std::runtime_error("not implemented"); }
+
+ virtual uint32_t stride(unsigned plane) const { throw std::runtime_error("not implemented"); }
+ virtual uint32_t size(unsigned plane) const { throw std::runtime_error("not implemented"); }
+ 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"); }
+};
+
+class Framebuffer : public DrmObject, public IFramebuffer
{
public:
Framebuffer(Card& card, uint32_t id);
uint32_t m_height;
};
-class IMappedFramebuffer {
-public:
- virtual ~IMappedFramebuffer() { }
-
- virtual uint32_t width() const = 0;
- virtual uint32_t height() const = 0;
-
- virtual PixelFormat format() const = 0;
- virtual unsigned num_planes() const = 0;
-
- virtual uint32_t stride(unsigned plane) const = 0;
- virtual uint32_t size(unsigned plane) const = 0;
- virtual uint32_t offset(unsigned plane) const = 0;
- virtual uint8_t* map(unsigned plane) = 0;
-};
-
}