build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Failing after 27s
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Failing after 28s
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Failing after 28s
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Failing after 21s
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Failing after 20s
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Failing after 21s
build / module (push) Failing after 16s
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Failing after 19s
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Failing after 20s
build / host-linux (push) Failing after 19s
build / host-windows-cross (push) Failing after 17s
build / obs (clang) (push) Failing after 18s
build / docs (push) Failing after 7s
build / obs (gcc) (push) Failing after 20s
build / host-windows-native (push) Canceled after 0s
build / idd (push) Canceled after 0s
Capture every guest display into a single frame and compose it back into the guest's desktop on the client, so one Looking Glass session can carry a multi-monitor guest instead of one instance per display. KVMFR gains a per-frame display layout (version 24). A frame with displayCount == 0 is a conventional single-display frame and behaves exactly as before, so existing capture backends are unaffected. - common: shared display layout and a shelf packer that minimises atlas area, plus atlas/desktop coordinate mapping helpers and unit tests - host: capture interface and host app carry the layout; a layout change invalidates the format so clients re-read it - host/XCB: enumerate RandR monitors and repack the root window into the atlas directly in shared memory - client/EGL: compose the atlas into the presented view as its own pass, leaving post processing, HDR, cursor and damage handling unchanged Also fixes the XCB backend writing a single row per frame instead of the whole image.
63 lines
2.2 KiB
C
63 lines
2.2 KiB
C
/**
|
|
* Looking Glass
|
|
* Copyright © 2017-2026 The Looking Glass Authors
|
|
* https://looking-glass.io
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the Free
|
|
* Software Foundation; either version 2 of the License, or (at your option)
|
|
* any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc., 59
|
|
* Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "texture.h"
|
|
#include "interface/renderer.h"
|
|
|
|
/* Composes a packed multi-display atlas frame into a single image of the
|
|
* guest's virtual desktop, or of one display within it.
|
|
*
|
|
* Running this as its own pass, rather than folding it into the desktop
|
|
* shader, keeps every stage downstream (post processing, HDR handling, the
|
|
* cursor, damage tracking and input mapping) working on one conventional
|
|
* frame. Those stages then need no knowledge of multi-display at all. */
|
|
|
|
typedef struct EGL_Compose EGL_Compose;
|
|
|
|
bool egl_composeInit(EGL_Compose ** compose);
|
|
void egl_composeFree(EGL_Compose ** compose);
|
|
|
|
/**
|
|
* Configure the composition for a frame format.
|
|
*
|
|
* Returns false if the format cannot be composed, in which case the caller
|
|
* should fall back to presenting the raw atlas rather than showing nothing.
|
|
*/
|
|
bool egl_composeSetup(EGL_Compose * compose, const LG_RendererFormat * format);
|
|
|
|
/**
|
|
* Compose `atlas` into the configured view.
|
|
*
|
|
* Returns the composed texture, or NULL if composition is not configured or
|
|
* failed, in which case the caller should present the atlas unchanged.
|
|
*/
|
|
EGL_Texture * egl_composeRun(EGL_Compose * compose, EGL_Texture * atlas);
|
|
|
|
/**
|
|
* The dimensions of the composed output. Only valid after a successful
|
|
* egl_composeSetup.
|
|
*/
|
|
void egl_composeGetSize(EGL_Compose * compose,
|
|
unsigned int * width, unsigned int * height);
|