diff options
Diffstat (limited to 'tests/benchmarks/gui/image/qimageconversion')
3 files changed, 13 insertions, 45 deletions
diff --git a/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt b/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt index 5b0bb33018..034ed28fcd 100644 --- a/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt +++ b/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt @@ -1,30 +1,27 @@ -# Generated from qimageconversion.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_bench_imageConversion Binary: ##################################################################### -qt_add_benchmark(tst_bench_imageConversion +qt_internal_add_benchmark(tst_bench_imageConversion SOURCES tst_qimageconversion.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Test ) -#### Keys ignored in scope 1:.:.:qimageconversion.pro:<TRUE>: -# QT_FOR_CONFIG = "gui-private" -# TEMPLATE = "app" - ## Scopes: ##################################################################### -qt_extend_target(tst_bench_imageConversion CONDITION QT_FEATURE_gif +qt_internal_extend_target(tst_bench_imageConversion CONDITION QT_FEATURE_gif DEFINES QTEST_HAVE_GIF ) -qt_extend_target(tst_bench_imageConversion CONDITION QT_FEATURE_jpeg +qt_internal_extend_target(tst_bench_imageConversion CONDITION QT_FEATURE_jpeg DEFINES QTEST_HAVE_JPEG ) diff --git a/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro b/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro deleted file mode 100644 index e152ac8200..0000000000 --- a/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro +++ /dev/null @@ -1,9 +0,0 @@ -TEMPLATE = app -TARGET = tst_bench_imageConversion -QT += testlib -QT_FOR_CONFIG += gui-private -SOURCES += tst_qimageconversion.cpp - -qtConfig(gif): DEFINES += QTEST_HAVE_GIF -qtConfig(jpeg): DEFINES += QTEST_HAVE_JPEG -qtConfig(c++11): CONFIG += c++11 diff --git a/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp b/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp index b8afb3bc05..0c4243637c 100644 --- a/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp +++ b/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <qtest.h> #include <QImage> @@ -244,6 +219,7 @@ void tst_QImageConversion::convertGeneric_data() QImage a2rgb30 = argb32.convertToFormat(QImage::Format_A2RGB30_Premultiplied); QImage rgb666 = rgb32.convertToFormat(QImage::Format_RGB666); QImage argb4444 = argb32.convertToFormat(QImage::Format_ARGB4444_Premultiplied); + QImage rgba64 = argb32.convertToFormat(QImage::Format_RGBA64); QImage rgba64pm = argb32.convertToFormat(QImage::Format_RGBA64_Premultiplied); QImage rgb888 = rgb32.convertToFormat(QImage::Format_RGB888); QImage bgr888 = rgb32.convertToFormat(QImage::Format_BGR888); @@ -298,6 +274,10 @@ void tst_QImageConversion::convertGeneric_data() QTest::newRow("argb4444pm -> rgb30") << argb4444 << QImage::Format_RGB30; QTest::newRow("argb4444pm -> a2bgr30") << argb4444 << QImage::Format_A2BGR30_Premultiplied; + QTest::newRow("rgba64 -> argb32") << rgba64 << QImage::Format_ARGB32; + QTest::newRow("rgba64 -> argb32pm") << rgba64 << QImage::Format_ARGB32_Premultiplied; + QTest::newRow("rgba64 -> rgba64pm") << rgba64 << QImage::Format_RGBA64_Premultiplied; + QTest::newRow("rgba64pm -> argb32") << rgba64pm << QImage::Format_ARGB32; QTest::newRow("rgba64pm -> rgbx8888") << rgba64pm << QImage::Format_RGBX8888; QTest::newRow("rgba64pm -> rgba8888pm") << rgba64pm << QImage::Format_RGBA8888_Premultiplied; |