display: Add support for MDP Composition
This change
1) implements MDP Composition upto 3 layers
2) adds invalidator support to fall back to FB
composition during idle screen condition.
Change-Id: I55f27321fd0df096b353d66aaad1cc720cd4b84b
Acked-by: Jeykumar Sankaran <jsanka@codeaurora.org>
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 1e405f7..a6c1446 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -50,6 +50,12 @@
HWC_USE_COPYBIT // This layer is to be handled by copybit
};
+enum {
+ HWC_MDPCOMP = 0x00000002,
+ HWC_LAYER_RESERVED_0 = 0x00000004,
+ HWC_LAYER_RESERVED_1 = 0x00000008
+};
+
class ExternalDisplay;
class CopybitEngine;
@@ -81,6 +87,13 @@
// Initialize uevent thread
void init_uevent_thread(hwc_context_t* ctx);
+inline void getLayerResolution(const hwc_layer_t* layer,
+ int& width, int& height)
+{
+ hwc_rect_t displayFrame = layer->displayFrame;
+ width = displayFrame.right - displayFrame.left;
+ height = displayFrame.bottom - displayFrame.top;
+}
}; //qhwc namespace
// -----------------------------------------------------------------------------