[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -6,7 +6,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">c27a1e07e979f5e59b864f5faa625007106db5cf</param>
+ <param name="revision">74a0315d53afb8f34284a4545b9e14c9135b3e07</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.1.0.7.tar.bz2/hwcomposer/hwcomposer_backend.cpp
^
|
@@ -85,14 +85,7 @@
// Open hardware composer device
HWC_PLUGIN_ASSERT_ZERO(hwc_module->methods->open(hwc_module, HWC_HARDWARE_COMPOSER, &hwc_device));
- uint32_t version = hwc_device->version;
- if ((version & 0xffff0000) == 0) {
- // Assume header version is always 1
- uint32_t header_version = 1;
-
- // Legacy version encoding
- version = (version << 16) | header_version;
- }
+ uint32_t version = interpreted_version(hwc_device);
fprintf(stderr, "== hwcomposer device ==\n");
fprintf(stderr, " * Version: %x (interpreted as %x)\n", hwc_device->version, version);
@@ -126,22 +119,19 @@
#endif /* HWC_DEVICE_API_VERSION_1_0 */
#ifdef HWC_PLUGIN_HAVE_HWCOMPOSER1_API
case HWC_DEVICE_API_VERSION_1_1:
- return new HwComposerBackend_v11(hwc_module, hwc_device, HWC_NUM_DISPLAY_TYPES);
- 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 */
+#endif
#ifdef HWC_DEVICE_API_VERSION_1_3
case HWC_DEVICE_API_VERSION_1_3:
- /* Do not use virtual displays */
- return new HwComposerBackend_v11(hwc_module, hwc_device, HWC_NUM_PHYSICAL_DISPLAY_TYPES);
+#endif
+#ifdef HWC_DEVICE_API_VERSION_1_4
+ case HWC_DEVICE_API_VERSION_1_4:
+#endif
+ // HWC_NUM_DISPLAY_TYPES is the actual size of the array, otherwise
+ // underrun/overruns happen
+ 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.7.tar.bz2/hwcomposer/hwcomposer_backend.h
^
|
@@ -43,6 +43,7 @@
#define HWCOMPOSER_BACKEND_H
#include <sys/types.h>
+#include <sync/sync.h>
#include <android-config.h>
#include <hardware/hardware.h>
@@ -78,6 +79,19 @@
{ int res; if ((res = (x)) != 0) \
qFatal("QPA-HWC: %s in %s returned %i", (#x), __func__, res); }
+static uint32_t interpreted_version(hw_device_t *hwc_device)
+{
+ uint32_t version = hwc_device->version;
+
+ if ((version & 0xffff0000) == 0) {
+ // Assume header version is always 1
+ uint32_t header_version = 1;
+
+ // Legacy version encoding
+ version = (version << 16) | header_version;
+ }
+ return version;
+}
class HwComposerBackend {
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.1.0.7.tar.bz2/hwcomposer/hwcomposer_backend_v0.cpp
^
|
@@ -38,6 +38,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include <android-version.h>
+#if ANDROID_VERSION_MAJOR <= 4
#include "hwcomposer_backend_v0.h"
#ifdef HWC_DEVICE_API_VERSION_0_1
@@ -119,3 +121,4 @@
return fps;
}
#endif
+#endif
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.1.0.7.tar.bz2/hwcomposer/hwcomposer_backend_v11.cpp
^
|
@@ -108,6 +108,7 @@
, oldrelease2(-1)
, num_displays(num_displays)
{
+ hwc_version = interpreted_version(hw_device);
sleepDisplay(false);
}
@@ -151,8 +152,11 @@
const hwc_rect_t r = { 0, 0, width, height };
for (int i = 0; i < num_displays; i++) {
- hwc_mList[i] = hwc_list;
+ hwc_mList[i] = NULL;
}
+ // Assign buffer only to the first item, otherwise you get tearing
+ // if passed the same to multiple places
+ hwc_mList[0] = hwc_list;
hwc_layer_1_t *layer = NULL;
@@ -164,12 +168,13 @@
layer->handle = 0;
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;
+#else
+ layer->sourceCrop = r;
#endif
layer->displayFrame = r;
layer->visibleRegionScreen.numRects = 1;
@@ -188,12 +193,13 @@
layer->handle = 0;
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;
+#else
+ layer->sourceCrop = r;
#endif
layer->displayFrame = r;
layer->visibleRegionScreen.numRects = 1;
@@ -235,9 +241,19 @@
HwComposerBackend_v11::sleepDisplay(bool sleep)
{
if (sleep) {
- HWC_PLUGIN_EXPECT_ZERO(hwc_device->blank(hwc_device, 0, 1));
+#ifdef HWC_DEVICE_API_VERSION_1_4
+ if (hwc_version == HWC_DEVICE_API_VERSION_1_4) {
+ HWC_PLUGIN_EXPECT_ZERO(hwc_device->setPowerMode(hwc_device, 0, HWC_POWER_MODE_OFF));
+ } else
+#endif
+ HWC_PLUGIN_EXPECT_ZERO(hwc_device->blank(hwc_device, 0, 1));
} else {
- HWC_PLUGIN_EXPECT_ZERO(hwc_device->blank(hwc_device, 0, 0));
+#ifdef HWC_DEVICE_API_VERSION_1_4
+ if (hwc_version == HWC_DEVICE_API_VERSION_1_4) {
+ HWC_PLUGIN_EXPECT_ZERO(hwc_device->setPowerMode(hwc_device, 0, HWC_POWER_MODE_NORMAL));
+ } else
+#endif
+ HWC_PLUGIN_EXPECT_ZERO(hwc_device->blank(hwc_device, 0, 0));
if (hwc_list) {
hwc_list->flags |= HWC_GEOMETRY_CHANGED;
|
[-]
[+]
|
Changed |
_service:tar_git:qt5-qpa-hwcomposer-plugin-5.1.0.7.tar.bz2/hwcomposer/hwcomposer_backend_v11.h
^
|
@@ -66,6 +66,7 @@
HWComposerNativeWindow *hwc_win;
hwc_display_contents_1_t *hwc_list;
hwc_display_contents_1_t **hwc_mList;
+ uint32_t hwc_version;
int oldretire;
int oldrelease;
int oldrelease2;
|