Introduce HWC_DEVICE_API_VERSION_1_0
The new version adds an acquire and release fence to each layer,
providing explicit producer->hwc and hwc->producer synchronization.
Change-Id: Ibd6e3c7b3515c012c767246e6d6514274fdef01d
diff --git a/modules/hwcomposer/hwcomposer.cpp b/modules/hwcomposer/hwcomposer.cpp
index 0e04cac..0e49e4c 100644
--- a/modules/hwcomposer/hwcomposer.cpp
+++ b/modules/hwcomposer/hwcomposer.cpp
@@ -29,7 +29,7 @@
/*****************************************************************************/
struct hwc_context_t {
- hwc_composer_device_t device;
+ hwc_composer_device_1_t device;
/* our private state goes below here */
};
@@ -54,7 +54,7 @@
/*****************************************************************************/
-static void dump_layer(hwc_layer_t const* l) {
+static void dump_layer(hwc_layer_1_t const* l) {
ALOGD("\ttype=%d, flags=%08x, handle=%p, tr=%02x, blend=%04x, {%d,%d,%d,%d}, {%d,%d,%d,%d}",
l->compositionType, l->flags, l->handle, l->transform, l->blending,
l->sourceCrop.left,
@@ -67,7 +67,7 @@
l->displayFrame.bottom);
}
-static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list) {
+static int hwc_prepare(hwc_composer_device_1_t *dev, hwc_layer_list_1_t* list) {
if (list && (list->flags & HWC_GEOMETRY_CHANGED)) {
for (size_t i=0 ; i<list->numHwLayers ; i++) {
//dump_layer(&list->hwLayers[i]);
@@ -77,10 +77,10 @@
return 0;
}
-static int hwc_set(hwc_composer_device_t *dev,
+static int hwc_set(hwc_composer_device_1_t *dev,
hwc_display_t dpy,
hwc_surface_t sur,
- hwc_layer_list_t* list)
+ hwc_layer_list_1_t* list)
{
//for (size_t i=0 ; i<list->numHwLayers ; i++) {
// dump_layer(&list->hwLayers[i]);
@@ -117,7 +117,7 @@
/* initialize the procs */
dev->device.common.tag = HARDWARE_DEVICE_TAG;
- dev->device.common.version = 0;
+ dev->device.common.version = HWC_DEVICE_API_VERSION_1_0;
dev->device.common.module = const_cast<hw_module_t*>(module);
dev->device.common.close = hwc_device_close;