[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,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"></param>
+ <param name="revision">5.6.2.22</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.22.tar.bz2/hwcomposer/hwcomposer_backend.cpp
^
|
@@ -103,6 +103,15 @@
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
+ if (!qEnvironmentVariableIsEmpty("QT_QPA_FORCE_HWC2")) {
+ // Create hwcomposer backend directly without opening hardware module
+ // because on some devices loading hwc2 module twice breaks graphics
+ // (The first load is in the composer android service.)
+ return new HwComposerBackend_v20(NULL, libminisf);
+ }
+#endif
+
// Open hardware composer
if (hw_get_module(HWC_HARDWARE_MODULE_ID, (const hw_module_t **)(&hwc_module)) == 0) {
fprintf(stderr, "== hwcomposer module ==\n");
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.6.2.22.tar.bz2/hwcomposer/hwcomposer_backend_v20.cpp
^
|
@@ -71,6 +71,7 @@
struct HwcProcs_v20 : public HWC2EventListener
{
HwComposerBackend_v20 *backend;
+ hwc2_display_t primaryDisplayId;
};
void hwc2_callback_vsync(HWC2EventListener* listener, int32_t /*sequenceId*/,
@@ -96,6 +97,10 @@
connected ? "connected" : "disconnected",
primaryDisplay ? "primary" : "external");
+ if (primaryDisplay) {
+ static_cast<HwcProcs_v20 *>(listener)->primaryDisplayId = display;
+ }
+
static_cast<const HwcProcs_v20 *>(listener)->backend->onHotplugReceived(
sequenceId, display, connected, primaryDisplay);
}
@@ -223,6 +228,11 @@
procs->on_hotplug_received = hwc2_callback_hotplug;
procs->on_refresh_received = hwc2_callback_refresh;
procs->backend = this;
+ // primaryDisplayId is not changed in this constructor
+ // but it may be changed by hwc2_callback_hotplug and thus the
+ // hwc2_compat_device_get_display_by_id loop will request the
+ // correct primary diplay once primaryDisplayId has been set.
+ procs->primaryDisplayId = 0;
hwc2_device = hwc2_compat_device_new(false);
HWC_PLUGIN_ASSERT_NOT_NULL(hwc2_device);
@@ -233,7 +243,7 @@
for (int i = 0; i < 5 * 1000; ++i) {
// Wait at most 5s for hotplug events
if ((hwc2_primary_display =
- hwc2_compat_device_get_display_by_id(hwc2_device, 0)))
+ hwc2_compat_device_get_display_by_id(hwc2_device, procs->primaryDisplayId)))
break;
usleep(1000);
}
|