hwc: Add API to find if a display is split
A display could be split if its dimensions exceed 2048 or in case
of primary if we make it so via device tree property.
Add an API to find if a display is split. Use this API instead of
going through a set of conditions in various use cases.
Rename the HighRes, LowRes objects to a more appropriate Split and
NonSplit respectively
Change-Id: Id847c2bf36ea9250e1cdbc0259fdec64bd124537
diff --git a/libhwcomposer/hwc_fbupdate.h b/libhwcomposer/hwc_fbupdate.h
index 3c76efe..0e3f29e 100644
--- a/libhwcomposer/hwc_fbupdate.h
+++ b/libhwcomposer/hwc_fbupdate.h
@@ -45,8 +45,7 @@
//Reset values
virtual void reset();
//Factory method that returns a low-res or high-res version
- static IFBUpdate *getObject(const int& width, const int& rightSplit,
- const int& dpy);
+ static IFBUpdate *getObject(hwc_context_t *ctx, const int& dpy);
protected:
const int mDpy; // display to update
@@ -54,11 +53,11 @@
overlay::Rotator *mRot;
};
-//Low resolution (<= 2048) panel handler.
-class FBUpdateLowRes : public IFBUpdate {
+//Non-Split panel handler.
+class FBUpdateNonSplit : public IFBUpdate {
public:
- explicit FBUpdateLowRes(const int& dpy);
- virtual ~FBUpdateLowRes() {};
+ explicit FBUpdateNonSplit(const int& dpy);
+ virtual ~FBUpdateNonSplit() {};
bool prepare(hwc_context_t *ctx, hwc_display_contents_1 *list,
int fbZorder);
bool draw(hwc_context_t *ctx, private_handle_t *hnd);
@@ -74,11 +73,11 @@
ovutils::eDest mDest; //pipe to draw on
};
-//High resolution (> 2048) panel handler.
-class FBUpdateHighRes : public IFBUpdate {
+//Split panel handler.
+class FBUpdateSplit : public IFBUpdate {
public:
- explicit FBUpdateHighRes(const int& dpy);
- virtual ~FBUpdateHighRes() {};
+ explicit FBUpdateSplit(const int& dpy);
+ virtual ~FBUpdateSplit() {};
bool prepare(hwc_context_t *ctx, hwc_display_contents_1 *list,
int fbZorder);
bool draw(hwc_context_t *ctx, private_handle_t *hnd);