summaryrefslogtreecommitdiff
path: root/kms++/src/framebuffer.cpp
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2021-07-26 10:42:48 +0300
committerGitHub <noreply@github.com>2021-07-26 10:42:48 +0300
commit54f591ec0de61dd192baf781c9b2ec87d5b461f7 (patch)
treeffa4b6142b0b56c57ea73259a4fc054894acd723 /kms++/src/framebuffer.cpp
parent5afc8d918f2c084acd65027604868dfde43395cf (diff)
parent3d2cde2851e7631ad3454d8371f74e2bc2e7f206 (diff)
Merge pull request #63 from notro/gud
Add partial fb flushing and expose some more properties in the python bindings
Diffstat (limited to 'kms++/src/framebuffer.cpp')
-rw-r--r--kms++/src/framebuffer.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/kms++/src/framebuffer.cpp b/kms++/src/framebuffer.cpp
index f1cba3b..72e1a73 100644
--- a/kms++/src/framebuffer.cpp
+++ b/kms++/src/framebuffer.cpp
@@ -34,6 +34,17 @@ Framebuffer::Framebuffer(Card& card, uint32_t id)
card.m_framebuffers.push_back(this);
}
+void Framebuffer::flush(uint32_t x, uint32_t y, uint32_t width, uint32_t height)
+{
+ drmModeClip clip{};
+ clip.x1 = x;
+ clip.y1 = y;
+ clip.x2 = x + width;
+ clip.y2 = y + height;
+
+ drmModeDirtyFB(card().fd(), id(), &clip, 1);
+}
+
void Framebuffer::flush()
{
drmModeClip clip{};