Merge branch 'Plasma/5.7'
This commit is contained in:
commit
76fa3026dd
10 changed files with 54 additions and 19 deletions
effects/morphingpopups/package
main_wayland.cppplugins/platforms
drm
fbdev
scripts/videowall
|
@ -14,6 +14,7 @@ Comment[nn]=Krysstoningsanimasjon når hjelpebobler eller varslingar endrar form
|
|||
Comment[pl]=Animacja zanikania przy zmianie geometrii wskazówek lub powiadomień
|
||||
Comment[pt]=Animar o desvanecimento quando as dicas ou notificações mudarem de tamanho
|
||||
Comment[pt_BR]=Animar a transição suave quando as dicas ou notificações mudarem de tamanho
|
||||
Comment[ru]=При изменении формы всплывающих подсказок или уведомлений они плавно растягиваются или сжимаются
|
||||
Comment[sk]=Prelínacia animácia pri tooltipoch alebo notifikáciách pri zmene ich geometrie
|
||||
Comment[sl]=Animacija navzkrižnega pojemanja ob spremembi geometrije orodnih namigov in obvestil
|
||||
Comment[sr]=Анимација претапања када облачићи или обавештења мењају геометрију
|
||||
|
@ -40,6 +41,7 @@ Name[nn]=Formendring for sprettoppvindauge
|
|||
Name[pl]=Morfing elementów wysuwnych
|
||||
Name[pt]=Mensagens com mudança de forma
|
||||
Name[pt_BR]=Mensagens com mudança de forma
|
||||
Name[ru]=Анимация преобразования всплывающих окон
|
||||
Name[sk]=Vysúvať vyskakovacie okná
|
||||
Name[sl]=Prehajajoča pojavna okna
|
||||
Name[sr]=Претапајући искакачи
|
||||
|
|
|
@ -135,7 +135,7 @@ void ApplicationWayland::createBackend()
|
|||
connect(platform(), &Platform::initFailed, this,
|
||||
[] () {
|
||||
std::cerr << "FATAL ERROR: backend failed to initialize, exiting now" << std::endl;
|
||||
::exit(1);
|
||||
QCoreApplication::exit(1);
|
||||
}
|
||||
);
|
||||
platform()->init();
|
||||
|
|
|
@ -237,6 +237,11 @@ void DrmBackend::openDrm()
|
|||
);
|
||||
m_drmId = device->sysNum();
|
||||
queryResources();
|
||||
if (m_outputs.isEmpty()) {
|
||||
qCWarning(KWIN_DRM) << "No outputs, cannot render, will terminate now";
|
||||
emit initFailed();
|
||||
return;
|
||||
}
|
||||
|
||||
// setup udevMonitor
|
||||
if (m_udevMonitor) {
|
||||
|
@ -315,7 +320,11 @@ void DrmBackend::queryResources()
|
|||
drmOutput->m_mode = connector->modes[0];
|
||||
}
|
||||
drmOutput->m_connector = connector->connector_id;
|
||||
drmOutput->init(connector.data());
|
||||
if (!drmOutput->init(connector.data())) {
|
||||
qCWarning(KWIN_DRM) << "Failed to create output for connector " << connector->connector_id;
|
||||
delete drmOutput;
|
||||
continue;
|
||||
}
|
||||
qCDebug(KWIN_DRM) << "Found new output with uuid" << drmOutput->uuid();
|
||||
connectedOutputs << drmOutput;
|
||||
}
|
||||
|
@ -339,7 +348,9 @@ void DrmBackend::queryResources()
|
|||
}
|
||||
m_outputs = connectedOutputs;
|
||||
readOutputsConfiguration();
|
||||
emit screensQueried();
|
||||
if (!m_outputs.isEmpty()) {
|
||||
emit screensQueried();
|
||||
}
|
||||
}
|
||||
|
||||
void DrmBackend::readOutputsConfiguration()
|
||||
|
|
|
@ -180,13 +180,15 @@ static DrmOutput::DpmsMode fromWaylandDpmsMode(KWayland::Server::OutputInterface
|
|||
}
|
||||
}
|
||||
|
||||
void DrmOutput::init(drmModeConnector *connector)
|
||||
bool DrmOutput::init(drmModeConnector *connector)
|
||||
{
|
||||
initEdid(connector);
|
||||
initDpms(connector);
|
||||
initUuid();
|
||||
m_savedCrtc.reset(drmModeGetCrtc(m_backend->fd(), m_crtcId));
|
||||
blank();
|
||||
if (!blank()) {
|
||||
return false;
|
||||
}
|
||||
setDpms(DpmsMode::On);
|
||||
if (!m_waylandOutput.isNull()) {
|
||||
delete m_waylandOutput.data();
|
||||
|
@ -287,6 +289,7 @@ void DrmOutput::init(drmModeConnector *connector)
|
|||
m_waylandOutput->create();
|
||||
qCDebug(KWIN_DRM) << "Created OutputDevice";
|
||||
m_waylandOutputDevice->create();
|
||||
return true;
|
||||
}
|
||||
|
||||
void DrmOutput::initUuid()
|
||||
|
@ -318,14 +321,17 @@ bool DrmOutput::isCurrentMode(const drmModeModeInfo *mode) const
|
|||
&& qstrcmp(mode->name, m_mode.name) == 0;
|
||||
}
|
||||
|
||||
void DrmOutput::blank()
|
||||
bool DrmOutput::blank()
|
||||
{
|
||||
if (!m_blackBuffer) {
|
||||
m_blackBuffer = m_backend->createBuffer(size());
|
||||
m_blackBuffer->map();
|
||||
if (!m_blackBuffer->map()) {
|
||||
cleanupBlackBuffer();
|
||||
return false;
|
||||
}
|
||||
m_blackBuffer->image()->fill(Qt::black);
|
||||
}
|
||||
setMode(m_blackBuffer);
|
||||
return setMode(m_blackBuffer);
|
||||
}
|
||||
|
||||
bool DrmOutput::setMode(DrmBuffer *buffer)
|
||||
|
|
|
@ -61,9 +61,9 @@ public:
|
|||
void moveCursor(const QPoint &globalPos);
|
||||
bool present(DrmBuffer *buffer);
|
||||
void pageFlipped();
|
||||
void init(drmModeConnector *connector);
|
||||
bool init(drmModeConnector *connector);
|
||||
void restoreSaved();
|
||||
void blank();
|
||||
bool blank();
|
||||
|
||||
/**
|
||||
* This sets the changes and tests them against the DRM output
|
||||
|
|
|
@ -92,6 +92,7 @@ void FramebufferBackend::openFrameBuffer()
|
|||
}
|
||||
m_fd = fd;
|
||||
queryScreenInfo();
|
||||
initImageFormat();
|
||||
setReady(true);
|
||||
emit screensQueried();
|
||||
}
|
||||
|
@ -153,9 +154,14 @@ void FramebufferBackend::unmap()
|
|||
}
|
||||
|
||||
QImage::Format FramebufferBackend::imageFormat() const
|
||||
{
|
||||
return m_imageFormat;
|
||||
}
|
||||
|
||||
void FramebufferBackend::initImageFormat()
|
||||
{
|
||||
if (m_fd < 0) {
|
||||
return QImage::Format_Invalid;
|
||||
return;
|
||||
}
|
||||
|
||||
qCDebug(KWIN_FB) << "Bits Per Pixel: " << m_bitsPerPixel;
|
||||
|
@ -178,7 +184,7 @@ QImage::Format FramebufferBackend::imageFormat() const
|
|||
m_green.offset == 8 &&
|
||||
m_red.offset == 16) {
|
||||
qCDebug(KWIN_FB) << "Framebuffer format is RGB32";
|
||||
return QImage::Format_RGB32;
|
||||
m_imageFormat = QImage::Format_RGB32;
|
||||
} else if (m_bitsPerPixel == 24 &&
|
||||
m_red.length == 8 &&
|
||||
m_green.length == 8 &&
|
||||
|
@ -187,7 +193,8 @@ QImage::Format FramebufferBackend::imageFormat() const
|
|||
m_green.offset == 8 &&
|
||||
m_red.offset == 16) {
|
||||
qCDebug(KWIN_FB) << "Framebuffer Format is RGB888";
|
||||
return QImage::Format_RGB888;
|
||||
m_bgr = true;
|
||||
m_imageFormat = QImage::Format_RGB888;
|
||||
} else if (m_bitsPerPixel == 16 &&
|
||||
m_red.length == 5 &&
|
||||
m_green.length == 6 &&
|
||||
|
@ -196,10 +203,9 @@ QImage::Format FramebufferBackend::imageFormat() const
|
|||
m_green.offset == 5 &&
|
||||
m_red.offset == 11) {
|
||||
qCDebug(KWIN_FB) << "Framebuffer Format is RGB16";
|
||||
return QImage::Format_RGB16;
|
||||
m_imageFormat = QImage::Format_RGB16;
|
||||
}
|
||||
qCWarning(KWIN_FB) << "Framebuffer format is unknown";
|
||||
return QImage::Format_Invalid;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -71,10 +71,17 @@ public:
|
|||
return m_bitsPerPixel;
|
||||
}
|
||||
QImage::Format imageFormat() const;
|
||||
/**
|
||||
* @returns whether the imageFormat is BGR instead of RGB.
|
||||
**/
|
||||
bool isBGR() const {
|
||||
return m_bgr;
|
||||
}
|
||||
|
||||
private:
|
||||
void openFrameBuffer();
|
||||
bool queryScreenInfo();
|
||||
void initImageFormat();
|
||||
QSize m_resolution;
|
||||
QSize m_physicalSize;
|
||||
QByteArray m_id;
|
||||
|
@ -91,6 +98,8 @@ private:
|
|||
quint32 m_bufferLength = 0;
|
||||
int m_bytesPerLine = 0;
|
||||
void *m_memory = nullptr;
|
||||
QImage::Format m_imageFormat = QImage::Format_Invalid;
|
||||
bool m_bgr = false;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ void FramebufferQPainterBackend::present(int mask, const QRegion &damage)
|
|||
return;
|
||||
}
|
||||
QPainter p(&m_backBuffer);
|
||||
p.drawImage(QPoint(0, 0), m_renderBuffer);
|
||||
p.drawImage(QPoint(0, 0), m_backend->isBGR() ? m_renderBuffer.rgbSwapped() : m_renderBuffer);
|
||||
}
|
||||
|
||||
bool FramebufferQPainterBackend::usesOverlayWindow() const
|
||||
|
|
|
@ -2280,7 +2280,7 @@ void SceneOpenGLShadow::buildQuads()
|
|||
const int width = qMax(topLeft.width(), bottomLeft.width()) +
|
||||
qMax(top.width(), bottom.width()) +
|
||||
qMax(topRight.width(), bottomRight.width());
|
||||
const int height = qMax(topLeft.height(), bottomLeft.height()) +
|
||||
const int height = qMax(topLeft.height(), topRight.height()) +
|
||||
qMax(left.height(), right.height()) +
|
||||
qMax(bottomLeft.height(), bottomRight.height());
|
||||
|
||||
|
@ -2387,7 +2387,8 @@ bool SceneOpenGLShadow::prepareBackend()
|
|||
const int width = qMax(topLeft.width(), bottomLeft.width()) +
|
||||
qMax(top.width(), bottom.width()) +
|
||||
qMax(topRight.width(), bottomRight.width());
|
||||
const int height = qMax(topLeft.height(), bottomLeft.height()) +
|
||||
|
||||
const int height = qMax(topRight.height(), topLeft.height()) +
|
||||
qMax(left.height(), right.height()) +
|
||||
qMax(bottomLeft.height(), bottomRight.height());
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ Comment[nn]=Filmframsyning i fullskjermsmodus over alle tilgjengelege skjermar
|
|||
Comment[pl]=Rozciąga pełnoekranowy odtwarzacz filmów na wszystkie podłączone ekrany, tworząc ścianę wideo
|
||||
Comment[pt]=Espalha o leitor de vídeo em todos os ecrãs ligados para criar um painel de vídeo
|
||||
Comment[pt_BR]=Espalha o reprodutor de vídeo em tela inteira sobre todas as telas ligadas para criar um painel de vídeo
|
||||
Comment[ru]=Поверх всех прикреплённых экранов открывается видео проигрыватель для создания видео стены
|
||||
Comment[ru]=Для создания видеостены вывод видеопроигрывателя распределяется по всем подключённым экранам
|
||||
Comment[sk]=Roztiahne na celú obrazovku video prehrávač cez všetky pripojené obrazovky na vytvorenie video steny
|
||||
Comment[sl]=Celozaslonski predvajalnik videov bo razprostrt prek vseh priklopljenih zaslonov in tako ustvaril video zid
|
||||
Comment[sr]=Видео плејер преко целог екрана бива проширен на све прикључене екране, стварајући видео зид
|
||||
|
|
Loading…
Reference in a new issue