[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -3,6 +3,6 @@
<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">58e4447c389e74abe3bfd6823c8db33e6bfe8ec6</param>
+ <param name="revision">39a996336574dfa892ea12103bd448fd945cdb5e</param>
</service>
</services>
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.1.0.3.tar.bz2/hwcomposer/hwcomposer_backend.cpp
^
|
@@ -40,7 +40,9 @@
****************************************************************************/
#include "hwcomposer_backend.h"
+#ifdef HWC_DEVICE_API_VERSION_0_1
#include "hwcomposer_backend_v0.h"
+#endif
#include "hwcomposer_backend_v10.h"
#include "hwcomposer_backend_v11.h"
@@ -64,7 +66,9 @@
// Some implementations insist on having the framebuffer module opened before loading
// the hardware composer one. Therefor we rely on using the fbdev HYBRIS_EGLPLATFORM
// here and use eglGetDisplay to initialize it.
- eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ if (qEnvironmentVariableIsEmpty("QT_QPA_NO_FRAMEBUFFER_FIRST")) {
+ eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ }
// Open hardware composer
HWC_PLUGIN_ASSERT_ZERO(hw_get_module(HWC_HARDWARE_MODULE_ID, (const hw_module_t **)(&hwc_module)));
@@ -95,13 +99,26 @@
fprintf(stderr, " * Module: %p\n", hwc_device->module);
fprintf(stderr, "== hwcomposer device ==\n");
+#ifdef HWC_DEVICE_API_VERSION_0_1
+ // Special-case for old hw adaptations that have the version encoded in
+ // legacy format, we have to check hwc_device->version directly, because
+ // the constants are actually encoded in the old format
+ if ((hwc_device->version == HWC_DEVICE_API_VERSION_0_1) ||
+ (hwc_device->version == HWC_DEVICE_API_VERSION_0_2) ||
+ (hwc_device->version == HWC_DEVICE_API_VERSION_0_3)) {
+ return new HwComposerBackend_v0(hwc_module, hwc_device);
+ }
+#endif
+
// Determine which backend we use based on the supported module API version
switch (version) {
+#ifdef HWC_DEVICE_API_VERSION_0_1
case HWC_DEVICE_API_VERSION_0_1:
case HWC_DEVICE_API_VERSION_0_2:
case HWC_DEVICE_API_VERSION_0_3:
return new HwComposerBackend_v0(hwc_module, hwc_device);
break;
+#endif
#ifdef HWC_DEVICE_API_VERSION_1_0
case HWC_DEVICE_API_VERSION_1_0:
return new HwComposerBackend_v10(hwc_module, hwc_device);
@@ -113,13 +130,18 @@
break;
#ifdef HWC_DEVICE_API_VERSION_1_2
case HWC_DEVICE_API_VERSION_1_2:
+ /* hwcomposer 1.2 and beyond have virtual displays however virtual displays are
+ only used in hwcomposer 1.2 */
+ return new HwComposerBackend_v11(hwc_module, hwc_device, HWC_NUM_DISPLAY_TYPES);
+ break;
+
#endif /* HWC_DEVICE_API_VERSION_1_2 */
#ifdef HWC_DEVICE_API_VERSION_1_3
case HWC_DEVICE_API_VERSION_1_3:
-#endif /* HWC_DEVICE_API_VERSION_1_3 */
- /* hwcomposer 1.2 and beyond have virtual displays */
- return new HwComposerBackend_v11(hwc_module, hwc_device, HWC_NUM_DISPLAY_TYPES + 1);
+ /* Do not use virtual displays */
+ return new HwComposerBackend_v11(hwc_module, hwc_device, HWC_NUM_DISPLAY_TYPES);
break;
+#endif /* HWC_DEVICE_API_VERSION_1_3 */
#endif /* HWC_PLUGIN_HAVE_HWCOMPOSER1_API */
default:
fprintf(stderr, "Unknown hwcomposer API: 0x%x/0x%x/0x%x\n",
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.1.0.3.tar.bz2/hwcomposer/hwcomposer_backend_v0.cpp
^
|
@@ -38,8 +38,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
#include "hwcomposer_backend_v0.h"
+#ifdef HWC_DEVICE_API_VERSION_0_1
HwComposerBackend_v0::HwComposerBackend_v0(hw_module_t *hwc_module, hw_device_t *hw_device)
@@ -118,3 +118,4 @@
qDebug("VSync: %dns, %ffps", vsyncVal, fps);
return fps;
}
+#endif
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.1.0.3.tar.bz2/hwcomposer/hwcomposer_backend_v11.cpp
^
|
@@ -39,6 +39,8 @@
**
****************************************************************************/
+#include <android-version.h>
+
#include "hwcomposer_backend_v11.h"
#ifdef HWC_PLUGIN_HAVE_HWCOMPOSER1_API
@@ -143,7 +145,6 @@
HWC_PLUGIN_EXPECT_NULL(hwc_list);
HWC_PLUGIN_EXPECT_NULL(hwc_mList);
-
size_t neededsize = sizeof(hwc_display_contents_1_t) + 2 * sizeof(hwc_layer_1_t);
hwc_list = (hwc_display_contents_1_t *) malloc(neededsize);
hwc_mList = (hwc_display_contents_1_t **) malloc(num_displays * sizeof(hwc_display_contents_1_t *));
@@ -164,11 +165,20 @@
layer->transform = 0;
layer->blending = HWC_BLENDING_NONE;
layer->sourceCrop = r;
+#ifdef HWC_DEVICE_API_VERSION_1_3
+ layer->sourceCropf.top = 0.0f;
+ layer->sourceCropf.left = 0.0f;
+ layer->sourceCropf.bottom = (float) height;
+ layer->sourceCropf.right = (float) width;
+#endif
layer->displayFrame = r;
layer->visibleRegionScreen.numRects = 1;
layer->visibleRegionScreen.rects = &layer->displayFrame;
layer->acquireFenceFd = -1;
layer->releaseFenceFd = -1;
+#if (ANDROID_VERSION_MAJOR >= 4) && (ANDROID_VERSION_MINOR >= 3)
+ layer->planeAlpha = 0xff;
+#endif
layer = &hwc_list->hwLayers[1];
memset(layer, 0, sizeof(hwc_layer_1_t));
@@ -179,11 +189,20 @@
layer->transform = 0;
layer->blending = HWC_BLENDING_NONE;
layer->sourceCrop = r;
+#ifdef HWC_DEVICE_API_VERSION_1_3
+ layer->sourceCropf.top = 0.0f;
+ layer->sourceCropf.left = 0.0f;
+ layer->sourceCropf.bottom = (float) height;
+ layer->sourceCropf.right = (float) width;
+#endif
layer->displayFrame = r;
layer->visibleRegionScreen.numRects = 1;
layer->visibleRegionScreen.rects = &layer->displayFrame;
layer->acquireFenceFd = -1;
layer->releaseFenceFd = -1;
+#if (ANDROID_VERSION_MAJOR >= 4) && (ANDROID_VERSION_MINOR >= 3)
+ layer->planeAlpha = 0xff;
+#endif
hwc_list->retireFenceFd = -1;
hwc_list->flags = HWC_GEOMETRY_CHANGED;
@@ -208,7 +227,7 @@
// TODO: Wait for vsync?
HWC_PLUGIN_ASSERT_NOT_NULL(hwc_win);
-
+
eglSwapBuffers(display, surface);
}
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.1.0.3.tar.bz2/hwcomposer/qeglfsintegration.cpp
^
|
@@ -48,11 +48,13 @@
#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>
#include <qpa/qplatformwindow.h>
+#include <qpa/qplatformservices.h>
#include <QtGui/QSurfaceFormat>
#include <QtGui/QOpenGLContext>
#include <QtGui/QScreen>
@@ -67,6 +69,15 @@
QT_BEGIN_NAMESPACE
+class GenericEglFSTheme: public QGenericUnixTheme
+{
+public:
+ static QStringList themeNames()
+ {
+ return QStringList() << QLatin1String("generic_eglfs");
+ }
+};
+
QEglFSIntegration::QEglFSIntegration()
: mHwc(NULL)
, mEventDispatcher(createUnixEventDispatcher())
@@ -238,4 +249,17 @@
return chooser.chooseConfig();
}
+QStringList QEglFSIntegration::themeNames() const
+{
+ return GenericEglFSTheme::themeNames();
+}
+
+QPlatformTheme *QEglFSIntegration::createPlatformTheme(const QString &name) const
+{
+ if (name == QLatin1String("generic_qeglfs"))
+ return new GenericEglFSTheme;
+
+ return GenericEglFSTheme::createUnixTheme(name);
+}
+
QT_END_NAMESPACE
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.1.0.3.tar.bz2/hwcomposer/qeglfsintegration.h
^
|
@@ -88,6 +88,10 @@
QPlatformInputContext *inputContext() const { return mInputContext; }
+ QStringList themeNames() const;
+
+ QPlatformTheme *createPlatformTheme(const QString &name) const;
+
private:
HwComposerContext *mHwc;
EGLDisplay mDisplay;
|