From 43e03aacfa211eb56037b68da66e79b162491c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Mon, 19 Jul 2021 18:13:09 +0200 Subject: framebuffer: Support partial flushing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Noralf Trønnes --- kms++/src/framebuffer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'kms++/src/framebuffer.cpp') 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{}; -- cgit v1.2.3