Skip to content

Commit

Permalink
Merge branch 'jb49519_activate_session' into 'master'
Browse files Browse the repository at this point in the history
[lipstick] Activate logind session. Contributes to JB#49519

See merge request mer-core/lipstick!138
  • Loading branch information
Tomin1 committed Apr 15, 2020
2 parents 67179c2 + 5483b9d commit 1e4ffb0
Show file tree
Hide file tree
Showing 151 changed files with 336 additions and 345 deletions.
2 changes: 1 addition & 1 deletion protocol/alien-manager.xml
@@ -1,6 +1,6 @@
<protocol name="alien_manager">
<copyright>
Copyright (C) 2014 Jolla Ltd.
Copyright (c) 2014 Jolla Ltd.

Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Expand Down
2 changes: 1 addition & 1 deletion protocol/lipstick-recorder.xml
@@ -1,6 +1,6 @@
<protocol name="lipstick_recorder">
<copyright>
Copyright (C) 2014 Jolla Ltd.
Copyright (c) 2014 Jolla Ltd.

Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Expand Down
2 changes: 1 addition & 1 deletion src/3rdparty/synchronizelists.h
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2013 Jolla Ltd <andrew.den.exter@jollamobile.com>
* Copyright (c) 2013 Jolla Ltd <andrew.den.exter@jollamobile.com>
*
* You may use this file under the terms of the BSD license as follows:
*
Expand Down
1 change: 0 additions & 1 deletion src/components/launcherdbus.cpp
Expand Up @@ -2,7 +2,6 @@
// This file is part of lipstick, a QML desktop library
//
// Copyright (c) 2014 Jolla Ltd.
// Contact: Thomas Perl <thomas.perl@jolla.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
Expand Down
1 change: 0 additions & 1 deletion src/components/launcherdbus.h
@@ -1,7 +1,6 @@
// This file is part of lipstick, a QML desktop library
//
// Copyright (c) 2014 Jolla Ltd.
// Contact: Thomas Perl <thomas.perl@jolla.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 0 additions & 2 deletions src/components/launcherfoldermodel.cpp
@@ -1,8 +1,6 @@
// This file is part of lipstick, a QML desktop library
//
// Copyright (c) 2014-2017 Jolla Ltd.
// Contact: Martin Jones <martin.jones@jolla.com>
// Contact: Raine Makelainen <raine.makelainen@jolla.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 0 additions & 2 deletions src/components/launcherfoldermodel.h
@@ -1,8 +1,6 @@
// This file is part of lipstick, a QML desktop library
//
// Copyright (c) 2014-2017 Jolla Ltd.
// Contact: Martin Jones <martin.jones@jolla.com>
// Contact: Raine Makelainen <raine.makelainen@jolla.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
Expand Down
1 change: 0 additions & 1 deletion src/components/launchermonitor.cpp
Expand Up @@ -2,7 +2,6 @@
// This file is part of lipstick, a QML desktop library
//
// Copyright (c) 2012 Jolla Ltd.
// Contact: Thomas Perl <thomas.perl@jolla.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
Expand Down
1 change: 0 additions & 1 deletion src/components/launchermonitor.h
Expand Up @@ -2,7 +2,6 @@
// This file is part of lipstick, a QML desktop library
//
// Copyright (c) 2012 Jolla Ltd.
// Contact: Thomas Perl <thomas.perl@jolla.com>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
Expand Down
3 changes: 1 addition & 2 deletions src/compositor/alienmanager/alienmanager.cpp
@@ -1,7 +1,6 @@
/***************************************************************************
**
** Copyright (C) 2014 Jolla Ltd.
** Contact: Giulio Camuffo <giulio.camuffo@jollamobile.com>
** Copyright (c) 2014 Jolla Ltd.
**
** This file is part of lipstick.
**
Expand Down
3 changes: 1 addition & 2 deletions src/compositor/alienmanager/alienmanager.h
@@ -1,7 +1,6 @@
/***************************************************************************
**
** Copyright (C) 2014 Jolla Ltd.
** Contact: Giulio Camuffo <giulio.camuffo@jollamobile.com>
** Copyright (c) 2014 Jolla Ltd.
**
** This file is part of lipstick.
**
Expand Down
3 changes: 1 addition & 2 deletions src/compositor/alienmanager/aliensurface.cpp
@@ -1,7 +1,6 @@
/***************************************************************************
**
** Copyright (C) 2014 Jolla Ltd.
** Contact: Giulio Camuffo <giulio.camuffo@jollamobile.com>
** Copyright (c) 2014 Jolla Ltd.
**
** This file is part of lipstick.
**
Expand Down
3 changes: 1 addition & 2 deletions src/compositor/alienmanager/aliensurface.h
@@ -1,7 +1,6 @@
/***************************************************************************
**
** Copyright (C) 2014 Jolla Ltd.
** Contact: Giulio Camuffo <giulio.camuffo@jollamobile.com>
** Copyright (c) 2014 Jolla Ltd.
**
** This file is part of lipstick.
**
Expand Down
9 changes: 5 additions & 4 deletions src/compositor/eglhybrisbuffer.cpp
@@ -1,7 +1,7 @@
/***************************************************************************
**
** Copyright (C) 2018 Jolla Ltd.
** Contact: Andrew den Exter <andrew.den.exter@jolla.com>
** Copyright (c) 2018 - 2020 Jolla Ltd.
** Copyright (c) 2020 Open Mobile Platform LLC.
**
** This file is part of lipstick.
**
Expand All @@ -16,6 +16,7 @@
#include "eglhybrisbuffer.h"
#include <QImage>
#include "hwcrenderstage.h"
#include "logging.h"

EglHybrisBuffer::EglHybrisBuffer(
Format format, const QSize &size, Usage usage, const EglHybrisFunctions &functions)
Expand Down Expand Up @@ -55,15 +56,15 @@ bool EglHybrisBuffer::allocate()
if (!eglHybrisCreateNativeBuffer(
m_size.width(), m_size.height(), m_usage, m_format, &m_bufferStride, &m_buffer)
|| !m_buffer) {
qCWarning(LIPSTICK_LOG_HWC, "EGL native buffer error");
qCWarning(lcLipstickHwcLog, "EGL native buffer error");
return false;
} else if (!(m_eglImage = eglCreateImageKHR(
eglGetDisplay(EGL_DEFAULT_DISPLAY),
EGL_NO_CONTEXT,
EGL_NATIVE_BUFFER_HYBRIS,
m_buffer,
0))) {
qCWarning(LIPSTICK_LOG_HWC, "EGLImage allocation error");
qCWarning(lcLipstickHwcLog, "EGLImage allocation error");
return false;
} else {
return true;
Expand Down
3 changes: 1 addition & 2 deletions src/compositor/eglhybrisbuffer.h
@@ -1,7 +1,6 @@
/***************************************************************************
**
** Copyright (C) 2018 Jolla Ltd.
** Contact: Andrew den Exter <andrew.den.exter@jolla.com>
** Copyright (c) 2018 Jolla Ltd.
**
** This file is part of lipstick.
**
Expand Down
3 changes: 1 addition & 2 deletions src/compositor/eglhybrisfunctions.cpp
@@ -1,7 +1,6 @@
/***************************************************************************
**
** Copyright (C) 2018 Jolla Ltd.
** Contact: Andrew den Exter <andrew.den.exter@jolla.com>
** Copyright (c) 2018 Jolla Ltd.
**
** This file is part of lipstick.
**
Expand Down
3 changes: 1 addition & 2 deletions src/compositor/eglhybrisfunctions.h
@@ -1,7 +1,6 @@
/***************************************************************************
**
** Copyright (C) 2018 Jolla Ltd.
** Contact: Andrew den Exter <andrew.den.exter@jolla.com>
** Copyright (c) 2018 Jolla Ltd.
**
** This file is part of lipstick.
**
Expand Down
43 changes: 22 additions & 21 deletions src/compositor/hwcimage.cpp
@@ -1,7 +1,7 @@
/***************************************************************************
**
** Copyright (C) 2015 Jolla Ltd.
** Contact: Gunnar Sletta <gunnar.sletta@jollamobile.com>
** Copyright (c) 2015 - 2020 Jolla Ltd.
** Copyright (c) 2019 - 2020 Open Mobile Platform LLC.
**
** This file is part of lipstick.
**
Expand All @@ -17,6 +17,7 @@
#include "hwcrenderstage.h"

#include "eglhybrisbuffer.h"
#include "logging.h"

#include <MGConfItem>

Expand Down Expand Up @@ -51,7 +52,7 @@ class HwcImageLoadRequest : public QRunnable, public QEvent
}

~HwcImageLoadRequest() {
qCDebug(LIPSTICK_LOG_HWC, "HwcImageLoadRequest completed and destroyed...");
qCDebug(lcLipstickHwcLog, "HwcImageLoadRequest completed and destroyed...");
}

void execute() {
Expand All @@ -61,10 +62,10 @@ class HwcImageLoadRequest : public QRunnable, public QEvent


if (!originalSize.isValid()) {
qCWarning(LIPSTICK_LOG_HWC, "%s is not a valid file or doesn't support reading image size: %s", qPrintable(file), qPrintable(reader.errorString()));
qCWarning(lcLipstickHwcLog, "%s is not a valid file or doesn't support reading image size: %s", qPrintable(file), qPrintable(reader.errorString()));
return;
} else if (Q_UNLIKELY(rotation != 0 && rotation != 90 && rotation != 180 && rotation != 270)) {
qCWarning(LIPSTICK_LOG_HWC, "%d is not a supported rotation: %s", rotation, qPrintable(file));
qCWarning(lcLipstickHwcLog, "%d is not a supported rotation: %s", rotation, qPrintable(file));
return;
}

Expand Down Expand Up @@ -131,7 +132,7 @@ class HwcImageLoadRequest : public QRunnable, public QEvent
image = QImage(bytes, imageSize.width(), imageSize.height(), stride, reader.imageFormat());

if (!reader.read(&image)) {
qCWarning(LIPSTICK_LOG_HWC, "Error reading %s: %s", qPrintable(file), qPrintable(reader.errorString()));
qCWarning(lcLipstickHwcLog, "Error reading %s: %s", qPrintable(file), qPrintable(reader.errorString()));

hybrisBuffer->unlock();
hybrisBuffer = EglHybrisBuffer::Pointer();
Expand All @@ -142,7 +143,7 @@ class HwcImageLoadRequest : public QRunnable, public QEvent
image = reader.read();

if (image.isNull()) {
qCWarning(LIPSTICK_LOG_HWC, "Error reading %s: %s", qPrintable(file), qPrintable(reader.errorString()));
qCWarning(lcLipstickHwcLog, "Error reading %s: %s", qPrintable(file), qPrintable(reader.errorString()));
return;
}
}
Expand All @@ -168,7 +169,7 @@ class HwcImageLoadRequest : public QRunnable, public QEvent
const auto themeName = MGConfItem("/meegotouch/theme/name").value(DEFAULT_THEME).toString();
auto shaderImage = shaderImageTemplate.arg(themeName);
if (themeName != QStringLiteral(DEFAULT_THEME) && !QFile::exists(shaderImage)) {
qCDebug(LIPSTICK_LOG_HWC, "Shader texture file does not exist: %s", qPrintable(shaderImage));
qCDebug(lcLipstickHwcLog, "Shader texture file does not exist: %s", qPrintable(shaderImage));
shaderImage = shaderImageTemplate.arg(DEFAULT_THEME);
}
QImage glass(shaderImage);
Expand Down Expand Up @@ -358,7 +359,7 @@ HwcImage::~HwcImage()
void HwcImage::setRotationHandler(QQuickItem *item)
{
if (!HwcRenderStage::isHwcEnabled()) {
qCDebug(LIPSTICK_LOG_HWC, "HwcImage ignoring rotation handler as HWC is disabled");
qCDebug(lcLipstickHwcLog, "HwcImage ignoring rotation handler as HWC is disabled");
return;
}

Expand All @@ -372,7 +373,7 @@ void HwcImage::setRotationHandler(QQuickItem *item)
emit rotationHandlerChanged();
polish();

qCDebug(LIPSTICK_LOG_HWC) << "HwcImage" << this << "tracking rotation handler" << item;
qCDebug(lcLipstickHwcLog) << "HwcImage" << this << "tracking rotation handler" << item;
}

void HwcImage::setAsynchronous(bool is)
Expand Down Expand Up @@ -448,7 +449,7 @@ void HwcImage::handlerRotationChanged()
{
qreal rotation = hwcimage_get_rotation(m_rotationHandler);
bool is90 = qFuzzyCompare(0.0, fmod(rotation, 90));
qCDebug(LIPSTICK_LOG_HWC, " - rotation changed: %6.3f, 90 degree=%s", rotation, is90 ? "yes" : "no");
qCDebug(lcLipstickHwcLog, " - rotation changed: %6.3f, 90 degree=%s", rotation, is90 ? "yes" : "no");
if (is90 && m_textureRotation != rotation)
polish();
}
Expand All @@ -465,7 +466,7 @@ void HwcImage::updatePolish()
}

if (!QFileInfo(m_source.toLocalFile()).exists()) {
qCDebug(LIPSTICK_LOG_HWC, "HwcImage: source file does not exist (%s)", qPrintable(m_source.toString()));
qCDebug(lcLipstickHwcLog, "HwcImage: source file does not exist (%s)", qPrintable(m_source.toString()));
return;
}

Expand All @@ -486,7 +487,7 @@ void HwcImage::updatePolish()
if (m_maxTextureSize > 0 && m_textureSize.width() > 0 && m_textureSize.height() > 0)
qWarning() << "HwcImage: both 'textureSize' and 'maxTextureSize' are set; 'textureSize' will take presedence" << this;

qCDebug(LIPSTICK_LOG_HWC,
qCDebug(lcLipstickHwcLog,
"Scheduling HwcImage request, source=%s, (%d x %d), eff=%s, olay=%s, rot=%d, pr=%f, %s",
qPrintable(m_source.toString()),
m_textureSize.width(), m_textureSize.height(),
Expand Down Expand Up @@ -542,7 +543,7 @@ bool HwcImage::event(QEvent *e)
&& m_textureSize == req->textureSize
&& m_pixelRatio == req->pixelRatio
&& m_overlayColor == req->overlay;
qCDebug(LIPSTICK_LOG_HWC,
qCDebug(lcLipstickHwcLog,
"HwcImage request completed: %s, source=%s, (%d x %d), eff=%s, olay=%s, rot=%d, pr=%f",
(accept ? "accepted" : "rejected"),
qPrintable(req->file),
Expand Down Expand Up @@ -617,12 +618,12 @@ class HwcImageNode : public QSGSimpleTextureNode
{
public:
HwcImageNode() {
qCDebug(LIPSTICK_LOG_HWC) << "HwcImageNode is created...";
qCDebug(lcLipstickHwcLog) << "HwcImageNode is created...";
qsgnode_set_description(this, QStringLiteral("hwc-image-node"));
setOwnsTexture(true);
}
~HwcImageNode() {
qCDebug(LIPSTICK_LOG_HWC) << "HwcImageNode is gone...";
qCDebug(lcLipstickHwcLog) << "HwcImageNode is gone...";
}
void *handle() const {
HwcImageTexture *t = static_cast<HwcImageTexture *>(texture());
Expand Down Expand Up @@ -677,7 +678,7 @@ QMatrix4x4 HwcImage::reverseTransform() const
QSGNode *HwcImage::updatePaintNode(QSGNode *old, UpdatePaintNodeData *)
{
if (!HwcRenderStage::isHwcEnabled()) {
qCDebug(LIPSTICK_LOG_HWC) << "HwcImage" << this << "updating paint node without HWC support";
qCDebug(lcLipstickHwcLog) << "HwcImage" << this << "updating paint node without HWC support";
return updateActualPaintNode(old);
}

Expand All @@ -698,7 +699,7 @@ QSGNode *HwcImage::updatePaintNode(QSGNode *old, UpdatePaintNodeData *)
HwcNode *hwcNode = 0;

if (old) {
qCDebug(LIPSTICK_LOG_HWC) << "HwcImage" << this << "updating paint existing node";
qCDebug(lcLipstickHwcLog) << "HwcImage" << this << "updating paint existing node";
hwcNode = static_cast<HwcNode *>(old);
HwcImageNode *contentNode = updateActualPaintNode(hwcNode->firstChild()->firstChild());
if (contentNode == 0) {
Expand All @@ -713,7 +714,7 @@ QSGNode *HwcImage::updatePaintNode(QSGNode *old, UpdatePaintNodeData *)
static_cast<QSGTransformNode *>(hwcNode->firstChild())->setMatrix(reverseTransform());
hwcNode->update(contentNode, contentNode->handle());
} else if (HwcImageNode *contentNode = updateActualPaintNode(0)) {
qCDebug(LIPSTICK_LOG_HWC) << "HwcImage" << this << "creating new node";
qCDebug(lcLipstickHwcLog) << "HwcImage" << this << "creating new node";
hwcNode = new HwcNode(window());
QSGTransformNode *xnode = new QSGTransformNode();
xnode->setMatrix(reverseTransform());
Expand All @@ -736,7 +737,7 @@ HwcImageTexture::HwcImageTexture(const EglHybrisBuffer::Pointer &buffer, HwcRend
, m_hwc(hwc)
{
glGenTextures(1, &m_id);
qCDebug(LIPSTICK_LOG_HWC,
qCDebug(lcLipstickHwcLog,
"HwcImageTexture(%p) created, size=(%d x %d), texId=%d",
this, m_buffer->size().width(), m_buffer->size().height(), m_id);
}
Expand All @@ -753,7 +754,7 @@ HwcImageTexture::~HwcImageTexture()
m_hwc->signalOnBufferRelease(EglHybrisBuffer::destroy, handle(), m_buffer.data());
}

qCDebug(LIPSTICK_LOG_HWC,
qCDebug(lcLipstickHwcLog,
"HwcImageTexture(%p) destroyed, size=(%d x %d), texId=%d",
this, m_buffer->size().width(), m_buffer->size().height(), m_id);
}
Expand Down
3 changes: 1 addition & 2 deletions src/compositor/hwcimage.h
@@ -1,7 +1,6 @@
/***************************************************************************
**
** Copyright (C) 2015 Jolla Ltd.
** Contact: Gunnar Sletta <gunnar.sletta@jollamobile.com>
** Copyright (c) 2015 Jolla Ltd.
**
** This file is part of lipstick.
**
Expand Down
3 changes: 1 addition & 2 deletions src/compositor/hwcinterface.h
Expand Up @@ -6,8 +6,7 @@

/****************************************************************************
**
** Copyright (C) 2015 Jolla Ltd.
** Contact: Gunnar Sletta <gunnar.sletta@jollamobile.com>
** Copyright (c) 2015 Jolla Ltd.
**
** This file is part of the hwcomposer plugin.
**
Expand Down

0 comments on commit 1e4ffb0

Please sign in to comment.