fix(linux/xdgportal): populate host latency statistics (#4685)

This commit is contained in:
Conn O'Griofa 2026-02-07 14:40:06 +00:00 committed by GitHub
commit b48a96f9f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -736,8 +736,9 @@ namespace portal {
struct spa_buffer *buf; struct spa_buffer *buf;
buf = stream_data.current_buffer->buffer; buf = stream_data.current_buffer->buffer;
if (buf->datas[0].chunk->size != 0) { if (buf->datas[0].chunk->size != 0) {
if (buf->datas[0].type == SPA_DATA_DmaBuf) {
const auto img_descriptor = static_cast<egl::img_descriptor_t *>(img); const auto img_descriptor = static_cast<egl::img_descriptor_t *>(img);
img_descriptor->frame_timestamp = std::chrono::steady_clock::now();
if (buf->datas[0].type == SPA_DATA_DmaBuf) {
img_descriptor->sd.width = stream_data.format.info.raw.size.width; img_descriptor->sd.width = stream_data.format.info.raw.size.width;
img_descriptor->sd.height = stream_data.format.info.raw.size.height; img_descriptor->sd.height = stream_data.format.info.raw.size.height;
img_descriptor->sd.modifier = stream_data.format.info.raw.modifier; img_descriptor->sd.modifier = stream_data.format.info.raw.modifier;