From e7ceacda70857f68a4c406c898bcd9b517ac1b43 Mon Sep 17 00:00:00 2001 From: Jani Heikkinen Date: Fri, 22 Aug 2014 09:13:59 +0300 Subject: Update license headers and add new licenses - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen --- src/quick/items/qquickpainteditem.h | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'src/quick/items/qquickpainteditem.h') diff --git a/src/quick/items/qquickpainteditem.h b/src/quick/items/qquickpainteditem.h index 0a332bf746..c5f5357dda 100644 --- a/src/quick/items/qquickpainteditem.h +++ b/src/quick/items/qquickpainteditem.h @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ -- cgit v1.2.3 From 916ced089f37d96ca8ef1cdb938791247bd44b72 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Sat, 23 Aug 2014 15:27:51 +0200 Subject: Make QQuickPaintedItem a texture provider. Change-Id: I605dc35fcc2284a890851c41946cf95537e92d2e Reviewed-by: Laszlo Agocs --- src/quick/items/qquickpainteditem.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/quick/items/qquickpainteditem.h') diff --git a/src/quick/items/qquickpainteditem.h b/src/quick/items/qquickpainteditem.h index c5f5357dda..0a387e6b26 100644 --- a/src/quick/items/qquickpainteditem.h +++ b/src/quick/items/qquickpainteditem.h @@ -96,6 +96,9 @@ public: virtual void paint(QPainter *painter) = 0; + bool isTextureProvider() const Q_DECL_OVERRIDE; + QSGTextureProvider *textureProvider() const Q_DECL_OVERRIDE; + Q_SIGNALS: void fillColorChanged(); void contentsSizeChanged(); @@ -105,6 +108,10 @@ Q_SIGNALS: protected: QQuickPaintedItem(QQuickPaintedItemPrivate &dd, QQuickItem *parent = 0); virtual QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *); + void releaseResources() Q_DECL_OVERRIDE; + +private Q_SLOTS: + void invalidateSG(); private: Q_DISABLE_COPY(QQuickPaintedItem) -- cgit v1.2.3 From 0de680c8e8fab36e386dca35e5008ffaa27e8ef6 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 2 Sep 2014 11:49:50 +0200 Subject: Fix performance regression caused by SG signals in QQuickItem. For a testcase with thosands of items, I measured an increase in shutdown time from 800ms to 7500ms, all spent in disconnect(). This is not acceptible, so we're choosing a different approach. If items implement a invalidateSceneGraph slot, this function will be called during shutdown. It should be made a proper virtual in Qt 6. This approach costs very little. Change-Id: I5970143cc0a0744955687e17586f0bb00c9afb26 Reviewed-by: Lars Knoll --- src/quick/items/qquickpainteditem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/items/qquickpainteditem.h') diff --git a/src/quick/items/qquickpainteditem.h b/src/quick/items/qquickpainteditem.h index 0a387e6b26..b5e04694bf 100644 --- a/src/quick/items/qquickpainteditem.h +++ b/src/quick/items/qquickpainteditem.h @@ -111,7 +111,7 @@ protected: void releaseResources() Q_DECL_OVERRIDE; private Q_SLOTS: - void invalidateSG(); + void invalidateSceneGraph(); private: Q_DISABLE_COPY(QQuickPaintedItem) -- cgit v1.2.3