[-]
[+]
|
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">d2b4f01af718600e34764c68f415016ae4e89b6e</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"
@@ -97,6 +99,7 @@
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
@@ -105,14 +108,17 @@
(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);
@@ -133,7 +139,7 @@
#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);
+ 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 */
|
[-]
[+]
|
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);
}
|