diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2011-05-03 14:22:36 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2011-05-03 14:23:39 +0200 |
commit | 075634945d5a9ba45fe7628c533977e6909f446d (patch) | |
tree | 62747ff9fd50bc2d17d99e5cd9b20c1adee03045 /src/plugins/graphicssystems/trace | |
parent | 86f20c89af906ecd58a4da74f82bd895ec8392e8 (diff) |
remove the graphicssystem code paths.
QPA's platform integration layer replaces the
graphics system now.
Diffstat (limited to 'src/plugins/graphicssystems/trace')
-rw-r--r-- | src/plugins/graphicssystems/trace/main.cpp | 69 | ||||
-rw-r--r-- | src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp | 153 | ||||
-rw-r--r-- | src/plugins/graphicssystems/trace/qgraphicssystem_trace_p.h | 71 | ||||
-rw-r--r-- | src/plugins/graphicssystems/trace/trace.pro | 13 |
4 files changed, 0 insertions, 306 deletions
diff --git a/src/plugins/graphicssystems/trace/main.cpp b/src/plugins/graphicssystems/trace/main.cpp deleted file mode 100644 index 2a84d0bdce..0000000000 --- a/src/plugins/graphicssystems/trace/main.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <private/qgraphicssystemplugin_p.h> -#include "qgraphicssystem_trace_p.h" - -QT_BEGIN_NAMESPACE - -class QTraceGraphicsSystemPlugin : public QGraphicsSystemPlugin -{ -public: - QStringList keys() const; - QGraphicsSystem *create(const QString&); -}; - -QStringList QTraceGraphicsSystemPlugin::keys() const -{ - return QStringList(QLatin1String("Trace")); -} - -QGraphicsSystem* QTraceGraphicsSystemPlugin::create(const QString& system) -{ - if (system.toLower() == QLatin1String("trace")) - return new QTraceGraphicsSystem; - - return 0; -} - -Q_EXPORT_PLUGIN2(trace, QTraceGraphicsSystemPlugin) - -QT_END_NAMESPACE diff --git a/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp b/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp deleted file mode 100644 index 62b6992f84..0000000000 --- a/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qgraphicssystem_trace_p.h" -#include <private/qpixmap_raster_p.h> -#include <private/qpaintbuffer_p.h> -#include <private/qwindowsurface_raster_p.h> - -#include <QFile> -#include <QPainter> -#include <QtDebug> - -QT_BEGIN_NAMESPACE - -class QTraceWindowSurface : public QRasterWindowSurface -{ -public: - QTraceWindowSurface(QWidget *widget); - ~QTraceWindowSurface(); - - QPaintDevice *paintDevice(); - void beginPaint(const QRegion &rgn); - void endPaint(const QRegion &rgn); - - bool scroll(const QRegion &area, int dx, int dy); - -private: - QPaintBuffer *buffer; - QList<QRegion> updates; - - qulonglong winId; -}; - -QTraceWindowSurface::QTraceWindowSurface(QWidget *widget) - : QRasterWindowSurface(widget) - , buffer(0) - , winId(0) -{ -} - -QTraceWindowSurface::~QTraceWindowSurface() -{ - if (buffer) { - QFile outputFile(QString(QLatin1String("qtgraphics-%0.trace")).arg(winId)); - if (outputFile.open(QIODevice::WriteOnly)) { - QDataStream out(&outputFile); - out.setFloatingPointPrecision(QDataStream::SinglePrecision); - - out.writeBytes("qttraceV2", 9); - - uint version = 1; - - out << version << *buffer << updates; - } - delete buffer; - } -} - -QPaintDevice *QTraceWindowSurface::paintDevice() -{ - if (!buffer) { - buffer = new QPaintBuffer; -#ifdef Q_WS_QPA - buffer->setBoundingRect(QRect(QPoint(), size())); -#else - buffer->setBoundingRect(geometry()); -#endif - } - return buffer; -} - -void QTraceWindowSurface::beginPaint(const QRegion &rgn) -{ - // ensure paint buffer is created - paintDevice(); - buffer->beginNewFrame(); - - QRasterWindowSurface::beginPaint(rgn); -} - -void QTraceWindowSurface::endPaint(const QRegion &rgn) -{ - QPainter p(QRasterWindowSurface::paintDevice()); - buffer->draw(&p, buffer->numFrames()-1); - p.end(); - - winId = (qulonglong)window()->winId(); - - updates << rgn; - - QRasterWindowSurface::endPaint(rgn); -} - -bool QTraceWindowSurface::scroll(const QRegion &, int, int) -{ - // TODO: scrolling should also be streamed and replayed - // to test scrolling performance - return false; -} - -QTraceGraphicsSystem::QTraceGraphicsSystem() -{ -} - -QPixmapData *QTraceGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const -{ - return new QRasterPixmapData(type); -} - -QWindowSurface *QTraceGraphicsSystem::createWindowSurface(QWidget *widget) const -{ - return new QTraceWindowSurface(widget); -} - -QT_END_NAMESPACE diff --git a/src/plugins/graphicssystems/trace/qgraphicssystem_trace_p.h b/src/plugins/graphicssystems/trace/qgraphicssystem_trace_p.h deleted file mode 100644 index e5ab4af147..0000000000 --- a/src/plugins/graphicssystems/trace/qgraphicssystem_trace_p.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** 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. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QGRAPHICSSYSTEM_TRACE_P_H -#define QGRAPHICSSYSTEM_TRACE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include <QtGui/private/qgraphicssystem_p.h> - -QT_BEGIN_NAMESPACE - -class QTraceGraphicsSystem : public QGraphicsSystem -{ -public: - QTraceGraphicsSystem(); - - QPixmapData *createPixmapData(QPixmapData::PixelType type) const; - QWindowSurface *createWindowSurface(QWidget *widget) const; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/plugins/graphicssystems/trace/trace.pro b/src/plugins/graphicssystems/trace/trace.pro deleted file mode 100644 index 0958a86973..0000000000 --- a/src/plugins/graphicssystems/trace/trace.pro +++ /dev/null @@ -1,13 +0,0 @@ -TARGET = qtracegraphicssystem -include(../../qpluginbase.pri) - -QT += network - -DESTDIR = $$QT.gui.plugins/graphicssystems -symbian:TARGET.UID3 = 0x2002130E - -SOURCES = main.cpp qgraphicssystem_trace.cpp - -target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems -INSTALLS += target -INCLUDEPATH += ../../../3rdparty/harfbuzz/src |