hwc: Common Display HAL to support VDS & V4L2 WFD solutions
1. Define classes for VDS and V4L2 based WFD solutions.
2. Overload the functionalities for VDS and V4L2 WFD solutions.
3. Instantiate VDS object or V4L2 object during hwc init based on the
property persist.hwc.enable_vds set by the user.
4. VDS solution is not verified as it requires some dependent changes.
Change-Id: I74bf944d532da138c850d4ec0c20b4a881489efa
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 4a20d47..e64f89c 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -59,6 +59,7 @@
class HwcDebug;
class AssertiveDisplay;
class VPUClient;
+class HWCVirtualBase;
struct MDPInfo {
@@ -221,6 +222,8 @@
bool isAlphaPresent(hwc_layer_1_t const* layer);
int hwc_vsync_control(hwc_context_t* ctx, int dpy, int enable);
int getBlending(int blending);
+bool isGLESOnlyComp(hwc_context_t *ctx, const int& dpy);
+void reset_layer_prop(hwc_context_t* ctx, int dpy, int numAppLayers);
//Helper function to dump logs
void dumpsys_log(android::String8& buf, const char* fmt, ...);
@@ -465,6 +468,7 @@
qhwc::AssertiveDisplay *mAD;
qhwc::VPUClient *mVPUClient;
eAnimationState mAnimationState[HWC_NUM_DISPLAY_TYPES];
+ qhwc::HWCVirtualBase *mHWCVirtual;
// stores the primary device orientation
int deviceOrientation;
@@ -511,6 +515,16 @@
return ctx->listStats[dpy].isSecurePresent;
}
+static inline bool isSecondaryConfiguring(hwc_context_t* ctx) {
+ return (ctx->dpyAttr[HWC_DISPLAY_EXTERNAL].isConfiguring ||
+ ctx->dpyAttr[HWC_DISPLAY_VIRTUAL].isConfiguring);
+}
+
+static inline bool isSecondaryConnected(hwc_context_t* ctx) {
+ return (ctx->dpyAttr[HWC_DISPLAY_EXTERNAL].connected ||
+ ctx->dpyAttr[HWC_DISPLAY_VIRTUAL].connected);
+}
+
};
#endif //HWC_UTILS_H