diff options
author | Lajos Molnar <molnar@ti.com> | 2011-12-12 12:34:53 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-12-12 12:34:53 -0800 |
commit | 82006f652ae6bac6b6e09bb420cc7541b5b9fd30 (patch) | |
tree | e2e68737cee1232f2aea439c4e99ccdb87939a0c /hwc | |
parent | 1869673d816a388fa57408c6ca096b63cb531f12 (diff) | |
parent | 06961d08c03b01a0d167039f75b580f999fbc663 (diff) | |
download | hardware_ti_omap4-82006f652ae6bac6b6e09bb420cc7541b5b9fd30.zip hardware_ti_omap4-82006f652ae6bac6b6e09bb420cc7541b5b9fd30.tar.gz hardware_ti_omap4-82006f652ae6bac6b6e09bb420cc7541b5b9fd30.tar.bz2 |
am e10ef2cd: am b81fb68c: hwc: simplify layer hint setting
* commit 'e10ef2cd8f619915d9638b5b5178ceae23520290':
hwc: simplify layer hint setting
Diffstat (limited to 'hwc')
-rw-r--r-- | hwc/hwc.c | 36 |
1 files changed, 9 insertions, 27 deletions
@@ -1093,6 +1093,7 @@ static int omap4_hwc_prepare(struct hwc_composer_device *dev, hwc_layer_list_t* /* set up if DSS layers */ unsigned int mem_used = 0; + hwc_dev->ovls_blending = 0; for (i = 0; list && i < list->numHwLayers; i++) { hwc_layer_t *layer = &list->hwLayers[i]; IMG_native_handle_t *handle = (IMG_native_handle_t *)layer->handle; @@ -1110,6 +1111,14 @@ static int omap4_hwc_prepare(struct hwc_composer_device *dev, hwc_layer_list_t* /* render via DSS overlay */ mem_used += mem1d(handle); layer->compositionType = HWC_OVERLAY; + + /* clear FB above all opaque layers if rendering via SGX */ + if (hwc_dev->use_sgx && !is_BLENDED(layer)) + layer->hints |= HWC_HINT_CLEAR_FB; + /* see if any of the (non-backmost) overlays are doing blending */ + else if (is_BLENDED(layer) && i > 0) + hwc_dev->ovls_blending = 1; + hwc_dev->buffers[dsscomp->num_ovls] = layer->handle; omap4_hwc_setup_layer(hwc_dev, @@ -1156,33 +1165,6 @@ static int omap4_hwc_prepare(struct hwc_composer_device *dev, hwc_layer_list_t* } } - /* clear FB above all opaque layers if rendering via SGX */ - if (hwc_dev->use_sgx) { - for (i = 0; list && i < list->numHwLayers; i++) { - hwc_layer_t *layer = &list->hwLayers[i]; - IMG_native_handle_t *handle = (IMG_native_handle_t *)layer->handle; - if (layer->compositionType == HWC_FRAMEBUFFER) - continue; - if ((layer->flags & HWC_SKIP_LAYER) || !layer->handle) - continue; - if (!is_BLENDED(layer)) - layer->hints |= HWC_HINT_CLEAR_FB; - } - } - - /* see if any of the (non-backmost) overlays are doing blending */ - hwc_dev->ovls_blending = 0; - for (i = 1; list && i < list->numHwLayers; i++) { - hwc_layer_t *layer = &list->hwLayers[i]; - IMG_native_handle_t *handle = (IMG_native_handle_t *)layer->handle; - if (layer->compositionType == HWC_FRAMEBUFFER) - continue; - if ((layer->flags & HWC_SKIP_LAYER) || !layer->handle) - continue; - if (is_BLENDED(layer)) - hwc_dev->ovls_blending = 1; - } - /* if scaling GFX (e.g. only 1 scaled surface) use a VID pipe */ if (scaled_gfx) dsscomp->ovls[0].cfg.ix = dsscomp->num_ovls; |