summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libkms++/crtc.cpp5
-rw-r--r--libkms++/crtc.h2
-rw-r--r--tests/db.cpp2
3 files changed, 8 insertions, 1 deletions
diff --git a/libkms++/crtc.cpp b/libkms++/crtc.cpp
index e583be8..b0a962e 100644
--- a/libkms++/crtc.cpp
+++ b/libkms++/crtc.cpp
@@ -71,4 +71,9 @@ int Crtc::set_plane(Plane* plane, Framebuffer& fb,
dst_x, dst_y, dst_w, dst_h,
conv(src_x), conv(src_y), conv(src_w), conv(src_h));
}
+
+int Crtc::page_flip(Framebuffer& fb, void *data)
+{
+ return drmModePageFlip(card().fd(), id(), fb.id(), DRM_MODE_PAGE_FLIP_EVENT, data);
+}
}
diff --git a/libkms++/crtc.h b/libkms++/crtc.h
index ac05da9..fabc6e2 100644
--- a/libkms++/crtc.h
+++ b/libkms++/crtc.h
@@ -27,6 +27,8 @@ public:
int32_t dst_x, int32_t dst_y, uint32_t dst_w, uint32_t dst_h,
float src_x, float src_y, float src_w, float src_h);
+ int page_flip(Framebuffer& fb, void *data);
+
private:
CrtcPriv* m_priv;
diff --git a/tests/db.cpp b/tests/db.cpp
index 5df104d..bfefcb8 100644
--- a/tests/db.cpp
+++ b/tests/db.cpp
@@ -79,7 +79,7 @@ public:
r = ctx.commit(this);
ASSERT(r == 0);
} else {
- int r = drmModePageFlip(card.fd(), m_crtc->id(), fb->id(), DRM_MODE_PAGE_FLIP_EVENT, this);
+ int r = crtc->page_flip(*fb, this);
ASSERT(r == 0);
}
}