[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -7,7 +7,7 @@
<service name="tar_git">
<param name="url">https://github.com/mer-hybris/qt5-qpa-hwcomposer-plugin.git</param>
<param name="branch">master</param>
- <param name="revision">95a834c36b452515a6b4a3a77ba1b60a1701ae85</param>
+ <param name="revision">b4c9e5e1fcee4d97b33619237beda083ffd64863</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Added |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/config.tests/hwcomposer2/hwcomposer2.pro
^
|
@@ -0,0 +1,8 @@
+TEMPLATE = app
+
+CONFIG += link_pkgconfig
+PKGCONFIG += android-headers
+
+TARGET = hwcomposer2
+
+SOURCES += main.cpp
|
[-]
[+]
|
Added |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/config.tests/hwcomposer2/main.cpp
^
|
@@ -0,0 +1,6 @@
+#include <hardware/hwcomposer2.h>
+
+int main()
+{
+ return 0;
+}
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/hwcomposer.pro
^
|
@@ -3,6 +3,7 @@
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QEglFShwcIntegrationPlugin
load(qt_plugin)
+load(configure)
INCLUDEPATH += .
DEPENDPATH += .
@@ -27,7 +28,22 @@
SOURCES += hwcomposer_backend_v11.cpp
HEADERS += hwcomposer_backend_v11.h
-QT += core-private compositor-private gui-private platformsupport-private dbus
+HEADERS += qsystrace_selector.h
+
+versionAtLeast(QT_MINOR_VERSION, 8) {
+ QT += core-private gui-private egl_support-private waylandcompositor-private dbus fontdatabase_support-private eventdispatcher_support-private theme_support-private
+} else {
+ QT += core-private compositor-private gui-private platformsupport-private dbus
+}
+
+enable-sensors {
+ QT += sensors
+ DEFINES += WITH_SENSORS
+}
+
+enable-systrace {
+ DEFINES += WITH_SYSTRACE
+}
DEFINES += QEGL_EXTRA_DEBUG
CONFIG += egl qpa/genericunixfontdatabase
@@ -49,7 +65,7 @@
DEFINES += HWC_PLUGIN_HAVE_HWCOMPOSER1_API
}
-exists(/usr/lib/droid-devel/droid-headers/hardware/hwcomposer2.h) {
+qtCompileTest(hwcomposer2) {
PKGCONFIG += libhwc2
DEFINES += HWC_PLUGIN_HAVE_HWCOMPOSER2_API
SOURCES += hwcomposer_backend_v20.cpp
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/hwcomposer_backend.cpp
^
|
@@ -73,8 +73,10 @@
HwComposerBackend *
HwComposerBackend::create()
{
+#ifndef HWC_PLUGIN_HAVE_HWCOMPOSER2_API
hw_module_t *hwc_module = NULL;
hw_device_t *hwc_device = NULL;
+#endif
void *libminisf;
void (*startMiniSurfaceFlinger)(void) = NULL;
@@ -82,7 +84,7 @@
// the hardware composer one. Therefor we rely on using the fbdev HYBRIS_EGLPLATFORM
// here and use eglGetDisplay to initialize it.
if (qEnvironmentVariableIsEmpty("QT_QPA_NO_FRAMEBUFFER_FIRST")) {
- eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ eglGetDisplay(EGL_DEFAULT_DISPLAY);
}
// A reason for calling this method here is to initialize the binder
@@ -94,15 +96,20 @@
libminisf = android_dlopen("libminisf.so", RTLD_LAZY);
if (libminisf) {
- startMiniSurfaceFlinger = (void(*)(void))android_dlsym(libminisf, "startMiniSurfaceFlinger");
+ startMiniSurfaceFlinger = (void(*)(void))android_dlsym(libminisf, "startMiniSurfaceFlinger");
}
if (startMiniSurfaceFlinger) {
- startMiniSurfaceFlinger();
+ startMiniSurfaceFlinger();
} else {
- fprintf(stderr, "libminisf is incompatible or missing. Can not possibly start the SurfaceFlinger service. If you're experiencing troubles with media try updating droidmedia (and/or this plugin).");
+ fprintf(stderr, "libminisf is incompatible or missing. Can not possibly start the SurfaceFlinger service. If you're experiencing troubles with media try updating droidmedia (and/or this plugin).");
}
+#ifdef HWC_PLUGIN_HAVE_HWCOMPOSER2_API
+ // Create hwcomposer backend directly without opening hardware module
+ // which is not needed and does not even exist on some hwc2 devices
+ return new HwComposerBackend_v20(NULL, libminisf);
+#else
// Open hardware composer
HWC_PLUGIN_ASSERT_ZERO(hw_get_module(HWC_HARDWARE_MODULE_ID, (const hw_module_t **)(&hwc_module)));
@@ -169,11 +176,6 @@
return new HwComposerBackend_v11(hwc_module, hwc_device, libminisf, HWC_NUM_DISPLAY_TYPES);
break;
#endif /* HWC_PLUGIN_HAVE_HWCOMPOSER1_API */
-#ifdef HWC_PLUGIN_HAVE_HWCOMPOSER2_API
- case HWC_DEVICE_API_VERSION_2_0:
- return new HwComposerBackend_v20(hwc_module, libminisf);
- break;
-#endif
default:
fprintf(stderr, "Unknown hwcomposer API: 0x%x/0x%x/0x%x\n",
hwc_module->module_api_version,
@@ -182,6 +184,7 @@
return NULL;
break;
}
+#endif
}
void
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/hwcomposer_backend.h
^
|
@@ -42,6 +42,7 @@
#ifndef HWCOMPOSER_BACKEND_H
#define HWCOMPOSER_BACKEND_H
+#include <inttypes.h>
#include <sys/types.h>
#include <sync/sync.h>
#include <stdint.h>
@@ -65,7 +66,7 @@
// Evaluate "x", if it isn't NULL, print a warning
#define HWC_PLUGIN_EXPECT_NULL(x) \
{ void *res; if ((res = (x)) != NULL) \
- qWarning("QPA-HWC: %s in %s returned %x", (#x), __func__, (intptr_t)res); }
+ qWarning("QPA-HWC: %s in %s returned %" PRIxPTR, (#x), __func__, (intptr_t)res); }
// Evaluate "x", if it is NULL, exit with a fatal error
#define HWC_PLUGIN_FATAL(x) \
@@ -74,7 +75,7 @@
// Evaluate "x", if it is NULL, exit with a fatal error
#define HWC_PLUGIN_ASSERT_NOT_NULL(x) \
{ void *res; if ((res = (x)) == NULL) \
- qFatal("QPA-HWC: %s in %s returned %x", (#x), __func__, (intptr_t)res); }
+ qFatal("QPA-HWC: %s in %s returned %" PRIxPTR, (#x), __func__, (intptr_t)res); }
// Evaluate "x", if it doesn't return zero, exit with a fatal error
#define HWC_PLUGIN_ASSERT_ZERO(x) \
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/hwcomposer_backend_v0.cpp
^
|
@@ -40,9 +40,9 @@
****************************************************************************/
#include <android-version.h>
#if ANDROID_VERSION_MAJOR <= 4
-#include "hwcomposer_backend_v0.h"
+#include <hardware/hwcomposer_defs.h>
#ifdef HWC_DEVICE_API_VERSION_0_1
-
+#include "hwcomposer_backend_v0.h"
HwComposerBackend_v0::HwComposerBackend_v0(hw_module_t *hwc_module, hw_device_t *hw_device, void *libminisf)
: HwComposerBackend(hwc_module, libminisf)
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/hwcomposer_backend_v10.cpp
^
|
@@ -41,6 +41,7 @@
#include "hwcomposer_backend_v10.h"
+#include <inttypes.h>
#include <unistd.h>
#ifdef HWC_DEVICE_API_VERSION_1_0
@@ -91,14 +92,14 @@
fprintf(stderr, "dpy = %p\n", contents->dpy);
fprintf(stderr, "sur = %p\n", contents->sur);
fprintf(stderr, "flags = %x\n", contents->flags);
- fprintf(stderr, "numHwLayers = %d\n", contents->numHwLayers);
- for (int i=0; i<contents->numHwLayers; i++) {
+ fprintf(stderr, "numHwLayers = %zu\n", contents->numHwLayers);
+ for (unsigned int i=0; i<contents->numHwLayers; i++) {
hwc_layer_1_t *layer = &(contents->hwLayers[i]);
fprintf(stderr, "Layer %d (%p):\n"
- " type=%s, hints=%x, flags=%x, handle=%x, transform=%d, blending=%s\n"
+ " type=%s, hints=%x, flags=%x, handle=%" PRIxPTR ", transform=%d, blending=%s\n"
" sourceCrop={%d, %d, %d, %d}, displayFrame={%d, %d, %d, %d}\n"
- " visibleRegionScreen=<%d rect(s)>, acquireFenceFd=%d, releaseFenceFd=%d\n",
- i, layer, comp_type_str(layer->compositionType), layer->hints, layer->flags, layer->handle,
+ " visibleRegionScreen=<%zu rect(s)>, acquireFenceFd=%d, releaseFenceFd=%d\n",
+ i, layer, comp_type_str(layer->compositionType), layer->hints, layer->flags, (uintptr_t)layer->handle,
layer->transform, blending_type_str(layer->blending),
layer->sourceCrop.left, layer->sourceCrop.top, layer->sourceCrop.right, layer->sourceCrop.bottom,
layer->displayFrame.left, layer->displayFrame.top, layer->displayFrame.right, layer->displayFrame.bottom,
@@ -109,11 +110,11 @@
void
hwcv10_proc_invalidate(const struct hwc_procs* procs)
{
- fprintf(stderr, "%s: procs=%x\n", __func__, procs);
+ fprintf(stderr, "%s: procs=%" PRIxPTR "\n", __func__, (uintptr_t)procs);
}
void
-hwcv10_proc_vsync(const struct hwc_procs* procs, int disp, int64_t timestamp)
+hwcv10_proc_vsync(const struct hwc_procs* /*procs*/, int /*disp*/, int64_t /*timestamp*/)
{
//fprintf(stderr, "%s: procs=%x, disp=%d, timestamp=%.0f\n", __func__, procs, disp, (float)timestamp);
vsync_mutex.lock();
@@ -124,7 +125,7 @@
void
hwcv10_proc_hotplug(const struct hwc_procs* procs, int disp, int connected)
{
- fprintf(stderr, "%s: procs=%x, disp=%d, connected=%d\n", __func__, procs, disp, connected);
+ fprintf(stderr, "%s: procs=%" PRIxPTR ", disp=%d, connected=%d\n", __func__, (uintptr_t)procs, disp, connected);
}
static hwc_procs_t global_procs = {
@@ -218,7 +219,7 @@
}
void
-HwComposerBackend_v10::swap(EGLNativeDisplayType display, EGLSurface surface)
+HwComposerBackend_v10::swap(EGLNativeDisplayType /*display*/, EGLSurface /*surface*/)
{
HWC_PLUGIN_ASSERT_ZERO(!(hwc_list->retireFenceFd == -1));
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/hwcomposer_backend_v11.cpp
^
|
@@ -48,7 +48,7 @@
#include <QtCore/QCoreApplication>
#include <private/qwindow_p.h>
-#include <private/qsystrace_p.h>
+#include "qsystrace_selector.h"
#ifdef HWC_PLUGIN_HAVE_HWCOMPOSER1_API
@@ -502,8 +502,16 @@
QSet<QWindow *> pendingWindows = m_pendingUpdate;
m_pendingUpdate.clear();
foreach (QWindow *w, pendingWindows) {
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
+ QPlatformWindow *platformWindow = w->handle();
+ if (!platformWindow)
+ continue;
+
+ platformWindow->deliverUpdateRequest();
+#else
QWindowPrivate *wp = (QWindowPrivate *) QWindowPrivate::get(w);
wp->deliverUpdateRequest();
+#endif
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/hwcomposer_backend_v20.cpp
^
|
@@ -49,7 +49,7 @@
#include <QtCore/QCoreApplication>
#include <private/qwindow_p.h>
-#include <private/qsystrace_p.h>
+#include "qsystrace_selector.h"
#include <inttypes.h>
@@ -73,8 +73,8 @@
HwComposerBackend_v20 *backend;
};
-void hwc2_callback_vsync(HWC2EventListener* listener, int32_t sequenceId,
- hwc2_display_t display, int64_t timestamp)
+void hwc2_callback_vsync(HWC2EventListener* listener, int32_t /*sequenceId*/,
+ hwc2_display_t /*display*/, int64_t /*timestamp*/)
{
static int counter = 0;
++counter;
@@ -100,8 +100,8 @@
sequenceId, display, connected, primaryDisplay);
}
-void hwc2_callback_refresh(HWC2EventListener* listener, int32_t sequenceId,
- hwc2_display_t display)
+void hwc2_callback_refresh(HWC2EventListener* /*listener*/, int32_t /*sequenceId*/,
+ hwc2_display_t /*display*/)
{
}
@@ -246,7 +246,7 @@
{
hwc2_compat_display_set_vsync_enabled(hwc2_primary_display, HWC2_VSYNC_DISABLE);
- hwc2_compat_display_set_power_mode(hwc2_primary_display, HWC2_POWER_MODE_DOZE);
+ hwc2_compat_display_set_power_mode(hwc2_primary_display, HWC2_POWER_MODE_OFF);
// Close the hwcomposer handle
if (!qgetenv("QPA_HWC_WORKAROUNDS").split(',').contains("no-close-hwc"))
@@ -405,8 +405,16 @@
QSet<QWindow *> pendingWindows = m_pendingUpdate;
m_pendingUpdate.clear();
foreach (QWindow *w, pendingWindows) {
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
+ QPlatformWindow *platformWindow = w->handle();
+ if (!platformWindow)
+ continue;
+
+ platformWindow->deliverUpdateRequest();
+#else
QWindowPrivate *wp = (QWindowPrivate *) QWindowPrivate::get(w);
wp->deliverUpdateRequest();
+#endif
}
}
@@ -426,9 +434,9 @@
return true;
}
-void HwComposerBackend_v20::onHotplugReceived(int32_t sequenceId,
+void HwComposerBackend_v20::onHotplugReceived(int32_t /*sequenceId*/,
hwc2_display_t display, bool connected,
- bool primaryDisplay)
+ bool /*primaryDisplay*/)
{
hwc2_compat_device_on_hotplug(hwc2_device, display, connected);
}
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/hwcomposer_context.h
^
|
@@ -47,12 +47,19 @@
#ifndef HWCOMPOSER_CONTEXT_H
#define HWCOMPOSER_CONTEXT_H
+#include <QtGlobal>
+
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformscreen.h>
#include <QtGui/QSurfaceFormat>
#include <QtGui/QImage>
#include <EGL/egl.h>
+
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+#include <QtEglSupport/private/qeglplatformcontext_p.h>
+#else
#include <QtPlatformSupport/private/qeglplatformcontext_p.h>
+#endif
QT_BEGIN_NAMESPACE
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/qeglfscontext.cpp
^
|
@@ -42,7 +42,13 @@
#include "qeglfscontext.h"
#include "qeglfswindow.h"
#include "qeglfsintegration.h"
+
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+#include <QtEglSupport/private/qeglpbuffer_p.h>
+#else
#include <QtPlatformSupport/private/qeglpbuffer_p.h>
+#endif
+
#include <QtGui/QSurface>
#include <QtDebug>
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/qeglfscontext.h
^
|
@@ -42,8 +42,16 @@
#ifndef QEGLFSCONTEXT_H
#define QEGLFSCONTEXT_H
+#include <QtGlobal>
+
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+
+#include <QtEglSupport/private/qeglconvenience_p.h>
+#include <QtEglSupport/private/qeglplatformcontext_p.h>
+#else
#include <QtPlatformSupport/private/qeglconvenience_p.h>
#include <QtPlatformSupport/private/qeglplatformcontext_p.h>
+#endif
#include "hwcomposer_context.h"
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/qeglfsintegration.cpp
^
|
@@ -46,12 +46,21 @@
#include <QtGui/private/qguiapplication_p.h>
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+#include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h>
+#include <QtEventDispatcherSupport/private/qgenericunixeventdispatcher_p.h>
+#include <QtThemeSupport/private/qgenericunixthemes_p.h>
+#include <QtEglSupport/private/qeglconvenience_p.h>
+#include <QtEglSupport/private/qeglplatformcontext_p.h>
+#include <QtEglSupport/private/qeglpbuffer_p.h>
+#else
#include <QtPlatformSupport/private/qgenericunixfontdatabase_p.h>
#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
#include <QtPlatformSupport/private/qgenericunixthemes_p.h>
#include <QtPlatformSupport/private/qeglconvenience_p.h>
#include <QtPlatformSupport/private/qeglplatformcontext_p.h>
#include <QtPlatformSupport/private/qeglpbuffer_p.h>
+#endif
#include <qpa/qplatformwindow.h>
#include <qpa/qplatformservices.h>
@@ -107,14 +116,20 @@
}
mScreen = new QEglFSScreen(mHwc, mDisplay);
+#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
screenAdded(mScreen);
+#else
+ QWindowSystemInterface::handleScreenAdded(mScreen);
+#endif
mInputContext = QPlatformInputContextFactory::create();
}
QEglFSIntegration::~QEglFSIntegration()
{
-#if QT_VERSION >= 0x050500
+#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)
+ QWindowSystemInterface::handleScreenRemoved(mScreen);
+#elif QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
destroyScreen(mScreen);
#else
delete mScreen;
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/qeglfsscreen.cpp
^
|
@@ -44,11 +44,25 @@
#include <private/qmath_p.h>
+#ifdef WITH_SENSORS
+#include <QtSensors/QSensorManager>
+#include <QtSensors/QOrientationSensor>
+#include <QtSensors/QOrientationFilter>
+#include <QtSensors/QOrientationReading>
+#include <qpa/qwindowsysteminterface.h>
+
+#include <QTimer>
+#endif
+
QT_BEGIN_NAMESPACE
QEglFSScreen::QEglFSScreen(HwComposerContext *hwc, EGLDisplay dpy)
: m_hwc(hwc)
, m_dpy(dpy)
+#ifdef WITH_SENSORS
+ , m_screenOrientation(Qt::PrimaryOrientation)
+ , m_orientationSensor(new QOrientationSensor(this))
+#endif
{
#ifdef QEGL_EXTRA_DEBUG
qWarning("QEglScreen %p\n", this);
@@ -57,7 +71,22 @@
QEglFSScreen::~QEglFSScreen()
{
+#ifdef WITH_SENSORS
+ if (m_orientationSensor) {
+ m_orientationSensor->stop();
+ delete m_orientationSensor; m_orientationSensor = NULL;
+ }
+#endif
+}
+
+#ifdef WITH_SENSORS
+void QEglFSScreen::onStarted()
+{
+ if (!m_orientationSensor->isActive()) {
+ m_orientationSensor->start();
+ }
}
+#endif
QRect QEglFSScreen::geometry() const
{
@@ -99,4 +128,43 @@
return m_hwc->refreshRate();
}
+#ifdef WITH_SENSORS
+void QEglFSScreen::orientationReadingChanged()
+{
+ QSize screenSize = m_hwc->screenSize();
+ Qt::ScreenOrientation screenPrimaryOrientation = Qt::PortraitOrientation;
+ if (screenSize.width() > screenSize.height()) {
+ screenPrimaryOrientation = Qt::LandscapeOrientation;
+ }
+
+ QOrientationReading *orientationReading = m_orientationSensor->reading();
+ QOrientationReading::Orientation currentOrientation = orientationReading->orientation();
+
+ switch (currentOrientation) {
+ case QOrientationReading::TopUp: /* 0 */
+ m_screenOrientation = screenPrimaryOrientation;
+ break;
+ case QOrientationReading::LeftUp: /* 90 clockwise */
+ m_screenOrientation = screenPrimaryOrientation == Qt::PortraitOrientation ?
+ Qt::InvertedLandscapeOrientation : Qt::PortraitOrientation;
+ break;
+ case QOrientationReading::TopDown: /* 180 */
+ m_screenOrientation = screenPrimaryOrientation == Qt::PortraitOrientation ?
+ Qt::InvertedPortraitOrientation : Qt::InvertedLandscapeOrientation;
+ break;
+ case QOrientationReading::RightUp: /* 270 clockwise */
+ m_screenOrientation = screenPrimaryOrientation == Qt::PortraitOrientation ?
+ Qt::LandscapeOrientation : Qt::InvertedPortraitOrientation;
+ break;
+ }
+
+ QWindowSystemInterface::handleScreenOrientationChange(QPlatformScreen::screen(), m_screenOrientation);
+}
+
+Qt::ScreenOrientation QEglFSScreen::orientation() const
+{
+ return m_screenOrientation;
+}
+#endif
+
QT_END_NAMESPACE
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/qeglfsscreen.h
^
|
@@ -49,14 +49,23 @@
#include <EGL/egl.h>
+#ifdef WITH_SENSORS
+class QOrientationSensor;
+#endif
QT_BEGIN_NAMESPACE
class QEglFSPageFlipper;
class QPlatformOpenGLContext;
+#ifdef WITH_SENSORS
+class QEglFSScreen : public QObject, public QPlatformScreen //huh: FullScreenScreen ;) just to follow namespace
+{
+ Q_OBJECT
+#else
class QEglFSScreen : public QPlatformScreen //huh: FullScreenScreen ;) just to follow namespace
{
+#endif
public:
QEglFSScreen(HwComposerContext *hwc, EGLDisplay display);
~QEglFSScreen();
@@ -72,6 +81,10 @@
qreal refreshRate() const;
+#ifdef WITH_SENSORS
+ Qt::ScreenOrientation orientation() const;
+#endif
+
#if 0
QPlatformScreenPageFlipper *pageFlipper() const;
#endif
@@ -80,6 +93,14 @@
HwComposerContext *m_hwc;
QEglFSPageFlipper *m_pageFlipper;
EGLDisplay m_dpy;
+#ifdef WITH_SENSORS
+ Qt::ScreenOrientation m_screenOrientation;
+ QOrientationSensor *m_orientationSensor;
+
+private Q_SLOTS:
+ void orientationReadingChanged();
+ void onStarted();
+#endif
};
QT_END_NAMESPACE
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/qeglfswindow.cpp
^
|
@@ -42,7 +42,11 @@
#include "qeglfswindow.h"
#include <qpa/qwindowsysteminterface.h>
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+#include <QtEglSupport/private/qeglconvenience_p.h>
+#else
#include <QtPlatformSupport/private/qeglconvenience_p.h>
+#endif
#include <QtDebug>
|
[-]
[+]
|
Added |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.19.tar.bz2/hwcomposer/qsystrace_selector.h
^
|
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** This file is part of the hwcomposer plugin.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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
+** 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.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** 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$
+**
+****************************************************************************/
+
+#ifndef HWCOMPOSER_QSYSTRACE_SELECTOR_H
+#define HWCOMPOSER_QSYSTRACE_SELECTOR_H
+
+#ifdef WITH_SYSTRACE
+#include <private/qsystrace_p.h>
+#else
+// Add dummy stub methods for QSysTrace
+namespace QSystrace
+{
+ inline void begin(const char *module, const char *tracepoint, const char *message, ...) {}
+ inline void end(const char *module, const char *tracepoint, const char *message, ...) {}
+ inline void counter(const char *module, const char *tracepoint, const char *message, ...) {}
+};
+struct QSystraceEvent {
+ QSystraceEvent(const char *module, const char *tracepoint) {}
+};
+#endif
+
+
+#endif
|