From d479ad22a0254fa0b5358fe82fa404e3e96c631a Mon Sep 17 00:00:00 2001 From: Jesse Hall Date: Tue, 5 Jun 2012 23:41:37 -0700 Subject: 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 --- modules/hwcomposer/hwcomposer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/hwcomposer') 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 @@ hwc_module_t HAL_MODULE_INFO_SYM = { /*****************************************************************************/ -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 @@ static void dump_layer(hwc_layer_t const* l) { 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 ; inumHwLayers ; i++) { //dump_layer(&list->hwLayers[i]); @@ -77,10 +77,10 @@ static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list) { 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 ; inumHwLayers ; i++) { // dump_layer(&list->hwLayers[i]); @@ -117,7 +117,7 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, /* 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(module); dev->device.common.close = hwc_device_close; -- cgit v1.1