hwc/qservice: Add support for toggling bwc over binder
Remove support for toggling BWC via property and add support to
toggle BWC over binder. This will take effect only on targets where
the driver enables BWC.
Example to disable BWC:
adb shell service call display.qservice 17 i32 0
Where 17 is the code to toggle BWC, 0 to disable.
Change-Id: Ie534ab4643a72d47f5a985fe0b32e134bf0e7af3
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 921c3e5..336bbbb 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -174,7 +174,9 @@
};
struct BwcPM {
- static void setBwc(const hwc_rect_t& crop, const hwc_rect_t& dst,
+ static void setBwc(const hwc_context_t *ctx, const int& dpy,
+ const private_handle_t *hnd,
+ const hwc_rect_t& crop, const hwc_rect_t& dst,
const int& transform, const int& downscale,
ovutils::eMdpFlags& mdpFlags);
};
@@ -627,6 +629,8 @@
// This denotes the tolerance between video layer and external display
// aspect ratio
float mAspectRatioToleranceLevel;
+ // Runtime switch for BWC for targets that support it
+ bool mBWCEnabled;
};
namespace qhwc {