mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2024-12-27 21:59:24 +01:00
Add another layer to the example
This commit is contained in:
parent
559bd2bf3a
commit
c5601aef5d
1 changed files with 3 additions and 1 deletions
|
@ -131,7 +131,7 @@ int main(int argc, char *argv[])
|
||||||
drmModeCrtc *crtc;
|
drmModeCrtc *crtc;
|
||||||
drmModeConnector *connector;
|
drmModeConnector *connector;
|
||||||
struct hwc_output *output;
|
struct hwc_output *output;
|
||||||
struct hwc_layer *layers[3];
|
struct hwc_layer *layers[4];
|
||||||
drmModeAtomicReq *req;
|
drmModeAtomicReq *req;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -178,6 +178,7 @@ int main(int argc, char *argv[])
|
||||||
crtc->mode.vdisplay, false);
|
crtc->mode.vdisplay, false);
|
||||||
layers[1] = add_layer(drm_fd, output, 50, 50, 256, 256, true);
|
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[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();
|
req = drmModeAtomicAlloc();
|
||||||
if (!hwc_display_apply(display, req)) {
|
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[0]);
|
||||||
hwc_layer_destroy(layers[1]);
|
hwc_layer_destroy(layers[1]);
|
||||||
hwc_layer_destroy(layers[2]);
|
hwc_layer_destroy(layers[2]);
|
||||||
|
hwc_layer_destroy(layers[3]);
|
||||||
hwc_output_destroy(output);
|
hwc_output_destroy(output);
|
||||||
drmModeFreeCrtc(crtc);
|
drmModeFreeCrtc(crtc);
|
||||||
drmModeFreeConnector(connector);
|
drmModeFreeConnector(connector);
|
||||||
|
|
Loading…
Reference in a new issue