summaryrefslogtreecommitdiff
path: root/kmscube
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-17 16:16:34 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-17 16:16:34 +0300
commite17e6f5c37b702092d8d4f97dd70f237c366708f (patch)
treebff7fdee5e8002d8dcad8556a4cac821e6d00cc2 /kmscube
parent34e63f641195019e903104c8b9e6eb855efeee2c (diff)
kmscube: use drmModeAddFB2 version of ExtFB
Diffstat (limited to 'kmscube')
-rw-r--r--kmscube/cube-gbm.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/kmscube/cube-gbm.cpp b/kmscube/cube-gbm.cpp
index 1528684..993434b 100644
--- a/kmscube/cube-gbm.cpp
+++ b/kmscube/cube-gbm.cpp
@@ -132,8 +132,13 @@ public:
uint32_t height = gbm_bo_get_height(bo);
uint32_t stride = gbm_bo_get_stride(bo);
uint32_t handle = gbm_bo_get_handle(bo).u32;
+ PixelFormat format = (PixelFormat)gbm_bo_get_format(bo);
- fb = new ExtFramebuffer(card, width, height, 24, 32, stride, handle);
+ uint32_t handles[4] { handle };
+ uint32_t strides[4] { stride };
+ uint32_t offsets[4] { 0 };
+
+ fb = new ExtFramebuffer(card, width, height, format, handles, strides, offsets);
gbm_bo_set_user_data(bo, fb, drm_fb_destroy_callback);