[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin.spec
^
|
|
|
Changed |
_service
^
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.2.tar.bz2/hwcomposer/hwcomposer.pro
^
|
@@ -1,7 +1,7 @@
TARGET = hwcomposer
PLUGIN_TYPE = platforms
-PLUGIN_CLASS_NAME = QEglFSIntegrationPlugin
+PLUGIN_CLASS_NAME = QEglFShwcIntegrationPlugin
load(qt_plugin)
INCLUDEPATH += .
@@ -28,7 +28,7 @@
HEADERS += hwcomposer_backend_v11.h
-QT += core-private compositor-private gui-private platformsupport-private
+QT += core-private compositor-private gui-private platformsupport-private dbus
DEFINES += QEGL_EXTRA_DEBUG
CONFIG += egl qpa/genericunixfontdatabase
@@ -57,14 +57,12 @@
$$PWD/qeglfswindow.cpp \
$$PWD/qeglfsbackingstore.cpp \
$$PWD/qeglfsscreen.cpp \
- $$PWD/qeglfscontext.cpp \
- $$PWD/qeglfspageflipper.cpp
+ $$PWD/qeglfscontext.cpp
HEADERS += $$PWD/qeglfsintegration.h \
$$PWD/qeglfswindow.h \
$$PWD/qeglfsbackingstore.h \
$$PWD/qeglfsscreen.h \
- $$PWD/qeglfscontext.h \
- $$PWD/qeglfspageflipper.h
+ $$PWD/qeglfscontext.h
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.2.tar.bz2/hwcomposer/hwcomposer_backend_v10.cpp
^
|
@@ -146,6 +146,8 @@
HwComposerBackend_v10::~HwComposerBackend_v10()
{
+ hwc_device->eventControl(hwc_device, 0, HWC_EVENT_VSYNC, 0);
+
// Close the hwcomposer handle
HWC_PLUGIN_EXPECT_ZERO(hwc_close_1(hwc_device));
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.2.tar.bz2/hwcomposer/hwcomposer_backend_v11.cpp
^
|
@@ -48,6 +48,8 @@
#include <QtCore/QCoreApplication>
#include <private/qwindow_p.h>
+#include <private/qsystrace_p.h>
+
#ifdef HWC_PLUGIN_HAVE_HWCOMPOSER1_API
// #define QPA_HWC_TIMING
@@ -71,6 +73,13 @@
static void hwc11_callback_vsync(const struct hwc_procs *procs, int, int64_t)
{
+ static int counter = 0;
+ ++counter;
+ if (counter % 2)
+ QSystrace::begin("graphics", "QPA::vsync", "");
+ else
+ QSystrace::end("graphics", "QPA::vsync", "");
+
QCoreApplication::postEvent(static_cast<const HwcProcs_v11 *>(procs)->backend, new QEvent(QEvent::User));
}
@@ -116,6 +125,8 @@
void HWComposer::present(HWComposerNativeWindowBuffer *buffer)
{
+ QSystraceEvent trace("graphics", "QPA::present");
+
QPA_HWC_TIMING_SAMPLE(presentTime);
fblayer->handle = buffer->handle;
@@ -139,8 +150,10 @@
QPA_HWC_TIMING_SAMPLE(prepareTime);
+ QSystrace::begin("graphics", "QPA::set", "");
err = hwcdevice->set(hwcdevice, num_displays, mlist);
HWC_PLUGIN_EXPECT_ZERO(err);
+ QSystrace::end("graphics", "QPA::set", "");
QPA_HWC_TIMING_SAMPLE(setTime);
@@ -174,6 +187,8 @@
HwComposerBackend_v11::~HwComposerBackend_v11()
{
+ hwc_device->eventControl(hwc_device, 0, HWC_EVENT_VSYNC, 0);
+
// Close the hwcomposer handle
if (!qgetenv("QPA_HWC_WORKAROUNDS").split(',').contains("no-close-hwc"))
HWC_PLUGIN_EXPECT_ZERO(hwc_close_1(hwc_device));
@@ -405,6 +420,7 @@
void HwComposerBackend_v11::handleVSyncEvent()
{
+ QSystraceEvent trace("graphics", "QPA::handleVsync");
QSet<QWindow *> pendingWindows = m_pendingUpdate;
m_pendingUpdate.clear();
foreach (QWindow *w, pendingWindows) {
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.2.tar.bz2/hwcomposer/main.cpp
^
|
@@ -44,20 +44,19 @@
QT_BEGIN_NAMESPACE
-class QEglFSIntegrationPlugin : public QPlatformIntegrationPlugin
+class QEglFShwcIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "hwcomposer.json")
-
public:
- QPlatformIntegration *create(const QString&, const QStringList&);
+ QPlatformIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QPlatformIntegration* QEglFSIntegrationPlugin::create(const QString& system, const QStringList& paramList)
+QPlatformIntegration* QEglFShwcIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "hwcomposer")
- return new QEglFSIntegration;
+ if (!system.compare(QLatin1String("hwcomposer"), Qt::CaseInsensitive))
+ return new QEglFSIntegration();
return 0;
}
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.2.tar.bz2/hwcomposer/qeglfscontext.cpp
^
|
@@ -42,7 +42,6 @@
#include "qeglfscontext.h"
#include "qeglfswindow.h"
#include "qeglfsintegration.h"
-#include "qeglfspageflipper.h"
#include <QtPlatformSupport/private/qeglpbuffer_p.h>
#include <QtGui/QSurface>
#include <QtDebug>
@@ -51,7 +50,6 @@
QEglFSContext::QEglFSContext(
HwComposerContext *hwc
- , QEglFSPageFlipper *pageFlipper
, const QSurfaceFormat &format
, QPlatformOpenGLContext *share
, EGLDisplay display
@@ -63,12 +61,12 @@
hwc->surfaceFormatFor(format)
, share
, display
- , QEglFSIntegration::chooseConfig(display, hwc->surfaceFormatFor(format))
+ , &(m_config = QEglFSIntegration::chooseConfig(display, hwc->surfaceFormatFor(format)))
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
, eglApi
#endif
),
- m_hwc(hwc), m_pageFlipper(pageFlipper), m_swapIntervalConfigured(false)
+ m_hwc(hwc), m_swapIntervalConfigured(false)
{
}
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.2.tar.bz2/hwcomposer/qeglfscontext.h
^
|
@@ -44,7 +44,6 @@
#include <QtPlatformSupport/private/qeglconvenience_p.h>
#include <QtPlatformSupport/private/qeglplatformcontext_p.h>
-#include "qeglfspageflipper.h"
#include "hwcomposer_context.h"
@@ -53,7 +52,7 @@
class QEglFSContext : public QEGLPlatformContext
{
public:
- QEglFSContext(HwComposerContext *hwc, QEglFSPageFlipper *pageFlipper,
+ QEglFSContext(HwComposerContext *hwc,
const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display
#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
, EGLenum eglApi = EGL_OPENGL_ES_API);
@@ -65,7 +64,7 @@
void swapBuffers(QPlatformSurface *surface);
private:
HwComposerContext *m_hwc;
- QEglFSPageFlipper *m_pageFlipper;
+ EGLConfig m_config;
bool m_swapIntervalConfigured;
};
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.2.tar.bz2/hwcomposer/qeglfsintegration.cpp
^
|
@@ -63,7 +63,6 @@
#include <qpa/qplatforminputcontextfactory_p.h>
#include "qeglfscontext.h"
-#include "qeglfspageflipper.h"
#include <EGL/egl.h>
@@ -115,7 +114,11 @@
QEglFSIntegration::~QEglFSIntegration()
{
+#if QT_VERSION >= 0x050500
+ destroyScreen(mScreen);
+#else
delete mScreen;
+#endif
eglTerminate(mDisplay);
delete mHwc;
@@ -150,7 +153,7 @@
QPlatformOpenGLContext *QEglFSIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
- return new QEglFSContext(mHwc, static_cast<QEglFSPageFlipper *>(mScreen->pageFlipper()), mHwc->surfaceFormatFor(context->format()), context->shareHandle(), mDisplay);
+ return new QEglFSContext(mHwc, mHwc->surfaceFormatFor(context->format()), context->shareHandle(), mDisplay);
}
QPlatformOffscreenSurface *QEglFSIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const
@@ -197,8 +200,8 @@
mHwc->sleepDisplay(true);
} else if (lowerCaseResource == "displayon") {
// Called from lipstick to turn on the display (src/homeapplication.cpp)
- mHwc->sleepDisplay(false);
- }
+ mHwc->sleepDisplay(false);
+ }
return NULL;
}
@@ -246,7 +249,7 @@
QPlatformTheme *QEglFSIntegration::createPlatformTheme(const QString &name) const
{
- if (name == QLatin1String("generic_qeglfs"))
+ if (name == QLatin1String("generic_eglfs"))
return new GenericEglFSTheme;
return GenericEglFSTheme::createUnixTheme(name);
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.2.tar.bz2/hwcomposer/qeglfsscreen.cpp
^
|
@@ -41,7 +41,6 @@
#include "qeglfsscreen.h"
#include "qeglfswindow.h"
-#include "qeglfspageflipper.h"
#include <private/qmath_p.h>
@@ -49,7 +48,6 @@
QEglFSScreen::QEglFSScreen(HwComposerContext *hwc, EGLDisplay dpy)
: m_hwc(hwc)
- , m_pageFlipper(new QEglFSPageFlipper(this))
, m_dpy(dpy)
{
#ifdef QEGL_EXTRA_DEBUG
@@ -59,17 +57,8 @@
QEglFSScreen::~QEglFSScreen()
{
- delete m_pageFlipper;
}
-#if 0
-QPlatformScreenPageFlipper *QEglFSScreen::pageFlipper() const
-{
- return m_pageFlipper;
-}
-#endif
-
-
QRect QEglFSScreen::geometry() const
{
return QRect(QPoint(0, 0), m_hwc->screenSize());
|