summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Lofthouse <a0741364@ti.com>2012-07-05 17:27:26 -0500
committerJason Simmons <jsimmons@google.com>2012-10-22 15:30:10 -0700
commita718b61ddb61e613cef6f0053624b20d151da6ea (patch)
treeaf17c465f18989f53cb8947352b803e084fa4237
parentdfc644c88eeac97a2dd0feb5967e746fa64dd1c6 (diff)
downloadomap4-aah-a718b61ddb61e613cef6f0053624b20d151da6ea.tar.gz
hwc: use triple buffer hint for overlay layers for debug
This is a cheat to discriminate between blit layers and real overlay engine layers in dumpsys SurfaceFlinger. This patch is benign for an OVERLAY type layer the hints field should have bit 1 set when using dss overlays, and clear when it was blitted. Ported from p-ics-mr1: 1f4cf8b hwc: use triple buffer for overlay layers Change-Id: I7a9afed74c0b2e44bf08d3611775be28530378a1 Signed-off-by: Tony Lofthouse <a0741364@ti.com> (cherry picked from commit 407ca87c9557dfd381f7ce765f080503722e7fd7)
-rw-r--r--hwc/hwc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hwc/hwc.c b/hwc/hwc.c
index d40c673..664b55f 100644
--- a/hwc/hwc.c
+++ b/hwc/hwc.c
@@ -1540,6 +1540,7 @@ static int blit_layers(omap4_hwc_device_t *hwc_dev, hwc_layer_list_t *list, int
if (list->hwLayers[i].compositionType != HWC_OVERLAY) {
list->hwLayers[i].compositionType = HWC_OVERLAY;
//ALOGI("blitting layer %d", i);
+ list->hwLayers[i].hints &= ~HWC_HINT_TRIPLE_BUFFER;
}
list->hwLayers[i].hints &= ~HWC_HINT_CLEAR_FB;
}
@@ -1652,6 +1653,12 @@ static int omap4_hwc_prepare(struct hwc_composer_device_1 *dev, size_t numDispla
/* render via DSS overlay */
mem_used += mem1d(handle);
layer->compositionType = HWC_OVERLAY;
+ /*
+ * This hint will not be used in vanilla ICS, but maybe in
+ * JellyBean, it is useful to distinguish between blts and true
+ * overlays
+ */
+ layer->hints |= HWC_HINT_TRIPLE_BUFFER;
/* clear FB above all opaque layers if rendering via SGX */
if (hwc_dev->use_sgx && !is_BLENDED(layer))