]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android/external-libkmsxx.git/commitdiff
Add Framebuffer::flush()
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 20 Jun 2016 05:46:32 +0000 (08:46 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 20 Jun 2016 05:46:32 +0000 (08:46 +0300)
kms++/inc/kms++/framebuffer.h
kms++/src/framebuffer.cpp

index cbf705d7c5d11f0b741eb14db85d276c22a491e2..faf2e71757ae6942c0ea5ea00528b00c15f3977a 100644 (file)
@@ -13,6 +13,8 @@ public:
 
        uint32_t width() const { return m_width; }
        uint32_t height() const { return m_height; }
+
+       void flush();
 protected:
        Framebuffer(Card& card, uint32_t width, uint32_t height);
 
index a7f589c00b8066d8513cb4340945602a3ada7921..1ce8f2a0070cd31a15dca65cfa6e63a54e695c23 100644 (file)
@@ -31,6 +31,16 @@ Framebuffer::Framebuffer(Card& card, uint32_t id)
        card.m_framebuffers.push_back(this);
 }
 
+void Framebuffer::flush()
+{
+       drmModeClip clip { };
+       clip.x1 = clip.y1 = 0;
+       clip.x2 = width();
+       clip.y2 = height();
+
+       drmModeDirtyFB(card().fd(), id(), &clip, 1);
+}
+
 Framebuffer::~Framebuffer()
 {
        auto& fbs = card().m_framebuffers;