overlay: Add support for pipe dumps.
Add support for pipe state dump useful in dumpsys.
Reduce debug log spam when mdp state changes.
Change-Id: Ie27ad00698085e2ffd6166ad2f7503fe16a571f8
diff --git a/liboverlay/overlayCtrlData.h b/liboverlay/overlayCtrlData.h
index 0c49bdd..c9a4949 100644
--- a/liboverlay/overlayCtrlData.h
+++ b/liboverlay/overlayCtrlData.h
@@ -81,9 +81,6 @@
/* retrieve cached crop data */
utils::Dim getCrop() const;
- /* dump the state of the object */
- void dump() const;
-
/* Perform transformation calculations */
void doTransform();
@@ -96,6 +93,12 @@
/* Update the src format */
void updateSrcformat(const uint32_t& inputsrcFormat);
+ /* dump the state of the object */
+ void dump() const;
+
+ /* Return the dump in the specified buffer */
+ void getDump(char *buf, size_t len);
+
private:
/* Retrieve screen info from underlying mdp */
bool getScreenInfo(utils::ScreenInfo& info);
@@ -134,6 +137,9 @@
/* sump the state of the obj */
void dump() const;
+ /* Return the dump in the specified buffer */
+ void getDump(char *buf, size_t len);
+
private:
// mdp data struct
MdpData mMdp;
@@ -213,6 +219,10 @@
return mMdp.getDownscalefactor();
}
+inline void Ctrl::getDump(char *buf, size_t len) {
+ mMdp.getDump(buf, len);
+}
+
inline Data::Data() {
mMdp.reset();
}
@@ -249,6 +259,9 @@
ALOGE("== Dump Data MDP end ==");
}
+inline void Data::getDump(char *buf, size_t len) {
+ mMdp.getDump(buf, len);
+}
} // overlay