From c5601aef5dbcb80d08f0cfb88e287e665164b0d3 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 23 Aug 2019 18:59:44 +0300 Subject: [PATCH] Add another layer to the example --- example.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/example.c b/example.c index 183fd59..2b7a275 100644 --- a/example.c +++ b/example.c @@ -131,7 +131,7 @@ int main(int argc, char *argv[]) drmModeCrtc *crtc; drmModeConnector *connector; struct hwc_output *output; - struct hwc_layer *layers[3]; + struct hwc_layer *layers[4]; drmModeAtomicReq *req; int ret; @@ -178,6 +178,7 @@ int main(int argc, char *argv[]) crtc->mode.vdisplay, false); layers[1] = add_layer(drm_fd, output, 50, 50, 256, 256, true); layers[2] = add_layer(drm_fd, output, 500, 500, 128, 128, false); + layers[3] = add_layer(drm_fd, output, 700, 700, 128, 128, true); req = drmModeAtomicAlloc(); if (!hwc_display_apply(display, req)) { @@ -204,6 +205,7 @@ int main(int argc, char *argv[]) hwc_layer_destroy(layers[0]); hwc_layer_destroy(layers[1]); hwc_layer_destroy(layers[2]); + hwc_layer_destroy(layers[3]); hwc_output_destroy(output); drmModeFreeCrtc(crtc); drmModeFreeConnector(connector);